diff options
Diffstat (limited to 'arch/riscv64/include')
| -rw-r--r-- | arch/riscv64/include/sbi.h | 13 | ||||
| -rw-r--r-- | arch/riscv64/include/vmem.h | 16 |
2 files changed, 16 insertions, 13 deletions
diff --git a/arch/riscv64/include/sbi.h b/arch/riscv64/include/sbi.h index b750475..3beedd2 100644 --- a/arch/riscv64/include/sbi.h +++ b/arch/riscv64/include/sbi.h @@ -26,24 +26,27 @@ struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0, unsigned long arg3, unsigned long arg4, unsigned long arg5); -#define EID_TIME 0x54494D45 +#define EID_TIME 0x54494D45 #define FID_SET_TIMER 0 static inline struct sbiret sbi_set_timer(uint64_t stime_value) { /* TODO: read timebase from fdt, seems to be clocks/sec for accurate * timers */ #if __riscv_xlen == 32 - return sbi_ecall(EID_TIME, FID_SET_TIMER, stime_value, stime_value >> 32, 0, 0, 0, 0); + return sbi_ecall(EID_TIME, FID_SET_TIMER, stime_value, + stime_value >> 32, 0, 0, 0, 0); #else return sbi_ecall(EID_TIME, FID_SET_TIMER, stime_value, 0, 0, 0, 0, 0); #endif } -#define EID_SRST 0x53525354 +#define EID_SRST 0x53525354 #define FID_RESET 0 -static inline struct sbiret sbi_system_reset(uint32_t reset_type, uint32_t reset_reason) +static inline struct sbiret sbi_system_reset(uint32_t reset_type, + uint32_t reset_reason) { - return sbi_ecall(EID_SRST, FID_RESET, reset_type, reset_reason, 0, 0, 0, 0); + return sbi_ecall(EID_SRST, FID_RESET, reset_type, reset_reason, 0, 0, 0, + 0); } #endif /* APOS_RISCV_SBI_H */ diff --git a/arch/riscv64/include/vmem.h b/arch/riscv64/include/vmem.h index 4446aef..9816110 100644 --- a/arch/riscv64/include/vmem.h +++ b/arch/riscv64/include/vmem.h @@ -6,14 +6,14 @@ #define RISCV_NUM_LEAVES (4096 / sizeof(void *)) -#define VM_V (1 << 0) -#define VM_R (1 << 1) -#define VM_W (1 << 2) -#define VM_X (1 << 3) -#define VM_U (1 << 4) -#define VM_G (1 << 5) -#define VM_A (1 << 6) -#define VM_D (1 << 7) +#define VM_V (1 << 0) +#define VM_R (1 << 1) +#define VM_W (1 << 2) +#define VM_X (1 << 3) +#define VM_U (1 << 4) +#define VM_G (1 << 5) +#define VM_A (1 << 6) +#define VM_D (1 << 7) enum mm_mode { Sv48, |
