Skip to main content

10 System Reset Extension (EID #0x53525354 "SRST")

The System Reset Extension provides a function that allow the supervisor software to request system-level reboot or shutdown. The term "system" refers to the world-view of supervisor software and the underlying SBI implementation could be provided by machine mode firmware or a hypervisor.

10.1 Function: System reset (FID #0)

struct sbiret sbi_system_reset(uint32_t reset_type, uint32_t reset_reason)

Reset the system based on provided reset_type and reset_reason. This is a synchronous call and does not return if it succeeds.

The reset_type parameter is 32 bits wide and it’s possible values are shown in the Table 26 below.

Table 26. SRST System Reset Types

ValueDescription
0x00000000Shutdown
0x00000001Cold reboot
0x00000002Warm reboot
0x00000003 - 0xEFFFFFFFReserved for future use
0xF0000000 - 0xFFFFFFFFVendor or platform specific reset type

The reset_reason is an optional parameter representing the reason for system reset. This parameter is 32 bits wide with possible values shown in the Table 27 below

Table 27. SRST System Reset Reasons

ValueDescription
0x00000000No reason
0x00000001System failure
0x00000002 - 0xDFFFFFFFReserved for future use
0xE0000000 - 0xEFFFFFFFSBI implementation specific reset reason
0xF0000000 - 0xFFFFFFFFVendor or platform specific reset reason

When supervisor software is running natively, the SBI implementation is provided by machine mode firmware. In this case, shutdown is equivalent to a physical power down of the entire system and cold reboot is equivalent to a physical power cycle of the entire system. Further, warm reboot is equivalent to a power cycle of the main processor and parts of the system, but not the entire system. For example, on a server class system with a BMC (board management controller), a warm reboot will not power cycle the BMC whereas a cold reboot will definitely power cycle the BMC.

When supervisor software is running inside a virtual machine, the SBI implementation is provided by a hypervisor. Shutdown, cold reboot and warm reboot will behave functionally the same as the native case, but might not result in any physical power changes.

The possible error codes returned in sbiret.error are shown in the Table 28 below.

Table 28. SRST System Reset Errors

Error codeDescription
SBI_ERR_INVALID_PARAMAt least one of reset_type or reset_reason is reserved or is platform-specific and unimplemented.
SBI_ERR_NOT_SUPPORTEDreset_type is not reserved and is implemented, but the platform does not support it due to one or more missing dependencies.
SBI_ERR_FAILEDThe reset request failed for unspecified or unknown other reasons.

10.2 Function Listing

Table 29. SRST Function List

Function NameSBI VersionFIDEID
sbi_system_reset0.300x53525354