arch/x86/ioapic.c: Move macros to compilation unit

Some of these macros are too generic like "NONE" and create conflicts in
other compilation units.

Change-Id: I6131a576f115df20df4d3df712d4c3f59c6dceb7
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70429
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans 2022-12-06 18:23:30 +01:00 committed by Felix Held
parent b2a6151299
commit f1e78a1349
2 changed files with 15 additions and 15 deletions

View File

@ -11,21 +11,6 @@
#include <types.h> #include <types.h>
#define ALL (0xff << 24)
#define NONE (0)
#define INT_DISABLED (1 << 16)
#define INT_ENABLED (0 << 16)
#define TRIGGER_EDGE (0 << 15)
#define TRIGGER_LEVEL (1 << 15)
#define POLARITY_HIGH (0 << 13)
#define POLARITY_LOW (1 << 13)
#define PHYSICAL_DEST (0 << 11)
#define LOGICAL_DEST (1 << 11)
#define ExtINT (7 << 8)
#define NMI (4 << 8)
#define SMI (2 << 8)
#define INT (1 << 8)
u8 get_ioapic_id(void *ioapic_base); u8 get_ioapic_id(void *ioapic_base);
u8 get_ioapic_version(void *ioapic_base); u8 get_ioapic_version(void *ioapic_base);

View File

@ -6,6 +6,21 @@
#include <console/console.h> #include <console/console.h>
#include <cpu/x86/lapic.h> #include <cpu/x86/lapic.h>
#define ALL (0xff << 24)
#define NONE (0)
#define INT_DISABLED (1 << 16)
#define INT_ENABLED (0 << 16)
#define TRIGGER_EDGE (0 << 15)
#define TRIGGER_LEVEL (1 << 15)
#define POLARITY_HIGH (0 << 13)
#define POLARITY_LOW (1 << 13)
#define PHYSICAL_DEST (0 << 11)
#define LOGICAL_DEST (1 << 11)
#define ExtINT (7 << 8)
#define NMI (4 << 8)
#define SMI (2 << 8)
#define INT (1 << 8)
static u32 io_apic_read(void *ioapic_base, u32 reg) static u32 io_apic_read(void *ioapic_base, u32 reg)
{ {
write32(ioapic_base, reg); write32(ioapic_base, reg);