![]() |
MOS Source Code
|
Go to the source code of this file.
Macros | |
| #define | read_csr(reg) |
| #define | write_csr(reg, val) |
| #define | make_satp(mode, asid, ppn) |
| #define | SATP_MODE_SV39 8 |
| #define | SATP_MODE_SV48 9 |
| #define | SATP_MODE_SV57 10 |
| #define | SSTATUS_SIE BIT(1) |
| #define | SSTATUS_SPIE BIT(5) |
| #define | SSTATUS_SPP BIT(8) |
| #define | SSTATUS_SUM BIT(18) |
| #define | SSTATUS_FS_OFF 0 |
| #define | SSTATUS_FS_INITIAL BIT(13) |
| #define | SSTATUS_FS_CLEAN BIT(14) |
| #define | SSTATUS_FS_DIRTY (BIT(13) | BIT(14)) |
| #define | SIE_SEIE BIT(9) |
| #define | SIE_STIE BIT(5) |
| #define | SIE_SSIE BIT(1) |
Functions | |
| MOS_STATIC_ASSERT (sizeof(platform_regs_t)==264, "please also change cpu/interrupt.S") | |
| void | riscv64_trap_exit (platform_regs_t *regs) |
Variables | |
| const char | __riscv64_trap_entry [] |
| const char | __riscv64_usermode_trap_entry [] |
| #define read_csr | ( | reg | ) |
Definition at line 12 of file cpu.hpp.
Referenced by do_save_fp_context(), platform_interrupt_disable(), platform_interrupt_enable(), platform_return_to_userspace(), platform_startup_early(), riscv64_start_user_thread(), and riscv64_trap_handler().
| #define write_csr | ( | reg, | |
| val ) |
Definition at line 13 of file cpu.hpp.
Referenced by do_restore_fp_context(), platform_interrupt_disable(), platform_interrupt_enable(), platform_return_to_userspace(), platform_startup_early(), platform_switch_mm(), riscv64_start_user_thread(), and riscv64_trap_handler().
| #define make_satp | ( | mode, | |
| asid, | |||
| ppn ) |
| #define SATP_MODE_SV48 9 |
Definition at line 18 of file cpu.hpp.
Referenced by platform_switch_mm().
| #define SSTATUS_SIE BIT(1) |
Definition at line 21 of file cpu.hpp.
Referenced by platform_interrupt_disable(), and platform_interrupt_enable().
| #define SSTATUS_SPIE BIT(5) |
Definition at line 22 of file cpu.hpp.
Referenced by platform_return_to_userspace(), riscv64_start_user_thread(), and riscv64_trap_handler().
| #define SSTATUS_SPP BIT(8) |
Definition at line 23 of file cpu.hpp.
Referenced by platform_return_to_userspace(), riscv64_start_user_thread(), and riscv64_trap_handler().
| #define SSTATUS_SUM BIT(18) |
Definition at line 24 of file cpu.hpp.
Referenced by platform_return_to_userspace(), platform_startup_early(), riscv64_start_user_thread(), and riscv64_trap_handler().
| #define SSTATUS_FS_INITIAL BIT(13) |
Definition at line 27 of file cpu.hpp.
Referenced by platform_startup_early().
| #define SIE_SEIE BIT(9) |
Definition at line 31 of file cpu.hpp.
Referenced by platform_startup_early().
| #define SIE_STIE BIT(5) |
Definition at line 32 of file cpu.hpp.
Referenced by platform_startup_early().
| #define SIE_SSIE BIT(1) |
Definition at line 33 of file cpu.hpp.
Referenced by platform_startup_early().
| MOS_STATIC_ASSERT | ( | sizeof(platform_regs_t) | = =264, |
| "please also change cpu/interrupt.S" | ) |
| void riscv64_trap_exit | ( | platform_regs_t * | regs | ) |
Referenced by platform_return_to_userspace(), and riscv64_start_user_thread().
|
extern |
Referenced by platform_startup_early(), riscv64_trap_exit(), and riscv64_trap_handler().
|
extern |
Referenced by platform_return_to_userspace(), riscv64_start_user_thread(), riscv64_trap_exit(), and riscv64_trap_handler().