]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BasePciCf8Lib/PciLib.c
If "SupArchList" is defined for a PCD in MSA, should check current arch is in the...
[mirror_edk2.git] / MdePkg / Library / BasePciCf8Lib / PciLib.c
index cbbd407eadd1d63957ff2ae99920564e2ad59431..272d641ff32af609ab574073f951a8a0ae23b643 100644 (file)
@@ -1315,7 +1315,7 @@ PciCf8ReadBuffer (
     //\r
     // Read a byte if StartAddress is byte aligned\r
     //\r
-    *(UINT8*)Buffer = PciCf8Read8 (StartAddress);\r
+    *(volatile UINT8 *)Buffer = PciCf8Read8 (StartAddress);\r
     StartAddress += sizeof (UINT8);\r
     Size -= sizeof (UINT8);\r
     Buffer = (UINT8*)Buffer + 1;\r
@@ -1325,7 +1325,7 @@ PciCf8ReadBuffer (
     //\r
     // Read a word if StartAddress is word aligned\r
     //\r
-    *(UINT16*)Buffer = PciCf8Read16 (StartAddress);\r
+    *(volatile UINT16 *)Buffer = PciCf8Read16 (StartAddress);\r
     StartAddress += sizeof (UINT16);\r
     Size -= sizeof (UINT16);\r
     Buffer = (UINT16*)Buffer + 1;\r
@@ -1335,7 +1335,7 @@ PciCf8ReadBuffer (
     //\r
     // Read as many double words as possible\r
     //\r
-    *(UINT32*)Buffer = PciCf8Read32 (StartAddress);\r
+    *(volatile UINT32 *)Buffer = PciCf8Read32 (StartAddress);\r
     StartAddress += sizeof (UINT32);\r
     Size -= sizeof (UINT32);\r
     Buffer = (UINT32*)Buffer + 1;\r
@@ -1345,7 +1345,7 @@ PciCf8ReadBuffer (
     //\r
     // Read the last remaining word if exist\r
     //\r
-    *(UINT16*)Buffer = PciCf8Read16 (StartAddress);\r
+    *(volatile UINT16 *)Buffer = PciCf8Read16 (StartAddress);\r
     StartAddress += sizeof (UINT16);\r
     Size -= sizeof (UINT16);\r
     Buffer = (UINT16*)Buffer + 1;\r
@@ -1355,7 +1355,7 @@ PciCf8ReadBuffer (
     //\r
     // Read the last remaining byte if exist\r
     //\r
-    *(UINT8*)Buffer = PciCf8Read8 (StartAddress);\r
+    *(volatile UINT8 *)Buffer = PciCf8Read8 (StartAddress);\r
   }\r
 \r
   return ReturnValue;\r