Make sure Pcd service driver can work on 64-bit architecture.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@439 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2006-06-07 15:56:29 +00:00
parent 533f039eb0
commit 4f24235764
4 changed files with 15 additions and 15 deletions

View File

@ -74,7 +74,7 @@ PcdDxeInit (
//
// Make sure the Pcd Protocol is not already installed in the system
//
ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gPcdProtocolGuid);
BuildPcdDxeDataBase ();
@ -274,7 +274,7 @@ DxePcdGetSizeEx (
IN UINTN ExTokenNumber
)
{
return DxePcdGetSize(GetExPcdTokenNumber (Guid, ExTokenNumber));
return DxePcdGetSize(GetExPcdTokenNumber (Guid, (UINT32) ExTokenNumber));
}

View File

@ -83,7 +83,7 @@ GetWorker (
switch (LocalTokenNumber & ~PCD_DATABASE_OFFSET_MASK) {
case PCD_TYPE_VPD:
VpdHead = (VPD_HEAD *) ((UINT8 *) PcdDb + Offset);
return (VOID *) (FixedPcdGet32(PcdVpdBaseAddress) + VpdHead->Offset);
return (VOID *) (UINTN) (FixedPcdGet32(PcdVpdBaseAddress) + VpdHead->Offset);
case PCD_TYPE_HII:
GuidTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.GuidTable :
@ -134,7 +134,7 @@ DxeRegisterCallBackWorker (
LIST_ENTRY *ListNode;
if (Guid != NULL) {
TokenNumber = GetExPcdTokenNumber (Guid, TokenNumber);
TokenNumber = GetExPcdTokenNumber (Guid, (UINT32) TokenNumber);
}
ListHead = &mCallbackFnTable[TokenNumber];
@ -177,7 +177,7 @@ DxeUnRegisterCallBackWorker (
LIST_ENTRY *ListNode;
if (Guid != NULL) {
TokenNumber = GetExPcdTokenNumber (Guid, TokenNumber);
TokenNumber = GetExPcdTokenNumber (Guid, (UINT32) TokenNumber);
}
ListHead = &mCallbackFnTable[TokenNumber];
@ -398,15 +398,15 @@ GetSkuEnabledTokenNumber (
switch (LocalTokenNumber & ~PCD_DATABASE_OFFSET_MASK) {
case PCD_TYPE_VPD:
Value = (UINT8 *) &(((VPD_HEAD *) Value)[i]);
return ((Value - PcdDb) | PCD_TYPE_VPD);
return (UINT32) ((Value - PcdDb) | PCD_TYPE_VPD);
case PCD_TYPE_HII:
Value = (UINT8 *) &(((VARIABLE_HEAD *) Value)[i]);
return ((Value - PcdDb) | PCD_TYPE_HII);
return (UINT32) ((Value - PcdDb) | PCD_TYPE_HII);
case PCD_TYPE_DATA:
Value += Size * i;
return (Value - PcdDb);
return (UINT32) (Value - PcdDb);
default:
ASSERT (FALSE);
@ -583,7 +583,7 @@ ExGetWorker (
IN UINTN GetSize
)
{
return GetWorker(GetExPcdTokenNumber (Guid, ExTokenNumber), GetSize);
return GetWorker(GetExPcdTokenNumber (Guid, (UINT32) ExTokenNumber), GetSize);
}
@ -601,9 +601,9 @@ ExSetWorker (
{
UINTN TokenNumber;
TokenNumber = GetExPcdTokenNumber (Guid, ExTokenNumber);
TokenNumber = GetExPcdTokenNumber (Guid, (UINT32) ExTokenNumber);
InvokeCallbackOnSet (ExTokenNumber, Guid, TokenNumber, Data, SetSize);
InvokeCallbackOnSet ((UINT32) ExTokenNumber, Guid, TokenNumber, Data, SetSize);
SetWorker (TokenNumber, Data, SetSize, PtrType);
@ -672,7 +672,7 @@ SetHiiVariable (
UINTN
GetExPcdTokenNumber (
IN CONST EFI_GUID *Guid,
IN UINTN ExTokenNumber
IN UINT32 ExTokenNumber
)
{
UINT32 i;

View File

@ -119,7 +119,7 @@ BuildPcdDxeDataBase (
UINTN
GetExPcdTokenNumber (
IN CONST EFI_GUID *Guid,
IN UINTN ExTokenNumber
IN UINT32 ExTokenNumber
)
;
//

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<Library>PeimEntryPoint</Library>
<Library>BaseLib</Library>
<Library>PeiCoreLib</Library>
<Library>PeiServicesTablePointerLib</Library>
<Library OverrideID="4444">PeiServicesTablePointerLib</Library>
<Library>PeiHobLib</Library>
<Library>BaseDebugLibReportStatusCode</Library>
<Library>PeiMemoryLib</Library>