summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Pei
diff options
context:
space:
mode:
authorjchen20 <jchen20@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-10 06:10:53 +0000
committerjchen20 <jchen20@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-10 06:10:53 +0000
commit852081fc68a3b8fe372cda5fb009058d8a077ab9 (patch)
tree09e59ad328dee305a52c83ef2a0e34acb27f315c /MdeModulePkg/Core/Pei
parentd7c0e60c44d73ca4834a7ca4ab63509349e15899 (diff)
downloadedk2-platforms-852081fc68a3b8fe372cda5fb009058d8a077ab9.tar.xz
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
Diffstat (limited to 'MdeModulePkg/Core/Pei')
-rw-r--r--MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c28
-rw-r--r--MdeModulePkg/Core/Pei/Image/Image.c6
-rw-r--r--MdeModulePkg/Core/Pei/PeiMain.inf4
3 files changed, 19 insertions, 19 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index 888887a418..0a4eaee482 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -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
diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c
index c2683762b7..b5fed45bd5 100644
--- a/MdeModulePkg/Core/Pei/Image/Image.c
+++ b/MdeModulePkg/Core/Pei/Image/Image.c
@@ -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"));
diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf b/MdeModulePkg/Core/Pei/PeiMain.inf
index 2b8c4ad8b9..5c65174033 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.inf
+++ b/MdeModulePkg/Core/Pei/PeiMain.inf
@@ -88,8 +88,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPpiSupported ## CONSUMES
- gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable ## CONSUMES
-
+
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst ## CONSUMES
@@ -97,4 +96,5 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressPeiCodePageNumber ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressBootTimeCodePageNumber ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressRuntimeCodePageNumber ## SOMETIMES_CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable ## CONSUMES