SMM for AMD K8 Part 1/2

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>




git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6201 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer
2010-12-18 23:29:37 +00:00
committed by Stefan Reinauer
parent 405721d45c
commit cadc545838
26 changed files with 563 additions and 29 deletions

View File

@@ -87,6 +87,24 @@ static void smi_set_eos(void)
southbridge_smi_set_eos();
}
static u32 pci_orig;
/**
* @brief Backup PCI address to make sure we do not mess up the OS
*/
static void smi_backup_pci_address(void)
{
pci_orig = inl(0xcf8);
}
/**
* @brief Restore PCI address previously backed up
*/
static void smi_restore_pci_address(void)
{
outl(pci_orig, 0xcf8);
}
/**
* @brief Interrupt handler for SMI#
*
@@ -107,6 +125,8 @@ void smi_handler(u32 smm_revision)
return;
}
smi_backup_pci_address();
node=nodeid();
console_init();
@@ -147,6 +167,8 @@ void smi_handler(u32 smm_revision)
if (southbridge_smi_handler)
southbridge_smi_handler(node, &state_save);
smi_restore_pci_address();
smi_release_lock();
/* De-assert SMI# signal to allow another SMI */