Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151137334
D24498.id71260.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
478 B
Referenced Files
None
Subscribers
None
D24498.id71260.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 8:28 AM (10 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30963750
Default Alt Text
D24498.id71260.diff (478 B)
Attached To
Mode
D24498: Use the HSM SBI extension to halt CPUs
Attached
Detach File
Event Timeline
Log In to Comment