Page MenuHomeFreeBSD

D24498.1794996447.diff
No OneTemporary

Authored By
Unknown
Size
478 B
Referenced Files
None
Subscribers
None

D24498.1794996447.diff

Index: head/sys/riscv/riscv/machdep.c
===================================================================
--- head/sys/riscv/riscv/machdep.c
+++ head/sys/riscv/riscv/machdep.c
@@ -473,9 +473,16 @@
cpu_halt(void)
{
+ /*
+ * Try to power down using the HSM SBI extension and fall back to a
+ * simple wfi loop.
+ */
intr_disable();
+ if (sbi_probe_extension(SBI_EXT_ID_HSM) != 0)
+ sbi_hsm_hart_stop();
for (;;)
__asm __volatile("wfi");
+ /* NOTREACHED */
}
/*

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 18, 10:07 AM (22 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41821312
Default Alt Text
D24498.1794996447.diff (478 B)

Event Timeline