diff options
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/amd/agesa/eventlog.c | 3 | ||||
-rw-r--r-- | src/drivers/amd/agesa/romstage.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/drivers/amd/agesa/eventlog.c b/src/drivers/amd/agesa/eventlog.c index 49ab4ce1c8..126a2ee1e1 100644 --- a/src/drivers/amd/agesa/eventlog.c +++ b/src/drivers/amd/agesa/eventlog.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <cpu/x86/lapic.h> #include <console/console.h> #include <stdint.h> #include <string.h> @@ -97,7 +98,7 @@ void agesa_state_on_entry(struct agesa_state *task, AGESA_STRUCT_NAME func) { int i; - task->apic_id = (u8) (cpuid_ebx(1) >> 24); + task->apic_id = (u8)initial_lapicid(); task->func = func; task->function_name = undefined; diff --git a/src/drivers/amd/agesa/romstage.c b/src/drivers/amd/agesa/romstage.c index 29423ef1ba..b8f38ce4ee 100644 --- a/src/drivers/amd/agesa/romstage.c +++ b/src/drivers/amd/agesa/romstage.c @@ -6,6 +6,7 @@ #include <arch/romstage.h> #include <cbmem.h> #include <console/console.h> +#include <cpu/x86/lapic.h> #include <halt.h> #include <program_loading.h> #include <romstage_handoff.h> @@ -35,7 +36,7 @@ static void romstage_main(void) struct postcar_frame pcf; struct sysinfo romstage_state; struct sysinfo *cb = &romstage_state; - u8 initial_apic_id = (u8) (cpuid_ebx(1) >> 24); + unsigned int initial_apic_id = initial_lapicid(); int cbmem_initted = 0; fill_sysinfo(cb); @@ -49,7 +50,7 @@ static void romstage_main(void) console_init(); } - printk(BIOS_DEBUG, "APIC %02d: CPU Family_Model = %08x\n", + printk(BIOS_DEBUG, "APIC %02u: CPU Family_Model = %08x\n", initial_apic_id, cpuid_eax(1)); set_ap_entry_ptr(ap_romstage_main); |