15GLOBAL_REMOVE_IF_UNREFERENCED CHAR8 mErrorMsgVersionAlert[] =
"\rThe SourceLevelDebugPkg you are using requires a newer version of the Intel(R) UDK Debugger Tool.\r\n";
16GLOBAL_REMOVE_IF_UNREFERENCED CHAR8 mErrorMsgSendInitPacket[] =
"\rSend INIT break packet and try to connect the HOST (Intel(R) UDK Debugger Tool v1.5) ...\r\n";
26 DEBUG_EXCEPT_DIVIDE_ERROR,
27 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
37 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
41 DEBUG_EXCEPT_BREAKPOINT,
46 DEBUG_EXCEPT_OVERFLOW,
47 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
52 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
56 DEBUG_EXCEPT_INVALID_OPCODE,
57 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
61 DEBUG_EXCEPT_DOUBLE_FAULT,
62 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
66 DEBUG_EXCEPT_INVALID_TSS,
67 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
71 DEBUG_EXCEPT_SEG_NOT_PRESENT,
72 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
76 DEBUG_EXCEPT_STACK_FAULT,
77 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
81 DEBUG_EXCEPT_GP_FAULT,
82 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
86 DEBUG_EXCEPT_PAGE_FAULT,
87 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
91 DEBUG_EXCEPT_FP_ERROR,
92 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
96 DEBUG_EXCEPT_ALIGNMENT_CHECK,
97 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
101 DEBUG_EXCEPT_MACHINE_CHECK,
102 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
107 EFI_VECTOR_HANDOFF_HOOK_BEFORE,
116 DEBUG_MAILBOX_VECTOR,
122 EFI_VECTOR_HANDOFF_LAST_ENTRY,
149 for (Index = 0; Index < DataSize; Index++) {
150 Crc ^= (UINT16)Data[Index];
151 for (BitIndex = 0; BitIndex < 8; BitIndex++) {
152 if ((Crc & 0x8000) != 0) {
176 UINTN InterruptHandler;
179 if ((InterruptHandler >= 4) && (*(UINT32 *)(InterruptHandler - 4) == AGENT_HANDLER_SIGNATURE)) {
284 if ((CheckSum != Mailbox->CheckSum) && (CheckSum != Mailbox->ToBeCheckSum)) {
285 DEBUG ((DEBUG_ERROR,
"DebugAgent: Mailbox checksum error, stack or heap crashed!\n"));
286 DEBUG ((DEBUG_ERROR,
"DebugAgent: CheckSum = %x, Mailbox->CheckSum = %x, Mailbox->ToBeCheckSum = %x\n", CheckSum, Mailbox->CheckSum, Mailbox->ToBeCheckSum));
308 case DEBUG_MAILBOX_DEBUG_FLAG_INDEX:
309 Mailbox->ToBeCheckSum = Mailbox->CheckSum +
CalculateSum8 ((UINT8 *)&Mailbox->DebugFlag.Uint64, sizeof (UINT64))
311 Mailbox->DebugFlag.Uint64 = Value;
313 case DEBUG_MAILBOX_DEBUG_PORT_HANDLE_INDEX:
314 Mailbox->ToBeCheckSum = Mailbox->CheckSum +
CalculateSum8 ((UINT8 *)&Mailbox->DebugPortHandle, sizeof (
UINTN))
316 Mailbox->DebugPortHandle = (
UINTN)Value;
318 case DEBUG_MAILBOX_EXCEPTION_BUFFER_POINTER_INDEX:
319 Mailbox->ToBeCheckSum = Mailbox->CheckSum +
CalculateSum8 ((UINT8 *)&Mailbox->ExceptionBufferPointer, sizeof (
UINTN))
321 Mailbox->ExceptionBufferPointer = (
UINTN)Value;
323 case DEBUG_MAILBOX_LAST_ACK:
324 Mailbox->ToBeCheckSum = Mailbox->CheckSum +
CalculateSum8 ((UINT8 *)&Mailbox->LastAck, sizeof (UINT8))
326 Mailbox->LastAck = (UINT8)Value;
328 case DEBUG_MAILBOX_SEQUENCE_NO_INDEX:
329 Mailbox->ToBeCheckSum = Mailbox->CheckSum +
CalculateSum8 ((UINT8 *)&Mailbox->SequenceNo, sizeof (UINT8))
331 Mailbox->SequenceNo = (UINT8)Value;
333 case DEBUG_MAILBOX_HOST_SEQUENCE_NO_INDEX:
334 Mailbox->ToBeCheckSum = Mailbox->CheckSum +
CalculateSum8 ((UINT8 *)&Mailbox->HostSequenceNo, sizeof (UINT8))
336 Mailbox->HostSequenceNo = (UINT8)Value;
338 case DEBUG_MAILBOX_DEBUG_TIMER_FREQUENCY:
339 Mailbox->ToBeCheckSum = Mailbox->CheckSum +
CalculateSum8 ((UINT8 *)&Mailbox->DebugTimerFrequency, sizeof (UINT32))
341 Mailbox->DebugTimerFrequency = (UINT32)Value;
368 IN DEBUG_PORT_HANDLE Handle,
376 UINT32 TimeoutTicker;
378 UINT32 TimerFrequency;
396 TimerRound = (UINT32)
DivU64x32Remainder (TimeoutTicker, TimerCycle / 2, &TimeoutTicker);
400 while (Index < NumberOfBytes) {
408 if (TimerRound == 0) {
444 Data64 = (Mailbox->DebugFlag.Uint64 & ~FlagMask) |
485 DEBUG_PORT_HANDLE Handle;
489 DebugHeader.StartSymbol = DEBUG_STARTING_SYMBOL_NORMAL;
490 DebugHeader.Command = DEBUG_COMMAND_PRINT_MESSAGE;
492 DebugHeader.SequenceNo = 0xEE;
524 CHAR8 Buffer[DEBUG_DATA_MAXIMUM_REAL_DATA];
530 if ((ErrorLevel &
GetDebugFlag (DEBUG_AGENT_FLAG_PRINT_ERROR_LEVEL)) == 0) {
568 CHAR8 Buffer[DEBUG_DATA_MAXIMUM_REAL_DATA];
575 if ((ErrorLevel &
GetDebugFlag (DEBUG_AGENT_FLAG_PRINT_ERROR_LEVEL)) == 0) {
581 DestBuffer +=
AsciiSPrint (DestBuffer, DEBUG_DATA_MAXIMUM_REAL_DATA,
"Sent data [ ");
583 DestBuffer +=
AsciiSPrint (DestBuffer, DEBUG_DATA_MAXIMUM_REAL_DATA,
"Received data [ ");
588 if (DestBuffer - Buffer > DEBUG_DATA_MAXIMUM_REAL_DATA - 6) {
597 DestBuffer +=
AsciiSPrint (DestBuffer, DEBUG_DATA_MAXIMUM_REAL_DATA - (DestBuffer - Buffer),
"%02x ", Data[Index]);
599 if (Index >= Length) {
603 DestBuffer +=
AsciiSPrint (DestBuffer, DEBUG_DATA_MAXIMUM_REAL_DATA - (DestBuffer - Buffer),
"]\n");
624 IN DEBUG_PORT_HANDLE Handle,
642 Crc = DebugHeader->Crc;
643 DebugHeader->Crc = 0;
644 if (
CalculateCrc16 ((UINT8 *)DebugHeader, DebugHeader->Length, 0) != Crc) {
647 return EFI_CRC_ERROR;
651 if (IS_REQUEST (DebugHeader)) {
652 if (DebugHeader->SequenceNo == (UINT8)(Mailbox->HostSequenceNo + 1)) {
660 if (DebugHeader->SequenceNo == Mailbox->HostSequenceNo) {
665 return EFI_DEVICE_ERROR;
680 return (BOOLEAN)(
GetDebugFlag (DEBUG_AGENT_FLAG_HOST_ATTACHED) == 1);
695 SetDebugFlag (DEBUG_AGENT_FLAG_HOST_ATTACHED, (UINT32)Attached);
712 RETURN_STATUS Status;
715 switch (DebugSetting->Key) {
716 case DEBUG_AGENT_SETTING_SMM_ENTRY_BREAK:
717 SetDebugFlag (DEBUG_AGENT_FLAG_BREAK_ON_NEXT_SMI, DebugSetting->Value);
719 case DEBUG_AGENT_SETTING_PRINT_ERROR_LEVEL:
720 SetDebugFlag (DEBUG_AGENT_FLAG_PRINT_ERROR_LEVEL, DebugSetting->Value);
722 case DEBUG_AGENT_SETTING_BOOT_SCRIPT_ENTRY_BREAK:
723 SetDebugFlag (DEBUG_AGENT_FLAG_BREAK_BOOT_SCRIPT, DebugSetting->Value);
743 IA32_EFLAGS32 *Eflags;
745 Eflags = (IA32_EFLAGS32 *)&CpuContext->Eflags;
761 IA32_EFLAGS32 *Eflags;
763 Eflags = (IA32_EFLAGS32 *)&CpuContext->Eflags;
769 SetDebugFlag (DEBUG_AGENT_FLAG_INTERRUPT_FLAG, Eflags->Bits.IF);
788 IA32_EFLAGS32 *Eflags;
790 Eflags = (IA32_EFLAGS32 *)&CpuContext->Eflags;
794 Eflags->Bits.IF =
GetDebugFlag (DEBUG_AGENT_FLAG_INTERRUPT_FLAG);
817 RegisterIndex = SetHwBreakpoint->Type.Index;
822 *((
UINTN *)&CpuContext->Dr0 + RegisterIndex) = (
UINTN)SetHwBreakpoint->Address;
824 Dr7Value = CpuContext->Dr7;
829 Dr7Value |= (
UINTN)(0x3 << (RegisterIndex * 2));
833 Dr7Value &= (
UINTN)(~(0xf << (16 + RegisterIndex * 4)));
834 Dr7Value |= (
UINTN)((SetHwBreakpoint->Type.Length << 2) | SetHwBreakpoint->Type.Access) << (16 + RegisterIndex * 4);
840 CpuContext->Dr7 = Dr7Value;
856 if ((ClearHwBreakpoint->IndexMask & BIT0) != 0) {
858 CpuContext->Dr7 &= (
UINTN)(~(0x3 << 0));
861 if ((ClearHwBreakpoint->IndexMask & BIT1) != 0) {
863 CpuContext->Dr7 &= (
UINTN)(~(0x3 << 2));
866 if ((ClearHwBreakpoint->IndexMask & BIT2) != 0) {
868 CpuContext->Dr7 &= (
UINTN)(~(0x3 << 4));
871 if ((ClearHwBreakpoint->IndexMask & BIT3) != 0) {
873 CpuContext->Dr7 &= (
UINTN)(~(0x3 << 6));
892 if (Index < SOFT_DEBUGGER_REGISTER_ST0) {
894 case SOFT_DEBUGGER_REGISTER_FP_FCW:
895 *Width = (UINT8)
sizeof (UINT16);
898 case SOFT_DEBUGGER_REGISTER_FP_FSW:
899 *Width = (UINT8)
sizeof (UINT16);
902 case SOFT_DEBUGGER_REGISTER_FP_FTW:
903 *Width = (UINT8)
sizeof (UINT16);
906 case SOFT_DEBUGGER_REGISTER_FP_OPCODE:
907 *Width = (UINT8)
sizeof (UINT16);
910 case SOFT_DEBUGGER_REGISTER_FP_EIP:
911 *Width = (UINT8)
sizeof (UINT32);
914 case SOFT_DEBUGGER_REGISTER_FP_CS:
915 *Width = (UINT8)
sizeof (UINT16);
918 case SOFT_DEBUGGER_REGISTER_FP_DATAOFFSET:
919 *Width = (UINT8)
sizeof (UINT32);
922 case SOFT_DEBUGGER_REGISTER_FP_DS:
923 *Width = (UINT8)
sizeof (UINT16);
926 case SOFT_DEBUGGER_REGISTER_FP_MXCSR:
927 *Width = (UINT8)
sizeof (UINT32);
930 case SOFT_DEBUGGER_REGISTER_FP_MXCSR_MASK:
931 *Width = (UINT8)
sizeof (UINT32);
936 if (Index <= SOFT_DEBUGGER_REGISTER_ST7) {
938 }
else if (Index <= SOFT_DEBUGGER_REGISTER_XMM15) {
945 Index -= SOFT_DEBUGGER_REGISTER_MM0 - SOFT_DEBUGGER_REGISTER_ST0;
970 if (Index < SOFT_DEBUGGER_REGISTER_FP_BASE) {
972 *Width = (UINT8)
sizeof (
UINTN);
992 IN UINT8 CommandType,
997 DEBUG_PORT_HANDLE Handle;
1001 DebugHeader.StartSymbol = DEBUG_STARTING_SYMBOL_NORMAL;
1002 DebugHeader.Command = CommandType;
1004 DebugHeader.SequenceNo = SequenceNo;
1005 DebugHeader.Crc = 0;
1026 if (AckCommand != DEBUG_COMMAND_OK) {
1034 SequenceNo = Mailbox->HostSequenceNo;
1035 DebugAgentMsgPrint (DEBUG_AGENT_INFO,
"SendAckPacket: SequenceNo = %x\n", SequenceNo);
1057 UINTN LastCharCount;
1060 LastChar = (UINT16)-1;
1062 for (Index = 0; Index < Length; Index++) {
1063 CurrentChar = Data[Index];
1064 if (LastCharCount == 2) {
1066 CopyMem (&Data[Index + CurrentChar], &Data[Index + 1], Length - Index - 1);
1067 SetMem (&Data[Index], CurrentChar, (UINT8)LastChar);
1068 LastChar = (UINT16)-1;
1069 Index += CurrentChar - 1;
1070 Length += CurrentChar - 1;
1072 if (LastChar != CurrentChar) {
1077 LastChar = CurrentChar;
1081 ASSERT (Length <= DEBUG_DATA_MAXIMUM_REAL_DATA);
1083 return (UINT8)Length;
1106 OUT UINT8 *InputPacket,
1107 OUT BOOLEAN *BreakReceived,
1108 OUT BOOLEAN *IncompatibilityFlag OPTIONAL,
1110 IN BOOLEAN SkipStartSymbol
1115 DEBUG_PORT_HANDLE Handle;
1117 UINTN TimeoutForStartSymbol;
1120 if (SkipStartSymbol) {
1121 TimeoutForStartSymbol = 0;
1123 TimeoutForStartSymbol = Timeout;
1131 Received =
DebugAgentReadBuffer (Handle, &DebugHeader->StartSymbol, sizeof (DebugHeader->StartSymbol), TimeoutForStartSymbol);
1132 if (Received <
sizeof (DebugHeader->StartSymbol)) {
1133 DebugAgentMsgPrint (DEBUG_AGENT_WARNING,
"DebugAgentReadBuffer(StartSymbol) timeout\n");
1137 if ((DebugHeader->StartSymbol != DEBUG_STARTING_SYMBOL_NORMAL) && (DebugHeader->StartSymbol != DEBUG_STARTING_SYMBOL_COMPRESS)) {
1138 DebugAgentMsgPrint (DEBUG_AGENT_WARNING,
"Invalid start symbol received [%02x]\n", DebugHeader->StartSymbol);
1151 if (Received == 0) {
1157 if (IncompatibilityFlag !=
NULL) {
1161 *IncompatibilityFlag =
TRUE;
1173 if (Received == 0) {
1174 DebugAgentMsgPrint (DEBUG_AGENT_ERROR,
"DebugAgentReadBuffer(SequenceNo) timeout\n");
1181 Crc = DebugHeader->Crc;
1182 DebugHeader->Crc = 0;
1183 if (Crc ==
CalculateCrc16 ((UINT8 *)DebugHeader, DebugHeader->Length, 0)) {
1194 if (DebugHeader->StartSymbol == DEBUG_STARTING_SYMBOL_COMPRESS) {
1195 DebugHeader->StartSymbol = DEBUG_STARTING_SYMBOL_NORMAL;
1197 (UINT8 *)(DebugHeader + 1),
1227 OUT BOOLEAN *BreakReceived OPTIONAL,
1228 OUT BOOLEAN *IncompatibilityFlag OPTIONAL
1231 RETURN_STATUS Status;
1232 UINT8 InputPacketBuffer[DEBUG_DATA_UPPER_LIMIT];
1235 UINT8 HostSequenceNo;
1241 while (RetryCount > 0) {
1245 Status =
ReceivePacket ((UINT8 *)DebugHeader, BreakReceived, IncompatibilityFlag, Timeout,
FALSE);
1247 if (Command == DEBUG_COMMAND_INIT_BREAK) {
1250 DebugAgentMsgPrint (DEBUG_AGENT_WARNING,
"TARGET: Timeout when waiting for ACK packet.\n");
1260 if ((DebugHeader->Command == DEBUG_COMMAND_OK) && (DebugHeader->SequenceNo == SequenceNo)) {
1268 if ((DebugHeader->Command == DEBUG_COMMAND_GO) && ((DebugHeader->SequenceNo == HostSequenceNo) || (Command == DEBUG_COMMAND_INIT_BREAK))) {
1272 if (Command == DEBUG_COMMAND_INIT_BREAK) {
1280 ASSERT (Command == DEBUG_COMMAND_INIT_BREAK);
1301 Cause = DEBUG_DATA_BREAK_CAUSE_UNKNOWN;
1304 case DEBUG_INT1_VECTOR:
1305 case DEBUG_INT3_VECTOR:
1307 if (Vector == DEBUG_INT1_VECTOR) {
1311 if ((CpuContext->Dr6 & BIT14) != 0) {
1312 Cause = DEBUG_DATA_BREAK_CAUSE_STEPPING;
1323 Cause = DEBUG_DATA_BREAK_CAUSE_HW_BREAKPOINT;
1329 Cause = DEBUG_DATA_BREAK_CAUSE_SW_BREAKPOINT;
1332 switch (CpuContext->Dr0) {
1333 case IMAGE_LOAD_SIGNATURE:
1334 case IMAGE_UNLOAD_SIGNATURE:
1336 if (CpuContext->Dr3 == IO_PORT_BREAKPOINT_ADDRESS) {
1337 Cause = (UINT8)((CpuContext->Dr0 == IMAGE_LOAD_SIGNATURE) ?
1338 DEBUG_DATA_BREAK_CAUSE_IMAGE_LOAD : DEBUG_DATA_BREAK_CAUSE_IMAGE_UNLOAD);
1343 case SOFT_INTERRUPT_SIGNATURE:
1345 if (CpuContext->Dr1 == MEMORY_READY_SIGNATURE) {
1346 Cause = DEBUG_DATA_BREAK_CAUSE_MEMORY_READY;
1347 CpuContext->Dr0 = 0;
1348 }
else if (CpuContext->Dr1 == SYSTEM_RESET_SIGNATURE) {
1349 Cause = DEBUG_DATA_BREAK_CAUSE_SYSTEM_RESET;
1350 CpuContext->Dr0 = 0;
1361 case DEBUG_TIMER_VECTOR:
1362 Cause = DEBUG_DATA_BREAK_CAUSE_USER_HALT;
1371 Cause = DEBUG_DATA_BREAK_CAUSE_STEPPING;
1373 Cause = DEBUG_DATA_BREAK_CAUSE_EXCEPTION;
1412 Destination = Dest + (Count - 1) * Width;
1413 Source = Src + (Count - 1) * Width;
1417 while (Count-- != 0) {
1436 Destination += Step;
1461 IN DEBUG_PORT_HANDLE Handle,
1465 OUT UINTN *CompressedLength OPTIONAL,
1466 OUT UINT16 *CompressedCrc OPTIONAL
1471 UINT8 LastCharCount;
1473 UINTN CompressedIndex;
1475 ASSERT (Length > 0);
1476 LastChar = Data[0] + 1;
1479 for (Index = 0, CompressedIndex = 0; Index <= Length; Index++) {
1480 if (Index < Length) {
1481 CurrentChar = Data[Index];
1483 CurrentChar = (UINT8)LastChar + 1;
1486 if (LastChar != CurrentChar) {
1487 if (LastCharCount == 1) {
1489 if (CompressedCrc !=
NULL) {
1496 }
else if (LastCharCount >= 2) {
1497 CompressedIndex += 3;
1499 if (CompressedCrc !=
NULL) {
1502 *CompressedCrc =
CalculateCrc16 (&LastCharCount, 1, *CompressedCrc);
1516 LastChar = CurrentChar;
1519 if (CompressedLength !=
NULL) {
1520 *CompressedLength = CompressedIndex;
1544 RETURN_STATUS Status;
1546 DEBUG_PORT_HANDLE Handle;
1548 UINTN RemainingDataSize;
1549 UINT8 CurrentDataSize;
1550 UINTN CompressedDataSize;
1554 RemainingDataSize = Count * Width;
1557 if (RemainingDataSize <= DEBUG_DATA_MAXIMUM_REAL_DATA) {
1561 CurrentDataSize = (UINT8)RemainingDataSize;
1563 DebugHeader->Command = DEBUG_COMMAND_OK;
1569 CurrentDataSize = (DEBUG_DATA_MAXIMUM_REAL_DATA / Width) * Width;
1571 DebugHeader->Command = DEBUG_COMMAND_IN_PROGRESS;
1577 DebugHeader->StartSymbol = DEBUG_STARTING_SYMBOL_NORMAL;
1579 DebugHeader->SequenceNo = SequenceNo;
1580 DebugHeader->Crc = 0;
1581 CopyMemByWidth ((UINT8 *)(DebugHeader + 1), Data, CurrentDataSize / Width, Width);
1587 if (
PcdGet32 (PcdTransferProtocolRevision) >= DEBUG_AGENT_REVISION_04) {
1593 (UINT8 *)(DebugHeader + 1),
1596 &CompressedDataSize,
1600 CompressedDataSize = CurrentDataSize;
1603 if (CompressedDataSize < CurrentDataSize) {
1605 DebugHeader->StartSymbol = DEBUG_STARTING_SYMBOL_COMPRESS;
1612 (UINT8 *)(DebugHeader + 1),
1627 (UINT8 *)(DebugHeader + 1),
1637 DebugHeader->Crc =
CalculateCrc16 ((UINT8 *)DebugHeader, DebugHeader->Length, 0);
1647 DebugAgentMsgPrint (DEBUG_AGENT_WARNING,
"TARGET: Timeout in SendDataResponsePacket()\n");
1651 if ((DebugHeader->Command == DEBUG_COMMAND_OK) && (DebugHeader->SequenceNo == SequenceNo) && LastPacket) {
1658 if ((DebugHeader->Command == DEBUG_COMMAND_CONTINUE) && (DebugHeader->SequenceNo == (UINT8)(SequenceNo + 1))) {
1662 Data += CurrentDataSize;
1663 RemainingDataSize -= CurrentDataSize;
1668 if (DebugHeader->SequenceNo >= SequenceNo) {
1669 DebugAgentMsgPrint (DEBUG_AGENT_WARNING,
"TARGET: Received one old or new command(SequenceNo is %x, last SequenceNo is %x)\n", SequenceNo, DebugHeader->SequenceNo);
1714 IN UINT8 BreakCause,
1716 OUT BOOLEAN *BreakReceived
1719 RETURN_STATUS Status;
1720 DEBUG_PORT_HANDLE Handle;
1721 BOOLEAN IncompatibilityFlag;
1723 IncompatibilityFlag =
FALSE;
1730 if (BreakCause == DEBUG_DATA_BREAK_CAUSE_SYSTEM_RESET) {
1736 if (IncompatibilityFlag) {
1772 IN UINT8 BreakCause,
1773 IN UINT32 ProcessorIndex,
1774 OUT BOOLEAN *BreakReceived
1777 UINT8 InputCharacter;
1778 DEBUG_PORT_HANDLE Handle;
1783 DebugAgentMsgPrint (DEBUG_AGENT_INFO,
"processor[%x]:Send Break Packet to HOST.\n", ProcessorIndex);
1786 DebugAgentMsgPrint (DEBUG_AGENT_INFO,
"processor[%x]:Try to attach HOST.\n", ProcessorIndex);
1795 }
while (InputCharacter != DEBUG_STARTING_SYMBOL_ATTACH);
1822 IN BOOLEAN BreakReceived
1825 RETURN_STATUS Status;
1826 UINT8 InputPacketBuffer[DEBUG_DATA_UPPER_LIMIT +
sizeof (UINT64) - 1];
1838 UINT8 *RegisterBuffer;
1848 BOOLEAN HaltDeferred;
1849 UINT32 ProcessorIndex;
1851 UINT32 IssuedViewPoint;
1853 UINT8 *AlignedDataPtr;
1856 IssuedViewPoint = 0;
1857 HaltDeferred = BreakReceived;
1866 IssuedViewPoint = ProcessorIndex;
1870 if (IssuedViewPoint == ProcessorIndex) {
1907 DebugAgentMsgPrint (DEBUG_AGENT_WARNING,
"TARGET: Get command[%x] sequenceno[%x] returned status is [%x] \n", DebugHeader->Command, DebugHeader->SequenceNo, Status);
1908 DebugAgentMsgPrint (DEBUG_AGENT_WARNING,
"TARGET: Get command failed or it's response packet not expected! \n");
1914 if (DebugHeader->SequenceNo == Mailbox->HostSequenceNo) {
1915 DebugAgentMsgPrint (DEBUG_AGENT_WARNING,
"TARGET: Receive one old command[%x] against command[%x]\n", DebugHeader->SequenceNo, Mailbox->HostSequenceNo);
1919 }
else if (DebugHeader->SequenceNo == (UINT8)(Mailbox->HostSequenceNo + 1)) {
1920 UpdateMailboxContent (Mailbox, DEBUG_MAILBOX_HOST_SEQUENCE_NO_INDEX, (UINT8)DebugHeader->SequenceNo);
1922 DebugAgentMsgPrint (DEBUG_AGENT_WARNING,
"Receive one invalid command[%x] against command[%x]\n", DebugHeader->SequenceNo, Mailbox->HostSequenceNo);
1930 UpdateMailboxContent (Mailbox, DEBUG_MAILBOX_EXCEPTION_BUFFER_POINTER_INDEX, (UINT64)(
UINTN)&AgentExceptionBuffer.JumpBuffer);
1931 if (
SetJump (&AgentExceptionBuffer.JumpBuffer) != 0) {
1943 switch (DebugHeader->Command) {
1944 case DEBUG_COMMAND_HALT:
1946 HaltDeferred =
TRUE;
1947 BreakReceived =
FALSE;
1951 case DEBUG_COMMAND_RESET:
1963 UpdateMailboxContent (Mailbox, DEBUG_MAILBOX_HOST_SEQUENCE_NO_INDEX, Mailbox->HostSequenceNo + 1);
1969 case DEBUG_COMMAND_GO:
1976 if ((Data8 == DEBUG_DATA_BREAK_CAUSE_IMAGE_LOAD) || (Data8 == DEBUG_DATA_BREAK_CAUSE_IMAGE_UNLOAD)) {
1977 CpuContext->Dr0 = 0;
1980 if (!HaltDeferred) {
2056 HaltDeferred =
FALSE;
2058 Vector = DEBUG_TIMER_VECTOR;
2063 case DEBUG_COMMAND_BREAK_CAUSE:
2064 BreakCause.StopAddress = CpuContext->Eip;
2066 BreakCause.Cause =
GetBreakCause (DEBUG_TIMER_VECTOR, CpuContext);
2074 case DEBUG_COMMAND_SET_HW_BREAKPOINT:
2079 case DEBUG_COMMAND_CLEAR_HW_BREAKPOINT:
2084 case DEBUG_COMMAND_SINGLE_STEPPING:
2091 if ((Data8 == DEBUG_DATA_BREAK_CAUSE_IMAGE_LOAD) || (Data8 == DEBUG_DATA_BREAK_CAUSE_IMAGE_UNLOAD)) {
2092 CpuContext->Dr0 = 0;
2103 case DEBUG_COMMAND_SET_SW_BREAKPOINT:
2105 Data8 = *(UINT8 *)(
UINTN)Data64;
2106 *(UINT8 *)(
UINTN)Data64 = DEBUG_SW_BREAKPOINT_SYMBOL;
2110 case DEBUG_COMMAND_READ_MEMORY:
2115 case DEBUG_COMMAND_WRITE_MEMORY:
2120 AlignedDataPtr =
ALIGN_POINTER ((UINT8 *)&MemoryWrite->Data, sizeof (UINT64));
2121 if (AlignedDataPtr != (UINT8 *)&MemoryWrite->Data) {
2122 CopyMem (AlignedDataPtr, (UINT8 *)&MemoryWrite->Data, MemoryWrite->Count * MemoryWrite->Width);
2125 CopyMemByWidth ((UINT8 *)(
UINTN)MemoryWrite->Address, AlignedDataPtr, MemoryWrite->Count, MemoryWrite->Width);
2129 case DEBUG_COMMAND_READ_IO:
2131 switch (IoRead->Width) {
2145 Data64 = (UINT64)-1;
2151 case DEBUG_COMMAND_WRITE_IO:
2153 switch (IoWrite->Width) {
2155 Data64 =
IoWrite8 ((
UINTN)IoWrite->Port, *(UINT8 *)&IoWrite->Data);
2158 Data64 =
IoWrite16 ((
UINTN)IoWrite->Port, *(UINT16 *)&IoWrite->Data);
2161 Data64 =
IoWrite32 ((
UINTN)IoWrite->Port, *(UINT32 *)&IoWrite->Data);
2164 Data64 =
IoWrite64 ((
UINTN)IoWrite->Port, *(UINT64 *)&IoWrite->Data);
2167 Data64 = (UINT64)-1;
2173 case DEBUG_COMMAND_READ_ALL_REGISTERS:
2177 case DEBUG_COMMAND_READ_REGISTER:
2180 if (RegisterRead->Index <= SOFT_DEBUGGER_REGISTER_MAX) {
2189 case DEBUG_COMMAND_WRITE_REGISTER:
2191 if (RegisterWrite->Index <= SOFT_DEBUGGER_REGISTER_MAX) {
2193 ASSERT (Width == RegisterWrite->Length);
2194 CopyMem (RegisterBuffer, RegisterWrite->Data, Width);
2202 case DEBUG_COMMAND_ARCH_MODE:
2203 Data8 = DEBUG_ARCH_SYMBOL;
2207 case DEBUG_COMMAND_READ_MSR:
2213 case DEBUG_COMMAND_WRITE_MSR:
2215 AsmWriteMsr64 (MsrRegisterWrite->Index, MsrRegisterWrite->Value);
2219 case DEBUG_COMMAND_SET_DEBUG_SETTING:
2227 case DEBUG_COMMAND_GET_REVISION:
2228 DebugAgentRevision.Revision =
PcdGet32 (PcdTransferProtocolRevision);
2229 DebugAgentRevision.Capabilities = DEBUG_AGENT_CAPABILITIES;
2233 case DEBUG_COMMAND_GET_EXCEPTION:
2234 Exception.ExceptionNum = (UINT8)Vector;
2235 Exception.ExceptionData = (UINT32)CpuContext->ExceptionData;
2239 case DEBUG_COMMAND_SET_VIEWPOINT:
2251 }
else if (SetViewPoint->ViewPoint == 0) {
2259 case DEBUG_COMMAND_GET_VIEWPOINT:
2264 case DEBUG_COMMAND_MEMORY_READY:
2265 Data8 = (UINT8)
GetDebugFlag (DEBUG_AGENT_FLAG_MEMORY_READY);
2269 case DEBUG_COMMAND_DETACH:
2274 case DEBUG_COMMAND_CPUID:
2287 case DEBUG_COMMAND_SEARCH_SIGNATURE:
2289 if ((SearchSignature->Alignment != 0) &&
2290 (SearchSignature->Alignment ==
GetPowerOfTwo32 (SearchSignature->Alignment))
2293 if (SearchSignature->Positive) {
2295 Data64 =
ALIGN_VALUE ((
UINTN)SearchSignature->Start, SearchSignature->Alignment);
2296 Data64 <= SearchSignature->Start + SearchSignature->Count - SearchSignature->DataLength;
2297 Data64 += SearchSignature->Alignment
2300 if (
CompareMem ((VOID *)(
UINTN)Data64, &SearchSignature->Data, SearchSignature->DataLength) == 0) {
2305 if (Data64 > SearchSignature->Start + SearchSignature->Count - SearchSignature->DataLength) {
2306 Data64 = (UINT64)-1;
2310 Data64 =
ALIGN_VALUE ((
UINTN)SearchSignature->Start - SearchSignature->Alignment, SearchSignature->Alignment);
2311 Data64 >= SearchSignature->Start - SearchSignature->Count;
2312 Data64 -= SearchSignature->Alignment
2315 if (
CompareMem ((VOID *)(
UINTN)Data64, &SearchSignature->Data, SearchSignature->DataLength) == 0) {
2320 if (Data64 < SearchSignature->Start - SearchSignature->Count) {
2321 Data64 = (UINT64)-1;
2362 UINT8 InputCharacter;
2365 BOOLEAN BreakReceived;
2366 UINT32 ProcessorIndex;
2367 UINT32 CurrentDebugTimerInitCount;
2368 DEBUG_PORT_HANDLE Handle;
2371 UINT32 IssuedViewPoint;
2376 IssuedViewPoint = 0;
2377 BreakReceived =
FALSE;
2379 if (mSkipBreakpoint) {
2383 if ((Vector == DEBUG_INT1_VECTOR) || (Vector == DEBUG_INT3_VECTOR)) {
2395 IssuedViewPoint = ProcessorIndex;
2399 if ((IssuedViewPoint == ProcessorIndex) && (
GetDebugFlag (DEBUG_AGENT_FLAG_STEPPING) != 1)) {
2407 if (
GetDebugFlag (DEBUG_AGENT_FLAG_AGENT_IN_PROGRESS) == 1) {
2410 "Debug agent meet one Exception, ExceptionNum is %d, EIP = 0x%x.\n",
2412 (
UINTN)CpuContext->Eip
2415 ExceptionBuffer->ExceptionContent.ExceptionNum = (UINT8)Vector;
2416 ExceptionBuffer->ExceptionContent.ExceptionData = (UINT32)CpuContext->ExceptionData;
2417 LongJump ((BASE_LIBRARY_JUMP_BUFFER *)(
UINTN)(ExceptionBuffer), 1);
2433 case DEBUG_INT1_VECTOR:
2434 case DEBUG_INT3_VECTOR:
2435 switch (BreakCause) {
2436 case DEBUG_DATA_BREAK_CAUSE_SYSTEM_RESET:
2447 case DEBUG_DATA_BREAK_CAUSE_STEPPING:
2463 case DEBUG_DATA_BREAK_CAUSE_MEMORY_READY:
2471 case DEBUG_DATA_BREAK_CAUSE_IMAGE_LOAD:
2472 case DEBUG_DATA_BREAK_CAUSE_IMAGE_UNLOAD:
2477 *Al = DEBUG_AGENT_IMAGE_CONTINUE;
2490 case DEBUG_DATA_BREAK_CAUSE_HW_BREAKPOINT:
2491 case DEBUG_DATA_BREAK_CAUSE_SW_BREAKPOINT:
2506 if (Vector == DEBUG_INT3_VECTOR) {
2511 SavedEip = CpuContext->Eip;
2513 if ((SavedEip == CpuContext->Eip) &&
2514 (*(UINT8 *)(
UINTN)CpuContext->Eip == DEBUG_SW_BREAKPOINT_SYMBOL))
2531 case DEBUG_TIMER_VECTOR:
2579 if ((!
IsHostAttached () && (InputCharacter == DEBUG_STARTING_SYMBOL_ATTACH)) ||
2593 if (InputCharacter == DEBUG_COMMAND_GO) {
2631 if (Vector <= DEBUG_EXCEPT_SIMD) {
2634 "Exception happened, ExceptionNum is %d, EIP = 0x%x.\n",
2636 (
UINTN)CpuContext->Eip
2638 if (BreakCause == DEBUG_DATA_BREAK_CAUSE_STEPPING) {
2690 if ((IssuedViewPoint == ProcessorIndex) && (
GetDebugFlag (DEBUG_AGENT_FLAG_STEPPING) != 1)) {
UINTN EFIAPI MicroSecondDelay(IN UINTN MicroSeconds)
VOID EFIAPI ResetCold(VOID)
UINT64 EFIAPI DivU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
RETURNS_TWICE UINTN EFIAPI SetJump(OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer)
UINT64 EFIAPI MultU64x64(IN UINT64 Multiplicand, IN UINT64 Multiplier)
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
UINT32 EFIAPI GetPowerOfTwo32(IN UINT32 Operand)
VOID EFIAPI CpuDeadLoop(VOID)
UINT8 EFIAPI CalculateSum8(IN CONST UINT8 *Buffer, IN UINTN Length)
VOID EFIAPI CpuPause(VOID)
UINT8 EFIAPI CalculateCheckSum8(IN CONST UINT8 *Buffer, IN UINTN Length)
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
UINT64 EFIAPI DivU64x32Remainder(IN UINT64 Dividend, IN UINT32 Divisor, OUT UINT32 *Remainder OPTIONAL)
INTN EFIAPI LowBitSet64(IN UINT64 Operand)
VOID EFIAPI CpuBreakpoint(VOID)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
VOID EFIAPI LongJump(IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, IN UINTN Value)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI SetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
UINT32 EFIAPI AsmCpuidEx(IN UINT32 Index, IN UINT32 SubIndex, OUT UINT32 *RegisterEax OPTIONAL, OUT UINT32 *RegisterEbx OPTIONAL, OUT UINT32 *RegisterEcx OPTIONAL, OUT UINT32 *RegisterEdx OPTIONAL)
VOID SendAckPacket(IN UINT8 AckCommand)
VOID UpdateMailboxContent(IN DEBUG_AGENT_MAILBOX *Mailbox, IN UINTN Index, IN UINT64 Value)
UINT8 DecompressDataInPlace(IN OUT UINT8 *Data, IN UINTN Length)
UINT32 GetDebugFlag(IN UINT64 FlagMask)
UINT8 * ArchReadRegisterBuffer(IN DEBUG_CPU_CONTEXT *CpuContext, IN UINT8 Index, OUT UINT8 *Width)
VOID CompressData(IN DEBUG_PORT_HANDLE Handle, IN UINT8 *Data, IN UINT8 Length, IN BOOLEAN Send, OUT UINTN *CompressedLength OPTIONAL, OUT UINT16 *CompressedCrc OPTIONAL)
VOID EFIAPI DebugAgentMsgPrint(IN UINT8 ErrorLevel, IN CHAR8 *Format,...)
VOID SetDebugRegister(IN DEBUG_CPU_CONTEXT *CpuContext, IN DEBUG_DATA_SET_HW_BREAKPOINT *SetHwBreakpoint)
BOOLEAN IsHostAttached(VOID)
UINT16 CalculateCrc16(IN UINT8 *Data, IN UINTN DataSize, IN UINT16 Crc)
VOID CommandSteppingCleanup(IN DEBUG_CPU_CONTEXT *CpuContext)
VOID VerifyMailboxChecksum(IN DEBUG_AGENT_MAILBOX *Mailbox)
VOID CommandStepping(IN DEBUG_CPU_CONTEXT *CpuContext)
RETURN_STATUS SendDataResponsePacket(IN UINT8 *Data, IN UINT16 DataSize, IN OUT DEBUG_PACKET_HEADER *DebugHeader)
VOID SendDebugMsgPacket(IN CHAR8 *Buffer, IN UINTN Length)
VOID UpdateMailboxChecksum(IN DEBUG_AGENT_MAILBOX *Mailbox)
RETURN_STATUS SetDebugSetting(IN DEBUG_DATA_SET_DEBUG_SETTING *DebugSetting)
VOID ClearDebugRegister(IN DEBUG_CPU_CONTEXT *CpuContext, IN DEBUG_DATA_CLEAR_HW_BREAKPOINT *ClearHwBreakpoint)
VOID EFIAPI DebugAgentDataMsgPrint(IN UINT8 ErrorLevel, IN BOOLEAN IsSend, IN UINT8 *Data, IN UINT8 Length)
RETURN_STATUS ReceivePacket(OUT UINT8 *InputPacket, OUT BOOLEAN *BreakReceived, OUT BOOLEAN *IncompatibilityFlag OPTIONAL, IN UINTN Timeout, IN BOOLEAN SkipStartSymbol)
VOID CopyMemByWidth(OUT UINT8 *Dest, IN UINT8 *Src, IN UINT16 Count, IN UINT8 Width)
RETURN_STATUS ReadMemoryAndSendResponsePacket(IN UINT8 *Data, IN UINT16 Count, IN UINT8 Width, IN DEBUG_PACKET_HEADER *DebugHeader)
VOID CommandGo(IN DEBUG_CPU_CONTEXT *CpuContext)
VOID SendPacketWithoutData(IN UINT8 CommandType, IN UINT8 SequenceNo)
RETURN_STATUS SendCommandAndWaitForAckOK(IN UINT8 Command, IN UINTN Timeout, OUT BOOLEAN *BreakReceived OPTIONAL, OUT BOOLEAN *IncompatibilityFlag OPTIONAL)
VOID SetDebugFlag(IN UINT64 FlagMask, IN UINT32 FlagValue)
VOID CommandCommunication(IN UINTN Vector, IN OUT DEBUG_CPU_CONTEXT *CpuContext, IN BOOLEAN BreakReceived)
VOID FindAndReportModuleImageInfo(IN UINTN AlignSize)
UINTN DebugAgentReadBuffer(IN DEBUG_PORT_HANDLE Handle, IN UINT8 *Buffer, IN UINTN NumberOfBytes, IN UINTN Timeout)
VOID EFIAPI InterruptProcess(IN UINT32 Vector, IN DEBUG_CPU_CONTEXT *CpuContext)
VOID SetHostAttached(IN BOOLEAN Attached)
BOOLEAN IsDebugAgentInitialzed(VOID)
RETURN_STATUS AttachHost(IN UINT8 BreakCause, IN UINTN Timeout, OUT BOOLEAN *BreakReceived)
VOID TriggerSoftInterrupt(IN UINT32 Signature)
UINT16 ArchReadFxStatOffset(IN UINT8 Index, OUT UINT8 *Width)
UINT8 GetBreakCause(IN UINTN Vector, IN DEBUG_CPU_CONTEXT *CpuContext)
EFI_STATUS ReadRemainingBreakPacket(IN DEBUG_PORT_HANDLE Handle, IN OUT DEBUG_PACKET_HEADER *DebugHeader)
VOID SendBreakPacketToHost(IN UINT8 BreakCause, IN UINT32 ProcessorIndex, OUT BOOLEAN *BreakReceived)
DEBUG_AGENT_MAILBOX * GetMailboxPointer(VOID)
BOOLEAN MultiProcessorDebugSupport(VOID)
VOID * GetExceptionHandlerInIdtEntry(IN UINTN ExceptionNum)
DEBUG_PORT_HANDLE GetDebugPortHandle(VOID)
EFI_STATUS DebugReadBreakSymbol(IN DEBUG_PORT_HANDLE Handle, OUT UINT8 *BreakSymbol)
#define EFI_DEBUG_AGENT_GUID
BOOLEAN EFIAPI SaveAndSetDebugTimerInterrupt(IN BOOLEAN EnableStatus)
UINTN EFIAPI DebugPortReadBuffer(IN DEBUG_PORT_HANDLE Handle, IN UINT8 *Buffer, IN UINTN NumberOfBytes, IN UINTN Timeout)
BOOLEAN EFIAPI DebugPortPollBuffer(IN DEBUG_PORT_HANDLE Handle)
UINTN EFIAPI DebugPortWriteBuffer(IN DEBUG_PORT_HANDLE Handle, IN UINT8 *Buffer, IN UINTN NumberOfBytes)
VOID SetCpuStopFlagByIndex(IN UINT32 ProcessorIndex, IN BOOLEAN StopFlag)
VOID SetDebugViewPoint(IN UINT32 ProcessorIndex)
UINT32 FindNextPendingBreakCpu(VOID)
VOID HaltOtherProcessors(IN UINT32 CurrentProcessorIndex)
UINT32 GetProcessorIndex(VOID)
BOOLEAN IsFirstBreakProcessor(IN UINT32 ProcessorIndex)
BOOLEAN DebugAgentIsBsp(IN UINT32 ProcessorIndex)
VOID ReleaseMpSpinLock(IN OUT SPIN_LOCK *MpSpinLock)
VOID AcquireMpSpinLock(IN OUT SPIN_LOCK *MpSpinLock)
VOID SetCpuRunningFlag(IN BOOLEAN RunningFlag)
BOOLEAN IsAllCpuRunning(VOID)
VOID SetCpuBreakFlagByIndex(IN UINT32 ProcessorIndex, IN BOOLEAN BreakFlag)
BOOLEAN IsCpuStopped(IN UINT32 ProcessorIndex)
VOID SetIpiSentByApFlag(IN BOOLEAN IpiSentByApFlag)
UINT32 InitializeDebugTimer(OUT UINT32 *TimerFrequency, IN BOOLEAN DumpFlag)
BOOLEAN IsDebugTimerTimeout(IN UINT32 TimerCycle, IN UINT32 Timer, IN UINT32 TimeoutTicker)
UINTN EFIAPI AsmWriteDr1(UINTN Dr1)
UINTN EFIAPI AsmReadDr1(VOID)
UINTN EFIAPI AsmReadDr0(VOID)
UINT64 EFIAPI AsmReadMsr64(IN UINT32 Index)
UINTN EFIAPI AsmWriteDr0(UINTN Dr0)
UINT64 EFIAPI AsmWriteMsr64(IN UINT32 Index, IN UINT64 Value)
UINT8 EFIAPI IoWrite8(IN UINTN Port, IN UINT8 Value)
UINT64 EFIAPI IoRead64(IN UINTN Port)
UINT64 EFIAPI IoWrite64(IN UINTN Port, IN UINT64 Value)
UINT64 EFIAPI MmioRead64(IN UINTN Address)
UINT16 EFIAPI MmioRead16(IN UINTN Address)
UINT8 EFIAPI MmioRead8(IN UINTN Address)
UINT8 EFIAPI IoRead8(IN UINTN Port)
UINT32 EFIAPI MmioRead32(IN UINTN Address)
UINT16 EFIAPI IoRead16(IN UINTN Port)
UINT32 EFIAPI IoRead32(IN UINTN Port)
UINT32 EFIAPI IoWrite32(IN UINTN Port, IN UINT32 Value)
UINT16 EFIAPI IoWrite16(IN UINTN Port, IN UINT16 Value)
UINT32 EFIAPI GetApicTimerInitCount(VOID)
VOID EFIAPI SendApicEoi(VOID)
UINT32 EFIAPI GetApicTimerCurrentCount(VOID)
UINTN EFIAPI AsciiVSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString, IN VA_LIST Marker)
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
#define RETURN_ERROR(StatusCode)
#define RETURN_UNSUPPORTED
#define ALIGN_POINTER(Pointer, Alignment)
#define VA_START(Marker, Parameter)
#define ALIGN_VALUE(Value, Alignment)
#define OFFSET_OF(TYPE, Field)
#define GLOBAL_REMOVE_IF_UNREFERENCED
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PcdGet32(TokenName)
UINTN EFIAPI PeCoffSearchImageBase(IN UINTN Address)
#define EFI_VECTOR_HANDOFF_DO_NOT_HOOK
UINT32 ViewPointIndex
Current view point to be debugged.
BOOLEAN IpiSentByAp
TRUE: IPI is sent by AP. FALSE: IPI is sent by BSP.
SPIN_LOCK MailboxSpinLock
Lock for accessing mail box.
UINT32 DebugTimerInitCount
Record BSP's init timer count.
UINT32 BspIndex
Processor index value of BSP.
BOOLEAN RunCommandSet
TRUE: RUN command is executing. FALSE: RUN command has been executed.
SPIN_LOCK DebugPortSpinLock
Lock for access debug port.
UINT32 BreakAtCpuIndex
Processor index value of the current breaking CPU.
PHYSICAL_ADDRESS ImageAddress