35 gpi_rout &= ~(3 << (2 * gpi));
36 gpi_rout |= ((mode & 3) << (2 * gpi));
59 for (slot = 0; slot < 0x20; slot++) {
60 for (func = 0; func < 8; func++) {
66 if (
val == 0xffffffff ||
val == 0x00000000 ||
67 val == 0x0000ffff ||
val == 0xffff0000)
103 CONFIG_MAINBOARD_POWER_FAILURE_STATE);
121 slp_typ = acpi_sleep_from_pm1(reg32);
123 printk(
BIOS_SPEW,
"SMI#: SLP = 0x%08x, TYPE = 0x%02x\n", reg32, slp_typ);
202 em64t101_smm_state_save_area_t *
state;
206 for (node = 0; node < CONFIG_MAX_CPUS; node++) {
210 if (!(
state->io_misc_info & (1 << 0)))
214 if (
state->io_misc_info & (1 << 4))
222 if ((
state->rax & 0xff) != cmd)
235 em64t101_smm_state_save_area_t *io_smi =
242 ret = (
u32*)&io_smi->rax;
243 sub_command = (
u8)(*ret >> 8);
246 param = (
u32*)&io_smi->rbx;
255 em64t101_smm_state_save_area_t *io_smi =
262 sub_command = (io_smi->rax >> 8) & 0xff;
321 reg32 = (7 << 10) | (1 << 13);
373 if (tco_sts & (1 << 8)) {
393 }
else if (tco_sts & (1 << 3)) {
465 for (i = 0; i < 31; i++) {
466 if (smi_sts & (1 << i)) {
471 " but no handler available.\n", i);
#define MAINBOARD_POWER_ON
#define ELOG_TYPE_ACPI_ENTER
#define ELOG_TYPE_POWER_BUTTON
#define printk(level,...)
void __weak southbridge_smi_handler(void)
void __weak mainboard_smi_sleep(u8 slp_typ)
int __weak mainboard_smi_apmc(u8 data)
void __weak mainboard_smi_gpi(u32 gpi_sts)
void * smm_get_save_state(int cpu)
void outb(u8 val, u16 port)
uint32_t smmstore_exec(uint8_t command, void *param)
u32 gsmi_exec(u8 command, u32 *param)
void __noreturn halt(void)
halt the system reliably
#define APM_CNT_ELOG_GSMI
#define APM_CNT_ACPI_DISABLE
#define APM_CNT_ACPI_ENABLE
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
static __always_inline void pci_and_config8(const struct device *dev, u16 reg, u8 andmask)
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
static __always_inline void pci_or_config8(const struct device *dev, u16 reg, u8 ormask)
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
static __always_inline u8 pci_read_config8(const struct device *dev, u16 reg)
static __always_inline void pci_write_config16(const struct device *dev, u16 reg, u16 val)
static __always_inline void pci_write_config8(const struct device *dev, u16 reg, u8 val)
static int elog_gsmi_add_event(u8 event_type)
static int elog_gsmi_add_event_byte(u8 event_type, u8 data)
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
unsigned int get_uint_option(const char *name, const unsigned int fallback)
#define PCI_HEADER_TYPE_CARDBUS
#define PCI_COMMAND_MASTER
#define PCI_HEADER_TYPE_BRIDGE
#define PCI_DEV(SEGBUS, DEV, FN)
void write_pmbase16(const u8 addr, const u16 val)
u32 read_pmbase32(const u8 addr)
void write_pmbase32(const u8 addr, const u32 val)
u16 read_pmbase16(const u8 addr)
void write_pmbase8(const u8 addr, const u8 val)
u8 read_pmbase8(const u8 addr)
#define D31F0_GEN_PMCON_3
const struct smm_save_state_ops *legacy_ops __weak
const smi_handler_t southbridge_smi[SMI_STS_BITS]
void southbridge_smi_set_eos(void)
void(* smi_handler_t)(void)
void southbridge_finalize_all(void)
void southbridge_smm_xhci_sleep(u8 slp_type)
void southbridge_smi_monitor(void)
void southbridge_gate_memory_reset(void)
void alt_gpi_mask(u16 clr, u16 set)
u16 reset_alt_gp_smi_status(void)
read and clear ALT_GP_SMI_STS
void gpe0_mask(u32 clr, u32 set)
static void southbridge_smi_pm1(void)
static void southbridge_smi_store(void)
static void busmaster_disable_on_bus(int bus)
static void southbridge_smi_apmc(void)
static void southbridge_smi_periodic(void)
static void southbridge_smi_gpe0(void)
static int mainboard_finalized
static em64t101_smm_state_save_area_t * smi_apmc_find_state_save(u8 cmd)
static void southbridge_smi_gpi(void)
static void southbridge_smi_gsmi(void)
void gpi_route_interrupt(u8 gpi, u8 mode)
static void southbridge_smi_tco(void)
static void southbridge_smi_mc(void)
static void southbridge_smi_sleep(void)
static int power_on_after_fail(void)
static void dump_gpe0_status(u32 gpe0_sts)
static u16 reset_pm1_status(void)
read and clear PM1_STS
static u32 reset_smi_status(void)
read and clear SMI_STS
static void dump_tco_status(u32 tco_sts)
static u32 reset_tco_status(void)
read and clear TCOx_STS
static u32 reset_gpe0_status(void)
read and clear GPE0_STS
static void dump_smi_status(u32 smi_sts)
static void dump_pm1_status(u16 pm1_sts)
typedef void(X86APIP X86EMU_intrFuncs)(int num)