![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <acpi/acpi_pm.h>
#include <device/mmio.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <console/console.h>
#include <intelblocks/pmclib.h>
#include <intelblocks/rtc.h>
#include <intelblocks/tco.h>
#include <security/vboot/vbnv.h>
#include <soc/espi.h>
#include <soc/gpe.h>
#include <soc/gpio.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/smbus.h>
#include <soc/soc_chip.h>
#include <types.h>
Go to the source code of this file.
Macros | |
#define | __SIMPLE_DEVICE__ |
Functions | |
const char *const * | soc_smi_sts_array (size_t *a) |
const char *const * | soc_tco_sts_array (size_t *a) |
const char *const * | soc_std_gpe_sts_array (size_t *a) |
void | pmc_set_disb (void) |
uint8_t * | pmc_mmio_regs (void) |
uintptr_t | soc_read_pmc_base (void) |
uint32_t * | soc_pmc_etr_addr (void) |
void | soc_get_gpi_gpe_configs (uint8_t *dw0, uint8_t *dw1, uint8_t *dw2) |
static int | rtc_failed (uint32_t gen_pmcon_b) |
int | soc_get_rtc_failed (void) |
int | vbnv_cmos_failed (void) |
static int | deep_s3_enabled (void) |
int | soc_prev_sleep_state (const struct chipset_power_state *ps, int prev_sleep_state) |
void | soc_fill_power_state (struct chipset_power_state *ps) |
uint16_t | get_pmbase (void) |
void | pmc_soc_set_afterg3_en (const bool on) |
|
inlinestatic |
Definition at line 189 of file pmutil.c.
References pmc_mmio_regs(), read32(), S3_PWRGATE_POL, S3AC_GATE_SUS, and S3DC_GATE_SUS.
Referenced by acpi_fill_soc_wake(), pch_log_power_and_resets(), and soc_prev_sleep_state().
Definition at line 254 of file pmutil.c.
Referenced by disable_gpe(), disable_pm1_control(), disable_smi(), enable_all_gpe(), enable_alt_smi(), enable_gpe(), enable_pm1(), enable_pm1_control(), enable_smi(), enable_tco_sci(), platform_is_resuming(), reset_alt_smi_status(), reset_alt_status(), reset_gpe_status(), reset_pm1_status(), reset_smi_status(), and reset_tco_status().
Definition at line 142 of file pmutil.c.
Referenced by clear_rtc_failed(), deep_s3_enabled(), pmc_set_disb(), pmc_soc_set_afterg3_en(), soc_fill_power_state(), soc_read_pmc_base(), and vbnv_cmos_failed().
Definition at line 263 of file pmutil.c.
References GEN_PMCON_A, pmc_mmio_regs(), read8(), SLEEP_AFTER_POWER_FAIL, and write8().
Referenced by get_high_assert_width(), mainboard_final(), and mainboard_prepare_cr50_reset().
|
static |
Definition at line 169 of file pmutil.c.
References RTC_BATTERY_DEAD.
Referenced by i82801dx_rtc_init(), i82801gx_rtc_init(), i82801ix_rtc_init(), i82801jx_rtc_init(), pch_rtc_init(), rtc_failure(), sb_rtc_init(), soc_get_rtc_failed(), soc_rtc_init(), and vbnv_cmos_failed().
void soc_fill_power_state | ( | struct chipset_power_state * | ps | ) |
Definition at line 228 of file pmutil.c.
References BIOS_DEBUG, chipset_power_state::gblrst_cause, GBLRST_CAUSE0, GBLRST_CAUSE1, chipset_power_state::gen_pmcon_a, GEN_PMCON_A, chipset_power_state::gen_pmcon_b, GEN_PMCON_B, chipset_power_state::hpr_cause0, HPR_CAUSE0, pmc, pmc_mmio_regs(), printk, read32(), chipset_power_state::tco1_sts, TCO1_STS, chipset_power_state::tco2_sts, TCO2_STS, and tco_read_reg().
Referenced by pmc_fill_pm_reg_info().
Definition at line 157 of file pmutil.c.
References config, config_of_soc, and DEVTREE_CONST.
Referenced by pmc_gpe_init().
int soc_get_rtc_failed | ( | void | ) |
Definition at line 174 of file pmutil.c.
References acpi_pm_state_for_rtc(), chipset_power_state::gen_pmcon_b, and rtc_failed().
Referenced by mainboard_romstage_entry().
Definition at line 152 of file pmutil.c.
References ETR, and soc_read_pmc_base().
int soc_prev_sleep_state | ( | const struct chipset_power_state * | ps, |
int | prev_sleep_state | ||
) |
Definition at line 198 of file pmutil.c.
References ACPI_S3, ACPI_S5, deep_s3_enabled(), chipset_power_state::gen_pmcon_a, mask, prev_sleep_state(), PWR_FLR, and SUS_PWR_FLR.
Definition at line 147 of file pmutil.c.
References pmc_mmio_regs().
Referenced by pch_thermal_configuration(), pmc_clear_prsts(), pmc_gpe_init(), pmc_ipc_acpi_fill_ssdt(), pmc_reg(), pmc_soc_set_afterg3_en(), set_slp_s3_assertion_width(), soc_fill_power_state(), soc_pmc_etr_addr(), soc_read_sci_irq_select(), soc_write_sci_irq_select(), and vbnv_cmos_failed().
const char* const* soc_smi_sts_array | ( | size_t * | a | ) |
Definition at line 40 of file pmutil.c.
References APM_STS_BIT, ARRAY_SIZE, BIOS_STS_BIT, DEVMON_STS_BIT, ESPI_SMI_STS_BIT, GPE0_STS_BIT, GPIO_STS_BIT, GPIO_UNLOCK_SMI_STS_BIT, LEGACY_USB_STS_BIT, MCSMI_STS_BIT, MONITOR_STS_BIT, PCI_EXP_SMI_STS_BIT, PERIODIC_STS_BIT, PM1_STS_BIT, SERIRQ_SMI_STS_BIT, SMBUS_SMI_STS_BIT, SMI_ON_SLP_EN_STS_BIT, SPI_SMI_STS_BIT, SWSMI_TMR_STS_BIT, and TCO_STS_BIT.
Referenced by print_smi_status().
const char* const* soc_std_gpe_sts_array | ( | size_t * | a | ) |
Definition at line 99 of file pmutil.c.
References ARRAY_SIZE.
Referenced by print_std_gpe_sts().
const char* const* soc_tco_sts_array | ( | size_t * | a | ) |
Definition at line 72 of file pmutil.c.
References ARRAY_SIZE.
Referenced by print_tco_status().
int vbnv_cmos_failed | ( | void | ) |
Definition at line 184 of file pmutil.c.
References GEN_PMCON_B, pmc_mmio_regs(), read32(), and rtc_failed().