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/include/arch/ioapic.h | |
parent | a138cfb422109018ba35c8f5d82621717eaf0611 (diff) | |
download | coreboot-0d19289e840f9c711f50a74437d1b3856222db03.tar.gz coreboot-0d19289e840f9c711f50a74437d1b3856222db03.tar.bz2 coreboot-0d19289e840f9c711f50a74437d1b3856222db03.zip |
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/include/arch/ioapic.h')
-rw-r--r-- | src/arch/x86/include/arch/ioapic.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/arch/x86/include/arch/ioapic.h b/src/arch/x86/include/arch/ioapic.h index 9dc2339dec26..530128a580f1 100644 --- a/src/arch/x86/include/arch/ioapic.h +++ b/src/arch/x86/include/arch/ioapic.h @@ -4,24 +4,23 @@ #define __I386_ARCH_IOAPIC_H #define IO_APIC_ADDR 0xfec00000 -#define VIO_APIC_VADDR ((u8 *)IO_APIC_ADDR) #ifndef __ACPI__ #include <types.h> -u8 get_ioapic_id(void *ioapic_base); -u8 get_ioapic_version(void *ioapic_base); +u8 get_ioapic_id(uintptr_t ioapic_base); +u8 get_ioapic_version(uintptr_t ioapic_base); -unsigned int ioapic_get_max_vectors(void *ioapic_base); -void ioapic_set_max_vectors(void *ioapic_base, int mre_count); -void ioapic_lock_max_vectors(void *ioapic_base); +unsigned int ioapic_get_max_vectors(uintptr_t ioapic_base); +void ioapic_set_max_vectors(uintptr_t ioapic_base, int mre_count); +void ioapic_lock_max_vectors(uintptr_t ioapic_base); -void setup_ioapic(void *ioapic_base, u8 ioapic_id); -void register_new_ioapic(void *ioapic_base); -void register_new_ioapic_gsi0(void *ioapic_base); +void setup_ioapic(uintptr_t ioapic_base, u8 ioapic_id); +void register_new_ioapic(uintptr_t ioapic_base); +void register_new_ioapic_gsi0(uintptr_t ioapic_base); -void ioapic_set_boot_config(void *ioapic_base, bool irq_on_fsb); +void ioapic_set_boot_config(uintptr_t ioapic_base, bool irq_on_fsb); void ioapic_get_sci_pin(u8 *gsi, u8 *irq, u8 *flags); #endif |