Use the HSM SBI extension to halt CPUs
Differential Revision: https://reviews.freebsd.org/D24498
This commit is contained in:
@@ -473,9 +473,16 @@ void
|
|||||||
cpu_halt(void)
|
cpu_halt(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Try to power down using the HSM SBI extension and fall back to a
|
||||||
|
* simple wfi loop.
|
||||||
|
*/
|
||||||
intr_disable();
|
intr_disable();
|
||||||
|
if (sbi_probe_extension(SBI_EXT_ID_HSM) != 0)
|
||||||
|
sbi_hsm_hart_stop();
|
||||||
for (;;)
|
for (;;)
|
||||||
__asm __volatile("wfi");
|
__asm __volatile("wfi");
|
||||||
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user