coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smihandler.c File Reference
#include <delay.h>
#include <types.h>
#include <arch/io.h>
#include <device/mmio.h>
#include <device/pci_ops.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 <spi-generic.h>
#include <elog.h>
#include <halt.h>
#include <option.h>
#include <soc/lpc.h>
#include <soc/nvs.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/rcba.h>
#include <soc/xhci.h>
#include <drivers/intel/gma/i915_reg.h>
#include <smmstore.h>
Include dependency graph for smihandler.c:

Go to the source code of this file.

Macros

#define IOTRAP(x)   (trap_sts & (1 << x))
 

Typedefs

typedef void(* smi_handler_t) (void)
 

Functions

int southbridge_io_trap_handler (int smif)
 
void southbridge_smi_set_eos (void)
 Set the EOS bit. More...
 
static void busmaster_disable_on_bus (int bus)
 
static void backlight_off (void)
 
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)
 
static void southbridge_smi_monitor (void)
 
void southbridge_smi_handler (void)
 Interrupt handler for SMI#. More...
 

Variables

static smi_handler_t southbridge_smi [32]
 

Macro Definition Documentation

◆ IOTRAP

#define IOTRAP (   x)    (trap_sts & (1 << x))

Typedef Documentation

◆ smi_handler_t

typedef void(* smi_handler_t) (void)

Definition at line 477 of file smihandler.c.

Function Documentation

◆ backlight_off()

static void backlight_off ( void  )
static

Definition at line 89 of file smihandler.c.

References BIOS_INFO, EDP_BLC_ENABLE, PANEL_LIGHT_OFF_DELAY_MASK, PANEL_UNLOCK_MASK, PANEL_UNLOCK_REGS, PCH_PP_CONTROL, PCH_PP_OFF_DELAYS, PCI_BASE_ADDRESS_0, pci_read_config32(), printk, read32(), SA_DEV_IGD, smm_points_to_smram(), udelay(), and write32().

Referenced by southbridge_smi_sleep().

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

◆ busmaster_disable_on_bus()

static void busmaster_disable_on_bus ( int  bus)
static

Definition at line 51 of file smihandler.c.

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

Referenced by southbridge_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 128 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 240 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 26 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 352 of file smihandler.c.

References clear_gpe_status().

Here is the call graph for this function:

◆ southbridge_smi_gpi()

static void southbridge_smi_gpi ( void  )
static

Definition at line 357 of file smihandler.c.

References clear_alt_smi_status(), and mainboard_smi_gpi().

Here is the call graph for this function:

◆ southbridge_smi_gsmi()

static void southbridge_smi_gsmi ( void  )
static

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

References BIOS_DEBUG, clear_smi_status(), printk, and southbridge_smi.

Here is the call graph for this function:

◆ southbridge_smi_mc()

static void southbridge_smi_mc ( void  )
static

Definition at line 365 of file smihandler.c.

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

Here is the call graph for this function:

◆ southbridge_smi_monitor()

static void southbridge_smi_monitor ( void  )
static

Definition at line 419 of file smihandler.c.

References BIOS_DEBUG, gnvs, io_trap_handler(), IOTRAP, mask, printk, RCBA32, global_nvs::smif, and void().

Here is the call graph for this function:

◆ southbridge_smi_periodic()

static void southbridge_smi_periodic ( void  )
static

Definition at line 408 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 337 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, and SLP_TYP_S5.

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 46 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 292 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 376 of file smihandler.c.

References BIOS_CNTL, BIOS_DEBUG, clear_tco_status(), PCH_DEV_LPC, pci_read_config16(), pci_write_config32(), and printk.

Here is the call graph for this function:

Variable Documentation

◆ southbridge_smi

smi_handler_t southbridge_smi[32]
static

Definition at line 479 of file smihandler.c.