diff mbox

[edk2,10/17] OvmfPkg: PciHostBridgeLib: set supported and initial attributes in RootBus

Message ID 1456532616-32475-11-git-send-email-lersek@redhat.com
State Superseded
Headers show

Commit Message

Laszlo Ersek Feb. 27, 2016, 12:23 a.m. UTC
These settings are copied from the RootBridgeConstructor() function, file
"OvmfPkg/PciHostBridgeDxe/PciRootBridgeIo.c".

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

-- 
1.8.3.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
index 7dd88e02283a..d7b01114c4aa 100644
--- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -17,6 +17,8 @@ 
 
 #include <IndustryStandard/Pci.h>
 
+#include <Protocol/PciRootBridgeIo.h>
+
 #include <Library/BaseMemoryLib.h>
 #include <Library/DebugLib.h>
 #include <Library/MemoryAllocationLib.h>
@@ -73,6 +75,15 @@  InitRootBridge (
 
   RootBus->Segment = 0;
 
+  RootBus->Supports   = EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO |
+                        EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO |
+                        EFI_PCI_ATTRIBUTE_ISA_IO_16 |
+                        EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO |
+                        EFI_PCI_ATTRIBUTE_VGA_MEMORY |
+                        EFI_PCI_ATTRIBUTE_VGA_IO_16  |
+                        EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16;
+  RootBus->Attributes = RootBus->Supports;
+
   return EFI_OUT_OF_RESOURCES;
 }