summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2011-11-22 19:44:45 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2011-12-05 12:20:43 +0100
commiteafb18be437d00e2e0b2f2cf0bcd370913524f04 (patch)
tree4e48a2421a636329b9e2d1509450a464099cab49 /src/cpu
parent7519d77f72836d47349c563b398e59d3ea8d8b97 (diff)
downloadcoreboot-eafb18be437d00e2e0b2f2cf0bcd370913524f04.tar.xz
Bootblock does not need a unique boot_cpu()
Detection of a CPU being a BSP CPU is not dependent of the existence of northbridge and/or southbridge init code in the bootblock. Even if CONFIG_LOGICAL_CPUS==0, boot_cpu() can get executed on an AP CPU of a hyper-threading CPU and needs to return actual BSP bit from MSR. Change-Id: I9187f954bb357ba1dbd459cfe11cc96cb7567968 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/447 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/x86/lapic/boot_cpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cpu/x86/lapic/boot_cpu.c b/src/cpu/x86/lapic/boot_cpu.c
index bca73e137e..87418d0883 100644
--- a/src/cpu/x86/lapic/boot_cpu.c
+++ b/src/cpu/x86/lapic/boot_cpu.c
@@ -1,5 +1,6 @@
#include <cpu/x86/msr.h>
+#if CONFIG_SMP
static int boot_cpu(void)
{
int bsp;
@@ -8,3 +9,7 @@ static int boot_cpu(void)
bsp = !!(msr.lo & (1 << 8));
return bsp;
}
+#else
+#define boot_cpu(x) 1
+#endif
+