src: Replace common MSR addresses with macros

Change-Id: I9fba67be12483ea5e12ccd34c648735d409bc8b0
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/29252
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
This commit is contained in:
Elyes HAOUAS
2018-10-24 15:55:53 +02:00
committed by Patrick Georgi
parent f33e835a06
commit a9473ecbb1
8 changed files with 12 additions and 24 deletions

View File

@@ -13,13 +13,14 @@
#include <smp/node.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/lapic_def.h>
#if IS_ENABLED(CONFIG_SMP)
int boot_cpu(void)
{
int bsp;
msr_t msr;
msr = rdmsr(0x1b);
msr = rdmsr(LAPIC_BASE_MSR);
bsp = !!(msr.lo & (1 << 8));
return bsp;
}