TianoCore EDK2 master
Loading...
Searching...
No Matches
IoLibFifoCc.c
Go to the documentation of this file.
1
10#include "IoLibSev.h"
11#include "IoLibTdx.h"
12#include <Uefi/UefiBaseType.h>
13#include <Library/TdxLib.h>
14
34VOID
35EFIAPI
37 IN UINTN Port,
38 IN UINTN Count,
39 OUT VOID *Buffer
40 )
41{
42 if (IsTdxGuest ()) {
43 TdIoReadFifo8 (Port, Count, Buffer);
44 } else {
45 SevIoReadFifo8 (Port, Count, Buffer);
46 }
47}
48
68VOID
69EFIAPI
71 IN UINTN Port,
72 IN UINTN Count,
73 IN VOID *Buffer
74 )
75{
76 if (IsTdxGuest ()) {
77 TdIoWriteFifo8 (Port, Count, Buffer);
78 } else {
79 SevIoWriteFifo8 (Port, Count, Buffer);
80 }
81}
82
102VOID
103EFIAPI
105 IN UINTN Port,
106 IN UINTN Count,
107 OUT VOID *Buffer
108 )
109{
110 if (IsTdxGuest ()) {
111 TdIoReadFifo16 (Port, Count, Buffer);
112 } else {
113 SevIoReadFifo16 (Port, Count, Buffer);
114 }
115}
116
136VOID
137EFIAPI
139 IN UINTN Port,
140 IN UINTN Count,
141 IN VOID *Buffer
142 )
143{
144 if (IsTdxGuest ()) {
145 TdIoWriteFifo16 (Port, Count, Buffer);
146 } else {
147 SevIoWriteFifo16 (Port, Count, Buffer);
148 }
149}
150
170VOID
171EFIAPI
173 IN UINTN Port,
174 IN UINTN Count,
175 OUT VOID *Buffer
176 )
177{
178 if (IsTdxGuest ()) {
179 TdIoReadFifo32 (Port, Count, Buffer);
180 } else {
181 SevIoReadFifo32 (Port, Count, Buffer);
182 }
183}
184
204VOID
205EFIAPI
207 IN UINTN Port,
208 IN UINTN Count,
209 IN VOID *Buffer
210 )
211{
212 if (IsTdxGuest ()) {
213 TdIoWriteFifo32 (Port, Count, Buffer);
214 } else {
215 SevIoWriteFifo32 (Port, Count, Buffer);
216 }
217}
UINT64 UINTN
VOID EFIAPI IoWriteFifo32(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
Definition: IoLibFifoCc.c:206
VOID EFIAPI IoReadFifo8(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
Definition: IoLibFifoCc.c:36
VOID EFIAPI IoReadFifo16(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
Definition: IoLibFifoCc.c:104
VOID EFIAPI IoWriteFifo16(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
Definition: IoLibFifoCc.c:138
VOID EFIAPI IoReadFifo32(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
Definition: IoLibFifoCc.c:172
VOID EFIAPI IoWriteFifo8(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
Definition: IoLibFifoCc.c:70
VOID EFIAPI TdIoWriteFifo32(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
VOID EFIAPI TdIoWriteFifo16(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
VOID EFIAPI TdIoReadFifo16(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
VOID EFIAPI TdIoReadFifo8(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
VOID EFIAPI TdIoWriteFifo8(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
VOID EFIAPI TdIoReadFifo32(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
BOOLEAN EFIAPI IsTdxGuest(VOID)
VOID EFIAPI SevIoWriteFifo8(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
VOID EFIAPI SevIoReadFifo16(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
VOID EFIAPI SevIoReadFifo8(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
VOID EFIAPI SevIoWriteFifo16(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
VOID EFIAPI SevIoReadFifo32(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
VOID EFIAPI SevIoWriteFifo32(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284