aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/x86/lapic/boot_cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86/lapic/boot_cpu.c')
-rw-r--r--src/cpu/x86/lapic/boot_cpu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpu/x86/lapic/boot_cpu.c b/src/cpu/x86/lapic/boot_cpu.c
new file mode 100644
index 0000000000..d3a8f6e7a7
--- /dev/null
+++ b/src/cpu/x86/lapic/boot_cpu.c
@@ -0,0 +1,10 @@
+#include <cpu/x86/msr.h>
+
+int boot_cpu(void)
+{
+ int bsp;
+ msr_t msr;
+ msr = rdmsr(0x1b);
+ bsp = !!(msr.lo & (1 << 8));
+ return bsp;
+}