diff options
Diffstat (limited to 'MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c')
-rw-r--r-- | MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c index 8315bc41d0..784bf5560e 100644 --- a/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c +++ b/MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c @@ -287,6 +287,7 @@ Returns: UINT8 *TmpPxePointer;
EFI_PCI_IO_PROTOCOL *PciIoFncs;
UINTN Len;
+ UINT64 Supports;
Status = gBS->OpenProtocol (
Controller,
@@ -380,10 +381,19 @@ Returns: Status = PciIoFncs->Attributes (
PciIoFncs,
- EfiPciIoAttributeOperationEnable,
- EFI_PCI_DEVICE_ENABLE | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER,
- NULL
+ EfiPciIoAttributeOperationSupported,
+ 0,
+ &Supports
);
+ if (!EFI_ERROR (Status)) {
+ Supports &= EFI_PCI_DEVICE_ENABLE;
+ Status = PciIoFncs->Attributes (
+ PciIoFncs,
+ EfiPciIoAttributeOperationEnable,
+ Supports,
+ NULL
+ );
+ }
//
// Read all the registers from device's PCI Configuration space
//
|