mb/starlabs/{lite_adl,byte_adl}: Don't select MAINBOARD_HAS_TPM2
[coreboot2.git] / src / soc / intel / xeon_sp / skx / soc_acpi.c
blob30e14d31dee703ff6f4ab8f09dce4de251bafe63
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpigen.h>
4 #include <arch/smp/mpspec.h>
5 #include <arch/vga.h>
6 #include <assert.h>
7 #include <cpu/intel/turbo.h>
8 #include <device/mmio.h>
9 #include <device/pci.h>
10 #include <intelblocks/acpi.h>
11 #include <soc/acpi.h>
12 #include <soc/iomap.h>
13 #include <soc/msr.h>
14 #include <soc/pci_devs.h>
15 #include <soc/pm.h>
16 #include <soc/soc_util.h>
17 #include <soc/util.h>
19 int soc_madt_sci_irq_polarity(int sci)
21 if (sci >= 20)
22 return MP_IRQ_POLARITY_LOW;
23 else
24 return MP_IRQ_POLARITY_HIGH;
27 uint32_t soc_read_sci_irq_select(void)
29 struct device *dev = PCH_DEV_PMC;
31 if (!dev)
32 return 0;
34 return pci_read_config32(dev, PMC_ACPI_CNT);
37 void soc_fill_fadt(acpi_fadt_t *fadt)
39 const uint16_t pmbase = ACPI_BASE_ADDRESS;
41 /* Fix flags set by common/block/acpi/acpi.c acpi_fill_fadt() */
42 fadt->flags &= ~(ACPI_FADT_SEALED_CASE);
43 fadt->flags |= ACPI_FADT_SLEEP_TYPE;
45 fadt->pm2_cnt_blk = pmbase + PM2_CNT;
46 fadt->pm_tmr_blk = pmbase + PM1_TMR;
48 fadt->pm2_cnt_len = 1;
49 fadt->pm_tmr_len = 4;
51 fadt->iapc_boot_arch = ACPI_FADT_LEGACY_DEVICES | ACPI_FADT_8042;
53 /* PM Extended Registers */
54 fill_fadt_extended_pm_io(fadt);
57 void soc_power_states_generation(int core, int cores_per_package)