SMM: add defines for APM_CNT register
in the current code, the defines for the APM_CNT (0xb2) register are duplicated in almost every place where it is used. define those values in cpu/x86/smm.h, and only include this file. And while at it, fixup whitespace. Change-Id: Iae712aff53322acd51e89986c2abf4c794e25484 Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-on: http://review.coreboot.org/4 Tested-by: build bot (Jenkins)
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <arch/ioapic.h>
|
||||
#include <cpu/cpu.h>
|
||||
#include "i82801gx.h"
|
||||
#include <cpu/x86/smm.h>
|
||||
|
||||
#define NMI_OFF 0
|
||||
|
||||
@@ -341,13 +342,13 @@ static void i82801gx_lock_smm(struct device *dev)
|
||||
#endif
|
||||
|
||||
#if ENABLE_ACPI_MODE_IN_COREBOOT
|
||||
printk(BIOS_DEBUG, "Enabling ACPI via APMC:\n");
|
||||
outb(0xe1, 0xb2); // Enable ACPI mode
|
||||
printk(BIOS_DEBUG, "done.\n");
|
||||
printk(BIOS_DEBUG, "Enabling ACPI via APMC:\n");
|
||||
outb(APM_CNT_ACPI_ENABLE, APM_CNT); // Enable ACPI mode
|
||||
printk(BIOS_DEBUG, "done.\n");
|
||||
#else
|
||||
printk(BIOS_DEBUG, "Disabling ACPI via APMC:\n");
|
||||
outb(0x1e, 0xb2); // Disable ACPI mode
|
||||
printk(BIOS_DEBUG, "done.\n");
|
||||
printk(BIOS_DEBUG, "Disabling ACPI via APMC:\n");
|
||||
outb(APM_CNT_ACPI_DISABLE, APM_CNT); // Disable ACPI mode
|
||||
printk(BIOS_DEBUG, "done.\n");
|
||||
#endif
|
||||
/* Don't allow evil boot loaders, kernels, or
|
||||
* userspace applications to deceive us:
|
||||
|
Reference in New Issue
Block a user