-/*++\r
+/**@file\r
\r
Copyright (c) 2006 - 2007, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- PciResourceSupport.c\r
-\r
-Abstract:\r
-\r
- PCI Bus Driver\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
\r
#include "pcibus.h"\r
#include "PciResourceSupport.h"\r
Node = NULL;\r
\r
Node = AllocatePool (sizeof (PCI_RESOURCE_NODE));\r
+ ASSERT (Node != NULL);\r
if (Node == NULL) {\r
return NULL;\r
}\r
Node->PciDev = PciDev;\r
Node->Length = Length;\r
Node->Alignment = Alignment;\r
+ if(((ResType == PciBarTypeIo16) || (ResType == PciBarTypeIo32)) && ( Alignment == 0x0FFF))\r
+ {\r
+ if((PciDev->Decodes & EFI_BRIDGE_IOEN1K_DECODE_SUPPORTED) == EFI_BRIDGE_IOEN1K_DECODE_SUPPORTED)\r
+ Node->Alignment = 0x3FF;\r
+ else\r
+ Node->Alignment = 0xFFF;\r
+ }\r
Node->Bar = Bar;\r
Node->ResType = ResType;\r
Node->Reserved = FALSE;\r
//\r
// if no PMem32 request, still keep PMem64. Otherwise degrade to PMem32\r
//\r
- if (PMem32Node != NULL) {\r
+ if (PMem32Node != NULL && PMem32Node->Length != 0 && Bridge->Parent != NULL ) { \r
+ //\r
+ // Fixed the issue that there is no resource for 64-bit (above 4G)\r
+ //\r
MergeResourceTree (\r
PMem32Node,\r
PMem64Node,\r