|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
RISC-V Supervisor Binary Interface (SBI) definitions. More...
Go to the source code of this file.
Macros | |
| #define | SBI_EXT_TIME 0x54494D45 |
| SBI extension ID for the Timer extension (TIME). | |
| #define | SBI_FUNC_SET_TIMER 0 |
| SBI_EXT_TIME function ID: set the next timer deadline. | |
| #define | SBI_EXT_SRST 0x53525354 |
| SBI extension ID for the System Reset extension (SRST). | |
| #define | SBI_FUNC_SYSTEM_RESET 0 |
| SBI_EXT_SRST function ID: reset or power off the system. | |
| #define | SBI_SRST_RESET_TYPE_SHUTDOWN 0 |
| SBI_EXT_SRST reset type: clean shutdown (power off). | |
| #define | SBI_SRST_RESET_TYPE_COLD_REBOOT 1 |
| SBI_EXT_SRST reset type: cold reboot. | |
| #define | SBI_SRST_RESET_TYPE_WARM_REBOOT 2 |
| SBI_EXT_SRST reset type: warm reboot. | |
| #define | SBI_SRST_RESET_REASON_NONE 0 |
| SBI_EXT_SRST reset reason: no specific reason. | |
| #define | SBI_SUCCESS 0 |
| SBI return code: call completed successfully. | |
| #define | SBI_ERR_NOT_SUPPORTED -1 |
| SBI return code: requested extension/function is not available. | |
RISC-V Supervisor Binary Interface (SBI) definitions.
Defines SBI extension IDs, function IDs, and error codes used by S-mode code to request M-mode firmware services via the ecall instruction. The subset defined here covers only the extensions used by Zephyr's in-tree minimal SBI runtime (arch/riscv/core/sbi.S).
References: RISC-V SBI Specification v2.0 (https://github.com/riscv-non-isa/riscv-sbi-doc)
| #define SBI_ERR_NOT_SUPPORTED -1 |
SBI return code: requested extension/function is not available.
| #define SBI_EXT_SRST 0x53525354 |
SBI extension ID for the System Reset extension (SRST).
| #define SBI_EXT_TIME 0x54494D45 |
SBI extension ID for the Timer extension (TIME).
| #define SBI_FUNC_SET_TIMER 0 |
SBI_EXT_TIME function ID: set the next timer deadline.
| #define SBI_FUNC_SYSTEM_RESET 0 |
SBI_EXT_SRST function ID: reset or power off the system.
| #define SBI_SRST_RESET_REASON_NONE 0 |
SBI_EXT_SRST reset reason: no specific reason.
| #define SBI_SRST_RESET_TYPE_COLD_REBOOT 1 |
SBI_EXT_SRST reset type: cold reboot.
| #define SBI_SRST_RESET_TYPE_SHUTDOWN 0 |
SBI_EXT_SRST reset type: clean shutdown (power off).
| #define SBI_SRST_RESET_TYPE_WARM_REBOOT 2 |
SBI_EXT_SRST reset type: warm reboot.
| #define SBI_SUCCESS 0 |
SBI return code: call completed successfully.