]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BasePciExpressLib/PciLib.c
Removed cross references from PciCf8Lib and PciExpressLib class to PciLib class.
[mirror_edk2.git] / MdePkg / Library / BasePciExpressLib / PciLib.c
index 509a5e423fd528ce3a108b586693cad47324d8b2..6bb08938878b7209442b909d66ee35bddced0aaa 100644 (file)
@@ -40,7 +40,7 @@
   @return The base address of PCI Express.\r
 \r
 **/\r
-UINTN\r
+volatile UINTN\r
 GetPciExpressBaseAddress (\r
   VOID\r
   )\r
@@ -1220,7 +1220,7 @@ PciExpressReadBuffer (
     //\r
     // Read a byte if StartAddress is byte aligned\r
     //\r
-    *(UINT8*)Buffer = PciExpressRead8 (StartAddress);\r
+    *(volatile UINT8 *)Buffer = PciExpressRead8 (StartAddress);\r
     StartAddress += sizeof (UINT8);\r
     Size -= sizeof (UINT8);\r
     Buffer = (UINT8*)Buffer + 1;\r
@@ -1230,7 +1230,7 @@ PciExpressReadBuffer (
     //\r
     // Read a word if StartAddress is word aligned\r
     //\r
-    *(UINT16*)Buffer = PciExpressRead16 (StartAddress);\r
+    *(volatile UINT16 *)Buffer = PciExpressRead16 (StartAddress);\r
     StartAddress += sizeof (UINT16);\r
     Size -= sizeof (UINT16);\r
     Buffer = (UINT16*)Buffer + 1;\r
@@ -1240,7 +1240,7 @@ PciExpressReadBuffer (
     //\r
     // Read as many double words as possible\r
     //\r
-    *(UINT32*)Buffer = PciExpressRead32 (StartAddress);\r
+    *(volatile UINT32 *)Buffer = PciExpressRead32 (StartAddress);\r
     StartAddress += sizeof (UINT32);\r
     Size -= sizeof (UINT32);\r
     Buffer = (UINT32*)Buffer + 1;\r
@@ -1250,7 +1250,7 @@ PciExpressReadBuffer (
     //\r
     // Read the last remaining word if exist\r
     //\r
-    *(UINT16*)Buffer = PciExpressRead16 (StartAddress);\r
+    *(volatile UINT16 *)Buffer = PciExpressRead16 (StartAddress);\r
     StartAddress += sizeof (UINT16);\r
     Size -= sizeof (UINT16);\r
     Buffer = (UINT16*)Buffer + 1;\r
@@ -1260,7 +1260,7 @@ PciExpressReadBuffer (
     //\r
     // Read the last remaining byte if exist\r
     //\r
-    *(UINT8*)Buffer = PciExpressRead8 (StartAddress);\r
+    *(volatile UINT8 *)Buffer = PciExpressRead8 (StartAddress);\r
   }\r
 \r
   return ReturnValue;\r