coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smi_util.c File Reference
#include <amdblocks/acpimmio.h>
#include <console/console.h>
#include "smi.h"
Include dependency graph for smi_util.c:

Go to the source code of this file.

Macros

#define HUDSON_SMI_ACPI_COMMAND   75
 

Functions

static void configure_smi (uint8_t smi_num, uint8_t mode)
 
void hudson_configure_gevent_smi (uint8_t gevent, uint8_t mode, uint8_t level)
 Configure generation of interrupts for given GEVENT pin. More...
 
void hudson_disable_gevent_smi (uint8_t gevent)
 Disable events from given GEVENT pin. More...
 
void hudson_enable_acpi_cmd_smi (void)
 Enable SMIs on writes to ACPI SMI command port. More...
 

Macro Definition Documentation

◆ HUDSON_SMI_ACPI_COMMAND

#define HUDSON_SMI_ACPI_COMMAND   75

Definition at line 12 of file smi_util.c.

Function Documentation

◆ configure_smi()

static void configure_smi ( uint8_t  smi_num,
uint8_t  mode 
)
static

Definition at line 14 of file smi_util.c.

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

Here is the call graph for this function:

◆ hudson_configure_gevent_smi()

void hudson_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_LVL_LOW or SMI_LVL_HIGH

Definition at line 43 of file smi_util.c.

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

Referenced by mainboard_enable(), mainboard_smi_apmc(), and pavilion_cold_boot_init().

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

◆ hudson_disable_gevent_smi()

void hudson_disable_gevent_smi ( uint8_t  gevent)

Disable events from given GEVENT pin.

Definition at line 63 of file smi_util.c.

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

Referenced by mainboard_smi_apmc().

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

◆ hudson_enable_acpi_cmd_smi()

void hudson_enable_acpi_cmd_smi ( void  )

Enable SMIs on writes to ACPI SMI command port.

Definition at line 76 of file smi_util.c.

References configure_smi(), HUDSON_SMI_ACPI_COMMAND, and SMI_MODE_SMI.

Referenced by hudson_init_acpi_ports().

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