diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2024-02-06 16:55:29 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-02-23 15:13:37 +0000 |
commit | 0d19289e840f9c711f50a74437d1b3856222db03 (patch) | |
tree | ca4e8ce2d51dfa9d10deceb28393a28c061a0952 /src/arch/x86/mpspec.c | |
parent | a138cfb422109018ba35c8f5d82621717eaf0611 (diff) |
arch/x86/ioapic: use uintptr_t for IOAPIC base address
Use uintptr_t for the IOAPIC base parameter of the various IOAPIC-
related functions to avoid needing type casts in the callers. This also
allows dropping the VIO_APIC_VADDR define and consistently use the
IO_APIC_ADDR define instead.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I912943e923ff092708e90138caa5e1daf269a69f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80358
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Diffstat (limited to 'src/arch/x86/mpspec.c')
-rw-r--r-- | src/arch/x86/mpspec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/x86/mpspec.c b/src/arch/x86/mpspec.c index ac3fc79ba9..f5242d3d6e 100644 --- a/src/arch/x86/mpspec.c +++ b/src/arch/x86/mpspec.c @@ -11,8 +11,8 @@ #include <device/pci_def.h> #include <device/pci_ids.h> #include <identity.h> -#include <stdint.h> #include <string.h> +#include <types.h> /* Initialize the specified "mc" struct with initial values. */ void mptable_init(struct mp_config_table *mc) @@ -207,7 +207,7 @@ static void smp_write_bus(struct mp_config_table *mc, * APIC Flags:EN, Address */ static void smp_write_ioapic(struct mp_config_table *mc, - u8 id, u8 ver, void *apicaddr) + u8 id, u8 ver, uintptr_t apicaddr) { struct mpc_config_ioapic *mpc; mpc = smp_next_mpc_entry(mc); @@ -216,11 +216,11 @@ static void smp_write_ioapic(struct mp_config_table *mc, mpc->mpc_apicid = id; mpc->mpc_apicver = ver; mpc->mpc_flags = MPC_APIC_USABLE; - mpc->mpc_apicaddr = apicaddr; + mpc->mpc_apicaddr = (void *)apicaddr; smp_add_mpc_entry(mc, sizeof(*mpc)); } -u8 smp_write_ioapic_from_hw(struct mp_config_table *mc, void *apicaddr) +u8 smp_write_ioapic_from_hw(struct mp_config_table *mc, uintptr_t apicaddr) { u8 id = get_ioapic_id(apicaddr); u8 ver = get_ioapic_version(apicaddr); |