]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmEbPkg/Library/SerialPortLib/SerialPortLib.c
Added stub RTC lib, turned on option of building debug agent (GDB STUB) into SEC...
[mirror_edk2.git] / ArmEbPkg / Library / SerialPortLib / SerialPortLib.c
index 735c5ddab82a5b8dd7bac1bd609f8d59a65aface..09a9333785b1a26c1a92acbf36a0e2afcabfcba7 100644 (file)
@@ -15,7 +15,6 @@
 **/\r
 \r
 #include <Base.h>\r
-#include <Library/DebugLib.h>\r
 #include <Library/SerialPortLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/IoLib.h>\r
@@ -35,7 +34,7 @@ SerialPortInitialize (
   VOID\r
   )\r
 {\r
-  UINT32  Base = PcdGet32 (PcdConsoleUart);\r
+  UINT32  Base = PcdGet32 (PcdConsoleUartBase);\r
   \r
   // initialize baud rate generator to 115200 based on EB clock REFCLK24MHZ\r
   MmioWrite32 (Base + UARTIBRD, UART_115200_IDIV);\r
@@ -70,8 +69,8 @@ SerialPortWrite (
   IN UINTN     NumberOfBytes\r
 )\r
 {\r
-  UINT32 FR = PcdGet32(PcdConsoleUart) + UARTFR;\r
-  UINT32 DR = PcdGet32(PcdConsoleUart) + UARTDR;\r
+  UINT32 FR = PcdGet32 (PcdConsoleUartBase) + UARTFR;\r
+  UINT32 DR = PcdGet32 (PcdConsoleUartBase) + UARTDR;\r
   UINTN  Count;\r
     \r
   for (Count = 0; Count < NumberOfBytes; Count++, Buffer++) {\r
@@ -100,8 +99,8 @@ SerialPortRead (
   IN  UINTN     NumberOfBytes\r
 )\r
 {\r
-  UINT32  FR = PcdGet32(PcdConsoleUart) + UARTFR;\r
-  UINT32  DR = PcdGet32(PcdConsoleUart) + UARTDR;\r
+  UINT32  FR = PcdGet32 (PcdConsoleUartBase) + UARTFR;\r
+  UINT32  DR = PcdGet32 (PcdConsoleUartBase) + UARTDR;\r
   UINTN   Count;\r
     \r
   for (Count = 0; Count < NumberOfBytes; Count++, Buffer++) {\r
@@ -127,7 +126,7 @@ SerialPortPoll (
   VOID\r
   )\r
 {\r
-  UINT32 FR = PcdGet32(PcdConsoleUart) + UARTFR;\r
+  UINT32 FR = PcdGet32 (PcdConsoleUartBase) + UARTFR;\r
 \r
   if ((MmioRead32 (FR) & UART_RX_EMPTY_FLAG_MASK) == 0) {\r
     return TRUE;\r