/** @file\r
- Commond Debug Agent library implementation. It mainly includes\r
+ Common Debug Agent library implementation. It mainly includes\r
the first C function called by exception/interrupt handlers,\r
read/write debug packet to communication with HOST based on transfer\r
protocol.\r
}\r
\r
/**\r
- Read remaing debug packet except for the start symbol\r
+ Read remaining debug packet except for the start symbol\r
\r
@param[in] Handle Pointer to Debug Port handle.\r
@param[in, out] DebugHeader Debug header buffer including start symbol.\r
@retval EFI_SUCCESS Read the symbol in BreakSymbol.\r
@retval EFI_CRC_ERROR CRC check fail.\r
@retval EFI_TIMEOUT Timeout occurs when reading debug packet.\r
- @retval EFI_DEVICE_ERROR Receive the old or responsed packet.\r
+ @retval EFI_DEVICE_ERROR Receive the old or response packet.\r
\r
**/\r
EFI_STATUS\r
if (IS_REQUEST (DebugHeader)) {\r
if (DebugHeader->SequenceNo == (UINT8)(Mailbox->HostSequenceNo + 1)) {\r
//\r
- // Only updagte HostSequenceNo for new command packet\r
+ // Only update HostSequenceNo for new command packet\r
//\r
UpdateMailboxContent (Mailbox, DEBUG_MAILBOX_HOST_SEQUENCE_NO_INDEX, DebugHeader->SequenceNo);\r
return EFI_SUCCESS;\r
}\r
};\r
\r
-#define DEBGU_SERIAL_IO_FIFO_DEPTH 10\r
+#define DEBUG_SERIAL_IO_FIFO_DEPTH 10\r
//\r
// Data buffer for Terminal input character and Debug Symbols.\r
-// The depth is DEBGU_SERIAL_IO_FIFO_DEPTH.\r
+// The depth is DEBUG_SERIAL_IO_FIFO_DEPTH.\r
// Fields:\r
// First UINT8: The index of the first data in array Data[].\r
// Last UINT8: The index, which you can put a new data into array Data[].\r
UINT8 First;\r
UINT8 Last;\r
UINT8 Surplus;\r
- UINT8 Data[DEBGU_SERIAL_IO_FIFO_DEPTH];\r
+ UINT8 Data[DEBUG_SERIAL_IO_FIFO_DEPTH];\r
} DEBUG_SERIAL_FIFO;\r
\r
//\r
EFI_HANDLE mSerialIoHandle = NULL;\r
UINTN mLoopbackBuffer = 0;\r
DEBUG_SERIAL_FIFO mSerialFifoForTerminal = {\r
- 0, 0, DEBGU_SERIAL_IO_FIFO_DEPTH, { 0 }\r
+ 0, 0, DEBUG_SERIAL_IO_FIFO_DEPTH, { 0 }\r
};\r
DEBUG_SERIAL_FIFO mSerialFifoForDebug = {\r
- 0, 0, DEBGU_SERIAL_IO_FIFO_DEPTH, { 0 }\r
+ 0, 0, DEBUG_SERIAL_IO_FIFO_DEPTH, { 0 }\r
};\r
\r
/**\r
\r
**/\r
BOOLEAN\r
-IsDebugTermianlFifoEmpty (\r
+IsDebugTerminalFifoEmpty (\r
IN DEBUG_SERIAL_FIFO *Fifo\r
)\r
{\r
- if (Fifo->Surplus == DEBGU_SERIAL_IO_FIFO_DEPTH) {\r
+ if (Fifo->Surplus == DEBUG_SERIAL_IO_FIFO_DEPTH) {\r
return TRUE;\r
}\r
\r
Fifo->Data[Fifo->Last] = Data;\r
Fifo->Surplus--;\r
Fifo->Last++;\r
- if (Fifo->Last == DEBGU_SERIAL_IO_FIFO_DEPTH) {\r
+ if (Fifo->Last == DEBUG_SERIAL_IO_FIFO_DEPTH) {\r
Fifo->Last = 0;\r
}\r
\r
//\r
// if FIFO is empty, no data can remove\r
//\r
- if (IsDebugTermianlFifoEmpty (Fifo)) {\r
+ if (IsDebugTerminalFifoEmpty (Fifo)) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
*Data = Fifo->Data[Fifo->First];\r
Fifo->Surplus++;\r
Fifo->First++;\r
- if (Fifo->First == DEBGU_SERIAL_IO_FIFO_DEPTH) {\r
+ if (Fifo->First == DEBUG_SERIAL_IO_FIFO_DEPTH) {\r
Fifo->First = 0;\r
}\r
\r
// Check to see if the Terminal FIFO is empty and\r
// check to see if the input buffer in the Debug Communication Library is empty\r
//\r
- if (!IsDebugTermianlFifoEmpty (&mSerialFifoForTerminal) || DebugPortPollBuffer (Handle)) {\r
+ if (!IsDebugTerminalFifoEmpty (&mSerialFifoForTerminal) || DebugPortPollBuffer (Handle)) {\r
*Control &= ~EFI_SERIAL_INPUT_BUFFER_EMPTY;\r
}\r
\r