coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smi.h File Reference
#include <types.h>
Include dependency graph for smi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  smi_sources_t
 
struct  sci_source
 

Enumerations

enum  smi_mode {
  SMI_MODE_DISABLE = 0 , SMI_MODE_SMI = 1 , SMI_MODE_NMI = 2 , SMI_MODE_IRQ13 = 3 ,
  SMI_MODE_DISABLE = 0 , SMI_MODE_SMI = 1 , SMI_MODE_NMI = 2 , SMI_MODE_IRQ13 = 3 ,
  SMI_MODE_DISABLE = 0 , SMI_MODE_SMI = 1 , SMI_MODE_NMI = 2 , SMI_MODE_IRQ13 = 3
}
 
enum  smi_sci_type { INTERRUPT_NONE , INTERRUPT_SCI , INTERRUPT_SMI , INTERRUPT_BOTH }
 
enum  smi_sci_lvl { SMI_SCI_LVL_LOW , SMI_SCI_LVL_HIGH }
 
enum  smi_sci_dir { SMI_SCI_EDG , SMI_SCI_LVL }
 

Functions

void configure_smi (uint8_t smi_num, uint8_t mode)
 
void configure_gevent_smi (uint8_t gevent, uint8_t mode, uint8_t level)
 Configure generation of interrupts for given GEVENT pin. More...
 
void configure_scimap (const struct sci_source *sci)
 Configure generation of SCIs. More...
 
void disable_gevent_smi (uint8_t gevent)
 Disable events from given GEVENT pin. More...
 
void gpe_configure_sci (const struct sci_source *scis, size_t num_gpes)
 
void clear_all_smi_status (void)
 
void clear_smi_sci_status (void)
 

Enumeration Type Documentation

◆ smi_mode

enum smi_mode
Enumerator
SMI_MODE_DISABLE 
SMI_MODE_SMI 
SMI_MODE_NMI 
SMI_MODE_IRQ13 
SMI_MODE_DISABLE 
SMI_MODE_SMI 
SMI_MODE_NMI 
SMI_MODE_IRQ13 
SMI_MODE_DISABLE 
SMI_MODE_SMI 
SMI_MODE_NMI 
SMI_MODE_IRQ13 

Definition at line 8 of file smi.h.

◆ smi_sci_dir

Enumerator
SMI_SCI_EDG 
SMI_SCI_LVL 

Definition at line 27 of file smi.h.

◆ smi_sci_lvl

Enumerator
SMI_SCI_LVL_LOW 
SMI_SCI_LVL_HIGH 

Definition at line 22 of file smi.h.

◆ smi_sci_type

Enumerator
INTERRUPT_NONE 
INTERRUPT_SCI 
INTERRUPT_SMI 
INTERRUPT_BOTH 

Definition at line 15 of file smi.h.

Function Documentation

◆ clear_all_smi_status()

void clear_all_smi_status ( void  )

Definition at line 142 of file smi_util.c.

References SMI_EVENT_STATUS, smi_read32(), SMI_REG_SMISTS0, SMI_REG_SMISTS1, SMI_REG_SMISTS2, SMI_REG_SMISTS3, SMI_REG_SMISTS4, SMI_SCI_STATUS, and smi_write32().

Referenced by fch_slp_typ_handler().

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

◆ clear_smi_sci_status()

void clear_smi_sci_status ( void  )

Definition at line 153 of file smi_util.c.

References smi_read32(), SMI_SCI_STATUS, and smi_write32().

Referenced by southbridge_smi_handler().

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

◆ configure_gevent_smi()

void configure_gevent_smi ( uint8_t  gevent,
uint8_t  mode,
uint8_t  level 
)

Configure generation of interrupts for given GEVENT pin.

Parameters
geventThe GEVENT pin number. Valid values are 0 thru 23
modeThe type of event this pin should generate. Note that only SMI_MODE_SMI generates an SMI. SMI_MODE_DISABLE disables events.
levelSMI__SCI_LVL_LOW or SMI_SCI_LVL_HIGH

Definition at line 40 of file smi_util.c.

References BIOS_WARNING, configure_smi(), printk, SMI_GEVENTS, smi_read32(), SMI_REG_SMITRIG0, and smi_write32().

Referenced by program_smi().

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

◆ configure_scimap()

void configure_scimap ( const struct sci_source sci)

Configure generation of SCIs.

Definition at line 78 of file smi_util.c.

References BIOS_DEBUG, BIOS_WARNING, sci_source::direction, sci_source::gpe, sci_source::level, printk, SCI_GPES, sci_source::scimap, SCIMAPS, smi_read32(), SMI_SCI_LEVEL, SMI_SCI_MAP, SMI_SCI_TRIG, smi_write32(), and smi_write8().

Referenced by gpe_configure_sci(), and program_sci().

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

◆ configure_smi()

void configure_smi ( uint8_t  smi_num,
uint8_t  mode 
)

Definition at line 12 of file smi_util.c.

References BIOS_WARNING, NUMBER_SMITYPES, printk, smi_read32(), SMI_REG_CONTROL0, and smi_write32().

Referenced by configure_gevent_smi(), disable_gevent_smi(), fch_init_acpi_ports(), hudson_configure_gevent_smi(), hudson_disable_gevent_smi(), and hudson_enable_acpi_cmd_smi().

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

◆ disable_gevent_smi()

void disable_gevent_smi ( uint8_t  gevent)

Disable events from given GEVENT pin.

Definition at line 125 of file smi_util.c.

References BIOS_WARNING, configure_smi(), printk, and SMI_MODE_DISABLE.

Here is the call graph for this function:

◆ gpe_configure_sci()

void gpe_configure_sci ( const struct sci_source scis,
size_t  num_gpes 
)

Definition at line 116 of file smi_util.c.

References configure_scimap().

Referenced by configure_xhci_sci(), and mainboard_ec_init().

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