summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-07-05 14:24:01 +0200
committerLean Sheng Tan <sheng.tan@9elements.com>2023-08-02 17:11:32 +0000
commiteb988dfcbad35a1b9ccb5e17d5f06f28f0b995a8 (patch)
tree3062a5f47f7d7378edf4e2c856a8616c3470b3b6 /src/arch
parentcd46e5f63a468a3f4aae9267b5db94c4e5cc1458 (diff)
downloadcoreboot-eb988dfcbad35a1b9ccb5e17d5f06f28f0b995a8.tar.gz
coreboot-eb988dfcbad35a1b9ccb5e17d5f06f28f0b995a8.tar.bz2
coreboot-eb988dfcbad35a1b9ccb5e17d5f06f28f0b995a8.zip
acpi/acpi.c: Move setting FADT SCI INT to arch specific code
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Ic1533cb520a057b29fc8f926db38338cd3401b18 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76295 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/acpi.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c
index ffa346325939..018cdf5cc316 100644
--- a/src/arch/x86/acpi.c
+++ b/src/arch/x86/acpi.c
@@ -1,12 +1,30 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
+#include <arch/ioapic.h>
#include <cf9_reset.h>
#include <cpu/x86/smm.h>
#include <pc80/mc146818rtc.h>
+static u16 acpi_sci_int(void)
+{
+ u8 gsi, irq, flags;
+
+ ioapic_get_sci_pin(&gsi, &irq, &flags);
+
+ /* ACPI Release 6.5, 5.2.9 and 5.2.15.5. */
+ if (!CONFIG(ACPI_HAVE_PCAT_8259))
+ return gsi;
+
+ assert(irq < 16);
+ return irq;
+}
+
+
void arch_fill_fadt(acpi_fadt_t *fadt)
{
+ fadt->sci_int = acpi_sci_int();
+
if (CONFIG(HAVE_CF9_RESET)) {
fadt->reset_reg.space_id = ACPI_ADDRESS_SPACE_IO;
fadt->reset_reg.bit_width = 8;