nb/intel/sandybridge: Use SA devid to identify PC type
Instead of using MSR IA32_PLATFORM_ID read the SystemAgent device id
to figure out the PC type. This follows the BWG which suggest to not
use MSR IA32_PLATFORM_ID for system identification.
Tested: Lenovo X220 still boots.
Change-Id: Ibddf6c75d15ca7a99758c377ed956d483abe7ec1
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78826
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/src/northbridge/intel/sandybridge/early_init.c b/src/northbridge/intel/sandybridge/early_init.c
index e3525135..a5ebf9d 100644
--- a/src/northbridge/intel/sandybridge/early_init.c
+++ b/src/northbridge/intel/sandybridge/early_init.c
@@ -150,14 +150,13 @@
void systemagent_early_init(void)
{
+ const size_t is_mobile = get_platform_type() == PLATFORM_MOBILE;
u32 capid0_a;
u8 reg8;
/* Device ID Override Enable should be done very early */
capid0_a = pci_read_config32(HOST_BRIDGE, CAPID0_A);
if (capid0_a & (1 << 10)) {
- const size_t is_mobile = get_platform_type() == PLATFORM_MOBILE;
-
reg8 = pci_read_config8(HOST_BRIDGE, DIDOR);
reg8 &= ~7; /* Clear 2:0 */
@@ -167,6 +166,9 @@
pci_write_config8(HOST_BRIDGE, DIDOR, reg8);
}
+ /* Print platform type */
+ printk(BIOS_INFO, "Detected system type: %s\n", is_mobile ? "mobile" : "desktop");
+
/* Setup all BARs required for early PCIe and raminit */
sandybridge_setup_bars();