From 607ca5102e33d4329377cbf3455e2cd422f9ee16 Mon Sep 17 00:00:00 2001 From: jljusten Date: Mon, 7 Sep 2009 20:18:19 +0000 Subject: [PATCH] OVMF: Fix a hang after resetting when NV variables are preserved. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9242 6f19259b-4bc3-4df7-8a09-765794883524 --- OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c | 31 +++++++------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c index 3728d40bb1..e44c825358 100644 --- a/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c @@ -462,6 +462,14 @@ Returns: continue; } + Status = PciIo->Attributes ( + PciIo, + EfiPciIoAttributeOperationEnable, + EFI_PCI_DEVICE_ENABLE, + NULL + ); + ASSERT_EFI_ERROR (Status); + if (!DetectVgaOnly) { // // Here we decide whether it is LPC Bridge @@ -472,17 +480,11 @@ Returns: (Pci.Hdr.DeviceId == 0x7000) ) ) { - Status = PciIo->Attributes ( - PciIo, - EfiPciIoAttributeOperationEnable, - EFI_PCI_DEVICE_ENABLE, - NULL - ); // // Add IsaKeyboard to ConIn, // add IsaSerial to ConOut, ConIn, ErrOut // - DEBUG ((EFI_D_INFO, "Find the LPC Bridge device\n")); + DEBUG ((EFI_D_INFO, "Found LPC Bridge device\n")); PrepareLpcBridgeDevicePath (HandleBuffer[Index]); continue; } @@ -493,23 +495,12 @@ Returns: // // Add them to ConOut, ConIn, ErrOut. // - DEBUG ((EFI_D_INFO, "Find the 16550 SERIAL device\n")); + DEBUG ((EFI_D_INFO, "Found PCI 16550 SERIAL device\n")); PreparePciSerialDevicePath (HandleBuffer[Index]); continue; } } - if ((Pci.Hdr.VendorId == 0x8086) && - (Pci.Hdr.DeviceId == 0x7010) - ) { - Status = PciIo->Attributes ( - PciIo, - EfiPciIoAttributeOperationEnable, - EFI_PCI_DEVICE_ENABLE, - NULL - ); - } - // // Here we decide which VGA device to enable in PCI bus // @@ -517,7 +508,7 @@ Returns: // // Add them to ConOut. // - DEBUG ((EFI_D_INFO, "Find the VGA device\n")); + DEBUG ((EFI_D_INFO, "Found PCI VGA device\n")); PreparePciVgaDevicePath (HandleBuffer[Index]); continue; } -- 2.39.2