IN PCI_RESOURCE_NODE *Bridge\r
)\r
{\r
-\r
- UINT64 Aperture;\r
- LIST_ENTRY *CurrentLink;\r
- PCI_RESOURCE_NODE *Node;\r
- UINT64 Offset;\r
- BOOLEAN IsaEnable;\r
- BOOLEAN VGAEnable;\r
+ EFI_STATUS Status;\r
+ UINT64 Aperture;\r
+ LIST_ENTRY *CurrentLink;\r
+ PCI_RESOURCE_NODE *Node;\r
+ UINT64 Offset;\r
+ BOOLEAN IsaEnable;\r
+ BOOLEAN VGAEnable;\r
+ EFI_PCI_PLATFORM_POLICY PciPolicy;\r
+ \r
\r
//\r
// Always assume there is ISA device and VGA device on the platform\r
IsaEnable = FALSE;\r
VGAEnable = FALSE;\r
\r
- if (FeaturePcdGet (PcdPciIsaEnable)){\r
- IsaEnable = TRUE;\r
- }\r
-\r
- if (FeaturePcdGet (PcdPciVgaEnable)){\r
- VGAEnable = TRUE;\r
+ //\r
+ // Check PciPlatform policy\r
+ //\r
+ if (gPciPlatformProtocol != NULL) {\r
+ Status = gPciPlatformProtocol->GetPlatformPolicy (\r
+ gPciPlatformProtocol,\r
+ &PciPolicy\r
+ );\r
+ if (!EFI_ERROR (Status)) {\r
+ if (PciPolicy & EFI_RESERVE_ISA_IO_ALIAS) {\r
+ IsaEnable = TRUE;\r
+ }\r
+ if (PciPolicy & EFI_RESERVE_VGA_IO_ALIAS) {\r
+ VGAEnable = TRUE;\r
+ }\r
+ }\r
}\r
\r
Aperture = 0;\r
//\r
if (Enable) {\r
ProgramPpbApperture (OptionRomBase, &Node);\r
- PciEnableCommandRegister (Parent, EFI_PCI_COMMAND_MEMORY_SPACE);\r
+ PCI_ENABLE_COMMAND_REGISTER (Parent, EFI_PCI_COMMAND_MEMORY_SPACE);\r
} else {\r
InitializePpb (Parent);\r
- PciDisableCommandRegister (Parent, EFI_PCI_COMMAND_MEMORY_SPACE);\r
+ PCI_DISABLE_COMMAND_REGISTER (Parent, EFI_PCI_COMMAND_MEMORY_SPACE);\r
}\r
\r
Parent = Parent->Parent;\r