coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smihandler.c File Reference
#include <arch/io.h>
#include <device/pci_ops.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
#include <soc/nvs.h>
#include <southbridge/intel/common/pmutil.h>
#include <ec/acpi/ec.h>
#include <option.h>
#include <ec/lenovo/h8/h8.h>
#include <delay.h>
#include "dock.h"
#include "smi.h"
Include dependency graph for smihandler.c:

Go to the source code of this file.

Macros

#define GPE_EC_SCI   12
 

Functions

static void mainboard_smi_save_cmos (void)
 
int mainboard_io_trap_handler (int smif)
 
static void mainboard_smi_brightness_up (void)
 
static void mainboard_smi_brightness_down (void)
 
static void mainboard_smi_handle_ec_sci (void)
 
void mainboard_smi_gpi (u32 gpi)
 
int mainboard_smi_apmc (u8 data)
 

Macro Definition Documentation

◆ GPE_EC_SCI

#define GPE_EC_SCI   12

Definition at line 16 of file smihandler.c.

Function Documentation

◆ mainboard_io_trap_handler()

int mainboard_io_trap_handler ( int  smif)

Definition at line 32 of file smihandler.c.

References dock_connect(), dock_disconnect(), ec_clr_bit(), ec_set_bit(), ec_write(), mainboard_smi_save_cmos(), mdelay(), SMI_DOCK_CONNECT, SMI_DOCK_DISCONNECT, and SMI_SAVE_CMOS.

Here is the call graph for this function:

◆ mainboard_smi_apmc()

int mainboard_smi_apmc ( u8  data)

Definition at line 129 of file smihandler.c.

References APM_CNT_ACPI_DISABLE, APM_CNT_ACPI_ENABLE, ec_set_ports(), ec_write(), GPE_EC_SCI, GPI_IS_SCI, GPI_IS_SMI, and gpi_route_interrupt().

Here is the call graph for this function:

◆ mainboard_smi_brightness_down()

static void mainboard_smi_brightness_down ( void  )
static

Definition at line 75 of file smihandler.c.

References PCI_DEV, pci_read_config8(), pci_write_config8(), and value.

Referenced by mainboard_smi_handle_ec_sci().

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

◆ mainboard_smi_brightness_up()

static void mainboard_smi_brightness_up ( void  )
static

Definition at line 67 of file smihandler.c.

References PCI_DEV, pci_read_config8(), pci_write_config8(), and value.

Referenced by mainboard_smi_handle_ec_sci().

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

◆ mainboard_smi_gpi()

void mainboard_smi_gpi ( u32  gpi)

Definition at line 123 of file smihandler.c.

References GPE_EC_SCI, and mainboard_smi_handle_ec_sci().

Here is the call graph for this function:

◆ mainboard_smi_handle_ec_sci()

static void mainboard_smi_handle_ec_sci ( void  )
static

Definition at line 83 of file smihandler.c.

References BIOS_DEBUG, ec_query(), EC_SC, EC_SCI_EVT, inb(), mainboard_io_trap_handler(), mainboard_smi_brightness_down(), mainboard_smi_brightness_up(), mainboard_smi_save_cmos(), printk, SMI_DOCK_CONNECT, and SMI_DOCK_DISCONNECT.

Referenced by mainboard_smi_gpi().

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

◆ mainboard_smi_save_cmos()

static void mainboard_smi_save_cmos ( void  )
static

Definition at line 18 of file smihandler.c.

References ec_read(), H8_VOLUME_CONTROL, inb(), outb(), PCI_DEV, pci_read_config8(), and set_uint_option().

Referenced by mainboard_io_trap_handler(), and mainboard_smi_handle_ec_sci().

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