diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2021-06-08 08:06:06 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2022-11-13 18:48:52 +0000 |
commit | ca5a793ec31c76b168ae2f9d2260b49c79330eb2 (patch) | |
tree | c961f3801e9187a57fee73c00f7a5ceda4d14923 /src/drivers/generic | |
parent | 9202cab6614f8a8f8d10e4539e9f6db2546d85ec (diff) |
drivers/generic/ioapic: Drop poor implementation
This disables MP table generation for the affected boards
since interrupt routing entries would now be completely missing.
The mechanism itself is flawed and redundant. The mapping
of integrated PCI devices' INTx pins to IOAPIC pins is
dependent of configuration registers and needs not appear
in the devicetree.cb files at all.
The write_smp_table implementation would skip writing
any entry delivering to destination IOAPIC ID 0. This
does not follow MP table specification.
There were duplicate calls to register_new_ioapic_gsi0(),
with another present under southbridge LPC device.
Change-Id: I383d55ba2bc0800423617215e0bfdfad5136e9ac
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69488
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/drivers/generic')
-rw-r--r-- | src/drivers/generic/ioapic/Kconfig | 2 | ||||
-rw-r--r-- | src/drivers/generic/ioapic/Makefile.inc | 1 | ||||
-rw-r--r-- | src/drivers/generic/ioapic/chip.h | 13 | ||||
-rw-r--r-- | src/drivers/generic/ioapic/ioapic.c | 42 |
4 files changed, 0 insertions, 58 deletions
diff --git a/src/drivers/generic/ioapic/Kconfig b/src/drivers/generic/ioapic/Kconfig deleted file mode 100644 index f8b46cb3d8..0000000000 --- a/src/drivers/generic/ioapic/Kconfig +++ /dev/null @@ -1,2 +0,0 @@ -config DRIVERS_GENERIC_IOAPIC - bool diff --git a/src/drivers/generic/ioapic/Makefile.inc b/src/drivers/generic/ioapic/Makefile.inc deleted file mode 100644 index d34542bf29..0000000000 --- a/src/drivers/generic/ioapic/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -ramstage-$(CONFIG_DRIVERS_GENERIC_IOAPIC) += ioapic.c diff --git a/src/drivers/generic/ioapic/chip.h b/src/drivers/generic/ioapic/chip.h deleted file mode 100644 index a5fbeab5d4..0000000000 --- a/src/drivers/generic/ioapic/chip.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef DRIVERS_GENERIC_IOAPIC_CHIP_H -#define DRIVERS_GENERIC_IOAPIC_CHIP_H - -typedef struct drivers_generic_ioapic_config { - u32 version; - u8 apicid; - u8 have_isa_interrupts; - void *base; -} ioapic_config_t; - -#endif diff --git a/src/drivers/generic/ioapic/ioapic.c b/src/drivers/generic/ioapic/ioapic.c deleted file mode 100644 index 818448438e..0000000000 --- a/src/drivers/generic/ioapic/ioapic.c +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <device/device.h> -#include "chip.h" -#include <arch/ioapic.h> - -static void ioapic_init(struct device *dev) -{ - struct drivers_generic_ioapic_config *config = dev->chip_info; - - if (!dev->enabled || !config) - return; - - setup_ioapic(config->base, config->apicid); -} - -static void ioapic_read_resources(struct device *dev) -{ - struct drivers_generic_ioapic_config *config = (struct drivers_generic_ioapic_config *)dev->chip_info; - struct resource *res; - - res = new_resource(dev, 0); - res->base = (resource_t)(uintptr_t)config->base; - res->size = 0x1000; - res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; -} - -static struct device_operations ioapic_operations = { - .read_resources = ioapic_read_resources, - .set_resources = noop_set_resources, - .init = ioapic_init, -}; - -static void enable_dev(struct device *dev) -{ - dev->ops = &ioapic_operations; -} - -struct chip_operations drivers_generic_ioapic_ops = { - CHIP_NAME("IOAPIC") - .enable_dev = enable_dev, -}; |