UefiCpuPkg: Change use of EFI_D_* to DEBUG_*

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739

Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Michael D Kinney 2021-11-16 19:21:42 -08:00 committed by mergify[bot]
parent 586fda4800
commit 96e1cba5c1
10 changed files with 56 additions and 58 deletions

View File

@ -900,7 +900,7 @@ CpuIoInitialize (
// //
// Shadow completed and running from memory // Shadow completed and running from memory
// //
DEBUG ((EFI_D_INFO, "CpuIO PPI has been loaded into memory. Reinstalled PPI=0x%x\n", &gCpuIoPpi)); DEBUG ((DEBUG_INFO, "CpuIO PPI has been loaded into memory. Reinstalled PPI=0x%x\n", &gCpuIoPpi));
} else { } else {
Status = PeiServicesInstallPpi (&gPpiList); Status = PeiServicesInstallPpi (&gPpiList);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);

View File

@ -227,7 +227,7 @@ CollectBistDataFromPpi (
BspCpuInstance.InfoRecord.IA32HealthFlags.Uint32 = SecPlatformInformation->IA32HealthFlags.Uint32; BspCpuInstance.InfoRecord.IA32HealthFlags.Uint32 = SecPlatformInformation->IA32HealthFlags.Uint32;
CpuInstance = &BspCpuInstance; CpuInstance = &BspCpuInstance;
} else { } else {
DEBUG ((EFI_D_INFO, "Does not find any stored CPU BIST information from PPI!\n")); DEBUG ((DEBUG_INFO, "Does not find any stored CPU BIST information from PPI!\n"));
} }
} }
for (ProcessorNumber = 0; ProcessorNumber < NumberOfProcessors; ProcessorNumber ++) { for (ProcessorNumber = 0; ProcessorNumber < NumberOfProcessors; ProcessorNumber ++) {
@ -250,7 +250,7 @@ CollectBistDataFromPpi (
(EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_SELF_TEST) (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_SELF_TEST)
); );
} }
DEBUG ((EFI_D_INFO, " APICID - 0x%08x, BIST - 0x%08x\n", DEBUG ((DEBUG_INFO, " APICID - 0x%08x, BIST - 0x%08x\n",
(UINT32) ProcessorInfo.ProcessorId, (UINT32) ProcessorInfo.ProcessorId,
BistData BistData
)); ));
@ -288,4 +288,3 @@ CollectBistDataFromPpi (
ASSERT_EFI_ERROR(Status); ASSERT_EFI_ERROR(Status);
} }
} }

View File

@ -126,7 +126,7 @@ CpuS3DataOnEndOfDxe (
); );
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
DEBUG ((EFI_D_VERBOSE, "%a\n", __FUNCTION__)); DEBUG ((DEBUG_VERBOSE, "%a\n", __FUNCTION__));
MtrrGetAllMtrrs (&AcpiCpuDataEx->MtrrTable); MtrrGetAllMtrrs (&AcpiCpuDataEx->MtrrTable);
// //

View File

@ -197,8 +197,8 @@ InternalSmstGetVendorTableByGuid (
// 32 PEI + 64 DXE // 32 PEI + 64 DXE
// //
Smst64 = (EFI_SMM_SYSTEM_TABLE2_64 *)Smst; Smst64 = (EFI_SMM_SYSTEM_TABLE2_64 *)Smst;
DEBUG ((EFI_D_INFO, "InitCommunicationContext - SmmConfigurationTable: %x\n", Smst64->SmmConfigurationTable)); DEBUG ((DEBUG_INFO, "InitCommunicationContext - SmmConfigurationTable: %x\n", Smst64->SmmConfigurationTable));
DEBUG ((EFI_D_INFO, "InitCommunicationContext - NumberOfTableEntries: %x\n", Smst64->NumberOfTableEntries)); DEBUG ((DEBUG_INFO, "InitCommunicationContext - NumberOfTableEntries: %x\n", Smst64->NumberOfTableEntries));
SmmConfigurationTable64 = (EFI_CONFIGURATION_TABLE64 *)(UINTN)Smst64->SmmConfigurationTable; SmmConfigurationTable64 = (EFI_CONFIGURATION_TABLE64 *)(UINTN)Smst64->SmmConfigurationTable;
NumberOfTableEntries = (UINTN)Smst64->NumberOfTableEntries; NumberOfTableEntries = (UINTN)Smst64->NumberOfTableEntries;
for (Index = 0; Index < NumberOfTableEntries; Index++) { for (Index = 0; Index < NumberOfTableEntries; Index++) {
@ -208,8 +208,8 @@ InternalSmstGetVendorTableByGuid (
} }
return NULL; return NULL;
} else { } else {
DEBUG ((EFI_D_INFO, "InitCommunicationContext - SmmConfigurationTable: %x\n", Smst->SmmConfigurationTable)); DEBUG ((DEBUG_INFO, "InitCommunicationContext - SmmConfigurationTable: %x\n", Smst->SmmConfigurationTable));
DEBUG ((EFI_D_INFO, "InitCommunicationContext - NumberOfTableEntries: %x\n", Smst->NumberOfTableEntries)); DEBUG ((DEBUG_INFO, "InitCommunicationContext - NumberOfTableEntries: %x\n", Smst->NumberOfTableEntries));
SmmConfigurationTable = Smst->SmmConfigurationTable; SmmConfigurationTable = Smst->SmmConfigurationTable;
NumberOfTableEntries = Smst->NumberOfTableEntries; NumberOfTableEntries = Smst->NumberOfTableEntries;
for (Index = 0; Index < NumberOfTableEntries; Index++) { for (Index = 0; Index < NumberOfTableEntries; Index++) {
@ -239,8 +239,8 @@ InitCommunicationContext (
SmramDescriptor = (EFI_SMRAM_DESCRIPTOR *) GET_GUID_HOB_DATA (GuidHob); SmramDescriptor = (EFI_SMRAM_DESCRIPTOR *) GET_GUID_HOB_DATA (GuidHob);
SmmS3ResumeState = (SMM_S3_RESUME_STATE *)(UINTN)SmramDescriptor->CpuStart; SmmS3ResumeState = (SMM_S3_RESUME_STATE *)(UINTN)SmramDescriptor->CpuStart;
DEBUG ((EFI_D_INFO, "InitCommunicationContext - SmmS3ResumeState: %x\n", SmmS3ResumeState)); DEBUG ((DEBUG_INFO, "InitCommunicationContext - SmmS3ResumeState: %x\n", SmmS3ResumeState));
DEBUG ((EFI_D_INFO, "InitCommunicationContext - Smst: %x\n", SmmS3ResumeState->Smst)); DEBUG ((DEBUG_INFO, "InitCommunicationContext - Smst: %x\n", SmmS3ResumeState->Smst));
SmmCommunicationContext = (EFI_SMM_COMMUNICATION_CONTEXT *)InternalSmstGetVendorTableByGuid ( SmmCommunicationContext = (EFI_SMM_COMMUNICATION_CONTEXT *)InternalSmstGetVendorTableByGuid (
SmmS3ResumeState->Signature, SmmS3ResumeState->Signature,
@ -283,7 +283,7 @@ Communicate (
UINTN Size; UINTN Size;
EFI_SMM_COMMUNICATION_CONTEXT *SmmCommunicationContext; EFI_SMM_COMMUNICATION_CONTEXT *SmmCommunicationContext;
DEBUG ((EFI_D_INFO, "PiSmmCommunicationPei Communicate Enter\n")); DEBUG ((DEBUG_INFO, "PiSmmCommunicationPei Communicate Enter\n"));
if (CommBuffer == NULL) { if (CommBuffer == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
@ -316,18 +316,18 @@ Communicate (
// Check SMRAM locked, it should be done after SMRAM lock. // Check SMRAM locked, it should be done after SMRAM lock.
// //
if (!SmmAccess->LockState) { if (!SmmAccess->LockState) {
DEBUG ((EFI_D_INFO, "PiSmmCommunicationPei LockState - %x\n", (UINTN)SmmAccess->LockState)); DEBUG ((DEBUG_INFO, "PiSmmCommunicationPei LockState - %x\n", (UINTN)SmmAccess->LockState));
return EFI_NOT_STARTED; return EFI_NOT_STARTED;
} }
SmmCommunicationContext = GetCommunicationContext (); SmmCommunicationContext = GetCommunicationContext ();
DEBUG ((EFI_D_INFO, "PiSmmCommunicationPei BufferPtrAddress - 0x%016lx, BufferPtr: 0x%016lx\n", SmmCommunicationContext->BufferPtrAddress, *(EFI_PHYSICAL_ADDRESS *)(UINTN)SmmCommunicationContext->BufferPtrAddress)); DEBUG ((DEBUG_INFO, "PiSmmCommunicationPei BufferPtrAddress - 0x%016lx, BufferPtr: 0x%016lx\n", SmmCommunicationContext->BufferPtrAddress, *(EFI_PHYSICAL_ADDRESS *)(UINTN)SmmCommunicationContext->BufferPtrAddress));
// //
// No need to check if BufferPtr is 0, because it is in PEI phase. // No need to check if BufferPtr is 0, because it is in PEI phase.
// //
*(EFI_PHYSICAL_ADDRESS *)(UINTN)SmmCommunicationContext->BufferPtrAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)CommBuffer; *(EFI_PHYSICAL_ADDRESS *)(UINTN)SmmCommunicationContext->BufferPtrAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)CommBuffer;
DEBUG ((EFI_D_INFO, "PiSmmCommunicationPei CommBuffer - %x\n", (UINTN)CommBuffer)); DEBUG ((DEBUG_INFO, "PiSmmCommunicationPei CommBuffer - %x\n", (UINTN)CommBuffer));
// //
// Send command // Send command
@ -349,7 +349,7 @@ Communicate (
// //
*(EFI_PHYSICAL_ADDRESS *)(UINTN)SmmCommunicationContext->BufferPtrAddress = 0; *(EFI_PHYSICAL_ADDRESS *)(UINTN)SmmCommunicationContext->BufferPtrAddress = 0;
DEBUG ((EFI_D_INFO, "PiSmmCommunicationPei Communicate Exit\n")); DEBUG ((DEBUG_INFO, "PiSmmCommunicationPei Communicate Exit\n"));
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -394,7 +394,7 @@ PiSmmCommunicationPeiEntryPoint (
// Check SMRAM locked, it should be done before SMRAM lock. // Check SMRAM locked, it should be done before SMRAM lock.
// //
if (SmmAccess->LockState) { if (SmmAccess->LockState) {
DEBUG ((EFI_D_INFO, "PiSmmCommunicationPei LockState - %x\n", (UINTN)SmmAccess->LockState)); DEBUG ((DEBUG_INFO, "PiSmmCommunicationPei LockState - %x\n", (UINTN)SmmAccess->LockState));
return EFI_ACCESS_DENIED; return EFI_ACCESS_DENIED;
} }

View File

@ -71,24 +71,24 @@ PiSmmCommunicationHandler (
EFI_SMM_COMMUNICATE_HEADER *CommunicateHeader; EFI_SMM_COMMUNICATE_HEADER *CommunicateHeader;
EFI_PHYSICAL_ADDRESS *BufferPtrAddress; EFI_PHYSICAL_ADDRESS *BufferPtrAddress;
DEBUG ((EFI_D_INFO, "PiSmmCommunicationHandler Enter\n")); DEBUG ((DEBUG_INFO, "PiSmmCommunicationHandler Enter\n"));
BufferPtrAddress = (EFI_PHYSICAL_ADDRESS *)(UINTN)mSmmCommunicationContext.BufferPtrAddress; BufferPtrAddress = (EFI_PHYSICAL_ADDRESS *)(UINTN)mSmmCommunicationContext.BufferPtrAddress;
CommunicateHeader = (EFI_SMM_COMMUNICATE_HEADER *)(UINTN)*BufferPtrAddress; CommunicateHeader = (EFI_SMM_COMMUNICATE_HEADER *)(UINTN)*BufferPtrAddress;
DEBUG ((EFI_D_INFO, "PiSmmCommunicationHandler CommunicateHeader - %x\n", CommunicateHeader)); DEBUG ((DEBUG_INFO, "PiSmmCommunicationHandler CommunicateHeader - %x\n", CommunicateHeader));
if (CommunicateHeader == NULL) { if (CommunicateHeader == NULL) {
DEBUG ((EFI_D_INFO, "PiSmmCommunicationHandler is NULL, needn't to call dispatch function\n")); DEBUG ((DEBUG_INFO, "PiSmmCommunicationHandler is NULL, needn't to call dispatch function\n"));
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
} else { } else {
if (!SmmIsBufferOutsideSmmValid ((UINTN)CommunicateHeader, OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data))) { if (!SmmIsBufferOutsideSmmValid ((UINTN)CommunicateHeader, OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data))) {
DEBUG ((EFI_D_INFO, "PiSmmCommunicationHandler CommunicateHeader invalid - 0x%x\n", CommunicateHeader)); DEBUG ((DEBUG_INFO, "PiSmmCommunicationHandler CommunicateHeader invalid - 0x%x\n", CommunicateHeader));
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
goto Done; goto Done;
} }
CommSize = (UINTN)CommunicateHeader->MessageLength; CommSize = (UINTN)CommunicateHeader->MessageLength;
if (!SmmIsBufferOutsideSmmValid ((UINTN)&CommunicateHeader->Data[0], CommSize)) { if (!SmmIsBufferOutsideSmmValid ((UINTN)&CommunicateHeader->Data[0], CommSize)) {
DEBUG ((EFI_D_INFO, "PiSmmCommunicationHandler CommunicateData invalid - 0x%x\n", &CommunicateHeader->Data[0])); DEBUG ((DEBUG_INFO, "PiSmmCommunicationHandler CommunicateData invalid - 0x%x\n", &CommunicateHeader->Data[0]));
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
goto Done; goto Done;
} }
@ -96,7 +96,7 @@ PiSmmCommunicationHandler (
// //
// Call dispatch function // Call dispatch function
// //
DEBUG ((EFI_D_INFO, "PiSmmCommunicationHandler Data - %x\n", &CommunicateHeader->Data[0])); DEBUG ((DEBUG_INFO, "PiSmmCommunicationHandler Data - %x\n", &CommunicateHeader->Data[0]));
Status = gSmst->SmiManage ( Status = gSmst->SmiManage (
&CommunicateHeader->HeaderGuid, &CommunicateHeader->HeaderGuid,
NULL, NULL,
@ -106,8 +106,8 @@ PiSmmCommunicationHandler (
} }
Done: Done:
DEBUG ((EFI_D_INFO, "PiSmmCommunicationHandler %r\n", Status)); DEBUG ((DEBUG_INFO, "PiSmmCommunicationHandler %r\n", Status));
DEBUG ((EFI_D_INFO, "PiSmmCommunicationHandler Exit\n")); DEBUG ((DEBUG_INFO, "PiSmmCommunicationHandler Exit\n"));
return (Status == EFI_SUCCESS) ? EFI_SUCCESS : EFI_INTERRUPT_PENDING; return (Status == EFI_SUCCESS) ? EFI_SUCCESS : EFI_INTERRUPT_PENDING;
} }
@ -190,11 +190,11 @@ PiSmmCommunicationSmmEntryPoint (
); );
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
DEBUG ((EFI_D_INFO, "SmmCommunication SwSmi: %x\n", (UINTN)SmmSwDispatchContext.SwSmiInputValue)); DEBUG ((DEBUG_INFO, "SmmCommunication SwSmi: %x\n", (UINTN)SmmSwDispatchContext.SwSmiInputValue));
BufferPtrAddress = AllocateAcpiNvsMemoryBelow4G (sizeof(EFI_PHYSICAL_ADDRESS)); BufferPtrAddress = AllocateAcpiNvsMemoryBelow4G (sizeof(EFI_PHYSICAL_ADDRESS));
ASSERT (BufferPtrAddress != NULL); ASSERT (BufferPtrAddress != NULL);
DEBUG ((EFI_D_INFO, "SmmCommunication BufferPtrAddress: 0x%016lx, BufferPtr: 0x%016lx\n", (EFI_PHYSICAL_ADDRESS)(UINTN)BufferPtrAddress, *BufferPtrAddress)); DEBUG ((DEBUG_INFO, "SmmCommunication BufferPtrAddress: 0x%016lx, BufferPtr: 0x%016lx\n", (EFI_PHYSICAL_ADDRESS)(UINTN)BufferPtrAddress, *BufferPtrAddress));
// //
// Save context // Save context

View File

@ -751,7 +751,7 @@ SmmRestoreCpu (
IA32_IDT_GATE_DESCRIPTOR IdtEntryTable[EXCEPTION_VECTOR_NUMBER]; IA32_IDT_GATE_DESCRIPTOR IdtEntryTable[EXCEPTION_VECTOR_NUMBER];
EFI_STATUS Status; EFI_STATUS Status;
DEBUG ((EFI_D_INFO, "SmmRestoreCpu()\n")); DEBUG ((DEBUG_INFO, "SmmRestoreCpu()\n"));
mSmmS3Flag = TRUE; mSmmS3Flag = TRUE;
@ -759,7 +759,7 @@ SmmRestoreCpu (
// See if there is enough context to resume PEI Phase // See if there is enough context to resume PEI Phase
// //
if (mSmmS3ResumeState == NULL) { if (mSmmS3ResumeState == NULL) {
DEBUG ((EFI_D_ERROR, "No context to return to PEI Phase\n")); DEBUG ((DEBUG_ERROR, "No context to return to PEI Phase\n"));
CpuDeadLoop (); CpuDeadLoop ();
} }
@ -822,17 +822,17 @@ SmmRestoreCpu (
// //
mRestoreSmmConfigurationInS3 = TRUE; mRestoreSmmConfigurationInS3 = TRUE;
DEBUG (( EFI_D_INFO, "SMM S3 Return CS = %x\n", SmmS3ResumeState->ReturnCs)); DEBUG (( DEBUG_INFO, "SMM S3 Return CS = %x\n", SmmS3ResumeState->ReturnCs));
DEBUG (( EFI_D_INFO, "SMM S3 Return Entry Point = %x\n", SmmS3ResumeState->ReturnEntryPoint)); DEBUG (( DEBUG_INFO, "SMM S3 Return Entry Point = %x\n", SmmS3ResumeState->ReturnEntryPoint));
DEBUG (( EFI_D_INFO, "SMM S3 Return Context1 = %x\n", SmmS3ResumeState->ReturnContext1)); DEBUG (( DEBUG_INFO, "SMM S3 Return Context1 = %x\n", SmmS3ResumeState->ReturnContext1));
DEBUG (( EFI_D_INFO, "SMM S3 Return Context2 = %x\n", SmmS3ResumeState->ReturnContext2)); DEBUG (( DEBUG_INFO, "SMM S3 Return Context2 = %x\n", SmmS3ResumeState->ReturnContext2));
DEBUG (( EFI_D_INFO, "SMM S3 Return Stack Pointer = %x\n", SmmS3ResumeState->ReturnStackPointer)); DEBUG (( DEBUG_INFO, "SMM S3 Return Stack Pointer = %x\n", SmmS3ResumeState->ReturnStackPointer));
// //
// If SMM is in 32-bit mode, then use SwitchStack() to resume PEI Phase // If SMM is in 32-bit mode, then use SwitchStack() to resume PEI Phase
// //
if (SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_32) { if (SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_32) {
DEBUG ((EFI_D_INFO, "Call SwitchStack() to return to S3 Resume in PEI Phase\n")); DEBUG ((DEBUG_INFO, "Call SwitchStack() to return to S3 Resume in PEI Phase\n"));
SwitchStack ( SwitchStack (
(SWITCH_STACK_ENTRY_POINT)(UINTN)SmmS3ResumeState->ReturnEntryPoint, (SWITCH_STACK_ENTRY_POINT)(UINTN)SmmS3ResumeState->ReturnEntryPoint,
@ -846,7 +846,7 @@ SmmRestoreCpu (
// If SMM is in 64-bit mode, then use AsmDisablePaging64() to resume PEI Phase // If SMM is in 64-bit mode, then use AsmDisablePaging64() to resume PEI Phase
// //
if (SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_64) { if (SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_64) {
DEBUG ((EFI_D_INFO, "Call AsmDisablePaging64() to return to S3 Resume in PEI Phase\n")); DEBUG ((DEBUG_INFO, "Call AsmDisablePaging64() to return to S3 Resume in PEI Phase\n"));
// //
// Disable interrupt of Debug timer, since new IDT table is for IA32 and will not work in long mode. // Disable interrupt of Debug timer, since new IDT table is for IA32 and will not work in long mode.
// //
@ -867,7 +867,7 @@ SmmRestoreCpu (
// //
// Can not resume PEI Phase // Can not resume PEI Phase
// //
DEBUG ((EFI_D_ERROR, "No context to return to PEI Phase\n")); DEBUG ((DEBUG_ERROR, "No context to return to PEI Phase\n"));
CpuDeadLoop (); CpuDeadLoop ();
} }
@ -904,8 +904,8 @@ InitSmmS3ResumeState (
} else { } else {
SmramDescriptor = (EFI_SMRAM_DESCRIPTOR *) GET_GUID_HOB_DATA (GuidHob); SmramDescriptor = (EFI_SMRAM_DESCRIPTOR *) GET_GUID_HOB_DATA (GuidHob);
DEBUG ((EFI_D_INFO, "SMM S3 SMRAM Structure = %x\n", SmramDescriptor)); DEBUG ((DEBUG_INFO, "SMM S3 SMRAM Structure = %x\n", SmramDescriptor));
DEBUG ((EFI_D_INFO, "SMM S3 Structure = %x\n", SmramDescriptor->CpuStart)); DEBUG ((DEBUG_INFO, "SMM S3 Structure = %x\n", SmramDescriptor->CpuStart));
SmmS3ResumeState = (SMM_S3_RESUME_STATE *)(UINTN)SmramDescriptor->CpuStart; SmmS3ResumeState = (SMM_S3_RESUME_STATE *)(UINTN)SmramDescriptor->CpuStart;
ZeroMem (SmmS3ResumeState, sizeof (SMM_S3_RESUME_STATE)); ZeroMem (SmmS3ResumeState, sizeof (SMM_S3_RESUME_STATE));

View File

@ -1788,8 +1788,8 @@ InitializeSmmCpuSemaphores (
GlobalSemaphoresSize = (sizeof (SMM_CPU_SEMAPHORE_GLOBAL) / sizeof (VOID *)) * SemaphoreSize; GlobalSemaphoresSize = (sizeof (SMM_CPU_SEMAPHORE_GLOBAL) / sizeof (VOID *)) * SemaphoreSize;
CpuSemaphoresSize = (sizeof (SMM_CPU_SEMAPHORE_CPU) / sizeof (VOID *)) * ProcessorCount * SemaphoreSize; CpuSemaphoresSize = (sizeof (SMM_CPU_SEMAPHORE_CPU) / sizeof (VOID *)) * ProcessorCount * SemaphoreSize;
TotalSize = GlobalSemaphoresSize + CpuSemaphoresSize; TotalSize = GlobalSemaphoresSize + CpuSemaphoresSize;
DEBUG((EFI_D_INFO, "One Semaphore Size = 0x%x\n", SemaphoreSize)); DEBUG((DEBUG_INFO, "One Semaphore Size = 0x%x\n", SemaphoreSize));
DEBUG((EFI_D_INFO, "Total Semaphores Size = 0x%x\n", TotalSize)); DEBUG((DEBUG_INFO, "Total Semaphores Size = 0x%x\n", TotalSize));
Pages = EFI_SIZE_TO_PAGES (TotalSize); Pages = EFI_SIZE_TO_PAGES (TotalSize);
SemaphoreBlock = AllocatePages (Pages); SemaphoreBlock = AllocatePages (Pages);
ASSERT (SemaphoreBlock != NULL); ASSERT (SemaphoreBlock != NULL);

View File

@ -608,14 +608,14 @@ PiCpuSmmEntry (
// Save the PcdCpuSmmCodeAccessCheckEnable value into a global variable. // Save the PcdCpuSmmCodeAccessCheckEnable value into a global variable.
// //
mSmmCodeAccessCheckEnable = PcdGetBool (PcdCpuSmmCodeAccessCheckEnable); mSmmCodeAccessCheckEnable = PcdGetBool (PcdCpuSmmCodeAccessCheckEnable);
DEBUG ((EFI_D_INFO, "PcdCpuSmmCodeAccessCheckEnable = %d\n", mSmmCodeAccessCheckEnable)); DEBUG ((DEBUG_INFO, "PcdCpuSmmCodeAccessCheckEnable = %d\n", mSmmCodeAccessCheckEnable));
// //
// Save the PcdPteMemoryEncryptionAddressOrMask value into a global variable. // Save the PcdPteMemoryEncryptionAddressOrMask value into a global variable.
// Make sure AddressEncMask is contained to smallest supported address field. // Make sure AddressEncMask is contained to smallest supported address field.
// //
mAddressEncMask = PcdGet64 (PcdPteMemoryEncryptionAddressOrMask) & PAGING_1G_ADDRESS_MASK_64; mAddressEncMask = PcdGet64 (PcdPteMemoryEncryptionAddressOrMask) & PAGING_1G_ADDRESS_MASK_64;
DEBUG ((EFI_D_INFO, "mAddressEncMask = 0x%lx\n", mAddressEncMask)); DEBUG ((DEBUG_INFO, "mAddressEncMask = 0x%lx\n", mAddressEncMask));
// //
// If support CPU hot plug, we need to allocate resources for possibly hot-added processors // If support CPU hot plug, we need to allocate resources for possibly hot-added processors
@ -767,7 +767,7 @@ PiCpuSmmEntry (
TileDataSize = ALIGN_VALUE(TileDataSize, SIZE_4KB); TileDataSize = ALIGN_VALUE(TileDataSize, SIZE_4KB);
TileSize = TileDataSize + TileCodeSize - 1; TileSize = TileDataSize + TileCodeSize - 1;
TileSize = 2 * GetPowerOfTwo32 ((UINT32)TileSize); TileSize = 2 * GetPowerOfTwo32 ((UINT32)TileSize);
DEBUG ((EFI_D_INFO, "SMRAM TileSize = 0x%08x (0x%08x, 0x%08x)\n", TileSize, TileCodeSize, TileDataSize)); DEBUG ((DEBUG_INFO, "SMRAM TileSize = 0x%08x (0x%08x, 0x%08x)\n", TileSize, TileCodeSize, TileDataSize));
// //
// If the TileSize is larger than space available for the SMI Handler of // If the TileSize is larger than space available for the SMI Handler of
@ -797,7 +797,7 @@ PiCpuSmmEntry (
Buffer = AllocateAlignedCodePages (BufferPages, SIZE_4KB); Buffer = AllocateAlignedCodePages (BufferPages, SIZE_4KB);
} }
ASSERT (Buffer != NULL); ASSERT (Buffer != NULL);
DEBUG ((EFI_D_INFO, "SMRAM SaveState Buffer (0x%08x, 0x%08x)\n", Buffer, EFI_PAGES_TO_SIZE(BufferPages))); DEBUG ((DEBUG_INFO, "SMRAM SaveState Buffer (0x%08x, 0x%08x)\n", Buffer, EFI_PAGES_TO_SIZE(BufferPages)));
// //
// Allocate buffer for pointers to array in SMM_CPU_PRIVATE_DATA. // Allocate buffer for pointers to array in SMM_CPU_PRIVATE_DATA.
@ -842,7 +842,7 @@ PiCpuSmmEntry (
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
mCpuHotPlugData.ApicId[Index] = gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId; mCpuHotPlugData.ApicId[Index] = gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId;
DEBUG ((EFI_D_INFO, "CPU[%03x] APIC ID=%04x SMBASE=%08x SaveState=%08x Size=%08x\n", DEBUG ((DEBUG_INFO, "CPU[%03x] APIC ID=%04x SMBASE=%08x SaveState=%08x Size=%08x\n",
Index, Index,
(UINT32)gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId, (UINT32)gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId,
mCpuHotPlugData.SmBase[Index], mCpuHotPlugData.SmBase[Index],
@ -1072,7 +1072,7 @@ PiCpuSmmEntry (
GetAcpiS3EnableFlag (); GetAcpiS3EnableFlag ();
InitSmmS3ResumeState (Cr3); InitSmmS3ResumeState (Cr3);
DEBUG ((EFI_D_INFO, "SMM CPU Module exit from SMRAM with EFI_SUCCESS\n")); DEBUG ((DEBUG_INFO, "SMM CPU Module exit from SMRAM with EFI_SUCCESS\n"));
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -1162,7 +1162,7 @@ FindSmramInfo (
} }
} while (Found); } while (Found);
DEBUG ((EFI_D_INFO, "SMRR Base: 0x%x, SMRR Size: 0x%x\n", *SmrrBase, *SmrrSize)); DEBUG ((DEBUG_INFO, "SMRR Base: 0x%x, SMRR Size: 0x%x\n", *SmrrBase, *SmrrSize));
} }
/** /**

View File

@ -514,14 +514,14 @@ InitProtectedMemRange (
mSplitMemRangeCount = NumberOfSpliteRange; mSplitMemRangeCount = NumberOfSpliteRange;
DEBUG ((EFI_D_INFO, "SMM Profile Memory Ranges:\n")); DEBUG ((DEBUG_INFO, "SMM Profile Memory Ranges:\n"));
for (Index = 0; Index < mProtectionMemRangeCount; Index++) { for (Index = 0; Index < mProtectionMemRangeCount; Index++) {
DEBUG ((EFI_D_INFO, "mProtectionMemRange[%d].Base = %lx\n", Index, mProtectionMemRange[Index].Range.Base)); DEBUG ((DEBUG_INFO, "mProtectionMemRange[%d].Base = %lx\n", Index, mProtectionMemRange[Index].Range.Base));
DEBUG ((EFI_D_INFO, "mProtectionMemRange[%d].Top = %lx\n", Index, mProtectionMemRange[Index].Range.Top)); DEBUG ((DEBUG_INFO, "mProtectionMemRange[%d].Top = %lx\n", Index, mProtectionMemRange[Index].Range.Top));
} }
for (Index = 0; Index < mSplitMemRangeCount; Index++) { for (Index = 0; Index < mSplitMemRangeCount; Index++) {
DEBUG ((EFI_D_INFO, "mSplitMemRange[%d].Base = %lx\n", Index, mSplitMemRange[Index].Base)); DEBUG ((DEBUG_INFO, "mSplitMemRange[%d].Base = %lx\n", Index, mSplitMemRange[Index].Base));
DEBUG ((EFI_D_INFO, "mSplitMemRange[%d].Top = %lx\n", Index, mSplitMemRange[Index].Top)); DEBUG ((DEBUG_INFO, "mSplitMemRange[%d].Top = %lx\n", Index, mSplitMemRange[Index].Top));
} }
} }
@ -671,7 +671,7 @@ InitPaging (
// //
// Go through page table and set several page table entries to absent or execute-disable. // Go through page table and set several page table entries to absent or execute-disable.
// //
DEBUG ((EFI_D_INFO, "Patch page table start ...\n")); DEBUG ((DEBUG_INFO, "Patch page table start ...\n"));
for (Pml5Index = 0; Pml5Index < NumberOfPml5Entries; Pml5Index++) { for (Pml5Index = 0; Pml5Index < NumberOfPml5Entries; Pml5Index++) {
if ((Pml5[Pml5Index] & IA32_PG_P) == 0) { if ((Pml5[Pml5Index] & IA32_PG_P) == 0) {
// //
@ -760,7 +760,7 @@ InitPaging (
// Flush TLB // Flush TLB
// //
CpuFlushTlb (); CpuFlushTlb ();
DEBUG ((EFI_D_INFO, "Patch page table done!\n")); DEBUG ((DEBUG_INFO, "Patch page table done!\n"));
// //
// Set execute-disable flag // Set execute-disable flag
// //
@ -786,7 +786,7 @@ GetSmiCommandPort (
ASSERT (Fadt != NULL); ASSERT (Fadt != NULL);
mSmiCommandPort = Fadt->SmiCmd; mSmiCommandPort = Fadt->SmiCmd;
DEBUG ((EFI_D_INFO, "mSmiCommandPort = %x\n", mSmiCommandPort)); DEBUG ((DEBUG_INFO, "mSmiCommandPort = %x\n", mSmiCommandPort));
} }
/** /**

View File

@ -513,7 +513,7 @@ S3ResumeBootOs (
EFI_ERROR_CODE | EFI_ERROR_MAJOR, EFI_ERROR_CODE | EFI_ERROR_MAJOR,
(EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_OS_WAKE_ERROR) (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_OS_WAKE_ERROR)
); );
DEBUG (( EFI_D_ERROR, "Unsupported for 32bit DXE transfer to 64bit OS waking vector!\r\n")); DEBUG (( DEBUG_ERROR, "Unsupported for 32bit DXE transfer to 64bit OS waking vector!\r\n"));
ASSERT (FALSE); ASSERT (FALSE);
CpuDeadLoop (); CpuDeadLoop ();
return ; return ;
@ -1136,4 +1136,3 @@ PeimS3ResumeEntryPoint (
return EFI_SUCCESS; return EFI_SUCCESS;
} }