550W Document
550W, a high-end OS
csr.h 文件参考
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

宏定义

#define SR_SIE   0x00000002 /* Supervisor Interrupt Enable */
 
#define SR_SPIE   0x00000020 /* Previous Supervisor IE */
 
#define SR_SPP   0x00000100 /* Previously Supervisor */
 
#define SR_SUM   0x00040000 /* Supervisor User Memory Access */
 
#define SR_FS   0x00006000 /* Floating-point Status */
 
#define SR_FS_OFF   0x00000000
 
#define SR_FS_INITIAL   0x00002000
 
#define SR_FS_CLEAN   0x00004000
 
#define SR_FS_DIRTY   0x00006000
 
#define SR_XS   0x00018000 /* Extension Status */
 
#define SR_XS_OFF   0x00000000
 
#define SR_XS_INITIAL   0x00008000
 
#define SR_XS_CLEAN   0x00010000
 
#define SR_XS_DIRTY   0x00018000
 
#define SR_SD   0x8000000000000000 /* FS/XS dirty */
 
#define SATP_PPN   0x00000FFFFFFFFFFF
 
#define SATP_MODE_39   0x8000000000000000
 
#define SATP_MODE   SATP_MODE_39
 
#define SCAUSE_IRQ_FLAG   ((uint64_t)1 << 63)
 
#define IRQ_U_SOFT   0
 
#define IRQ_S_SOFT   1
 
#define IRQ_M_SOFT   3
 
#define IRQ_U_TIMER   4
 
#define IRQ_S_TIMER   5
 
#define IRQ_M_TIMER   7
 
#define IRQ_U_EXT   8
 
#define IRQ_S_EXT   9
 
#define IRQ_M_EXT   11
 
#define EXC_INST_MISALIGNED   0
 
#define EXC_INST_ACCESS   1
 
#define EXC_BREAKPOINT   3
 
#define EXC_LOAD_ACCESS   5
 
#define EXC_STORE_ACCESS   7
 
#define EXC_SYSCALL   8
 
#define EXC_INST_PAGE_FAULT   12
 
#define EXC_LOAD_PAGE_FAULT   13
 
#define EXC_STORE_PAGE_FAULT   15
 
#define SIE_SSIE   (0x1 << IRQ_S_SOFT)
 
#define SIE_STIE   (0x1 << IRQ_S_TIMER)
 
#define SIE_SEIE   (0x1 << IRQ_S_EXT)
 
#define SSTATUS_UIE   (1 << 0)
 
#define SSTATUS_SIE   (1 << 1)
 
#define SSTATUS_UPIE   (1 << 4)
 
#define SSTATUS_SPIE   (1 << 5)
 
#define SSTATUS_SPP   (1 << 8)
 
#define SSTATUS_FS   (3 << 13)
 
#define SSTATUS_XS   (3 << 15)
 
#define SSTATUS_SUM   (1 << 18)
 
#define SSTATUS_MXR   (1 << 19)
 
#define SSTATUS_UXL   (3 << 34)
 
#define SSTATUS_SD   (1 << 63)
 
#define CSR_CYCLE   0xc00
 
#define CSR_TIME   0xc01
 
#define CSR_INSTRET   0xc02
 
#define CSR_SSTATUS   0x100
 
#define CSR_SIE   0x104
 
#define CSR_STVEC   0x105
 
#define CSR_SCOUNTEREN   0x106
 
#define CSR_SSCRATCH   0x140
 
#define CSR_SEPC   0x141
 
#define CSR_SCAUSE   0x142
 
#define CSR_STVAL   0x143
 
#define CSR_SIP   0x144
 
#define CSR_SATP   0x180
 
#define CSR_CYCLEH   0xc80
 
#define CSR_TIMEH   0xc81
 
#define CSR_INSTRETH   0xc82
 
#define CSR_MHARTID   0xf14
 
#define BOOT_STACK_MASTER   0x80600000
 

宏定义说明

◆ BOOT_STACK_MASTER

#define BOOT_STACK_MASTER   0x80600000

◆ CSR_CYCLE

#define CSR_CYCLE   0xc00

◆ CSR_CYCLEH

#define CSR_CYCLEH   0xc80

◆ CSR_INSTRET

#define CSR_INSTRET   0xc02

◆ CSR_INSTRETH

#define CSR_INSTRETH   0xc82

◆ CSR_MHARTID

#define CSR_MHARTID   0xf14

◆ CSR_SATP

#define CSR_SATP   0x180

◆ CSR_SCAUSE

#define CSR_SCAUSE   0x142

◆ CSR_SCOUNTEREN

#define CSR_SCOUNTEREN   0x106

◆ CSR_SEPC

#define CSR_SEPC   0x141

◆ CSR_SIE

#define CSR_SIE   0x104

◆ CSR_SIP

#define CSR_SIP   0x144

◆ CSR_SSCRATCH

#define CSR_SSCRATCH   0x140

◆ CSR_SSTATUS

#define CSR_SSTATUS   0x100

◆ CSR_STVAL

#define CSR_STVAL   0x143

◆ CSR_STVEC

#define CSR_STVEC   0x105

◆ CSR_TIME

#define CSR_TIME   0xc01

◆ CSR_TIMEH

#define CSR_TIMEH   0xc81

◆ EXC_BREAKPOINT

#define EXC_BREAKPOINT   3

◆ EXC_INST_ACCESS

#define EXC_INST_ACCESS   1

◆ EXC_INST_MISALIGNED

#define EXC_INST_MISALIGNED   0

◆ EXC_INST_PAGE_FAULT

#define EXC_INST_PAGE_FAULT   12

◆ EXC_LOAD_ACCESS

#define EXC_LOAD_ACCESS   5

◆ EXC_LOAD_PAGE_FAULT

#define EXC_LOAD_PAGE_FAULT   13

◆ EXC_STORE_ACCESS

#define EXC_STORE_ACCESS   7

◆ EXC_STORE_PAGE_FAULT

#define EXC_STORE_PAGE_FAULT   15

◆ EXC_SYSCALL

#define EXC_SYSCALL   8

◆ IRQ_M_EXT

#define IRQ_M_EXT   11

◆ IRQ_M_SOFT

#define IRQ_M_SOFT   3

◆ IRQ_M_TIMER

#define IRQ_M_TIMER   7

◆ IRQ_S_EXT

#define IRQ_S_EXT   9

◆ IRQ_S_SOFT

#define IRQ_S_SOFT   1

◆ IRQ_S_TIMER

#define IRQ_S_TIMER   5

◆ IRQ_U_EXT

#define IRQ_U_EXT   8

◆ IRQ_U_SOFT

#define IRQ_U_SOFT   0

◆ IRQ_U_TIMER

#define IRQ_U_TIMER   4

◆ SATP_MODE

#define SATP_MODE   SATP_MODE_39

◆ SATP_MODE_39

#define SATP_MODE_39   0x8000000000000000

◆ SATP_PPN

#define SATP_PPN   0x00000FFFFFFFFFFF

◆ SCAUSE_IRQ_FLAG

#define SCAUSE_IRQ_FLAG   ((uint64_t)1 << 63)

◆ SIE_SEIE

#define SIE_SEIE   (0x1 << IRQ_S_EXT)

◆ SIE_SSIE

#define SIE_SSIE   (0x1 << IRQ_S_SOFT)

◆ SIE_STIE

#define SIE_STIE   (0x1 << IRQ_S_TIMER)

◆ SR_FS

#define SR_FS   0x00006000 /* Floating-point Status */

◆ SR_FS_CLEAN

#define SR_FS_CLEAN   0x00004000

◆ SR_FS_DIRTY

#define SR_FS_DIRTY   0x00006000

◆ SR_FS_INITIAL

#define SR_FS_INITIAL   0x00002000

◆ SR_FS_OFF

#define SR_FS_OFF   0x00000000

◆ SR_SD

#define SR_SD   0x8000000000000000 /* FS/XS dirty */

◆ SR_SIE

#define SR_SIE   0x00000002 /* Supervisor Interrupt Enable */

◆ SR_SPIE

#define SR_SPIE   0x00000020 /* Previous Supervisor IE */

◆ SR_SPP

#define SR_SPP   0x00000100 /* Previously Supervisor */

◆ SR_SUM

#define SR_SUM   0x00040000 /* Supervisor User Memory Access */

◆ SR_XS

#define SR_XS   0x00018000 /* Extension Status */

◆ SR_XS_CLEAN

#define SR_XS_CLEAN   0x00010000

◆ SR_XS_DIRTY

#define SR_XS_DIRTY   0x00018000

◆ SR_XS_INITIAL

#define SR_XS_INITIAL   0x00008000

◆ SR_XS_OFF

#define SR_XS_OFF   0x00000000

◆ SSTATUS_FS

#define SSTATUS_FS   (3 << 13)

◆ SSTATUS_MXR

#define SSTATUS_MXR   (1 << 19)

◆ SSTATUS_SD

#define SSTATUS_SD   (1 << 63)

◆ SSTATUS_SIE

#define SSTATUS_SIE   (1 << 1)

◆ SSTATUS_SPIE

#define SSTATUS_SPIE   (1 << 5)

◆ SSTATUS_SPP

#define SSTATUS_SPP   (1 << 8)

◆ SSTATUS_SUM

#define SSTATUS_SUM   (1 << 18)

◆ SSTATUS_UIE

#define SSTATUS_UIE   (1 << 0)

◆ SSTATUS_UPIE

#define SSTATUS_UPIE   (1 << 4)

◆ SSTATUS_UXL

#define SSTATUS_UXL   (3 << 34)

◆ SSTATUS_XS

#define SSTATUS_XS   (3 << 15)