Go to the source code of this file.
Macros | |
| #define | M_MODE 0 |
| #define | S_MODE 1 |
| #define | PLICSWI 1 |
| #define | intc_m_enable_irq(irq) intc_enable_irq(HPM_PLIC_TARGET_M_MODE, irq) |
| #define | intc_m_disable_irq(irq) intc_disable_irq(HPM_PLIC_TARGET_M_MODE, irq) |
| #define | intc_m_set_threshold(threshold) intc_set_threshold(HPM_PLIC_TARGET_M_MODE, threshold) |
| #define | intc_m_complete_irq(irq) intc_complete_irq(HPM_PLIC_TARGET_M_MODE, irq) |
| #define | intc_m_claim_irq() intc_claim_irq(HPM_PLIC_TARGET_M_MODE) |
| #define | intc_m_enable_irq_with_priority(irq, priority) |
| #define | SAVE_CSR(r) register long __##r = read_csr(r); |
| #define | RESTORE_CSR(r) write_csr(r, __##r); |
| #define | SAVE_MXSTATUS() |
| #define | RESTORE_MXSTATUS() |
| #define | SAVE_FCSR() |
| #define | RESTORE_FCSR() |
| #define | SAVE_UCODE() |
| #define | RESTORE_UCODE() |
| #define | CONTEXT_REG_NUM (4 * (16 + 4)) |
| #define | SAVE_FPU_CONTEXT() |
| #define | RESTORE_FPU_CONTEXT() |
| #define | SAVE_CALLER_CONTEXT() |
| Save the caller registers based on the RISC-V ABI specification. More... | |
| #define | RESTORE_CALLER_CONTEXT() |
| Restore the caller registers based on the RISC-V ABI specification. More... | |
| #define | SAVE_FPU_STATE() |
| #define | RESTORE_FPU_STATE() |
| #define | SAVE_DSP_CONTEXT() |
| #define | RESTORE_DSP_CONTEXT() |
| #define | ENTER_NESTED_IRQ_HANDLING_M() |
| #define | COMPLETE_IRQ_HANDLING_M(irq_num) |
| #define | EXIT_NESTED_IRQ_HANDLING_M() |
| #define | NESTED_IRQ_ENTER() |
| #define | NESTED_IRQ_EXIT() |
| #define | HPM_EXTERN_C |
| #define | ISR_NAME_M(irq_num) default_isr_##irq_num |
| #define | SDK_DECLARE_EXT_ISR_M(irq_num, isr) |
| Declare an external interrupt handler for machine mode. More... | |
| #define | SDK_DECLARE_MCHTMR_ISR(isr) |
| Declare machine timer interrupt handler. More... | |
| #define | SDK_DECLARE_SWI_ISR(isr) |
| Declare machine software interrupt handler. More... | |
Functions | |
| static ATTR_ALWAYS_INLINE void | enable_global_irq (uint32_t mask) |
| Enable global IRQ with mask. More... | |
| static ATTR_ALWAYS_INLINE uint32_t | disable_global_irq (uint32_t mask) |
| Disable global IRQ with mask and return mstatus. More... | |
| static ATTR_ALWAYS_INLINE void | restore_global_irq (uint32_t mask) |
| Restore global IRQ with mask. More... | |
| static ATTR_ALWAYS_INLINE void | enable_irq_from_intc (void) |
| Enable IRQ from interrupt controller. More... | |
| static ATTR_ALWAYS_INLINE void | disable_irq_from_intc (void) |
| Disable IRQ from interrupt controller. More... | |
| static ATTR_ALWAYS_INLINE void | enable_mchtmr_irq (void) |
| Enable machine timer IRQ. More... | |
| static ATTR_ALWAYS_INLINE void | disable_mchtmr_irq (void) |
| Disable machine timer IRQ. More... | |
| static ATTR_ALWAYS_INLINE void | intc_m_init_swi (void) |
| Initialize software interrupt. More... | |
| static ATTR_ALWAYS_INLINE void | intc_m_enable_swi (void) |
| Enable software interrupt. More... | |
| static ATTR_ALWAYS_INLINE void | intc_m_disable_swi (void) |
| Disable software interrupt. More... | |
| static ATTR_ALWAYS_INLINE void | intc_m_trigger_swi (void) |
| Trigger software interrupt. More... | |
| static ATTR_ALWAYS_INLINE void | intc_m_claim_swi (void) |
| Claim software interrupt. More... | |
| static ATTR_ALWAYS_INLINE void | intc_m_complete_swi (void) |
| Complete software interrupt. More... | |
| static ATTR_ALWAYS_INLINE void | intc_enable_irq (uint32_t target, uint32_t irq) |
| static ATTR_ALWAYS_INLINE void | intc_set_irq_priority (uint32_t irq, uint32_t priority) |
| Set interrupt priority. More... | |
| static ATTR_ALWAYS_INLINE void | intc_disable_irq (uint32_t target, uint32_t irq) |
| Disable specific interrupt. More... | |
| static ATTR_ALWAYS_INLINE void | intc_set_threshold (uint32_t target, uint32_t threshold) |
| Set interrupt threshold. More... | |
| static ATTR_ALWAYS_INLINE uint32_t | intc_claim_irq (uint32_t target) |
| Claim IRQ. More... | |
| static ATTR_ALWAYS_INLINE void | intc_complete_irq (uint32_t target, uint32_t irq) |
| Complete IRQ. More... | |
| void | default_irq_entry (void) |
| static ATTR_ALWAYS_INLINE void | install_isr (uint32_t irq, uint32_t isr) |
| Install ISR for certain IRQ for ram based vector table. More... | |
| static ATTR_ALWAYS_INLINE void | uninstall_isr (uint32_t irq) |
| Uninstall ISR for certain IRQ for ram based vector table. More... | |
|
inlinestatic |
Disable global IRQ with mask and return mstatus.
| [in] | mask | interrupt mask to be disabled |
| current | mstatus value before irq mask is disabled |
|
inlinestatic |
Disable IRQ from interrupt controller.
|
inlinestatic |
Disable machine timer IRQ.
|
inlinestatic |
Enable global IRQ with mask.
| [in] | mask | interrupt mask to be enabaled |
|
inlinestatic |
Enable IRQ from interrupt controller.
|
inlinestatic |
Enable machine timer IRQ.
|
inlinestatic |
Install ISR for certain IRQ for ram based vector table.
| [in] | irq | Target interrupt number |
| [in] | isr | Interrupt service routine |
|
inlinestatic |
Claim IRQ.
| [in] | target | Target to handle specific interrupt |
|
inlinestatic |
Complete IRQ.
| [in] | target | Target to handle specific interrupt |
| [in] | irq | Specific IRQ to be completed |
|
inlinestatic |
Disable specific interrupt.
| [in] | target | Target to handle specific interrupt |
| [in] | irq | Interrupt number |
|
inlinestatic |
|
inlinestatic |
Claim software interrupt.
|
inlinestatic |
Complete software interrupt.
|
inlinestatic |
Disable software interrupt.
|
inlinestatic |
Enable software interrupt.
|
inlinestatic |
Initialize software interrupt.
|
inlinestatic |
Trigger software interrupt.
|
inlinestatic |
Set interrupt priority.
| [in] | irq | Interrupt number |
| [in] | priority | Priority of interrupt |
|
inlinestatic |
Set interrupt threshold.
| [in] | target | Target to handle specific interrupt |
| [in] | threshold | Threshold of IRQ can be serviced |
|
inlinestatic |
Restore global IRQ with mask.
| [in] | mask | interrupt mask to be restored |
|
inlinestatic |
Uninstall ISR for certain IRQ for ram based vector table.
| [in] | irq | Target interrupt number |