diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/aarch64/aarch64/machdep.c | 7 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sys/arch/aarch64/aarch64/machdep.c b/sys/arch/aarch64/aarch64/machdep.c index a29ad7e..7c21e62 100644 --- a/sys/arch/aarch64/aarch64/machdep.c +++ b/sys/arch/aarch64/aarch64/machdep.c @@ -42,6 +42,13 @@ cpu_startup(struct cpu_info *ci) } void +cpu_halt_others(void) +{ + /* TODO: STUB */ + return; +} + +void serial_init(void) { /* TODO: STUB */ diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 07d6cdd..4a885fa 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -174,6 +174,21 @@ cpu_halt_all(void) for (;;); } +/* + * Same as cpu_halt_all() but for all other + * cores but ourselves. + */ +void +cpu_halt_others(void) +{ + if (rdmsr(IA32_GS_BASE) == 0) { + __ASMV("cli; hlt"); + } + + /* Send IPI to all cores */ + lapic_send_ipi(0, IPI_SHORTHAND_OTHERS, halt_vector); +} + void serial_init(void) { |