1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpigen.h>
4 #include <arch/smp/mpspec.h>
7 #include <cpu/intel/turbo.h>
8 #include <device/mmio.h>
9 #include <device/pci.h>
10 #include <intelblocks/acpi.h>
12 #include <soc/iomap.h>
14 #include <soc/pci_devs.h>
16 #include <soc/soc_util.h>
19 int soc_madt_sci_irq_polarity(int sci
)
22 return MP_IRQ_POLARITY_LOW
;
24 return MP_IRQ_POLARITY_HIGH
;
27 uint32_t soc_read_sci_irq_select(void)
29 struct device
*dev
= PCH_DEV_PMC
;
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;
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
)