#ifndef __ASSEMBLY__
+#include <sbi/sbi_ecall_interface.h>
#include <sbi/sbi_error.h>
#include <sbi/sbi_scratch.h>
#include <sbi/sbi_version.h>
int (*hart_stop)(void);
/** Reset the platform */
-#define SBI_PLATFORM_RESET_SHUTDOWN 0
-#define SBI_PLATFORM_RESET_COLD 1
-#define SBI_PLATFORM_RESET_WARM 2
int (*system_reset)(u32 reset_type);
/** platform specific SBI extension implementation probe function */
#include <sbi/sbi_types.h>
-void __noreturn sbi_system_reset(u32 platform_reset_type);
+void __noreturn sbi_system_reset(u32 reset_type);
#endif
}
break;
case SBI_EXT_0_1_SHUTDOWN:
- sbi_system_reset(SBI_PLATFORM_RESET_SHUTDOWN);
+ sbi_system_reset(SBI_SRST_RESET_TYPE_SHUTDOWN);
break;
default:
ret = SBI_ENOTSUPP;
#include <sbi/sbi_ipi.h>
#include <sbi/sbi_init.h>
-void __noreturn sbi_system_reset(u32 platform_reset_type)
+void __noreturn sbi_system_reset(u32 reset_type)
{
ulong hbase = 0, hmask;
u32 cur_hartid = current_hartid();
/* Platform specific reset if domain allowed system reset */
if (dom->system_reset_allowed)
sbi_platform_system_reset(sbi_platform_ptr(scratch),
- platform_reset_type);
+ reset_type);
/* If platform specific reset did not work then do sbi_exit() */
sbi_exit(scratch);
* was successful so that QEMU exits
*/
switch (type) {
- case SBI_PLATFORM_RESET_SHUTDOWN:
+ case SBI_SRST_RESET_TYPE_SHUTDOWN:
writew(FINISHER_PASS, sifive_test_base);
break;
- case SBI_PLATFORM_RESET_COLD:
- case SBI_PLATFORM_RESET_WARM:
+ case SBI_SRST_RESET_TYPE_COLD_REBOOT:
+ case SBI_SRST_RESET_TYPE_WARM_REBOOT:
writew(FINISHER_RESET, sifive_test_base);
break;
}