coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmutil.c File Reference
#include <acpi/acpi.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <console/console.h>
#include <intelblocks/pmclib.h>
#include <intelblocks/lpc_lib.h>
#include <intelblocks/tco.h>
#include <soc/gpe.h>
#include <soc/gpio.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/pmc.h>
#include <soc/smbus.h>
#include <security/vboot/vbnv.h>
#include "chip.h"
Include dependency graph for pmutil.c:

Go to the source code of this file.

Macros

#define __SIMPLE_DEVICE__
 

Functions

const char *const * soc_smi_sts_array (size_t *smi_arr)
 
const char *const * soc_tco_sts_array (size_t *tco_arr)
 
const char *const * soc_std_gpe_sts_array (size_t *gpe_arr)
 
void pmc_set_disb (void)
 
uint8_tpmc_mmio_regs (void)
 
uintptr_t soc_read_pmc_base (void)
 
uint32_tsoc_pmc_etr_addr (void)
 
void soc_get_gpi_gpe_configs (uint8_t *dw0, uint8_t *dw1, uint8_t *dw2)
 
int rtc_failure (void)
 
int vbnv_cmos_failed (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)
 

Macro Definition Documentation

◆ __SIMPLE_DEVICE__

#define __SIMPLE_DEVICE__

Definition at line 8 of file pmutil.c.

Function Documentation

◆ get_pmbase()

uint16_t get_pmbase ( void  )

Definition at line 247 of file pmutil.c.

References ACPI_BASE_ADDRESS.

◆ pmc_mmio_regs()

uint8_t* pmc_mmio_regs ( void  )

Definition at line 130 of file pmutil.c.

References PCH_DEV_PMC, pci_read_config32(), and PWRMBASE.

Here is the call graph for this function:

◆ pmc_set_disb()

void pmc_set_disb ( void  )

Definition at line 116 of file pmutil.c.

References DISB, GBL_RST_STS, GEN_PMCON_A, MS4V, PCH_DEV_PMC, pci_read_config32(), and pci_write_config32().

Here is the call graph for this function:

◆ pmc_soc_set_afterg3_en()

void pmc_soc_set_afterg3_en ( const bool  on)

Definition at line 256 of file pmutil.c.

References GEN_PMCON_B, PCH_DEV_PMC, pci_read_config8(), pci_write_config8(), and SLEEP_AFTER_POWER_FAIL.

Here is the call graph for this function:

◆ rtc_failure()

int rtc_failure ( void  )

Definition at line 169 of file pmutil.c.

References BIOS_DEBUG, GEN_PMCON_B, PCH_DEV_PMC, pci_read_config8(), pci_write_config8(), printk, RTC_BATTERY_DEAD, and rtc_failed().

Here is the call graph for this function:

◆ soc_fill_power_state()

◆ soc_get_gpi_gpe_configs()

void soc_get_gpi_gpe_configs ( uint8_t dw0,
uint8_t dw1,
uint8_t dw2 
)

Definition at line 157 of file pmutil.c.

References config, config_of_soc, and DEVTREE_CONST.

◆ soc_pmc_etr_addr()

uint32_t* soc_pmc_etr_addr ( void  )

Definition at line 147 of file pmutil.c.

References ETR, PCH_DEVFN_PMC, and pci_mmio_config32_addr().

Here is the call graph for this function:

◆ soc_prev_sleep_state()

int soc_prev_sleep_state ( const struct chipset_power_state ps,
int  prev_sleep_state 
)

Definition at line 193 of file pmutil.c.

References ACPI_S3, ACPI_S5, deep_s3_enabled(), chipset_power_state::gen_pmcon_b, mask, chipset_power_state::pm1_sts, prev_sleep_state(), PWR_FLR, SUS_PWR_FLR, and WAK_STS.

Here is the call graph for this function:

◆ soc_read_pmc_base()

uintptr_t soc_read_pmc_base ( void  )

Definition at line 142 of file pmutil.c.

References pmc_mmio_regs().

Here is the call graph for this function:

◆ soc_smi_sts_array()

◆ soc_std_gpe_sts_array()

const char* const* soc_std_gpe_sts_array ( size_t gpe_arr)

Definition at line 94 of file pmutil.c.

References ARRAY_SIZE.

◆ soc_tco_sts_array()

const char* const* soc_tco_sts_array ( size_t tco_arr)

Definition at line 67 of file pmutil.c.

References ARRAY_SIZE.

◆ vbnv_cmos_failed()

int vbnv_cmos_failed ( void  )

Definition at line 187 of file pmutil.c.

References rtc_failure().

Here is the call graph for this function: