21STATIC INT64 mLastGetChar = -1;
38 Ret =
SbiCall (SBI_EXT_BASE, SBI_EXT_BASE_PROBE_EXT, 1, SBI_EXT_0_1_CONSOLE_GETCHAR);
71 mHaveLegacyPutchar =
TRUE;
75 mHaveLegacyGetchar =
TRUE;
78 return (mHaveLegacyGetchar && mHaveLegacyPutchar) ?
106 if (NumberOfBytes == 0) {
112 }
else if (mHaveLegacyPutchar) {
148 Buffer[Index++] = (UINT8)mLastGetChar;
177 if (mLastGetChar >= 0) {
196 mLastGetChar = Buffer;
198 }
else if (mHaveLegacyGetchar) {
199 mLastGetChar = (INT64)
SbiCall (SBI_EXT_0_1_CONSOLE_GETCHAR, 0, 0).
Error;
202 return mLastGetChar >= 0;
280 IN OUT UINT64 *BaudRate,
281 IN OUT UINT32 *ReceiveFifoDepth,
282 IN OUT UINT32 *Timeout,
284 IN OUT UINT8 *DataBits,
SBI_RET EFIAPI SbiCall(IN UINTN ExtId, IN UINTN FuncId, IN UINTN NumArgs,...)
EFI_STATUS EFIAPI TranslateError(IN UINTN SbiError)
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)
STATIC BOOLEAN SbiImplementsLegacyGetchar(VOID)
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_DEVICE_ERROR
BOOLEAN SbiImplementsLegacyPutchar(VOID)
UINTN SbiDbcnWrite(IN UINT8 *Buffer, IN UINTN NumberOfBytes)
UINTN SbiLegacyPutchar(IN UINT8 *Buffer, IN UINTN NumberOfBytes)
BOOLEAN SbiImplementsDbcn(VOID)
UINTN Error
SBI status code.
UINTN Value
Value returned.