diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2022-12-06 18:23:30 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-12-07 23:01:51 +0000 |
commit | f1e78a1349d40f2e8a74b15471fc5560976a566f (patch) | |
tree | dfe65df951bbf2d516d2e15a5aba68c3e075fc46 /src/arch | |
parent | b2a6151299b3891f3c7e6e17368bbe552dbdb72a (diff) |
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>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/include/arch/ioapic.h | 15 | ||||
-rw-r--r-- | src/arch/x86/ioapic.c | 15 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/arch/x86/include/arch/ioapic.h b/src/arch/x86/include/arch/ioapic.h index 12f9387632..a91ac14220 100644 --- a/src/arch/x86/include/arch/ioapic.h +++ b/src/arch/x86/include/arch/ioapic.h @@ -11,21 +11,6 @@ #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_version(void *ioapic_base); diff --git a/src/arch/x86/ioapic.c b/src/arch/x86/ioapic.c index 28bbcb14f2..e30b6caa84 100644 --- a/src/arch/x86/ioapic.c +++ b/src/arch/x86/ioapic.c @@ -6,6 +6,21 @@ #include <console/console.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) { write32(ioapic_base, reg); |