mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-05 14:38:57 +08:00
1 parent
bd5603868a
commit
adede135e7
5 files changed
+263
-3
No files matched your search
@@ -147,7 +147,11 @@ typedef enum {
|
||||
RISCV_FATAL_CLOCK_IRQ_INSTALL,
|
||||
RISCV_FATAL_NO_CLINT_REG_IN_DEVICE_TREE,
|
||||
RISCV_FATAL_INVALID_HART_REG_IN_DEVICE_TREE,
|
||||
RISCV_FATAL_INVALID_CLINT_IRQS_EXTENDED_IN_DEVICE_TREE
|
||||
RISCV_FATAL_INVALID_CLINT_IRQS_EXTENDED_IN_DEVICE_TREE,
|
||||
RISCV_FATAL_NO_PLIC_REG_IN_DEVICE_TREE,
|
||||
RISCV_FATAL_INVALID_PLIC_NDEV_IN_DEVICE_TREE,
|
||||
RISCV_FATAL_TOO_LARGE_PLIC_NDEV_IN_DEVICE_TREE,
|
||||
RISCV_FATAL_INVALID_INTERRUPT_AFFINITY
|
||||
} bsp_fatal_code;
|
||||
|
||||
RTEMS_NO_RETURN static inline void
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BSP_FEATURE_IRQ_EXTENSION
|
||||
|
||||
#define BSP_FDT_IS_SUPPORTED
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <bsp.h>
|
||||
#include <rtems/irq.h>
|
||||
#include <rtems/irq-extension.h>
|
||||
#include <rtems/score/processormask.h>
|
||||
|
||||
#define RISCV_INTERRUPT_VECTOR_SOFTWARE 0
|
||||
|
||||
@@ -49,10 +50,24 @@
|
||||
|
||||
#define RISCV_INTERRUPT_VECTOR_EXTERNAL(x) ((x) + 2)
|
||||
|
||||
#define RISCV_INTERRUPT_VECTOR_IS_EXTERNAL(x) ((x) >= 2)
|
||||
|
||||
#define RISCV_INTERRUPT_VECTOR_EXTERNAL_TO_INDEX(x) ((x) - 2)
|
||||
|
||||
#define BSP_INTERRUPT_VECTOR_MIN 0
|
||||
|
||||
#define BSP_INTERRUPT_VECTOR_MAX RISCV_INTERRUPT_VECTOR_EXTERNAL(RISCV_MAXIMUM_EXTERNAL_INTERRUPTS - 1)
|
||||
|
||||
void bsp_interrupt_set_affinity(
|
||||
rtems_vector_number vector,
|
||||
const Processor_mask *affinity
|
||||
);
|
||||
|
||||
void bsp_interrupt_get_affinity(
|
||||
rtems_vector_number vector,
|
||||
Processor_mask *affinity
|
||||
);
|
||||
|
||||
#endif /* ASM */
|
||||
|
||||
#endif /* LIBBSP_GENERIC_RISCV_IRQ_H */
|
||||
+240
-1
File diff suppressed because it is too large.
Load diff
@@ -40,7 +40,7 @@ void bsp_start_on_secondary_processor(Per_CPU_Control *cpu_self)
|
||||
cpu_index_self < rtems_configuration_get_maximum_processors()
|
||||
&& _SMP_Should_start_processor(cpu_index_self)
|
||||
) {
|
||||
set_csr(mie, MIP_MSIP);
|
||||
set_csr(mie, MIP_MSIP | MIP_MEIP);
|
||||
_SMP_Start_multitasking_on_secondary_processor(cpu_self);
|
||||
} else {
|
||||
_CPU_Thread_Idle_body(0);
|
||||
|
||||
Reference in new issue
Block a user