Changeset View
Changeset View
Standalone View
Standalone View
sys/riscv/include/sbi.h
Context not available. | |||||
#define SBI_HSM_STATUS_START_PENDING 2 | #define SBI_HSM_STATUS_START_PENDING 2 | ||||
#define SBI_HSM_STATUS_STOP_PENDING 3 | #define SBI_HSM_STATUS_STOP_PENDING 3 | ||||
/* System Reset (SRST) Extension */ | |||||
#define SBI_EXT_ID_SRST 0x53525354 | |||||
#define SBI_SRST_SYSTEM_RESET 0 | |||||
#define SBI_SRST_TYPE_SHUTDOWN 0x00000000 | |||||
#define SBI_SRST_TYPE_COLD_REBOOT 0x00000001 | |||||
#define SBI_SRST_TYPE_WARM_REBOOT 0x00000002 | |||||
#define SBI_SRST_REASON_NONE 0x00000000 | |||||
#define SBI_SRST_REASON_SYSTEM_FAILURE 0x00000001 | |||||
mhorne: I don't think there's a need to spell these constants in hex. | |||||
/* Legacy Extensions */ | /* Legacy Extensions */ | ||||
#define SBI_SET_TIMER 0 | #define SBI_SET_TIMER 0 | ||||
#define SBI_CONSOLE_PUTCHAR 1 | #define SBI_CONSOLE_PUTCHAR 1 | ||||
Context not available. | |||||
*/ | */ | ||||
int sbi_hsm_hart_status(u_long hart); | int sbi_hsm_hart_status(u_long hart); | ||||
Done Inline ActionsCould use a comment here like other SBI extensions have. mhorne: Could use a comment here like other SBI extensions have. | |||||
void sbi_system_reset(u_long reset_type, u_long reset_reason); | |||||
/* Legacy extension functions. */ | /* Legacy extension functions. */ | ||||
static __inline void | static __inline void | ||||
sbi_console_putchar(int ch) | sbi_console_putchar(int ch) | ||||
Context not available. | |||||
return (SBI_CALL0(SBI_CONSOLE_GETCHAR, 0).error); | return (SBI_CALL0(SBI_CONSOLE_GETCHAR, 0).error); | ||||
} | } | ||||
static __inline void | |||||
sbi_shutdown(void) | |||||
{ | |||||
(void)SBI_CALL0(SBI_SHUTDOWN, 0); | |||||
} | |||||
void sbi_print_version(void); | void sbi_print_version(void); | ||||
void sbi_init(void); | void sbi_init(void); | ||||
Context not available. |
I don't think there's a need to spell these constants in hex.