coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smihandler.c File Reference
Include dependency graph for smihandler.c:

Go to the source code of this file.

Macros

#define GPE_PALMDET1   2
 
#define GPE_PALMDET2   4
 
#define GPE_EC_SCI   7
 
#define GPE_EC_SMI   8
 
#define GPE_EC_WAKE   13
 

Enumerations

enum  sleep_states {
  S0 = 0 , S1 = 1 , S3 = 3 , S4 = 4 ,
  S5 = 5 , S0 = 0 , S1 = 1 , S3 = 3 ,
  S4 = 4 , S5 = 5 , S0 = 0 , S1 = 1 ,
  S3 = 3 , S4 = 4 , S5 = 5
}
 
enum  ec_smi_event {
  EC_SMI_EVENT_IDLE = 0x80 , EC_SMI_BATTERY_LOW = 0xb3 , EC_SMI_EVENT_IDLE = 0x80 , EC_SMI_BATTERY_LOW = 0xb3 ,
  EC_SMI_EVENT_IDLE = 0x80 , EC_SMI_BATTERY_LOW = 0xb3
}
 

Functions

static void ec_enter_apm_mode (void)
 
static void ec_enter_acpi_mode (void)
 
static uint8_t ec_get_smi_event (void)
 
static void ec_process_smi (uint8_t src)
 
static void handle_ec_smi (void)
 
void mainboard_smi_gpi (u32 gpi_sts)
 
int mainboard_smi_apmc (u8 data)
 
void mainboard_smi_sleep (u8 slp_typ)
 

Macro Definition Documentation

◆ GPE_EC_SCI

#define GPE_EC_SCI   7

Definition at line 14 of file smihandler.c.

◆ GPE_EC_SMI

#define GPE_EC_SMI   8

Definition at line 15 of file smihandler.c.

◆ GPE_EC_WAKE

#define GPE_EC_WAKE   13

Definition at line 17 of file smihandler.c.

◆ GPE_PALMDET1

#define GPE_PALMDET1   2

Definition at line 12 of file smihandler.c.

◆ GPE_PALMDET2

#define GPE_PALMDET2   4

Definition at line 13 of file smihandler.c.

Enumeration Type Documentation

◆ ec_smi_event

Enumerator
EC_SMI_EVENT_IDLE 
EC_SMI_BATTERY_LOW 
EC_SMI_EVENT_IDLE 
EC_SMI_BATTERY_LOW 
EC_SMI_EVENT_IDLE 
EC_SMI_BATTERY_LOW 

Definition at line 27 of file smihandler.c.

◆ sleep_states

Enumerator
S0 
S1 
S3 
S4 
S5 
S0 
S1 
S3 
S4 
S5 
S0 
S1 
S3 
S4 
S5 

Definition at line 19 of file smihandler.c.

Function Documentation

◆ ec_enter_acpi_mode()

static void ec_enter_acpi_mode ( void  )
static

Definition at line 39 of file smihandler.c.

References ec_kbc_write_cmd(), and ec_kbc_write_ib().

Referenced by mainboard_smi_apmc().

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

◆ ec_enter_apm_mode()

static void ec_enter_apm_mode ( void  )
static

Definition at line 33 of file smihandler.c.

References ec_kbc_write_cmd(), and ec_kbc_write_ib().

Referenced by mainboard_smi_apmc().

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

◆ ec_get_smi_event()

static uint8_t ec_get_smi_event ( void  )
static

Definition at line 45 of file smihandler.c.

References ec_kbc_read_ob(), and ec_kbc_write_cmd().

Referenced by handle_ec_smi().

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

◆ ec_process_smi()

static void ec_process_smi ( uint8_t  src)
static

Definition at line 51 of file smihandler.c.

References BIOS_DEBUG, and printk.

Referenced by handle_ec_smi().

Here is the caller graph for this function:

◆ handle_ec_smi()

static void handle_ec_smi ( void  )
static

Definition at line 61 of file smihandler.c.

References ec_get_smi_event(), ec_process_smi(), and EC_SMI_EVENT_IDLE.

Referenced by mainboard_smi_gpi().

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

◆ mainboard_smi_apmc()

int mainboard_smi_apmc ( u8  data)

◆ mainboard_smi_gpi()

void mainboard_smi_gpi ( u32  gpi_sts)

Definition at line 69 of file smihandler.c.

References GPE_EC_SMI, and handle_ec_smi().

Here is the call graph for this function:

◆ mainboard_smi_sleep()

void mainboard_smi_sleep ( u8  slp_typ)

Definition at line 94 of file smihandler.c.

References ec_read(), GPE_EC_WAKE, GPI_IS_SCI, gpi_route_interrupt(), and S3.

Here is the call graph for this function: