diff options
author | zliu3 <zliu3@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-03-13 08:44:09 +0000 |
---|---|---|
committer | zliu3 <zliu3@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-03-13 08:44:09 +0000 |
commit | 31bbf49fa70c32e712b8dc83dbbb7d924735ee95 (patch) | |
tree | 5a523846276f3998ef3b0be89d7845ba64f72971 | |
parent | e92d66f2809305801f8a4c477baca5b4f3dd01d3 (diff) | |
download | edk2-platforms-31bbf49fa70c32e712b8dc83dbbb7d924735ee95.tar.xz |
Enhanced the PCI Bus DXE module
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4844 6f19259b-4bc3-4df7-8a09-765794883524
3 files changed, 18 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c index 048e30c8a3..0a5292e796 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c @@ -490,6 +490,12 @@ Returns: } else {
PciIoDevice->Decodes |= EFI_BRIDGE_IO16_DECODE_SUPPORTED;
}
+ //
+ // changed to support En1K for IO Bridge Device
+ //
+ if( (Value & 0x0c) == 0x0c ){
+ PciIoDevice->Decodes |= EFI_BRIDGE_IOEN1K_DECODE_SUPPORTED;
+ }
}
Status = BarExisted (
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c index 1b44b6bc8f..1db77d15ae 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c @@ -653,6 +653,13 @@ Returns: Node->PciDev = PciDev;
Node->Length = Length;
Node->Alignment = Alignment;
+ if(((ResType == PciBarTypeIo16) || (ResType == PciBarTypeIo32)) && ( Alignment == 0x0FFF))
+ {
+ if((PciDev->Decodes & EFI_BRIDGE_IOEN1K_DECODE_SUPPORTED) == EFI_BRIDGE_IOEN1K_DECODE_SUPPORTED)
+ Node->Alignment = 0x3FF;
+ else
+ Node->Alignment = 0xFFF;
+ }
Node->Bar = Bar;
Node->ResType = ResType;
Node->Reserved = FALSE;
@@ -1013,7 +1020,10 @@ Returns: //
// if no PMem32 request, still keep PMem64. Otherwise degrade to PMem32
//
- if (PMem32Node != NULL) {
+ if (PMem32Node != NULL && PMem32Node->Length != 0 && Bridge->Parent != NULL ) {
+ //
+ // Fixed the issue that there is no resource for 64-bit (above 4G)
+ //
MergeResourceTree (
PMem32Node,
PMem64Node,
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/pcibus.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/pcibus.h index 9db1dde553..9ce14e87e0 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/pcibus.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/pcibus.h @@ -110,6 +110,7 @@ typedef struct { #define EFI_BRIDGE_PMEM_MEM_COMBINE_SUPPORTED 0x0010
#define EFI_BRIDGE_MEM64_DECODE_SUPPORTED 0x0020
#define EFI_BRIDGE_MEM32_DECODE_SUPPORTED 0x0040
+#define EFI_BRIDGE_IOEN1K_DECODE_SUPPORTED 0x0080
#define PCI_MAX_HOST_BRIDGE_NUM 0x0010
//
|