![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <arch/io.h>
#include <console/console.h>
#include <commonlib/region.h>
#include <cpu/x86/smm.h>
#include <cpu/x86/smi_deprecated.h>
#include <cpu/amd/amd64_save_state.h>
#include <cpu/intel/em64t100_save_state.h>
#include <cpu/intel/em64t101_save_state.h>
#include <cpu/x86/legacy_save_state.h>
Go to the source code of this file.
Macros | |
#define | LAPIC_ID 0xfee00020 |
Enumerations | |
enum | smi_semaphore { SMI_LOCKED , SMI_UNLOCKED , SMI_LOCKED , SMI_UNLOCKED } |
Functions | |
static int | smi_obtain_lock (void) |
static void | smi_release_lock (void) |
static __always_inline unsigned long | nodeid (void) |
void | io_trap_handler (int smif) |
static void | smi_set_eos (void) |
Set the EOS bit. More... | |
static void | smi_backup_pci_address (void) |
Backup PCI address to make sure we do not mess up the OS. More... | |
static void | smi_restore_pci_address (void) |
Restore PCI address previously backed up. More... | |
static void * | smm_save_state (uintptr_t base, int arch_offset, int node) |
uint32_t | smm_revision (void) |
void * | smm_get_save_state (int cpu) |
bool | smm_region_overlaps_handler (const struct region *r) |
void | smi_handler (void) |
Interrupt handler for SMI#. More... | |
int __weak | mainboard_io_trap_handler (int smif) |
void __weak | southbridge_smi_handler (void) |
void __weak | mainboard_smi_gpi (u32 gpi_sts) |
int __weak | mainboard_smi_apmc (u8 data) |
void __weak | mainboard_smi_sleep (u8 slp_typ) |
void __weak | mainboard_smi_finalize (void) |
Variables | |
static int | do_driver_init = 1 |
static volatile smi_semaphore | smi_handler_status = SMI_UNLOCKED |
static u32 | pci_orig |
#define LAPIC_ID 0xfee00020 |
Definition at line 52 of file smihandler.c.
enum smi_semaphore |
Enumerator | |
---|---|
SMI_LOCKED | |
SMI_UNLOCKED | |
SMI_LOCKED | |
SMI_UNLOCKED |
Definition at line 19 of file smihandler.c.
void io_trap_handler | ( | int | smif | ) |
Definition at line 58 of file smihandler.c.
References BIOS_DEBUG, mainboard_io_trap_handler(), printk, and southbridge_io_trap_handler().
Referenced by smihandler_southbridge_monitor(), and southbridge_smi_monitor().
int __weak mainboard_io_trap_handler | ( | int | smif | ) |
Definition at line 206 of file smihandler.c.
Referenced by io_trap_handler(), and mainboard_smi_handle_ec_sci().
Definition at line 209 of file smihandler.c.
Referenced by fch_apmc_smi_handler(), hudson_apmc_smi_handler(), smihandler_southbridge_apmc(), and southbridge_smi_apmc().
Definition at line 211 of file smihandler.c.
Referenced by finalize().
Definition at line 208 of file smihandler.c.
Referenced by process_gpe_smi(), process_smi_sources(), southbridge_smi_gpi(), and southbridge_smi_handler().
Definition at line 210 of file smihandler.c.
Referenced by fch_slp_typ_handler(), smihandler_southbridge_sleep(), and southbridge_smi_sleep().
|
static |
Definition at line 53 of file smihandler.c.
References LAPIC_ID.
Referenced by amdfam14_find_iopair(), amdfam14_find_mempair(), amdfam14_link_read_bases(), amdfam15_find_iopair(), amdfam15_find_mempair(), amdfam15_link_read_bases(), amdfam16_find_iopair(), amdfam16_find_mempair(), amdfam16_link_read_bases(), create_vga_resource(), domain_read_resources(), get_dram_base_limit(), get_node_pci(), nb_read_resources(), nb_set_resources(), read_resources(), reg_useable(), set_io_addr_reg(), set_mmio_addr_reg(), set_resource(), set_resources(), set_vga_enable_reg(), and smi_handler().
Backup PCI address to make sure we do not mess up the OS.
Definition at line 87 of file smihandler.c.
References inl(), and pci_orig.
Referenced by smi_handler().
Interrupt handler for SMI#.
smm_revision | revision of the smm state save map |
Definition at line 145 of file smihandler.c.
References BIOS_SPEW, BIOS_WARNING, console_init(), do_driver_init, nodeid(), NULL, printk, smi_backup_pci_address(), smi_handler_status, SMI_LOCKED, smi_obtain_lock(), smi_release_lock(), smi_restore_pci_address(), smi_set_eos(), smm_get_save_state(), smm_revision(), southbridge_smi_handler(), and spi_init().
|
static |
Definition at line 25 of file smihandler.c.
References smi_handler_status, SMI_LOCKED, and SMI_UNLOCKED.
Referenced by smi_handler(), and smm_handler_start().
Definition at line 41 of file smihandler.c.
References smi_handler_status, and SMI_UNLOCKED.
Referenced by smi_handler().
Restore PCI address previously backed up.
Definition at line 95 of file smihandler.c.
References outl(), and pci_orig.
Referenced by smi_handler().
Set the EOS bit.
Definition at line 77 of file smihandler.c.
References southbridge_smi_set_eos().
Referenced by smi_handler().
void* smm_get_save_state | ( | int | cpu | ) |
Definition at line 114 of file smihandler.c.
References NULL, SMM_AMD64_ARCH_OFFSET, SMM_BASE, SMM_EM64T100_ARCH_OFFSET, SMM_EM64T101_ARCH_OFFSET, SMM_LEGACY_ARCH_OFFSET, smm_revision(), and smm_save_state().
Referenced by find_save_state(), smi_apmc_find_state_save(), and smi_handler().
Definition at line 132 of file smihandler.c.
References region_overlap(), SMM_BASE, and SMM_DEFAULT_SIZE.
Definition at line 109 of file smihandler.c.
References SMM_BASE, SMM_ENTRY_OFFSET, and SMM_REVISION_OFFSET_FROM_TOP.
Referenced by init_save_state(), smi_handler(), and smm_get_save_state().
Definition at line 100 of file smihandler.c.
References base, and SMM_SAVE_STATE_BEGIN.
Referenced by smm_get_save_state().
Definition at line 207 of file smihandler.c.
Referenced by smi_handler().
|
static |
Definition at line 17 of file smihandler.c.
Referenced by smi_handler().
|
static |
Definition at line 82 of file smihandler.c.
Referenced by smi_backup_pci_address(), and smi_restore_pci_address().
|
static |
Definition at line 22 of file smihandler.c.
Referenced by smi_handler(), smi_obtain_lock(), and smi_release_lock().