Basic serial IO abstaction for GDB\r
\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
- \r
+\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
RETURN_STATUS\r
EFIAPI\r
GdbSerialInit (\r
- IN UINT64 BaudRate, \r
- IN UINT8 Parity, \r
- IN UINT8 DataBits, \r
- IN UINT8 StopBits \r
+ IN UINT64 BaudRate,\r
+ IN UINT8 Parity,\r
+ IN UINT8 DataBits,\r
+ IN UINT8 StopBits\r
)\r
{\r
if ((Parity != 0) || (DataBits != 8) || (StopBits != 1)) {\r
// Could add support for different Baud rates....\r
return RETURN_UNSUPPORTED;\r
}\r
- \r
+\r
UINT32 Base = PcdGet32 (PcdGdbUartBase);\r
- \r
+\r
// initialize baud rate generator to 115200 based on EB clock REFCLK24MHZ\r
MmioWrite32 (Base + UARTIBRD, UART_115200_IDIV);\r
MmioWrite32 (Base + UARTFBRD, UART_115200_FDIV);\r
EFIAPI\r
GdbIsCharAvailable (\r
VOID\r
- ) \r
+ )\r
{\r
UINT32 FR = PcdGet32 (PcdGdbUartBase) + UARTFR;\r
\r
{\r
UINT32 FR = PcdGet32 (PcdGdbUartBase) + UARTFR;\r
UINT32 DR = PcdGet32 (PcdGdbUartBase) + UARTDR;\r
- \r
+\r
while ((MmioRead32 (FR) & UART_RX_EMPTY_FLAG_MASK) == 0);\r
return MmioRead8 (DR);\r
}\r