![]() |
SyterKit 0.4.0.x
SyterKit is a bare-metal framework
|

Go to the source code of this file.
Macros | |
| #define | MSTATUS_UIE (1 << 0) |
| Machine Status Bit Definitions. | |
| #define | MSTATUS_SIE (1 << 1) |
| #define | MSTATUS_MIE (1 << 3) |
| #define | MSTATUS_UPIE (1 << 4) |
| #define | MSTATUS_SPIE (1 << 5) |
| #define | MSTATUS_MPIE (1 << 7) |
| #define | MSTATUS_SPP (1 << 8) |
| #define | MSTATUS_MPP (3 << 11) |
| #define | MSTATUS_FS (3 << 13) |
| #define | MSTATUS_XS (3 << 15) |
| #define | MSTATUS_MPRV (1 << 17) |
| #define | MSTATUS_SUM (1 << 18) |
| #define | MSTATUS_MXR (1 << 19) |
| #define | MSTATUS_TVM (1 << 20) |
| #define | MSTATUS_TW (1 << 21) |
| #define | MSTATUS32_SD (1 << 31) |
| #define | MSTATUS_UXL (3ULL << 32) |
| #define | MSTATUS_SXL (3ULL << 34) |
| #define | MSTATUS64_SD (1ULL << 63) |
| #define | MXSTATUS_MM (1 << 15) |
| Machine Extra Status Bit Definitions. | |
| #define | MXSTATUS_THEADISAEE (1 << 22) |
| #define | MHCR_IE (1 << 0) |
| Machine Hardware Config Bit Definitions. | |
| #define | MHCR_DE (1 << 1) |
| #define | MHCR_WB (1 << 2) |
| #define | MHCR_WA (1 << 3) |
| #define | MHCR_RS (1 << 4) |
| #define | MHCR_BPE (1 << 5) |
| #define | MHCR_BTE (1 << 12) |
| #define | MHINT_D_PLD (1 << 2) |
| Machine HINT Bit Definitions. | |
| #define | MHINT_AMR_0 (0b00 << 3) |
| #define | MHINT_AMR_1 (0b01 << 3) |
| #define | MHINT_AMR_2 (0b10 << 3) |
| #define | MHINT_AMR_3 (0b11 << 3) |
| #define | MHINT_IWPE (1 << 10) |
| #define | MHINT_PREF_N_2 (0b00 << 13) |
| #define | MHINT_PREF_N_4 (0b01 << 13) |
| #define | MHINT_PREF_N_8 (0b10 << 13) |
| #define | MHINT_PREF_N_16 (0b11 << 13) |
| #define | MHINT_AEE (1 << 20) |
| #define | MHINT_PCFIFO_FREEZE (1 << 24) |
| #define | MIP_USIP (1 << 0) |
| Machine Interrupt Pending (mip) Bit Definitions. | |
| #define | MIP_SSIP (1 << 1) |
| Supervisor Software Interrupt Pending. | |
| #define | MIP_MSIP (1 << 3) |
| Machine Software Interrupt Pending. | |
| #define | MIP_UTIP (1 << 4) |
| User Timer Interrupt Pending. | |
| #define | MIP_STIP (1 << 5) |
| Supervisor Timer Interrupt Pending. | |
| #define | MIP_MTIP (1 << 7) |
| Machine Timer Interrupt Pending. | |
| #define | MIP_UEIP (1 << 8) |
| User External Interrupt Pending. | |
| #define | MIP_SEIP (1 << 9) |
| Supervisor External Interrupt Pending. | |
| #define | MIP_MEIP (1 << 11) |
| Machine External Interrupt Pending. | |
| #define | MIE_USIE (1 << 0) |
| Machine Interrupt Enable (mie) Bit Definitions. | |
| #define | MIE_SSIE (1 << 1) |
| Supervisor Software Interrupt Enable. | |
| #define | MIE_MSIE (1 << 3) |
| Machine Software Interrupt Enable. | |
| #define | MIE_UTIE (1 << 4) |
| User Timer Interrupt Enable. | |
| #define | MIE_STIE (1 << 5) |
| Supervisor Timer Interrupt Enable. | |
| #define | MIE_MTIE (1 << 7) |
| Machine Timer Interrupt Enable. | |
| #define | MIE_UEIE (1 << 8) |
| User External Interrupt Enable. | |
| #define | MIE_SEIE (1 << 9) |
| Supervisor External Interrupt Enable. | |
| #define | MIE_MEIE (1 << 11) |
| Machine External Interrupt Enable. | |
| #define | PRV_U (0) |
| #define | PRV_S (1) |
| #define | PRV_H (2) |
| #define | PRV_M (3) |
| #define | csr_swap(csr, val) |
| Swap the value of a CSR with a new value. | |
| #define | csr_read(csr) |
| Read the value of a CSR. | |
| #define | csr_write(csr, val) |
| Write a new value to a CSR. | |
| #define | csr_read_set(csr, val) |
| Read and set bits in a CSR. | |
| #define | csr_set(csr, val) |
| Set bits in a CSR. | |
| #define | csr_read_clear(csr, val) |
| Read a CSR and clear specified bits. | |
| #define | csr_clear(csr, val) |
| Clear specified bits in a CSR. | |
| #define csr_clear | ( | csr, | |
| val | |||
| ) |
Clear specified bits in a CSR.
This macro clears the specified bits in the given CSR.
| csr | The CSR to clear bits in. |
| val | The bits to clear in the CSR. |
| #define csr_read | ( | csr | ) |
Read the value of a CSR.
This macro reads the current value of the specified CSR.
| csr | The CSR to read. |
| #define csr_read_clear | ( | csr, | |
| val | |||
| ) |
Read a CSR and clear specified bits.
This macro reads the current value of the specified CSR and clears the specified bits.
| csr | The CSR to read and clear bits in. |
| val | The bits to clear in the CSR. |
| #define csr_read_set | ( | csr, | |
| val | |||
| ) |
Read and set bits in a CSR.
This macro reads the current value of the specified CSR and sets the specified bits.
| csr | The CSR to read and set bits in. |
| val | The bits to set in the CSR. |
| #define csr_set | ( | csr, | |
| val | |||
| ) |
Set bits in a CSR.
This macro sets the specified bits in the given CSR.
| csr | The CSR to set bits in. |
| val | The bits to set in the CSR. |
| #define csr_swap | ( | csr, | |
| val | |||
| ) |
Swap the value of a CSR with a new value.
This macro writes the new value to the specified CSR and returns the old value.
| csr | The CSR to swap with. |
| val | The new value to write to the CSR. |
| #define csr_write | ( | csr, | |
| val | |||
| ) |
Write a new value to a CSR.
This macro writes a new value to the specified CSR.
| csr | The CSR to write to. |
| val | The value to write to the CSR. |
| #define MHCR_BPE (1 << 5) |
| #define MHCR_BTE (1 << 12) |
| #define MHCR_DE (1 << 1) |
| #define MHCR_IE (1 << 0) |
Machine Hardware Config Bit Definitions.
| #define MHCR_RS (1 << 4) |
| #define MHCR_WA (1 << 3) |
| #define MHCR_WB (1 << 2) |
| #define MHINT_AEE (1 << 20) |
| #define MHINT_AMR_0 (0b00 << 3) |
| #define MHINT_AMR_1 (0b01 << 3) |
| #define MHINT_AMR_2 (0b10 << 3) |
| #define MHINT_AMR_3 (0b11 << 3) |
| #define MHINT_D_PLD (1 << 2) |
Machine HINT Bit Definitions.
| #define MHINT_IWPE (1 << 10) |
| #define MHINT_PCFIFO_FREEZE (1 << 24) |
| #define MHINT_PREF_N_16 (0b11 << 13) |
| #define MHINT_PREF_N_2 (0b00 << 13) |
| #define MHINT_PREF_N_4 (0b01 << 13) |
| #define MHINT_PREF_N_8 (0b10 << 13) |
| #define MIE_MEIE (1 << 11) |
Machine External Interrupt Enable.
| #define MIE_MSIE (1 << 3) |
Machine Software Interrupt Enable.
| #define MIE_MTIE (1 << 7) |
Machine Timer Interrupt Enable.
| #define MIE_SEIE (1 << 9) |
Supervisor External Interrupt Enable.
| #define MIE_SSIE (1 << 1) |
Supervisor Software Interrupt Enable.
| #define MIE_STIE (1 << 5) |
Supervisor Timer Interrupt Enable.
| #define MIE_UEIE (1 << 8) |
User External Interrupt Enable.
| #define MIE_USIE (1 << 0) |
Machine Interrupt Enable (mie) Bit Definitions.
User Software Interrupt Enable
| #define MIE_UTIE (1 << 4) |
User Timer Interrupt Enable.
| #define MIP_MEIP (1 << 11) |
Machine External Interrupt Pending.
| #define MIP_MSIP (1 << 3) |
Machine Software Interrupt Pending.
| #define MIP_MTIP (1 << 7) |
Machine Timer Interrupt Pending.
| #define MIP_SEIP (1 << 9) |
Supervisor External Interrupt Pending.
| #define MIP_SSIP (1 << 1) |
Supervisor Software Interrupt Pending.
| #define MIP_STIP (1 << 5) |
Supervisor Timer Interrupt Pending.
| #define MIP_UEIP (1 << 8) |
User External Interrupt Pending.
| #define MIP_USIP (1 << 0) |
Machine Interrupt Pending (mip) Bit Definitions.
User Software Interrupt Pending
| #define MIP_UTIP (1 << 4) |
User Timer Interrupt Pending.
| #define MSTATUS32_SD (1 << 31) |
| #define MSTATUS64_SD (1ULL << 63) |
| #define MSTATUS_FS (3 << 13) |
| #define MSTATUS_MIE (1 << 3) |
| #define MSTATUS_MPIE (1 << 7) |
| #define MSTATUS_MPP (3 << 11) |
| #define MSTATUS_MPRV (1 << 17) |
| #define MSTATUS_MXR (1 << 19) |
| #define MSTATUS_SIE (1 << 1) |
| #define MSTATUS_SPIE (1 << 5) |
| #define MSTATUS_SPP (1 << 8) |
| #define MSTATUS_SUM (1 << 18) |
| #define MSTATUS_SXL (3ULL << 34) |
| #define MSTATUS_TVM (1 << 20) |
| #define MSTATUS_TW (1 << 21) |
| #define MSTATUS_UIE (1 << 0) |
Machine Status Bit Definitions.
| #define MSTATUS_UPIE (1 << 4) |
| #define MSTATUS_UXL (3ULL << 32) |
| #define MSTATUS_XS (3 << 15) |
| #define MXSTATUS_MM (1 << 15) |
Machine Extra Status Bit Definitions.
| #define MXSTATUS_THEADISAEE (1 << 22) |
| #define PRV_H (2) |
| #define PRV_M (3) |
| #define PRV_S (1) |
| #define PRV_U (0) |