/* Print TCO status bits */ static u32 print_tco_status(u32 tco_sts) { const char *tco_sts_bits[] = { [0] = "NMI2SMI", [1] = "SW_TCO", [2] = "TCO_INT", [3] = "TIMEOUT", [7] = "NEWCENTURY", [8] = "BIOSWR", [9] = "DMISCI", [10] = "DMISMI", [12] = "DMISERR", [13] = "SLVSEL", [16] = "INTRD_DET", [17] = "SECOND_TO", [18] = "BOOT", [20] = "SMLINK_SLV" }; if (!tco_sts) return 0; printk(BIOS_DEBUG, "TCO_STS: "); print_status_bits(tco_sts, tco_sts_bits); printk(BIOS_DEBUG, "\n"); return tco_sts; }
static uint32_t print_smi_status(uint32_t smi_sts) { static const char * const smi_sts_bits[] = { [2] = "BIOS", [4] = "SLP_SMI", [5] = "APM", [6] = "SWSMI_TMR", [8] = "PM1", [9] = "GPE0", [12] = "DEVMON", [13] = "TCO", [14] = "PERIODIC", [15] = "ILB", [16] = "SMBUS_SMI", [17] = "LEGACY_USB2", [18] = "INTEL_USB2", [20] = "PCI_EXP_SMI", [26] = "SPI", [28] = "PUNIT", [29] = "GUNIT", }; if (!smi_sts) return 0; printk(BIOS_DEBUG, "SMI_STS: "); print_status_bits(smi_sts, smi_sts_bits); printk(BIOS_DEBUG, "\n"); return smi_sts; }
/* Print SMI status bits */ static u32 print_smi_status(u32 smi_sts) { const char *smi_sts_bits[] = { [2] = "BIOS", [3] = "LEGACY_USB", [4] = "SLP_SMI", [5] = "APM", [6] = "SWSMI_TMR", [8] = "PM1", [9] = "GPE0", [10] = "GPI", [11] = "MCSMI", [12] = "DEVMON", [13] = "TCO", [14] = "PERIODIC", [15] = "SERIRQ_SMI", [16] = "SMBUS_SMI", [17] = "LEGACY_USB2", [18] = "INTEL_USB2", [20] = "PCI_EXP_SMI", [21] = "MONITOR", [26] = "SPI", [27] = "GPIO_UNLOCK" }; if (!smi_sts) return 0; printk(BIOS_DEBUG, "SMI_STS: "); print_status_bits(smi_sts, smi_sts_bits); printk(BIOS_DEBUG, "\n"); return smi_sts; }
/* Print GPE0 status bits */ static u32 print_gpe_status(u32 gpe0_sts, const char *bit_names[]) { if (!gpe0_sts) return 0; printk(BIOS_DEBUG, "GPE0_STS: "); print_status_bits(gpe0_sts, bit_names); printk(BIOS_DEBUG, "\n"); return gpe0_sts; }
static uint32_t print_tco_status(uint32_t tco_sts) { static const char * const tco_sts_bits[] = { [3] = "TIMEOUT", [17] = "SECOND_TO", }; if (!tco_sts) return 0; printk(BIOS_DEBUG, "TCO_STS: "); print_status_bits(tco_sts, tco_sts_bits); printk(BIOS_DEBUG, "\n"); return tco_sts; }
static uint32_t print_gpe_sts(uint32_t gpe_sts) { static const char * const gpe_sts_bits[] = { [1] = "HOTPLUG", [2] = "SWGPE", [3] = "PCIE_WAKE0", [4] = "PUNIT", [5] = "GUNIT", [6] = "PCIE_WAKE1", [7] = "PCIE_WAKE2", [8] = "PCIE_WAKE3", [9] = "PCI_EXP", [10] = "BATLOW", [13] = "PME_B0", [16] = "SUS_GPIO_0", [17] = "SUS_GPIO_1", [18] = "SUS_GPIO_2", [19] = "SUS_GPIO_3", [20] = "SUS_GPIO_4", [21] = "SUS_GPIO_5", [22] = "SUS_GPIO_6", [23] = "SUS_GPIO_7", [24] = "CORE_GPIO_0", [25] = "CORE_GPIO_1", [26] = "CORE_GPIO_2", [27] = "CORE_GPIO_3", [28] = "CORE_GPIO_4", [29] = "CORE_GPIO_5", [30] = "CORE_GPIO_6", [31] = "CORE_GPIO_7", }; if (!gpe_sts) return gpe_sts; printk(BIOS_DEBUG, "GPE0a_STS: "); print_status_bits(gpe_sts, gpe_sts_bits); printk(BIOS_DEBUG, "\n"); return gpe_sts; }
static uint16_t print_pm1_status(uint16_t pm1_sts) { static const char * const pm1_sts_bits[] = { [0] = "TMROF", [5] = "GBL", [8] = "PWRBTN", [10] = "RTC", [11] = "PRBTNOR", [13] = "USB", [14] = "PCIEXPWAK", [15] = "WAK", }; if (!pm1_sts) return 0; printk(BIOS_SPEW, "PM1_STS: "); print_status_bits(pm1_sts, pm1_sts_bits); printk(BIOS_SPEW, "\n"); return pm1_sts; }