coreboot/src
Felix Held b5d244ccf2 arch/x86/ioapic: always write IOAPIC ID in set_ioapic_id
Back in the days of the APIC bus, the IOAPIC IDs mustn't overlap with
the LAPIC IDs (0 to CONFIG_MAX_CPUS - 1), but since the IOAPIC and LAPIC
nowadays talk to each other via the system bus, an IOAPIC ID of 0 is
valid. When set_ioapic_id gets called with an IOAPIC ID of 0, it skipped
writing the IOAPIC ID to the corresponding IOAPIC register, so the code
was relying of the register having the expected default value of the
IOAPIC IO 0 for things to work as expected. The case of the IOAPIC ID
being 0 is the most common case in coreboot, since that's what
register_new_ioapic_gsi0 will end up doing. Fix this issue by not making
the io_apic_write call conditional on ioapic_id being non-zero. The only
southbridge that doesn't call register_new_ioapic_gsi0, calls
set_ioapic_id with the IOAPIC ID 2 for which this won't cause any
changes in behavior.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ic8538f82a6b10f16eeb228669db197dc8e326ffd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80330
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-02-06 16:28:42 +00:00
..
acpi device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
arch arch/x86/ioapic: always write IOAPIC ID in set_ioapic_id 2024-02-06 16:28:42 +00:00
commonlib commonlib: Add assembly optimization for ipchksum() on x86 2024-02-02 22:49:10 +00:00
console lib,console,sbom: Rename Makefiles from .inc to .mk 2024-01-24 10:12:57 +00:00
cpu cpu/x86/smm/pci_resource_store: Allow devices with no resources 2024-02-02 14:46:24 +00:00
device device/device.h: Fix spelling mistake 2024-01-31 10:36:49 +00:00
drivers drivers/wifi: Use depends instead of if in Kconfig 2024-02-06 03:37:50 +00:00
ec device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
include drivers/wifi: Add MTCL function to ACPI SSDT 2024-02-06 03:37:19 +00:00
lib lib: Move IP checksum to commonlib 2024-02-02 22:48:27 +00:00
mainboard soc/intel/xeon_sp/smihandler: Lock SMM_FEATURE_CONTROL on all sockets 2024-02-06 08:21:05 +00:00
northbridge lib: Move IP checksum to commonlib 2024-02-02 22:48:27 +00:00
sbom src, util: Clean up makefile.inc in text, help & comments 2024-01-26 20:15:18 +00:00
security security/intel: Use write{64,32,16,8}p and read{64,32,16,8}p 2024-01-30 12:27:29 +00:00
soc soc/intel/xeon_sp/smihandler: Lock SMM_FEATURE_CONTROL on all sockets 2024-02-06 08:21:05 +00:00
southbridge lib: Move IP checksum to commonlib 2024-02-02 22:48:27 +00:00
superio device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
vendorcode vc/amd/opensil: add openSIL stub implementation 2024-02-02 20:36:27 +00:00
Kconfig src, util: Clean up makefile.inc in text, help & comments 2024-01-26 20:15:18 +00:00