TianoCore EDK2 master
Loading...
Searching...
No Matches
PeiEmuSerialPortLib.c
Go to the documentation of this file.
1
12#include <PiPei.h>
15
16#include <Ppi/EmuThunk.h>
17#include <Protocol/EmuThunk.h>
18
30RETURN_STATUS
31EFIAPI
33 VOID
34 )
35{
36 return RETURN_SUCCESS;
37}
38
57EFIAPI
59 IN UINT8 *Buffer,
60 IN UINTN NumberOfBytes
61 )
62{
63 EMU_THUNK_PPI *ThunkPpi;
64 EFI_STATUS Status;
65 EMU_THUNK_PROTOCOL *Thunk;
66
67 //
68 // Locate EmuThunkPpi for retrieving standard output handle
69 //
70 Status = PeiServicesLocatePpi (
71 &gEmuThunkPpiGuid,
72 0,
73 NULL,
74 (VOID **)&ThunkPpi
75 );
76 if (!EFI_ERROR (Status)) {
77 Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
78 return Thunk->WriteStdErr (Buffer, NumberOfBytes);
79 }
80
81 return 0;
82}
83
100UINTN
101EFIAPI
103 OUT UINT8 *Buffer,
104 IN UINTN NumberOfBytes
105 )
106{
107 return 0;
108}
109
121BOOLEAN
122EFIAPI
124 VOID
125 )
126{
127 return FALSE;
128}
UINT64 UINTN
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
#define NULL
Definition: Base.h:319
#define RETURN_SUCCESS
Definition: Base.h:1066
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
BOOLEAN EFIAPI SerialPortPoll(VOID)
UINTN EFIAPI SerialPortRead(OUT UINT8 *Buffer, IN UINTN NumberOfBytes)
RETURN_STATUS EFIAPI SerialPortInitialize(VOID)
UINTN EFIAPI SerialPortWrite(IN UINT8 *Buffer, IN UINTN NumberOfBytes)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29