revise the debug message to add 0x in front of the HEX number for consistency

replace FixedPcdGetXX with PcdGetXX to access PcdLoadModuleAtFixAddressEnable

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9964 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jchen20 2010-02-10 06:10:53 +00:00
parent d7c0e60c44
commit 852081fc68
8 changed files with 27 additions and 29 deletions

View File

@ -140,9 +140,7 @@
[FeaturePcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONSUMES
[FixedPcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable ## CONSUMES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressBootTimeCodePageNumber ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressRuntimeCodePageNumber ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable ## CONSUMES

View File

@ -295,7 +295,7 @@ DxeMain (
// Configuration Table so that user could easily to retrieve the top address to load Dxe and PEI
// Code and Tseg base to load SMM driver.
//
if (FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
Status = CoreInstallConfigurationTable (&gLoadFixedAddressConfigurationTableGuid, &gLoadModuleAtFixAddressConfigurationTable);
ASSERT_EFI_ERROR (Status);
}

View File

@ -1797,7 +1797,7 @@ CoreInitializeMemoryServices (
//
PhitHob = Hob.HandoffInformationTable;
if (FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
ReservedCodePageNumber = PcdGet32(PcdLoadFixAddressRuntimeCodePageNumber);
ReservedCodePageNumber += PcdGet32(PcdLoadFixAddressBootTimeCodePageNumber);

View File

@ -355,7 +355,7 @@ GetPeCoffImageFixLoadingAssignedAddress(
// hold the spcified address. If the feature is configured as load module at fixed offset, ImageAddress hold an offset
// relative to top address
//
if ((INT64)FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) < 0) {
if ((INT64)PcdGet64(PcdLoadModuleAtFixAddressEnable) < 0) {
ImageContext->ImageAddress = gLoadModuleAtFixAddressConfigurationTable.DxeCodeTopAddress + (INT64)ImageContext->ImageAddress;
}
//
@ -367,7 +367,7 @@ GetPeCoffImageFixLoadingAssignedAddress(
}
SectionHeaderOffset += sizeof (EFI_IMAGE_SECTION_HEADER);
}
DEBUG ((EFI_D_INFO|EFI_D_LOAD, "LOADING MODULE FIXED INFO: Loading module at fixed address %x. Status = %r \n", ImageContext->ImageAddress, Status));
DEBUG ((EFI_D_INFO|EFI_D_LOAD, "LOADING MODULE FIXED INFO: Loading module at fixed address 0x%11p. Status = %r \n", (VOID *)(UINTN)(ImageContext->ImageAddress), Status));
return Status;
}
/**
@ -479,7 +479,7 @@ CoreLoadPeImage (
// If Loading Module At Fixed Address feature is enabled, the module should be loaded to
// a specified address.
//
if (FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) != 0 ) {
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0 ) {
Status = GetPeCoffImageFixLoadingAssignedAddress (&(Image->ImageContext));
if (EFI_ERROR (Status)) {

View File

@ -533,7 +533,7 @@ CoreAddMemoryDescriptor (
//
// If Loading Module At Fixed Address feature is enabled. try to allocate memory with Runtime code & Boot time code type
//
if (FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
CoreLoadingFixedAddressHook();
}

View File

@ -293,10 +293,10 @@ PeiLoadFixAddressHook(
//
TotalReservedMemorySize += PeiMemorySize;
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressRuntimeCodePageNumber= %x.\n", PcdGet32(PcdLoadFixAddressRuntimeCodePageNumber)));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressBootTimeCodePageNumber= %x.\n", PcdGet32(PcdLoadFixAddressBootTimeCodePageNumber)));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressPeiCodePageNumber= %x.\n", PcdGet32(PcdLoadFixAddressPeiCodePageNumber)));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: Total Reserved Memory Size = %lx.\n", TotalReservedMemorySize));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressRuntimeCodePageNumber= 0x%x.\n", PcdGet32(PcdLoadFixAddressRuntimeCodePageNumber)));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressBootTimeCodePageNumber= 0x%x.\n", PcdGet32(PcdLoadFixAddressBootTimeCodePageNumber)));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressPeiCodePageNumber= 0x%x.\n", PcdGet32(PcdLoadFixAddressPeiCodePageNumber)));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: Total Reserved Memory Size = 0x%lx.\n", TotalReservedMemorySize));
//
// Loop through the system memory typed hob to merge the adjacent memory range
//
@ -364,17 +364,17 @@ PeiLoadFixAddressHook(
//
// Try to find and validate the TOP address.
//
if ((INT64)FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) > 0 ) {
if ((INT64)PcdGet64(PcdLoadModuleAtFixAddressEnable) > 0 ) {
//
// The LMFA feature is enabled as load module at fixed absolute address.
//
TopLoadingAddress = (EFI_PHYSICAL_ADDRESS)FixedPcdGet64(PcdLoadModuleAtFixAddressEnable);
TopLoadingAddress = (EFI_PHYSICAL_ADDRESS)PcdGet64(PcdLoadModuleAtFixAddressEnable);
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: Loading module at fixed absolute address.\n"));
//
// validate the Address. Loop the resource descriptor HOB to make sure the address is in valid memory range
//
if ((TopLoadingAddress & EFI_PAGE_MASK) != 0) {
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:Top Address %lx is invalid since top address should be page align. \n", TopLoadingAddress));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:Top Address 0x%lx is invalid since top address should be page align. \n", TopLoadingAddress));
ASSERT (FALSE);
}
//
@ -405,10 +405,10 @@ PeiLoadFixAddressHook(
}
}
if (CurrentResourceHob != NULL) {
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO:Top Address %lx is valid \n", TopLoadingAddress));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO:Top Address 0x%lx is valid \n", TopLoadingAddress));
TopLoadingAddress += MINIMUM_INITIAL_MEMORY_SIZE;
} else {
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:Top Address %lx is invalid \n", TopLoadingAddress));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:Top Address 0x%lx is invalid \n", TopLoadingAddress));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:The recommended Top Address for the platform is: \n"));
//
// Print the recomended Top address range.
@ -429,7 +429,7 @@ PeiLoadFixAddressHook(
// See if Top address specified by user is valid.
//
if (ResourceHob->ResourceLength > TotalReservedMemorySize) {
DEBUG ((EFI_D_INFO, "(%lx, %lx)\n",
DEBUG ((EFI_D_INFO, "(0x%lx, 0x%lx)\n",
(ResourceHob->PhysicalStart + TotalReservedMemorySize -MINIMUM_INITIAL_MEMORY_SIZE),
(ResourceHob->PhysicalStart + ResourceHob->ResourceLength -MINIMUM_INITIAL_MEMORY_SIZE)
));
@ -546,7 +546,7 @@ PeiLoadFixAddressHook(
// Cache the top address for Loading Module at Fixed Address feature
//
PrivateData->LoadModuleAtFixAddressTopAddress = TopLoadingAddress - MINIMUM_INITIAL_MEMORY_SIZE;
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: Top address = %lx\n", PrivateData->LoadModuleAtFixAddressTopAddress));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: Top address = 0x%lx\n", PrivateData->LoadModuleAtFixAddressTopAddress));
//
// reinstall the PEI memory relative to TopLoadingAddress
//
@ -796,7 +796,7 @@ PeiDispatcher (
));
DEBUG_CODE_END ();
if (FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
//
// Loading Module at Fixed Address is enabled
//
@ -940,13 +940,13 @@ PeiDispatcher (
//
PrivateInMem->PeimDispatcherReenter = TRUE;
if (FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
//
// if Loading Module at Fixed Address is enabled, This is the first invoke to page
// allocation for Pei Core segment. This memory segment should be reserved for loading PEIM
//
LoadFixPeiCodeBegin = AllocatePages((UINTN)PcdGet32(PcdLoadFixAddressPeiCodePageNumber));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PeiCodeBegin = %x, PeiCodeTop= %x\n", (UINTN)LoadFixPeiCodeBegin, ((UINTN)LoadFixPeiCodeBegin) + PcdGet32(PcdLoadFixAddressPeiCodePageNumber) * EFI_PAGE_SIZE));
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PeiCodeBegin = 0x%lx, PeiCodeTop= 0xl%x\n", (UINTN)LoadFixPeiCodeBegin, ((UINTN)LoadFixPeiCodeBegin) + PcdGet32(PcdLoadFixAddressPeiCodePageNumber) * EFI_PAGE_SIZE));
//
// if Loading Module at Fixed Address is enabled, allocate the PEI code memory range usage bit map array.
// Every bit in the array indicate the status of the corresponding memory page, available or not

View File

@ -251,7 +251,7 @@ GetPeCoffImageFixLoadingAssignedAddress(
//
// Found first section header that doesn't point to code section.
//
if ((INT64)FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) > 0) {
if ((INT64)PcdGet64(PcdLoadModuleAtFixAddressEnable) > 0) {
//
// When LMFA feature is configured as Load Module at Fixed Absolute Address mode, PointerToRelocations & PointerToLineNumbers field
// hold the absolute address of image base runing in memory
@ -279,7 +279,7 @@ GetPeCoffImageFixLoadingAssignedAddress(
}
SectionHeaderOffset += sizeof (EFI_IMAGE_SECTION_HEADER);
}
DEBUG ((EFI_D_INFO|EFI_D_LOAD, "LOADING MODULE FIXED INFO: Loading module at fixed address %lx. Status= %r \n", FixLoaddingAddress, Status));
DEBUG ((EFI_D_INFO|EFI_D_LOAD, "LOADING MODULE FIXED INFO: Loading module at fixed address 0x%11p. Status= %r \n", (VOID *)(UINTN)FixLoaddingAddress, Status));
return Status;
}
/**
@ -336,7 +336,7 @@ LoadAndRelocatePeCoffImage (
// Allocate Memory for the image when memory is ready, boot mode is not S3, and image is relocatable.
//
if ((!ImageContext.RelocationsStripped) && (Private->PeiMemoryInstalled) && (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) {
if (FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
Status = GetPeCoffImageFixLoadingAssignedAddress(&ImageContext, Private);
if (EFI_ERROR (Status)){
DEBUG ((EFI_D_INFO|EFI_D_LOAD, "LOADING MODULE FIXED ERROR: Failed to load module at fixed address. \n"));

View File

@ -88,7 +88,6 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPpiSupported ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable ## CONSUMES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize ## CONSUMES
@ -97,4 +96,5 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressPeiCodePageNumber ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressBootTimeCodePageNumber ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressRuntimeCodePageNumber ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable ## CONSUMES