18 #include <soc/pci_devs.h>
21 #include <soc/device_nvs.h>
52 for (slot = 0; slot < 0x20; slot++) {
53 for (func = 0; func < 8; func++) {
59 if (
val == 0xffffffff ||
val == 0x00000000 ||
60 val == 0x0000ffff ||
val == 0xffff0000)
92 slp_typ = acpi_sleep_from_pm1(reg32);
160 em64t100_smm_state_save_area_t *
state;
164 for (node = 0; node < CONFIG_MAX_CPUS; node++) {
168 if (!(
state->io_misc_info & (1 << 0)))
172 if (
state->io_misc_info & (1 << 4))
180 if ((
state->rax & 0xff) != cmd)
199 ret = (
u32 *)&io_smi->rax;
200 sub_command = (
uint8_t)(*ret >> 8);
203 param = (
u32 *)&io_smi->rbx;
234 #define SCC_ACPI_MODE_DISABLE(name_) \
235 do { if (dev_nvs->scc_en[SCC_NVS_ ## name_]) { \
236 reg32 = iosf_scc_read(SCC_ ## name_ ## _CTL); \
237 reg32 &= ~(SCC_CTL_PCI_CFG_DIS | SCC_CTL_ACPI_INT_EN); \
238 iosf_scc_write(SCC_ ## name_ ## _CTL, reg32); \
246 #define LPSS_ACPI_MODE_DISABLE(name_) \
247 do { if (dev_nvs->lpss_en[LPSS_NVS_ ## name_]) { \
248 reg32 = iosf_lpss_read(LPSS_ ## name_ ## _CTL); \
249 reg32 &= ~LPSS_CTL_PCI_CFG_DIS | ~LPSS_CTL_ACPI_INT_EN; \
250 iosf_lpss_write(LPSS_ ## name_ ## _CTL, reg32); \
278 sub_command = (io_smi->rax >> 8) & 0xff;
281 reg_ebx = io_smi->rbx;
411 if (!(smi_sts & (1 << i)))
418 "SMI_STS[%d] occurred, but no handler available.\n", i);
#define LPE_PCICFGCTR1_ACPI_INT_EN
#define LPE_PCICFGCTR1_PCI_CFG_DIS
void iosf_port58_write(int reg, uint32_t val)
uint32_t iosf_port58_read(int reg)
uint16_t clear_pm1_status(void)
void enable_pm1_control(uint32_t mask)
uint32_t clear_alt_status(void)
void disable_smi(uint32_t mask)
void enable_smi(uint32_t mask)
uint32_t clear_gpe_status(void)
void disable_pm1_control(uint32_t mask)
void disable_all_gpe(void)
uint32_t clear_tco_status(void)
uint32_t clear_smi_status(void)
#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)
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 u16 pci_read_config16(const struct device *dev, u16 reg)
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 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.
#define PCI_HEADER_TYPE_CARDBUS
#define PCI_COMMAND_MASTER
#define PCI_HEADER_TYPE_BRIDGE
#define PCI_DEV(SEGBUS, DEV, FN)
int southbridge_io_trap_handler(int smif)
const smi_handler_t southbridge_smi[SMI_STS_BITS]
static void southbridge_smi_pm1(void)
void * acpi_get_device_nvs(void)
static void southbridge_smi_store(void)
void southbridge_smi_set_eos(void)
static em64t100_smm_state_save_area_t * smi_apmc_find_state_save(uint8_t cmd)
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)
#define SCC_ACPI_MODE_DISABLE(name_)
static void southbridge_smi_gsmi(void)
#define LPSS_ACPI_MODE_DISABLE(name_)
static void southbridge_smi_tco(void)
static void soc_legacy(void)
static void southbridge_smi_sleep(void)
void(* smi_handler_t)(void)
unsigned long long uint64_t
typedef void(X86APIP X86EMU_intrFuncs)(int num)