diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-25 02:44:11 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-25 02:44:45 -0400 |
commit | cf1bb5e566ad0e346af810b399d871a74031feb2 (patch) | |
tree | 7180f312516bb35327414366a24bc711b7b1740b /sys/include/arch/amd64/cdefs.h | |
parent | 4d68494efd7b03a0c91215dc28afcf314940e2ea (diff) |
kernel/amd64: Keep track of which cores are online
Give each core a bit that indicates whether the core is online or
halted. We also provide a cpu_halt() which marks the core as offline.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch/amd64/cdefs.h')
-rw-r--r-- | sys/include/arch/amd64/cdefs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/include/arch/amd64/cdefs.h b/sys/include/arch/amd64/cdefs.h index a49736b..d038a15 100644 --- a/sys/include/arch/amd64/cdefs.h +++ b/sys/include/arch/amd64/cdefs.h @@ -31,6 +31,7 @@ #define _AMD64_CDEFS_H_ #include <sys/cdefs.h> +#include <machine/cpu.h> /* * Please use CLI wisely, it is a good idea to use @@ -40,7 +41,7 @@ #define md_pause() __ASMV("rep; nop") /* (F3 90) PAUSE */ #define md_intoff() __ASMV("cli") /* Clear interrupts */ #define md_inton() __ASMV("sti") /* Enable interrupts */ -#define md_hlt() __ASMV("hlt") /* Halt the processor */ +#define md_hlt() cpu_halt() /* Halt the processor */ /* * AMD64 specific defines |