Kyösti Mälkki | 5a5c886 | 2014-01-26 14:41:54 +0200 | [diff] [blame] | 1 | #include <smp/node.h> |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 2 | #include <cpu/x86/msr.h> |
3 | |||||
Kyösti Mälkki | eafb18b | 2011-11-22 19:44:45 +0200 | [diff] [blame] | 4 | #if CONFIG_SMP |
Stefan Reinauer | 00093a8 | 2011-11-02 16:12:34 -0700 | [diff] [blame] | 5 | int boot_cpu(void) |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 6 | { |
7 | int bsp; | ||||
8 | msr_t msr; | ||||
9 | msr = rdmsr(0x1b); | ||||
10 | bsp = !!(msr.lo & (1 << 8)); | ||||
11 | return bsp; | ||||
12 | } | ||||
Kyösti Mälkki | eafb18b | 2011-11-22 19:44:45 +0200 | [diff] [blame] | 13 | #endif |