/*++\r
\r
-Copyright (c) 2005 - 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
#include "PcatPciRootBridge.h"\r
\r
-static BOOLEAN mPciOptionRomTableInstalled = FALSE;\r
-static EFI_PCI_OPTION_ROM_TABLE mPciOptionRomTable = {0, NULL};\r
+BOOLEAN mPciOptionRomTableInstalled = FALSE;\r
+EFI_PCI_OPTION_ROM_TABLE mPciOptionRomTable = {0, NULL};\r
\r
EFI_STATUS\r
PcatRootBridgeIoIoRead (\r
// Check PciExpressBaseAddress\r
//\r
if ((PrivateData->PciExpressBaseAddress == 0) ||\r
- (PrivateData->PciExpressBaseAddress >= EFI_MAX_ADDRESS)) {\r
+ (PrivateData->PciExpressBaseAddress >= MAX_ADDRESS)) {\r
return EFI_UNSUPPORTED;\r
} else {\r
UsePciExpressAccess = TRUE;\r
return EFI_SUCCESS;\r
}\r
\r
-static\r
VOID\r
ScanPciBus(\r
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoDev,\r
}\r
}\r
\r
-static\r
VOID\r
CheckForRom (\r
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoDev,\r
Status = gBS->AllocatePool(\r
EfiBootServicesData,\r
((UINT32)mPciOptionRomTable.PciOptionRomCount + 1) * sizeof(EFI_PCI_OPTION_ROM_DESCRIPTOR),\r
- &TempPciOptionRomDescriptors\r
+ (VOID **) &TempPciOptionRomDescriptors\r
);\r
if (mPciOptionRomTable.PciOptionRomCount > 0) {\r
CopyMem(\r
IoDev->Pci.Write (IoDev, EfiPciWidthUint32, Address, sizeof(PciHeader)/sizeof(UINT32), &PciHeader);\r
}\r
\r
-static\r
VOID\r
SaveCommandRegister (\r
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoDev,\r
//\r
// Clear the memory enable bit\r
//\r
- Command = Context->CommandRegisterBuffer[Index] & (~0x02);\r
+ Command = (UINT16) (Context->CommandRegisterBuffer[Index] & (~0x02));\r
\r
IoDev->Pci.Write (IoDev, EfiPciWidthUint16, Address, 1, &Command);\r
}\r
\r
-static\r
VOID\r
RestoreCommandRegister (\r
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoDev,\r
mPciOptionRomTableInstalled = TRUE;\r
}\r
\r
- Status = IoDev->Configuration(IoDev, &Descriptors);\r
+ Status = IoDev->Configuration(IoDev, (VOID **) &Descriptors);\r
if (EFI_ERROR (Status) || Descriptors == NULL) {\r
return EFI_NOT_FOUND;\r
}\r
//\r
// Find Memory Descriptors that are less than 4GB, so the PPB Memory Window can be used for downstream devices\r
//\r
- if (Descriptors->AddrRangeMax < 0x100000000) {\r
+ if (Descriptors->AddrRangeMax < 0x100000000ULL) {\r
//\r
// Find the largest Non-Prefetchable Memory Descriptor that is less than 4GB\r
//\r
Status = gBS->AllocatePool(\r
EfiBootServicesData,\r
sizeof(UINT16) * (MaxBus - MinBus + 1) * (PCI_MAX_DEVICE+1) * (PCI_MAX_FUNC+1),\r
- &Context.CommandRegisterBuffer\r
+ (VOID **) &Context.CommandRegisterBuffer\r
);\r
\r
if (EFI_ERROR (Status)) {\r