summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-11-01 19:51:13 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-11-03 21:21:57 +0000
commit1bb9786da30e77014c806a40da0ffdf4c860c185 (patch)
treec3160d4d161bd13d4a25dd27c8cb616e8d17b148
parent506014f624c8c27165385642e4ad5a86b22a0089 (diff)
cpu/x86/mp_init.c: Set a bogus initial lapic_id
This makes it easier to catch errors later if the ap_init code fails to properly set things up. Change-Id: I938faf042bfa4fe1fc39e78ab740c9b210bc105c Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69108 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
-rw-r--r--src/cpu/x86/mp_init.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index e3b294fc79..8cd785e5ec 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -375,9 +375,11 @@ static int allocate_cpu_devices(struct bus *cpu_bus, struct mp_params *p)
/* Build the CPU device path */
cpu_path.type = DEVICE_PATH_APIC;
- /* Assuming linear APIC space allocation. AP will set its own
- APIC id in the ap_init() path above. */
- cpu_path.apic.apic_id = info->cpu->path.apic.apic_id + i;
+ /*
+ * Set a bogus apic_id.
+ * AP will set its own APIC id in the ap_init() path above.
+ */
+ cpu_path.apic.apic_id = UINT32_MAX;
/* Allocate the new CPU device structure */
new = alloc_find_dev(cpu_bus, &cpu_path);