aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/amd/agesa/eventlog.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-05-29 06:58:38 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-07-14 02:19:28 +0000
commit78ab06ace918f6efa1a36c896b85806c5f617393 (patch)
treec4a62378f5bf7f44329d723813d719b13750d7ad /src/drivers/amd/agesa/eventlog.c
parent53ea1d44f0435ca419de04e275e08b1bd296922c (diff)
src: Use initial_lapicid() instead of open coding it
Since initial_lapicid() returns an unsigned int, change the type of the local variables the return value gets assigned to to unsigned int as well if applicable. Also change the printk format strings for printing the variable's contents to %u where it was %d before. Change-Id: I289015b81b2a9d915c4cab9b0544fc19b85df7a3 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55063 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/amd/agesa/eventlog.c')
-rw-r--r--src/drivers/amd/agesa/eventlog.c3
1 files changed, 2 insertions, 1 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;