Fixed some issues for IA32 architecture platform build.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 13 Apr 2007 02:23:10 +0000 (02:23 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 13 Apr 2007 02:23:10 +0000 (02:23 +0000)
1. added UINTN typecast for shift.
2. updated Nt32.fpd and Unix.fpd.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2564 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Bus/Pci/PciBus/Dxe/PciLib.c
EdkNt32Pkg/Nt32.fpd
EdkUnixPkg/Unix.fpd

index fb6f21f..1296836 100644 (file)
@@ -2113,7 +2113,7 @@ ReadConfigData (
           return Status;\r
         }\r
 \r
-        Stride = 1 << AccessWidth;\r
+       Stride = 1 << AccessWidth;\r
         AccessAddress += Stride;\r
         if (AccessAddress >= (Address + (1 << Width))) {\r
           //\r
@@ -2215,9 +2215,7 @@ UpdateConfigData (
 {\r
   EFI_STATUS                    Status;\r
   EFI_PCI_REGISTER_VALUE_DATA   *PciRegisterData;\r
-  UINT64                        AndValue;\r
-  UINT64                        OrValue;\r
-  UINT32                        TempValue;\r
+  UINT64                        TempValue;\r
 \r
   //\r
   // check register value incompatibility\r
@@ -2226,28 +2224,17 @@ UpdateConfigData (
 \r
   if (Status == EFI_SUCCESS) {\r
 \r
-    AndValue = (PciRegisterData->AndValue) >> ((Address & 0x3) * 8);\r
-    OrValue  = (PciRegisterData->OrValue)  >> ((Address & 0x3) * 8);\r
-\r
     TempValue = * (UINT32 *) Buffer;\r
 \r
-    if (PciRegisterData->AndValue != VALUE_NOCARE) {\r
-      TempValue &= (UINT32) AndValue;\r
-    }\r
-    if (PciRegisterData->OrValue != VALUE_NOCARE) {\r
-      TempValue |= (UINT32) OrValue;\r
-    }\r
-\r
     switch (Width) {\r
     case EfiPciWidthUint8:\r
-      *(UINT32 *)Buffer = *(UINT32 *)Buffer & 0xffffff00 + (UINT8)TempValue;\r
+      * (UINT8 *) Buffer = (UINT8) TempValue;\r
       break;\r
-\r
     case EfiPciWidthUint16:\r
-      *(UINT32 *)Buffer = *(UINT32 *)Buffer & 0xffff0000 + (UINT16)TempValue;\r
+      * (UINT16 *) Buffer = (UINT16) TempValue;\r
       break;\r
     case EfiPciWidthUint32:\r
-      *(UINT32 *)Buffer = TempValue;\r
+      * (UINT32 *) Buffer = (UINT32) TempValue;\r
       break;\r
 \r
     default:\r
@@ -2340,7 +2327,7 @@ WriteConfigData (
           //\r
           UpdateConfigData (PciDeviceInfo, PCI_REGISTER_READ, AccessWidth, AccessAddress & 0xff, &Data);\r
 \r
-          Shift = (Address - AccessAddress) * 8;\r
+          Shift = (UINTN) ((Address - AccessAddress) * 8);\r
           switch (Width) {\r
           case EfiPciWidthUint8:\r
             Data = (* (UINT8 *) Buffer) << Shift | (Data & ~(0xff << Shift));\r
index ab4ac4b..9eb391b 100644 (file)
         <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="be490364-73d2-420d-950e-f6450ca75dfb" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <!--Pkg: EdkModulePkg Mod: EdkPciIncompatibleDeviceSuppportLib Path: EdkModulePkg\Library\EdkPciIncompatibleDeviceSupportLib\EdkPciIncompatibleDeviceSupportLib.msa-->\r
+        <Instance ModuleGuid="1ca1c1f9-5baf-4204-b6e5-5e24109a4e4e" ModuleVersion="1.0" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" PackageVersion="0.3"/>\r
       </Libraries>\r
       <PcdBuildDefinition>\r
         <PcdData ItemType="FIXED_AT_BUILD">\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdPciIncompatibleDeviceSupportMask</C_Name>\r
+          <Token>0x0001003f</Token>\r
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0x0</Value>\r
+        </PcdData>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>FV_RECOVERY</FvBinding>\r
index b088f7d..c48a5e7 100644 (file)
         <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="be490364-73d2-420d-950e-f6450ca75dfb" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <!--Pkg: EdkModulePkg Mod: EdkPciIncompatibleDeviceSuppportLib Path: EdkModulePkg\Library\EdkPciIncompatibleDeviceSupportLib\EdkPciIncompatibleDeviceSupportLib.msa-->\r
+        <Instance ModuleGuid="1ca1c1f9-5baf-4204-b6e5-5e24109a4e4e" ModuleVersion="1.0" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" PackageVersion="0.3"/>\r
       </Libraries>\r
       <PcdBuildDefinition>\r
         <PcdData ItemType="FIXED_AT_BUILD">\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
+        <PcdData ItemType="FIXED_AT_BUILD">\r
+          <C_Name>PcdPciIncompatibleDeviceSupportMask</C_Name>\r
+          <Token>0x0001003f</Token>\r
+          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
+          <DatumType>UINT8</DatumType>\r
+          <MaxDatumSize>1</MaxDatumSize>\r
+          <Value>0x0</Value>\r
+        </PcdData>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>FV_RECOVERY</FvBinding>\r