coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
finalize.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <bootstate.h>
4 #include <console/console.h>
5 #include <console/debug.h>
6 #include <cpu/x86/smm.h>
7 #include <device/pci.h>
8 #include <intelpch/lockdown.h>
9 #include <soc/pci_devs.h>
10 #include <soc/pm.h>
11 #include <soc/util.h>
12 
13 #include "chip.h"
14 
15 static void lock_pam0123(void)
16 {
17  const struct device *dev;
18 
20  return;
21 
24 }
25 
26 static void soc_finalize(void *unused)
27 {
28  printk(BIOS_DEBUG, "Finalizing chipset.\n");
29 
30  /*
31  * Disable ACPI PM timer based on Kconfig
32  *
33  * Disabling ACPI PM timer is necessary for XTAL OSC shutdown.
34  * Disabling ACPI PM timer also switches off TCO.
35  *
36  * Note: In contrast to other platforms supporting PM timer emulation,
37  * disabling the PM timer must be done *after* FSP has run on Xeon-SP,
38  * because FSP makes use of the PM timer.
39  */
40  if (!CONFIG(USE_PM_ACPI_TIMER))
42 
44  lock_pam0123();
45 
47 }
48 
uint8_t * pmc_mmio_regs(void)
Definition: pmutil.c:142
@ BS_PAYLOAD_LOAD
Definition: bootstate.h:88
@ BS_ON_ENTRY
Definition: bootstate.h:95
#define printk(level,...)
Definition: stdlib.h:16
DEVTREE_CONST struct device * pcidev_path_on_bus(unsigned int bus, pci_devfn_t devfn)
Definition: device_const.c:221
@ CONFIG
Definition: dsi_common.h:201
#define APM_CNT_FINALIZE
Definition: smm.h:24
#define setbits8(addr, set)
Definition: mmio.h:19
static __always_inline void pci_or_config32(const struct device *dev, u16 reg, u32 ormask)
Definition: pci_ops.h:191
#define ACPI_TIM_DIS
Definition: pmc.h:108
#define PCH_PWRM_ACPI_TMR_CTL
Definition: pmc.h:107
int get_lockdown_config(void)
Definition: lockdown.c:22
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
#define PCI_DEVFN(slot, func)
Definition: pci_def.h:548
#define post_code(value)
Definition: post_code.h:12
#define POST_OS_BOOT
Final code before OS boots.
Definition: post_codes.h:414
int apm_control(u8 cmd)
Definition: smi_trigger.c:31
BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, soc_finalize, NULL)
@ CHIPSET_LOCKDOWN_COREBOOT
Definition: cfg.h:12
#define SAD_ALL_FUNC
Definition: pci_devs.h:12
#define SAD_ALL_PAM0123_CSR
Definition: pci_devs.h:13
#define SAD_ALL_DEV
Definition: pci_devs.h:11
static void soc_finalize(void *unused)
Definition: finalize.c:26
static void lock_pam0123(void)
Definition: finalize.c:15
uint8_t get_stack_busno(const uint8_t stack)
Definition: util.c:16
#define NULL
Definition: stddef.h:19
Definition: device.h:107
#define PAM_LOCK