aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64/kernel/power.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv64/kernel/power.c')
-rw-r--r--arch/riscv64/kernel/power.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/arch/riscv64/kernel/power.c b/arch/riscv64/kernel/power.c
index b3a48fd..73500bb 100644
--- a/arch/riscv64/kernel/power.c
+++ b/arch/riscv64/kernel/power.c
@@ -6,14 +6,26 @@
#include <apos/power.h>
#include "sbi.h"
-/* shutdown reason */
-#define SBI_NO_REASON 0
+/**
+ * Shutdown without any particular reason. Only reason kernel is likely to
+ * need.
+ */
+#define SBI_NO_REASON 0
+
+/** @name Shutdown types. */
+/** @{ */
-/* shutdown type */
-#define SBI_SHUTDOWN 0
+/** Regular shutdown. */
+#define SBI_SHUTDOWN 0
+
+/** Cold reboot. */
#define SBI_COLD_REBOOT 1
+
+/** Warm reboot. */
#define SBI_WARM_REBOOT 2
+/** @} */
+
stat_t poweroff(enum poweroff_type type)
{
/* TODO: this only shuts down the cpu itself, but may leave the SOC