]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/DeviceIoToPciRootBridgeIoThunk/DeviceIoToPciRootBridgeIoThunk.c
Correct FeatureFlagExpress PCD format based on INF spec.
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / DeviceIoToPciRootBridgeIoThunk / DeviceIoToPciRootBridgeIoThunk.c
index 24acfb3b678d1cfd1bbbfdcfa1789f96bec08aa1..a0ed14af48749031bba6231ff4d0e67aedb29ba3 100644 (file)
@@ -340,7 +340,7 @@ DeviceIoFreeBuffer (
   );\r
 \r
 \r
-#define DEVICE_IO_PRIVATE_DATA_SIGNATURE  EFI_SIGNATURE_32 ('D', 'e', 'I', 'O')\r
+#define DEVICE_IO_PRIVATE_DATA_SIGNATURE  SIGNATURE_32 ('D', 'e', 'I', 'O')\r
 \r
 typedef struct {\r
   UINTN                           Signature;\r
@@ -457,6 +457,8 @@ PciRootBridgeIoNotificationEvent (
       continue;\r
     }\r
 \r
+    Private->PciRootBridgeIo = PciRootBridgeIo;\r
+\r
     Status = gBS->HandleProtocol (\r
                     Handle,\r
                     &gEfiDevicePathProtocolGuid,\r
@@ -541,7 +543,7 @@ DeviceIoMemRead (
     return EFI_INVALID_PARAMETER;\r
   }\r
   if (Width >= MMIO_COPY_UINT8) {\r
-    Width = Width - MMIO_COPY_UINT8;\r
+    Width = (EFI_IO_WIDTH) (Width - MMIO_COPY_UINT8);\r
     Status = Private->PciRootBridgeIo->CopyMem (\r
                                          Private->PciRootBridgeIo,\r
                                          (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,\r
@@ -600,7 +602,7 @@ DeviceIoMemWrite (
     return EFI_INVALID_PARAMETER;\r
   }\r
   if (Width >= MMIO_COPY_UINT8) {\r
-    Width = Width - MMIO_COPY_UINT8;\r
+    Width = (EFI_IO_WIDTH) (Width - MMIO_COPY_UINT8);\r
     Status = Private->PciRootBridgeIo->CopyMem (\r
                                          Private->PciRootBridgeIo,\r
                                          (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,\r