coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smihandler.c File Reference
#include <arch/hlt.h>
#include <arch/io.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <console/console.h>
#include <cpu/x86/cache.h>
#include <cpu/x86/smm.h>
#include <cpu/intel/em64t100_save_state.h>
#include <device/pci_def.h>
#include <elog.h>
#include <soc/nvs.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <spi-generic.h>
#include <stdint.h>
#include <soc/gpio.h>
#include <smmstore.h>
Include dependency graph for smihandler.c:

Go to the source code of this file.

Typedefs

typedef void(* smi_handler_t) (void)
 

Functions

int southbridge_io_trap_handler (int smif)
 
void southbridge_smi_set_eos (void)
 
static void busmaster_disable_on_bus (int bus)
 
static void tristate_gpios (uint32_t val)
 
static void southbridge_smi_sleep (void)
 
static em64t100_smm_state_save_area_t * smi_apmc_find_state_save (uint8_t cmd)
 
static void southbridge_smi_gsmi (void)
 
static void southbridge_smi_store (void)
 
static void southbridge_smi_apmc (void)
 
static void southbridge_smi_pm1 (void)
 
static void southbridge_smi_gpe0 (void)
 
static void southbridge_smi_tco (void)
 
static void southbridge_smi_periodic (void)
 
void southbridge_smi_handler (void)
 

Variables

static const smi_handler_t southbridge_smi [32]
 

Typedef Documentation

◆ smi_handler_t

typedef void(* smi_handler_t) (void)

Definition at line 329 of file smihandler.c.

Function Documentation

◆ busmaster_disable_on_bus()

static void busmaster_disable_on_bus ( int  bus)
static

Definition at line 44 of file smihandler.c.

References PCI_COMMAND, PCI_COMMAND_MASTER, PCI_DEV, PCI_HEADER_TYPE, PCI_HEADER_TYPE_BRIDGE, PCI_HEADER_TYPE_CARDBUS, PCI_PRIMARY_BUS, pci_read_config16(), pci_read_config32(), pci_read_config8(), PCI_VENDOR_ID, pci_write_config16(), and val.

Referenced by southbridge_smi_sleep().

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

◆ smi_apmc_find_state_save()

static em64t100_smm_state_save_area_t* smi_apmc_find_state_save ( uint8_t  cmd)
static

Definition at line 189 of file smihandler.c.

References APM_CNT, NULL, and smm_get_save_state().

Referenced by southbridge_smi_gsmi(), and southbridge_smi_store().

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

◆ southbridge_io_trap_handler()

int southbridge_io_trap_handler ( int  smif)

Definition at line 21 of file smihandler.c.

References BIOS_DEBUG, gnvs, printk, and global_nvs::smif.

◆ southbridge_smi_apmc()

static void southbridge_smi_apmc ( void  )
static

◆ southbridge_smi_gpe0()

static void southbridge_smi_gpe0 ( void  )
static

Definition at line 297 of file smihandler.c.

References clear_gpe_status().

Here is the call graph for this function:

◆ southbridge_smi_gsmi()

static void southbridge_smi_gsmi ( void  )
static

Definition at line 220 of file smihandler.c.

References APM_CNT_ELOG_GSMI, gsmi_exec(), and smi_apmc_find_state_save().

Referenced by southbridge_smi_apmc().

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

◆ southbridge_smi_handler()

void southbridge_smi_handler ( void  )

Definition at line 366 of file smihandler.c.

References ARRAY_SIZE, BIOS_DEBUG, clear_alt_status(), clear_smi_status(), mainboard_smi_gpi(), NULL, printk, and southbridge_smi.

Here is the call graph for this function:

◆ southbridge_smi_periodic()

static void southbridge_smi_periodic ( void  )
static

Definition at line 316 of file smihandler.c.

References BIOS_DEBUG, get_pmbase(), inl(), PERIODIC_EN, printk, and SMI_EN.

Here is the call graph for this function:

◆ southbridge_smi_pm1()

static void southbridge_smi_pm1 ( void  )
static

Definition at line 284 of file smihandler.c.

References clear_pm1_status(), disable_pm1_control(), elog_gsmi_add_event(), ELOG_TYPE_POWER_BUTTON, enable_pm1_control(), PWRBTN_STS, SLP_EN, SLP_TYP_S5, and SLP_TYP_SHIFT.

Here is the call graph for this function:

◆ southbridge_smi_set_eos()

void southbridge_smi_set_eos ( void  )

Definition at line 39 of file smihandler.c.

References enable_smi(), and EOS.

Here is the call graph for this function:

◆ southbridge_smi_sleep()

◆ southbridge_smi_store()

static void southbridge_smi_store ( void  )
static

Definition at line 240 of file smihandler.c.

References APM_CNT_SMMSTORE, smi_apmc_find_state_save(), and smmstore_exec().

Referenced by southbridge_smi_apmc().

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

◆ southbridge_smi_tco()

static void southbridge_smi_tco ( void  )
static

Definition at line 302 of file smihandler.c.

References BIOS_DEBUG, clear_tco_status(), printk, and TCO_TIMEOUT.

Here is the call graph for this function:

◆ tristate_gpios()

Variable Documentation

◆ southbridge_smi

const smi_handler_t southbridge_smi[32]
static

Definition at line 331 of file smihandler.c.