示例#1
0
uint32_t clear_smi_status(void)
{
	uint32_t sts = reset_smi_status();

	/*
	 * Check for power button status if nothing else is indicating an SMI
	 * and SMIs aren't turned into SCIs. Apparently, there is no PM1 status
	 * bit in the SMI status register.  That makes things difficult for
	 * determining if the power button caused an SMI.
	 */
	if (sts == 0 && !(inl(ACPI_PMIO_BASE + PM1_CNT) & SCI_EN)) {
		uint16_t pm1_sts = inw(ACPI_PMIO_BASE + PM1_STS);

		/* Fake PM1 status bit if power button pressed. */
		if (pm1_sts & PWRBTN_STS)
			sts |= (1 << FAKE_PM1_SMI_STS);
	}

	return print_smi_status(sts);
}
示例#2
0
uint32_t clear_smi_status(void)
{
	return print_smi_status(reset_smi_status());
}