diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-05-15 13:22:26 +0200 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2014-06-04 11:06:58 -0400 |
commit | 40d03128531e06b35a3836f9346790003692540e (patch) | |
tree | 0807826d822c4a8eebdcac99174f96e8a1e1cb05 /src/fw/smm.c | |
parent | c029a912d39f82cefc305800b49c933f1789faee (diff) | |
download | seabios-40d03128531e06b35a3836f9346790003692540e.tar.gz |
piix: add and use dev-piix.h
Move all definitions for PIIX registers to a single header file,
like there is one already for Q35, and make the naming more
consistent.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'src/fw/smm.c')
-rw-r--r-- | src/fw/smm.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/fw/smm.c b/src/fw/smm.c index 0f59f207..20bf6317 100644 --- a/src/fw/smm.c +++ b/src/fw/smm.c @@ -7,6 +7,7 @@ #include "config.h" // CONFIG_* #include "dev-q35.h" +#include "dev-piix.h" #include "hw/pci.h" // pci_config_writel #include "hw/pci_ids.h" // PCI_VENDOR_ID_INTEL #include "hw/pci_regs.h" // PCI_DEVICE_ID @@ -86,16 +87,12 @@ smm_relocate_and_restore(void) wbinvd(); } -#define I440FX_SMRAM 0x72 -#define PIIX_DEVACTB 0x58 -#define PIIX_APMC_EN (1 << 25) - // This code is hardcoded for PIIX4 Power Management device. static void piix4_apmc_smm_setup(int isabdf, int i440_bdf) { /* check if SMM init is already done */ u32 value = pci_config_readl(isabdf, PIIX_DEVACTB); - if (value & PIIX_APMC_EN) + if (value & PIIX_DEVACTB_APMC_EN) return; /* enable the SMM memory window */ @@ -104,7 +101,7 @@ static void piix4_apmc_smm_setup(int isabdf, int i440_bdf) smm_save_and_copy(); /* enable SMI generation when writing to the APMC register */ - pci_config_writel(isabdf, PIIX_DEVACTB, value | PIIX_APMC_EN); + pci_config_writel(isabdf, PIIX_DEVACTB, value | PIIX_DEVACTB_APMC_EN); smm_relocate_and_restore(); |