ArmPkg: 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: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
committed by
mergify[bot]
parent
dfafa8e453
commit
a4a582e180
@@ -210,12 +210,12 @@ DefaultExceptionHandler (
|
||||
UINT32 ItBlock;
|
||||
|
||||
CpsrString (SystemContext.SystemContextArm->CPSR, CpsrStr);
|
||||
DEBUG ((EFI_D_ERROR, "%a\n", CpsrStr));
|
||||
DEBUG ((DEBUG_ERROR, "%a\n", CpsrStr));
|
||||
|
||||
Pdb = GetImageName (SystemContext.SystemContextArm->PC, &ImageBase, &PeCoffSizeOfHeader);
|
||||
Offset = SystemContext.SystemContextArm->PC - ImageBase;
|
||||
if (Pdb != NULL) {
|
||||
DEBUG ((EFI_D_ERROR, "%a\n", Pdb));
|
||||
DEBUG ((DEBUG_ERROR, "%a\n", Pdb));
|
||||
|
||||
//
|
||||
// A PE/COFF image loads its headers into memory so the headers are
|
||||
@@ -225,13 +225,13 @@ DefaultExceptionHandler (
|
||||
// you need to subtract out the size of the PE/COFF header to get
|
||||
// get the offset that matches the link map.
|
||||
//
|
||||
DEBUG ((EFI_D_ERROR, "loaded at 0x%08x (PE/COFF offset) 0x%x (ELF or Mach-O offset) 0x%x", ImageBase, Offset, Offset - PeCoffSizeOfHeader));
|
||||
DEBUG ((DEBUG_ERROR, "loaded at 0x%08x (PE/COFF offset) 0x%x (ELF or Mach-O offset) 0x%x", ImageBase, Offset, Offset - PeCoffSizeOfHeader));
|
||||
|
||||
// If we come from an image it is safe to show the instruction. We know it should not fault
|
||||
DisAsm = (UINT8 *)(UINTN)SystemContext.SystemContextArm->PC;
|
||||
ItBlock = 0;
|
||||
DisassembleInstruction (&DisAsm, (SystemContext.SystemContextArm->CPSR & BIT5) == BIT5, TRUE, &ItBlock, Buffer, sizeof (Buffer));
|
||||
DEBUG ((EFI_D_ERROR, "\n%a", Buffer));
|
||||
DEBUG ((DEBUG_ERROR, "\n%a", Buffer));
|
||||
|
||||
switch (ExceptionType) {
|
||||
case EXCEPT_ARM_UNDEFINED_INSTRUCTION:
|
||||
@@ -248,25 +248,25 @@ DefaultExceptionHandler (
|
||||
|
||||
}
|
||||
DEBUG_CODE_END ();
|
||||
DEBUG ((EFI_D_ERROR, "\n R0 0x%08x R1 0x%08x R2 0x%08x R3 0x%08x\n", SystemContext.SystemContextArm->R0, SystemContext.SystemContextArm->R1, SystemContext.SystemContextArm->R2, SystemContext.SystemContextArm->R3));
|
||||
DEBUG ((EFI_D_ERROR, " R4 0x%08x R5 0x%08x R6 0x%08x R7 0x%08x\n", SystemContext.SystemContextArm->R4, SystemContext.SystemContextArm->R5, SystemContext.SystemContextArm->R6, SystemContext.SystemContextArm->R7));
|
||||
DEBUG ((EFI_D_ERROR, " R8 0x%08x R9 0x%08x R10 0x%08x R11 0x%08x\n", SystemContext.SystemContextArm->R8, SystemContext.SystemContextArm->R9, SystemContext.SystemContextArm->R10, SystemContext.SystemContextArm->R11));
|
||||
DEBUG ((EFI_D_ERROR, " R12 0x%08x SP 0x%08x LR 0x%08x PC 0x%08x\n", SystemContext.SystemContextArm->R12, SystemContext.SystemContextArm->SP, SystemContext.SystemContextArm->LR, SystemContext.SystemContextArm->PC));
|
||||
DEBUG ((EFI_D_ERROR, "DFSR 0x%08x DFAR 0x%08x IFSR 0x%08x IFAR 0x%08x\n", SystemContext.SystemContextArm->DFSR, SystemContext.SystemContextArm->DFAR, SystemContext.SystemContextArm->IFSR, SystemContext.SystemContextArm->IFAR));
|
||||
DEBUG ((DEBUG_ERROR, "\n R0 0x%08x R1 0x%08x R2 0x%08x R3 0x%08x\n", SystemContext.SystemContextArm->R0, SystemContext.SystemContextArm->R1, SystemContext.SystemContextArm->R2, SystemContext.SystemContextArm->R3));
|
||||
DEBUG ((DEBUG_ERROR, " R4 0x%08x R5 0x%08x R6 0x%08x R7 0x%08x\n", SystemContext.SystemContextArm->R4, SystemContext.SystemContextArm->R5, SystemContext.SystemContextArm->R6, SystemContext.SystemContextArm->R7));
|
||||
DEBUG ((DEBUG_ERROR, " R8 0x%08x R9 0x%08x R10 0x%08x R11 0x%08x\n", SystemContext.SystemContextArm->R8, SystemContext.SystemContextArm->R9, SystemContext.SystemContextArm->R10, SystemContext.SystemContextArm->R11));
|
||||
DEBUG ((DEBUG_ERROR, " R12 0x%08x SP 0x%08x LR 0x%08x PC 0x%08x\n", SystemContext.SystemContextArm->R12, SystemContext.SystemContextArm->SP, SystemContext.SystemContextArm->LR, SystemContext.SystemContextArm->PC));
|
||||
DEBUG ((DEBUG_ERROR, "DFSR 0x%08x DFAR 0x%08x IFSR 0x%08x IFAR 0x%08x\n", SystemContext.SystemContextArm->DFSR, SystemContext.SystemContextArm->DFAR, SystemContext.SystemContextArm->IFSR, SystemContext.SystemContextArm->IFAR));
|
||||
|
||||
// Bit10 is Status[4] Bit3:0 is Status[3:0]
|
||||
DfsrStatus = (SystemContext.SystemContextArm->DFSR & 0xf) | ((SystemContext.SystemContextArm->DFSR >> 6) & 0x10);
|
||||
DfsrWrite = (SystemContext.SystemContextArm->DFSR & BIT11) != 0;
|
||||
if (DfsrStatus != 0x00) {
|
||||
DEBUG ((EFI_D_ERROR, " %a: %a 0x%08x\n", FaultStatusToString (DfsrStatus), DfsrWrite ? "write to" : "read from", SystemContext.SystemContextArm->DFAR));
|
||||
DEBUG ((DEBUG_ERROR, " %a: %a 0x%08x\n", FaultStatusToString (DfsrStatus), DfsrWrite ? "write to" : "read from", SystemContext.SystemContextArm->DFAR));
|
||||
}
|
||||
|
||||
IfsrStatus = (SystemContext.SystemContextArm->IFSR & 0xf) | ((SystemContext.SystemContextArm->IFSR >> 6) & 0x10);
|
||||
if (IfsrStatus != 0) {
|
||||
DEBUG ((EFI_D_ERROR, " Instruction %a at 0x%08x\n", FaultStatusToString (SystemContext.SystemContextArm->IFSR & 0xf), SystemContext.SystemContextArm->IFAR));
|
||||
DEBUG ((DEBUG_ERROR, " Instruction %a at 0x%08x\n", FaultStatusToString (SystemContext.SystemContextArm->IFSR & 0xf), SystemContext.SystemContextArm->IFAR));
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_ERROR, "\n"));
|
||||
DEBUG ((DEBUG_ERROR, "\n"));
|
||||
ASSERT (FALSE);
|
||||
|
||||
CpuDeadLoop (); // may return if executing under a debugger
|
||||
|
Reference in New Issue
Block a user