Signed-off-by: Omar Berrow omarkberrow@gmail.com --- src/hw/pci.c | 2 +- src/resume.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/hw/pci.c b/src/hw/pci.c index 8eda84b2..dfe4d92a 100644 --- a/src/hw/pci.c +++ b/src/hw/pci.c @@ -14,7 +14,7 @@ #define PORT_PCI_CMD 0x0cf8 #define PORT_PCI_DATA 0x0cfc
-static u32 mmconfig; +volatile u32 mmconfig;
static void *mmconfig_addr(u16 bdf, u32 addr) { diff --git a/src/resume.c b/src/resume.c index fb0b8a89..10b873c3 100644 --- a/src/resume.c +++ b/src/resume.c @@ -96,6 +96,15 @@ s3_resume(void) return; }
+ make_bios_writable(); + // reset mmconfig to make sure that we don't use PCIe to + // resume PCIe + dprintf(1, "resetting mmconfig\n"); + extern volatile u32 mmconfig; + mmconfig = 0; + dprintf(1, "mmconfig: 0x%x\n", mmconfig); +// make_bios_readonly(); + pic_setup(); smm_setup(); smp_resume();