]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseIoLibIntrinsic/IoLibSev.h
MdePkg: Remove RVCT support
[mirror_edk2.git] / MdePkg / Library / BaseIoLibIntrinsic / IoLibSev.h
1 /** @file
2 Header file for SEV IO library.
3
4 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 **/
7
8 #ifndef IOLIB_SEV_H_
9 #define IOLIB_SEV_H_
10
11 #include <Base.h>
12
13 #include <Library/BaseLib.h>
14 #include <Library/DebugLib.h>
15
16 /**
17 Reads an 8-bit I/O port fifo into a block of memory.
18
19 Reads the 8-bit I/O fifo port specified by Port.
20 The port is read Count times, and the read data is
21 stored in the provided Buffer.
22
23 This function must guarantee that all I/O read and write operations are
24 serialized.
25
26 If 8-bit I/O port operations are not supported, then ASSERT().
27
28 @param Port The I/O port to read.
29 @param Count The number of times to read I/O port.
30 @param Buffer The buffer to store the read data into.
31
32 **/
33 VOID
34 EFIAPI
35 SevIoReadFifo8 (
36 IN UINTN Port,
37 IN UINTN Count,
38 OUT VOID *Buffer
39 );
40
41 /**
42 Writes a block of memory into an 8-bit I/O port fifo.
43
44 Writes the 8-bit I/O fifo port specified by Port.
45 The port is written Count times, and the write data is
46 retrieved from the provided Buffer.
47
48 This function must guarantee that all I/O write and write operations are
49 serialized.
50
51 If 8-bit I/O port operations are not supported, then ASSERT().
52
53 @param Port The I/O port to write.
54 @param Count The number of times to write I/O port.
55 @param Buffer The buffer to retrieve the write data from.
56
57 **/
58 VOID
59 EFIAPI
60 SevIoWriteFifo8 (
61 IN UINTN Port,
62 IN UINTN Count,
63 IN VOID *Buffer
64 );
65
66 /**
67 Reads an 8-bit I/O port fifo into a block of memory.
68
69 Reads the 8-bit I/O fifo port specified by Port.
70 The port is read Count times, and the read data is
71 stored in the provided Buffer.
72
73 This function must guarantee that all I/O read and write operations are
74 serialized.
75
76 If 8-bit I/O port operations are not supported, then ASSERT().
77
78 @param Port The I/O port to read.
79 @param Count The number of times to read I/O port.
80 @param Buffer The buffer to store the read data into.
81
82 **/
83 VOID
84 EFIAPI
85 SevIoReadFifo16 (
86 IN UINTN Port,
87 IN UINTN Count,
88 OUT VOID *Buffer
89 );
90
91 /**
92 Writes a block of memory into an 8-bit I/O port fifo.
93
94 Writes the 8-bit I/O fifo port specified by Port.
95 The port is written Count times, and the write data is
96 retrieved from the provided Buffer.
97
98 This function must guarantee that all I/O write and write operations are
99 serialized.
100
101 If 8-bit I/O port operations are not supported, then ASSERT().
102
103 @param Port The I/O port to write.
104 @param Count The number of times to write I/O port.
105 @param Buffer The buffer to retrieve the write data from.
106
107 **/
108 VOID
109 EFIAPI
110 SevIoWriteFifo16 (
111 IN UINTN Port,
112 IN UINTN Count,
113 IN VOID *Buffer
114 );
115
116 /**
117 Reads an 8-bit I/O port fifo into a block of memory.
118
119 Reads the 8-bit I/O fifo port specified by Port.
120 The port is read Count times, and the read data is
121 stored in the provided Buffer.
122
123 This function must guarantee that all I/O read and write operations are
124 serialized.
125
126 If 8-bit I/O port operations are not supported, then ASSERT().
127
128 @param Port The I/O port to read.
129 @param Count The number of times to read I/O port.
130 @param Buffer The buffer to store the read data into.
131
132 **/
133 VOID
134 EFIAPI
135 SevIoReadFifo32 (
136 IN UINTN Port,
137 IN UINTN Count,
138 OUT VOID *Buffer
139 );
140
141 /**
142 Writes a block of memory into an 8-bit I/O port fifo.
143
144 Writes the 8-bit I/O fifo port specified by Port.
145 The port is written Count times, and the write data is
146 retrieved from the provided Buffer.
147
148 This function must guarantee that all I/O write and write operations are
149 serialized.
150
151 If 8-bit I/O port operations are not supported, then ASSERT().
152
153 @param Port The I/O port to write.
154 @param Count The number of times to write I/O port.
155 @param Buffer The buffer to retrieve the write data from.
156
157 **/
158 VOID
159 EFIAPI
160 SevIoWriteFifo32 (
161 IN UINTN Port,
162 IN UINTN Count,
163 IN VOID *Buffer
164 );
165
166 #endif