coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smihandler.c File Reference
#include <types.h>
#include <arch/io.h>
#include <device/pci_ops.h>
#include <acpi/acpi.h>
#include <console/console.h>
#include <cpu/x86/cache.h>
#include <device/pci_def.h>
#include <cpu/x86/smm.h>
#include <cpu/intel/em64t101_save_state.h>
#include <elog.h>
#include <halt.h>
#include <option.h>
#include <southbridge/intel/common/pmbase.h>
#include <smmstore.h>
#include "pmutil.h"
Include dependency graph for smihandler.c:

Go to the source code of this file.

Typedefs

typedef void(* smi_handler_t) (void)
 

Functions

u16 get_pmbase (void)
 
void gpi_route_interrupt (u8 gpi, u8 mode)
 
void southbridge_smi_set_eos (void)
 Set the EOS bit. More...
 
static void busmaster_disable_on_bus (int bus)
 
__weak void southbridge_gate_memory_reset (void)
 
__weak void southbridge_smm_xhci_sleep (u8 slp_type)
 
static int power_on_after_fail (void)
 
static void southbridge_smi_sleep (void)
 
static em64t101_smm_state_save_area_t * smi_apmc_find_state_save (u8 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_gpi (void)
 
static void southbridge_smi_mc (void)
 
static void southbridge_smi_tco (void)
 
static void southbridge_smi_periodic (void)
 
void southbridge_smi_handler (void)
 Interrupt handler for SMI#. More...
 

Variables

static int mainboard_finalized = 0
 
static smi_handler_t southbridge_smi [32]
 

Typedef Documentation

◆ smi_handler_t

typedef void(* smi_handler_t) (void)

Definition at line 414 of file smihandler.c.

Function Documentation

◆ busmaster_disable_on_bus()

static void busmaster_disable_on_bus ( int  bus)
static

Definition at line 53 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:

◆ get_pmbase()

u16 get_pmbase ( void  )

Definition at line 20 of file smihandler.c.

References lpc_get_pmbase().

Referenced by mainboard_smi_ec(), southbridge_smi_mc(), southbridge_smi_periodic(), and southbridge_smi_sleep().

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

◆ gpi_route_interrupt()

void gpi_route_interrupt ( u8  gpi,
u8  mode 
)

Definition at line 25 of file smihandler.c.

References alt_gpi_mask(), D31F0_GPIO_ROUT, gpe0_mask(), GPI_IS_SCI, GPI_IS_SMI, PCI_DEV, pci_read_config32(), and pci_write_config32().

Referenced by mainboard_smi_apmc(), and mainboard_smi_sleep().

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

◆ power_on_after_fail()

static int power_on_after_fail ( void  )
static

Definition at line 96 of file smihandler.c.

References get_uint_option(), inb(), MAINBOARD_POWER_ON, and outb().

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 em64t101_smm_state_save_area_t* smi_apmc_find_state_save ( u8  cmd)
static

Definition at line 200 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_gate_memory_reset()

__weak void southbridge_gate_memory_reset ( void  )

Definition at line 88 of file smihandler.c.

◆ southbridge_smi_apmc()

◆ southbridge_smi_gpe0()

static void southbridge_smi_gpe0 ( void  )
static

Definition at line 327 of file smihandler.c.

References dump_gpe0_status(), and reset_gpe0_status().

Here is the call graph for this function:

◆ southbridge_smi_gpi()

static void southbridge_smi_gpi ( void  )
static

Definition at line 335 of file smihandler.c.

References ALT_GP_SMI_EN, ALT_GP_SMI_STS, BIOS_DEBUG, mainboard_smi_gpi(), printk, read_pmbase16(), reset_alt_gp_smi_status(), and write_pmbase16().

Here is the call graph for this function:

◆ southbridge_smi_gsmi()

static void southbridge_smi_gsmi ( void  )
static

Definition at line 231 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  )

Interrupt handler for SMI#.

Definition at line 454 of file smihandler.c.

References BIOS_DEBUG, dump, dump_smi_status(), printk, reset_smi_status(), and southbridge_smi.

Here is the call graph for this function:

◆ southbridge_smi_mc()

static void southbridge_smi_mc ( void  )
static

Definition at line 350 of file smihandler.c.

References BIOS_DEBUG, MCSMI_EN, printk, read_pmbase32(), and SMI_EN.

Here is the call graph for this function:

◆ southbridge_smi_periodic()

static void southbridge_smi_periodic ( void  )
static

Definition at line 401 of file smihandler.c.

References BIOS_DEBUG, PERIODIC_EN, printk, read_pmbase32(), and SMI_EN.

Here is the call graph for this function:

◆ southbridge_smi_pm1()

static void southbridge_smi_pm1 ( void  )
static

Definition at line 308 of file smihandler.c.

References dump_pm1_status(), elog_gsmi_add_event(), ELOG_TYPE_POWER_BUTTON, PM1_CNT, PWRBTN_STS, reset_pm1_status(), and write_pmbase32().

Here is the call graph for this function:

◆ southbridge_smi_set_eos()

void southbridge_smi_set_eos ( void  )

Set the EOS bit.

Definition at line 48 of file smihandler.c.

References EOS, read_pmbase8(), SMI_EN, and write_pmbase8().

Here is the call graph for this function:

◆ southbridge_smi_sleep()

◆ southbridge_smi_store()

static void southbridge_smi_store ( void  )
static

Definition at line 252 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 363 of file smihandler.c.

References BIOS_DEBUG, dump_tco_status(), PCI_DEV, pci_read_config8(), pci_write_config8(), printk, and reset_tco_status().

Here is the call graph for this function:

◆ southbridge_smm_xhci_sleep()

__weak void southbridge_smm_xhci_sleep ( u8  slp_type)

Definition at line 92 of file smihandler.c.

Variable Documentation

◆ mainboard_finalized

int mainboard_finalized = 0
static

Definition at line 272 of file smihandler.c.

Referenced by southbridge_smi_apmc().

◆ southbridge_smi

smi_handler_t southbridge_smi[32]
static

Definition at line 416 of file smihandler.c.