mirror of https://github.com/acidanthera/audk.git
Fixed some issues for IA32 architecture platform build.
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
This commit is contained in:
parent
ba6e17fe11
commit
bbee9482d7
|
@ -2113,7 +2113,7 @@ ReadConfigData (
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Stride = 1 << AccessWidth;
|
Stride = 1 << AccessWidth;
|
||||||
AccessAddress += Stride;
|
AccessAddress += Stride;
|
||||||
if (AccessAddress >= (Address + (1 << Width))) {
|
if (AccessAddress >= (Address + (1 << Width))) {
|
||||||
//
|
//
|
||||||
|
@ -2215,9 +2215,7 @@ UpdateConfigData (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_PCI_REGISTER_VALUE_DATA *PciRegisterData;
|
EFI_PCI_REGISTER_VALUE_DATA *PciRegisterData;
|
||||||
UINT64 AndValue;
|
UINT64 TempValue;
|
||||||
UINT64 OrValue;
|
|
||||||
UINT32 TempValue;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// check register value incompatibility
|
// check register value incompatibility
|
||||||
|
@ -2226,28 +2224,17 @@ UpdateConfigData (
|
||||||
|
|
||||||
if (Status == EFI_SUCCESS) {
|
if (Status == EFI_SUCCESS) {
|
||||||
|
|
||||||
AndValue = (PciRegisterData->AndValue) >> ((Address & 0x3) * 8);
|
|
||||||
OrValue = (PciRegisterData->OrValue) >> ((Address & 0x3) * 8);
|
|
||||||
|
|
||||||
TempValue = * (UINT32 *) Buffer;
|
TempValue = * (UINT32 *) Buffer;
|
||||||
|
|
||||||
if (PciRegisterData->AndValue != VALUE_NOCARE) {
|
|
||||||
TempValue &= (UINT32) AndValue;
|
|
||||||
}
|
|
||||||
if (PciRegisterData->OrValue != VALUE_NOCARE) {
|
|
||||||
TempValue |= (UINT32) OrValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (Width) {
|
switch (Width) {
|
||||||
case EfiPciWidthUint8:
|
case EfiPciWidthUint8:
|
||||||
*(UINT32 *)Buffer = *(UINT32 *)Buffer & 0xffffff00 + (UINT8)TempValue;
|
* (UINT8 *) Buffer = (UINT8) TempValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EfiPciWidthUint16:
|
case EfiPciWidthUint16:
|
||||||
*(UINT32 *)Buffer = *(UINT32 *)Buffer & 0xffff0000 + (UINT16)TempValue;
|
* (UINT16 *) Buffer = (UINT16) TempValue;
|
||||||
break;
|
break;
|
||||||
case EfiPciWidthUint32:
|
case EfiPciWidthUint32:
|
||||||
*(UINT32 *)Buffer = TempValue;
|
* (UINT32 *) Buffer = (UINT32) TempValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -2340,7 +2327,7 @@ WriteConfigData (
|
||||||
//
|
//
|
||||||
UpdateConfigData (PciDeviceInfo, PCI_REGISTER_READ, AccessWidth, AccessAddress & 0xff, &Data);
|
UpdateConfigData (PciDeviceInfo, PCI_REGISTER_READ, AccessWidth, AccessAddress & 0xff, &Data);
|
||||||
|
|
||||||
Shift = (Address - AccessAddress) * 8;
|
Shift = (UINTN) ((Address - AccessAddress) * 8);
|
||||||
switch (Width) {
|
switch (Width) {
|
||||||
case EfiPciWidthUint8:
|
case EfiPciWidthUint8:
|
||||||
Data = (* (UINT8 *) Buffer) << Shift | (Data & ~(0xff << Shift));
|
Data = (* (UINT8 *) Buffer) << Shift | (Data & ~(0xff << Shift));
|
||||||
|
|
|
@ -4537,6 +4537,8 @@
|
||||||
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
<Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
<Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
<Instance ModuleGuid="be490364-73d2-420d-950e-f6450ca75dfb" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
<Instance ModuleGuid="be490364-73d2-420d-950e-f6450ca75dfb" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<!--Pkg: EdkModulePkg Mod: EdkPciIncompatibleDeviceSuppportLib Path: EdkModulePkg\Library\EdkPciIncompatibleDeviceSupportLib\EdkPciIncompatibleDeviceSupportLib.msa-->
|
||||||
|
<Instance ModuleGuid="1ca1c1f9-5baf-4204-b6e5-5e24109a4e4e" ModuleVersion="1.0" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" PackageVersion="0.3"/>
|
||||||
</Libraries>
|
</Libraries>
|
||||||
<PcdBuildDefinition>
|
<PcdBuildDefinition>
|
||||||
<PcdData ItemType="FIXED_AT_BUILD">
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
@ -4651,6 +4653,14 @@
|
||||||
<MaxDatumSize>4</MaxDatumSize>
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
<Value>320</Value>
|
<Value>320</Value>
|
||||||
</PcdData>
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdPciIncompatibleDeviceSupportMask</C_Name>
|
||||||
|
<Token>0x0001003f</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0x0</Value>
|
||||||
|
</PcdData>
|
||||||
</PcdBuildDefinition>
|
</PcdBuildDefinition>
|
||||||
<ModuleSaBuildOptions>
|
<ModuleSaBuildOptions>
|
||||||
<FvBinding>FV_RECOVERY</FvBinding>
|
<FvBinding>FV_RECOVERY</FvBinding>
|
||||||
|
|
|
@ -4521,6 +4521,8 @@
|
||||||
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
<Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
<Instance ModuleGuid="91c1677a-e57f-4191-8b8e-eb7711a716e0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
<Instance ModuleGuid="be490364-73d2-420d-950e-f6450ca75dfb" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
<Instance ModuleGuid="be490364-73d2-420d-950e-f6450ca75dfb" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
|
||||||
|
<!--Pkg: EdkModulePkg Mod: EdkPciIncompatibleDeviceSuppportLib Path: EdkModulePkg\Library\EdkPciIncompatibleDeviceSupportLib\EdkPciIncompatibleDeviceSupportLib.msa-->
|
||||||
|
<Instance ModuleGuid="1ca1c1f9-5baf-4204-b6e5-5e24109a4e4e" ModuleVersion="1.0" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d" PackageVersion="0.3"/>
|
||||||
</Libraries>
|
</Libraries>
|
||||||
<PcdBuildDefinition>
|
<PcdBuildDefinition>
|
||||||
<PcdData ItemType="FIXED_AT_BUILD">
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
@ -4635,6 +4637,14 @@
|
||||||
<MaxDatumSize>4</MaxDatumSize>
|
<MaxDatumSize>4</MaxDatumSize>
|
||||||
<Value>320</Value>
|
<Value>320</Value>
|
||||||
</PcdData>
|
</PcdData>
|
||||||
|
<PcdData ItemType="FIXED_AT_BUILD">
|
||||||
|
<C_Name>PcdPciIncompatibleDeviceSupportMask</C_Name>
|
||||||
|
<Token>0x0001003f</Token>
|
||||||
|
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
|
||||||
|
<DatumType>UINT8</DatumType>
|
||||||
|
<MaxDatumSize>1</MaxDatumSize>
|
||||||
|
<Value>0x0</Value>
|
||||||
|
</PcdData>
|
||||||
</PcdBuildDefinition>
|
</PcdBuildDefinition>
|
||||||
<ModuleSaBuildOptions>
|
<ModuleSaBuildOptions>
|
||||||
<FvBinding>FV_RECOVERY</FvBinding>
|
<FvBinding>FV_RECOVERY</FvBinding>
|
||||||
|
|
Loading…
Reference in New Issue