coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
elog.c File Reference
#include <acpi/acpi_pm.h>
#include <bootstate.h>
#include <commonlib/helpers.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <stdint.h>
#include <elog.h>
#include <intelblocks/pmclib.h>
#include <intelblocks/xhci.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/smbus.h>
Include dependency graph for elog.c:

Go to the source code of this file.

Data Structures

struct  pme_status_info
 

Macros

#define PME_STS_BIT   (1 << 15)
 
#define RP_PME_STS_BIT   (1 << 16)
 

Functions

static void pch_log_gpio_gpe (u32 gpe0_sts, u32 gpe0_en, int start)
 
static void pch_log_pme_internal_wake_source (void)
 
static void pch_log_rp_wake_source (void)
 
static void pch_log_wake_source (const struct chipset_power_state *ps)
 
static void pch_log_power_and_resets (const struct chipset_power_state *ps)
 
static void pch_log_state (void *unused)
 
 BOOT_STATE_INIT_ENTRY (BS_DEV_INIT, BS_ON_EXIT, pch_log_state, NULL)
 
void elog_gsmi_cb_platform_log_wake_source (void)
 

Macro Definition Documentation

◆ PME_STS_BIT

#define PME_STS_BIT   (1 << 15)

Definition at line 34 of file elog.c.

◆ RP_PME_STS_BIT

#define RP_PME_STS_BIT   (1 << 16)

Definition at line 81 of file elog.c.

Function Documentation

◆ BOOT_STATE_INIT_ENTRY()

BOOT_STATE_INIT_ENTRY ( BS_DEV_INIT  ,
BS_ON_EXIT  ,
pch_log_state  ,
NULL   
)

◆ elog_gsmi_cb_platform_log_wake_source()

void elog_gsmi_cb_platform_log_wake_source ( void  )

Definition at line 248 of file elog.c.

References pch_log_wake_source(), and pmc_fill_pm_reg_info().

Here is the call graph for this function:

◆ pch_log_gpio_gpe()

static void pch_log_gpio_gpe ( u32  gpe0_sts,
u32  gpe0_en,
int  start 
)
static

Definition at line 16 of file elog.c.

References elog_add_event_wake(), and ELOG_WAKE_SOURCE_GPE.

Referenced by pch_log_wake_source().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pch_log_pme_internal_wake_source()

◆ pch_log_power_and_resets()

◆ pch_log_rp_wake_source()

static void pch_log_rp_wake_source ( void  )
static

Definition at line 82 of file elog.c.

References ARRAY_SIZE, pme_status_info::dev, pme_status_info::devfn, elog_add_event_wake(), pme_status_info::elog_event, ELOG_WAKE_SOURCE_PME_PCIE1, ELOG_WAKE_SOURCE_PME_PCIE10, ELOG_WAKE_SOURCE_PME_PCIE11, ELOG_WAKE_SOURCE_PME_PCIE12, ELOG_WAKE_SOURCE_PME_PCIE13, ELOG_WAKE_SOURCE_PME_PCIE14, ELOG_WAKE_SOURCE_PME_PCIE15, ELOG_WAKE_SOURCE_PME_PCIE16, ELOG_WAKE_SOURCE_PME_PCIE17, ELOG_WAKE_SOURCE_PME_PCIE18, ELOG_WAKE_SOURCE_PME_PCIE19, ELOG_WAKE_SOURCE_PME_PCIE2, ELOG_WAKE_SOURCE_PME_PCIE20, ELOG_WAKE_SOURCE_PME_PCIE21, ELOG_WAKE_SOURCE_PME_PCIE22, ELOG_WAKE_SOURCE_PME_PCIE23, ELOG_WAKE_SOURCE_PME_PCIE24, ELOG_WAKE_SOURCE_PME_PCIE3, ELOG_WAKE_SOURCE_PME_PCIE4, ELOG_WAKE_SOURCE_PME_PCIE5, ELOG_WAKE_SOURCE_PME_PCIE6, ELOG_WAKE_SOURCE_PME_PCIE7, ELOG_WAKE_SOURCE_PME_PCIE8, ELOG_WAKE_SOURCE_PME_PCIE9, MIN, PCH_DEVFN_PCIE1, PCH_DEVFN_PCIE10, PCH_DEVFN_PCIE11, PCH_DEVFN_PCIE12, PCH_DEVFN_PCIE13, PCH_DEVFN_PCIE14, PCH_DEVFN_PCIE15, PCH_DEVFN_PCIE16, PCH_DEVFN_PCIE17, PCH_DEVFN_PCIE18, PCH_DEVFN_PCIE19, PCH_DEVFN_PCIE2, PCH_DEVFN_PCIE20, PCH_DEVFN_PCIE21, PCH_DEVFN_PCIE22, PCH_DEVFN_PCIE23, PCH_DEVFN_PCIE24, PCH_DEVFN_PCIE3, PCH_DEVFN_PCIE4, PCH_DEVFN_PCIE5, PCH_DEVFN_PCIE6, PCH_DEVFN_PCIE7, PCH_DEVFN_PCIE8, PCH_DEVFN_PCIE9, PCI_DEV, PCI_FUNC, pci_s_read_config32(), PCI_SLOT, pme_status_info::reg_offset, RP_PME_STS_BIT, and val.

Referenced by pch_log_wake_source().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pch_log_state()

static void pch_log_state ( void unused)
static

Definition at line 231 of file elog.c.

References acpi_pm_state_for_elog(), pch_log_power_and_resets(), pch_log_wake_source(), and chipset_power_state::prev_sleep_state.

Here is the call graph for this function:

◆ pch_log_wake_source()