50 UINTN SerialBaseAddress;
52 UINT32 ReceiveFifoDepth;
57 if (mSerialBaseAddress != 0) {
62 return mPermanentStatus;
66 if ((Hob ==
NULL) || (GET_GUID_HOB_DATA_SIZE (Hob) !=
sizeof *UartBase)) {
71 UartBase = GET_GUID_HOB_DATA (Hob);
73 SerialBaseAddress = (
UINTN)UartBase->ConsoleAddress;
74 if (SerialBaseAddress == 0) {
82 DataBits =
PcdGet8 (PcdUartDefaultDataBits);
98 mSerialBaseAddress = SerialBaseAddress;
102 mPermanentStatus = Status;
124 return PL011UartWrite (mSerialBaseAddress, Buffer, NumberOfBytes);
148 return PL011UartRead (mSerialBaseAddress, Buffer, NumberOfBytes);
210 IN OUT UINT64 *BaudRate,
211 IN OUT UINT32 *ReceiveFifoDepth,
212 IN OUT UINT32 *Timeout,
214 IN OUT UINT8 *DataBits,
218 RETURN_STATUS Status;
253 RETURN_STATUS Status;
280 RETURN_STATUS Status;
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
BOOLEAN EFIAPI SerialPortPoll(VOID)
RETURN_STATUS EFIAPI SerialPortSetAttributes(IN OUT UINT64 *BaudRate, IN OUT UINT32 *ReceiveFifoDepth, IN OUT UINT32 *Timeout, IN OUT EFI_PARITY_TYPE *Parity, IN OUT UINT8 *DataBits, IN OUT EFI_STOP_BITS_TYPE *StopBits)
UINTN EFIAPI SerialPortRead(OUT UINT8 *Buffer, IN UINTN NumberOfBytes)
RETURN_STATUS EFIAPI SerialPortInitialize(VOID)
RETURN_STATUS EFIAPI SerialPortSetControl(IN UINT32 Control)
RETURN_STATUS EFIAPI SerialPortGetControl(OUT UINT32 *Control)
UINTN EFIAPI SerialPortWrite(IN UINT8 *Buffer, IN UINTN NumberOfBytes)
#define RETURN_ERROR(StatusCode)
#define RETURN_UNSUPPORTED
RETURN_STATUS EFIAPI PL011UartInitializePort(IN UINTN UartBase, IN UINT32 UartClkInHz, IN OUT UINT64 *BaudRate, IN OUT UINT32 *ReceiveFifoDepth, IN OUT EFI_PARITY_TYPE *Parity, IN OUT UINT8 *DataBits, IN OUT EFI_STOP_BITS_TYPE *StopBits)
RETURN_STATUS EFIAPI PL011UartSetControl(IN UINTN UartBase, IN UINT32 Control)
UINTN EFIAPI PL011UartWrite(IN UINTN UartBase, IN UINT8 *Buffer, IN UINTN NumberOfBytes)
UINTN EFIAPI PL011UartRead(IN UINTN UartBase, OUT UINT8 *Buffer, IN UINTN NumberOfBytes)
BOOLEAN EFIAPI PL011UartPoll(IN UINTN UartBase)
RETURN_STATUS EFIAPI PL011UartGetControl(IN UINTN UartBase, OUT UINT32 *Control)
#define PcdGet64(TokenName)
#define FixedPcdGet32(TokenName)
#define PcdGet8(TokenName)