Browse Source

[efi] Add definitions of GUIDs observed when booting shim.efi and grub.efi

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
a09dd5c03d

+ 301
- 0
src/include/ipxe/efi/Protocol/SerialIo.h View File

@@ -0,0 +1,301 @@
1
+/** @file
2
+  Serial IO protocol as defined in the UEFI 2.0 specification.
3
+
4
+  Abstraction of a basic serial device. Targeted at 16550 UART, but
5
+  could be much more generic.
6
+
7
+  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
8
+  This program and the accompanying materials
9
+  are licensed and made available under the terms and conditions of the BSD License
10
+  which accompanies this distribution.  The full text of the license may be found at
11
+  http://opensource.org/licenses/bsd-license.php
12
+
13
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15
+
16
+**/
17
+
18
+#ifndef __SERIAL_IO_PROTOCOL_H__
19
+#define __SERIAL_IO_PROTOCOL_H__
20
+
21
+FILE_LICENCE ( BSD3 );
22
+
23
+#define EFI_SERIAL_IO_PROTOCOL_GUID \
24
+  { \
25
+    0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD } \
26
+  }
27
+
28
+///
29
+/// Protocol GUID defined in EFI1.1.
30
+///
31
+#define SERIAL_IO_PROTOCOL  EFI_SERIAL_IO_PROTOCOL_GUID
32
+
33
+typedef struct _EFI_SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL;
34
+
35
+
36
+///
37
+/// Backward-compatible with EFI1.1.
38
+///
39
+typedef EFI_SERIAL_IO_PROTOCOL  SERIAL_IO_INTERFACE;
40
+
41
+///
42
+/// Parity type that is computed or checked as each character is transmitted or received. If the
43
+/// device does not support parity, the value is the default parity value.
44
+///
45
+typedef enum {
46
+  DefaultParity,
47
+  NoParity,
48
+  EvenParity,
49
+  OddParity,
50
+  MarkParity,
51
+  SpaceParity
52
+} EFI_PARITY_TYPE;
53
+
54
+///
55
+/// Stop bits type
56
+///
57
+typedef enum {
58
+  DefaultStopBits,
59
+  OneStopBit,
60
+  OneFiveStopBits,
61
+  TwoStopBits
62
+} EFI_STOP_BITS_TYPE;
63
+
64
+//
65
+// define for Control bits, grouped by read only, write only, and read write
66
+//
67
+//
68
+// Read Only
69
+//
70
+#define EFI_SERIAL_CLEAR_TO_SEND        0x00000010
71
+#define EFI_SERIAL_DATA_SET_READY       0x00000020
72
+#define EFI_SERIAL_RING_INDICATE        0x00000040
73
+#define EFI_SERIAL_CARRIER_DETECT       0x00000080
74
+#define EFI_SERIAL_INPUT_BUFFER_EMPTY   0x00000100
75
+#define EFI_SERIAL_OUTPUT_BUFFER_EMPTY  0x00000200
76
+
77
+//
78
+// Write Only
79
+//
80
+#define EFI_SERIAL_REQUEST_TO_SEND      0x00000002
81
+#define EFI_SERIAL_DATA_TERMINAL_READY  0x00000001
82
+
83
+//
84
+// Read Write
85
+//
86
+#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE     0x00001000
87
+#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE     0x00002000
88
+#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x00004000
89
+
90
+//
91
+// Serial IO Member Functions
92
+//
93
+/**
94
+  Reset the serial device.
95
+
96
+  @param  This              Protocol instance pointer.
97
+
98
+  @retval EFI_SUCCESS       The device was reset.
99
+  @retval EFI_DEVICE_ERROR  The serial device could not be reset.
100
+
101
+**/
102
+typedef
103
+EFI_STATUS
104
+(EFIAPI *EFI_SERIAL_RESET)(
105
+  IN EFI_SERIAL_IO_PROTOCOL *This
106
+  );
107
+
108
+/**
109
+  Sets the baud rate, receive FIFO depth, transmit/receice time out, parity,
110
+  data buts, and stop bits on a serial device.
111
+
112
+  @param  This             Protocol instance pointer.
113
+  @param  BaudRate         The requested baud rate. A BaudRate value of 0 will use the
114
+                           device's default interface speed.
115
+  @param  ReveiveFifoDepth The requested depth of the FIFO on the receive side of the
116
+                           serial interface. A ReceiveFifoDepth value of 0 will use
117
+                           the device's default FIFO depth.
118
+  @param  Timeout          The requested time out for a single character in microseconds.
119
+                           This timeout applies to both the transmit and receive side of the
120
+                           interface. A Timeout value of 0 will use the device's default time
121
+                           out value.
122
+  @param  Parity           The type of parity to use on this serial device. A Parity value of
123
+                           DefaultParity will use the device's default parity value.
124
+  @param  DataBits         The number of data bits to use on the serial device. A DataBits
125
+                           vaule of 0 will use the device's default data bit setting.
126
+  @param  StopBits         The number of stop bits to use on this serial device. A StopBits
127
+                           value of DefaultStopBits will use the device's default number of
128
+                           stop bits.
129
+
130
+  @retval EFI_SUCCESS      The device was reset.
131
+  @retval EFI_DEVICE_ERROR The serial device could not be reset.
132
+
133
+**/
134
+typedef
135
+EFI_STATUS
136
+(EFIAPI *EFI_SERIAL_SET_ATTRIBUTES)(
137
+  IN EFI_SERIAL_IO_PROTOCOL         *This,
138
+  IN UINT64                         BaudRate,
139
+  IN UINT32                         ReceiveFifoDepth,
140
+  IN UINT32                         Timeout,
141
+  IN EFI_PARITY_TYPE                Parity,
142
+  IN UINT8                          DataBits,
143
+  IN EFI_STOP_BITS_TYPE             StopBits
144
+  );
145
+
146
+/**
147
+  Set the control bits on a serial device
148
+
149
+  @param  This             Protocol instance pointer.
150
+  @param  Control          Set the bits of Control that are settable.
151
+
152
+  @retval EFI_SUCCESS      The new control bits were set on the serial device.
153
+  @retval EFI_UNSUPPORTED  The serial device does not support this operation.
154
+  @retval EFI_DEVICE_ERROR The serial device is not functioning correctly.
155
+
156
+**/
157
+typedef
158
+EFI_STATUS
159
+(EFIAPI *EFI_SERIAL_SET_CONTROL_BITS)(
160
+  IN EFI_SERIAL_IO_PROTOCOL         *This,
161
+  IN UINT32                         Control
162
+  );
163
+
164
+/**
165
+  Retrieves the status of thecontrol bits on a serial device
166
+
167
+  @param  This              Protocol instance pointer.
168
+  @param  Control           A pointer to return the current Control signals from the serial device.
169
+
170
+  @retval EFI_SUCCESS       The control bits were read from the serial device.
171
+  @retval EFI_DEVICE_ERROR  The serial device is not functioning correctly.
172
+
173
+**/
174
+typedef
175
+EFI_STATUS
176
+(EFIAPI *EFI_SERIAL_GET_CONTROL_BITS)(
177
+  IN EFI_SERIAL_IO_PROTOCOL         *This,
178
+  OUT UINT32                        *Control
179
+  );
180
+
181
+/**
182
+  Writes data to a serial device.
183
+
184
+  @param  This              Protocol instance pointer.
185
+  @param  BufferSize        On input, the size of the Buffer. On output, the amount of
186
+                            data actually written.
187
+  @param  Buffer            The buffer of data to write
188
+
189
+  @retval EFI_SUCCESS       The data was written.
190
+  @retval EFI_DEVICE_ERROR  The device reported an error.
191
+  @retval EFI_TIMEOUT       The data write was stopped due to a timeout.
192
+
193
+**/
194
+typedef
195
+EFI_STATUS
196
+(EFIAPI *EFI_SERIAL_WRITE)(
197
+  IN EFI_SERIAL_IO_PROTOCOL         *This,
198
+  IN OUT UINTN                      *BufferSize,
199
+  IN VOID                           *Buffer
200
+  );
201
+
202
+/**
203
+  Writes data to a serial device.
204
+
205
+  @param  This              Protocol instance pointer.
206
+  @param  BufferSize        On input, the size of the Buffer. On output, the amount of
207
+                            data returned in Buffer.
208
+  @param  Buffer            The buffer to return the data into.
209
+
210
+  @retval EFI_SUCCESS       The data was read.
211
+  @retval EFI_DEVICE_ERROR  The device reported an error.
212
+  @retval EFI_TIMEOUT       The data write was stopped due to a timeout.
213
+
214
+**/
215
+typedef
216
+EFI_STATUS
217
+(EFIAPI *EFI_SERIAL_READ)(
218
+  IN EFI_SERIAL_IO_PROTOCOL         *This,
219
+  IN OUT UINTN                      *BufferSize,
220
+  OUT VOID                          *Buffer
221
+  );
222
+
223
+/**
224
+  @par Data Structure Description:
225
+  The data values in SERIAL_IO_MODE are read-only and are updated by the code
226
+  that produces the SERIAL_IO_PROTOCOL member functions.
227
+
228
+  @param ControlMask
229
+  A mask for the Control bits that the device supports. The device
230
+  must always support the Input Buffer Empty control bit.
231
+
232
+  @param TimeOut
233
+  If applicable, the number of microseconds to wait before timing out
234
+  a Read or Write operation.
235
+
236
+  @param BaudRate
237
+  If applicable, the current baud rate setting of the device; otherwise,
238
+  baud rate has the value of zero to indicate that device runs at the
239
+  device's designed speed.
240
+
241
+  @param ReceiveFifoDepth
242
+  The number of characters the device will buffer on input
243
+
244
+  @param DataBits
245
+  The number of characters the device will buffer on input
246
+
247
+  @param Parity
248
+  If applicable, this is the EFI_PARITY_TYPE that is computed or
249
+  checked as each character is transmitted or reveived. If the device
250
+  does not support parity the value is the default parity value.
251
+
252
+  @param StopBits
253
+  If applicable, the EFI_STOP_BITS_TYPE number of stop bits per
254
+  character. If the device does not support stop bits the value is
255
+  the default stop bit values.
256
+
257
+**/
258
+typedef struct {
259
+  UINT32  ControlMask;
260
+
261
+  //
262
+  // current Attributes
263
+  //
264
+  UINT32  Timeout;
265
+  UINT64  BaudRate;
266
+  UINT32  ReceiveFifoDepth;
267
+  UINT32  DataBits;
268
+  UINT32  Parity;
269
+  UINT32  StopBits;
270
+} EFI_SERIAL_IO_MODE;
271
+
272
+#define EFI_SERIAL_IO_PROTOCOL_REVISION    0x00010000
273
+#define SERIAL_IO_INTERFACE_REVISION  EFI_SERIAL_IO_PROTOCOL_REVISION
274
+
275
+///
276
+/// The Serial I/O protocol is used to communicate with UART-style serial devices.
277
+/// These can be standard UART serial ports in PC-AT systems, serial ports attached
278
+/// to a USB interface, or potentially any character-based I/O device.
279
+///
280
+struct _EFI_SERIAL_IO_PROTOCOL {
281
+  ///
282
+  /// The revision to which the EFI_SERIAL_IO_PROTOCOL adheres. All future revisions
283
+  /// must be backwards compatible. If a future version is not backwards compatible,
284
+  /// it is not the same GUID.
285
+  ///
286
+  UINT32                      Revision;
287
+  EFI_SERIAL_RESET            Reset;
288
+  EFI_SERIAL_SET_ATTRIBUTES   SetAttributes;
289
+  EFI_SERIAL_SET_CONTROL_BITS SetControl;
290
+  EFI_SERIAL_GET_CONTROL_BITS GetControl;
291
+  EFI_SERIAL_WRITE            Write;
292
+  EFI_SERIAL_READ             Read;
293
+  ///
294
+  /// Pointer to SERIAL_IO_MODE data.
295
+  ///
296
+  EFI_SERIAL_IO_MODE          *Mode;
297
+};
298
+
299
+extern EFI_GUID gEfiSerialIoProtocolGuid;
300
+
301
+#endif

+ 168
- 0
src/include/ipxe/efi/Protocol/UgaDraw.h View File

@@ -0,0 +1,168 @@
1
+/** @file
2
+  UGA Draw protocol from the EFI 1.10 specification.
3
+
4
+  Abstraction of a very simple graphics device.
5
+
6
+  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
7
+  This program and the accompanying materials
8
+  are licensed and made available under the terms and conditions of the BSD License
9
+  which accompanies this distribution.  The full text of the license may be found at
10
+  http://opensource.org/licenses/bsd-license.php
11
+
12
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
+
15
+**/
16
+
17
+#ifndef __UGA_DRAW_H__
18
+#define __UGA_DRAW_H__
19
+
20
+FILE_LICENCE ( BSD3 );
21
+
22
+
23
+#define EFI_UGA_DRAW_PROTOCOL_GUID \
24
+  { \
25
+    0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 } \
26
+  }
27
+
28
+typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL;
29
+
30
+/**
31
+  Return the current video mode information.
32
+
33
+  @param  This                  The EFI_UGA_DRAW_PROTOCOL instance.
34
+  @param  HorizontalResolution  The size of video screen in pixels in the X dimension.
35
+  @param  VerticalResolution    The size of video screen in pixels in the Y dimension.
36
+  @param  ColorDepth            Number of bits per pixel, currently defined to be 32.
37
+  @param  RefreshRate           The refresh rate of the monitor in Hertz.
38
+
39
+  @retval EFI_SUCCESS           Mode information returned.
40
+  @retval EFI_NOT_STARTED       Video display is not initialized. Call SetMode ()
41
+  @retval EFI_INVALID_PARAMETER One of the input args was NULL.
42
+
43
+**/
44
+typedef
45
+EFI_STATUS
46
+(EFIAPI *EFI_UGA_DRAW_PROTOCOL_GET_MODE)(
47
+  IN  EFI_UGA_DRAW_PROTOCOL *This,
48
+  OUT UINT32                *HorizontalResolution,
49
+  OUT UINT32                *VerticalResolution,
50
+  OUT UINT32                *ColorDepth,
51
+  OUT UINT32                *RefreshRate
52
+  );
53
+
54
+/**
55
+  Set the current video mode information.
56
+
57
+  @param  This                 The EFI_UGA_DRAW_PROTOCOL instance.
58
+  @param  HorizontalResolution The size of video screen in pixels in the X dimension.
59
+  @param  VerticalResolution   The size of video screen in pixels in the Y dimension.
60
+  @param  ColorDepth           Number of bits per pixel, currently defined to be 32.
61
+  @param  RefreshRate          The refresh rate of the monitor in Hertz.
62
+
63
+  @retval EFI_SUCCESS          Mode information returned.
64
+  @retval EFI_NOT_STARTED      Video display is not initialized. Call SetMode ()
65
+
66
+**/
67
+typedef
68
+EFI_STATUS
69
+(EFIAPI *EFI_UGA_DRAW_PROTOCOL_SET_MODE)(
70
+  IN  EFI_UGA_DRAW_PROTOCOL *This,
71
+  IN  UINT32                HorizontalResolution,
72
+  IN  UINT32                VerticalResolution,
73
+  IN  UINT32                ColorDepth,
74
+  IN  UINT32                RefreshRate
75
+  );
76
+
77
+typedef struct {
78
+  UINT8 Blue;
79
+  UINT8 Green;
80
+  UINT8 Red;
81
+  UINT8 Reserved;
82
+} EFI_UGA_PIXEL;
83
+
84
+typedef union {
85
+  EFI_UGA_PIXEL Pixel;
86
+  UINT32        Raw;
87
+} EFI_UGA_PIXEL_UNION;
88
+
89
+///
90
+/// Enumration value for actions of Blt operations.
91
+///
92
+typedef enum {
93
+  EfiUgaVideoFill,          ///< Write data from the  BltBuffer pixel (SourceX, SourceY)
94
+                            ///< directly to every pixel of the video display rectangle
95
+                            ///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
96
+                            ///< Only one pixel will be used from the BltBuffer. Delta is NOT used.
97
+
98
+  EfiUgaVideoToBltBuffer,   ///< Read data from the video display rectangle
99
+                            ///< (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
100
+                            ///< the BltBuffer rectangle (DestinationX, DestinationY )
101
+                            ///< (DestinationX + Width, DestinationY + Height). If DestinationX or
102
+                            ///< DestinationY is not zero then Delta must be set to the length in bytes
103
+                            ///< of a row in the BltBuffer.
104
+
105
+  EfiUgaBltBufferToVideo,   ///< Write data from the  BltBuffer rectangle
106
+                            ///< (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
107
+                            ///< video display rectangle (DestinationX, DestinationY)
108
+                            ///< (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
109
+                            ///< not zero then Delta must be set to the length in bytes of a row in the
110
+                            ///< BltBuffer.
111
+
112
+  EfiUgaVideoToVideo,       ///< Copy from the video display rectangle (SourceX, SourceY)
113
+                            ///< (SourceX + Width, SourceY + Height) .to the video display rectangle
114
+                            ///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
115
+                            ///< The BltBuffer and Delta  are not used in this mode.
116
+
117
+  EfiUgaBltMax              ///< Maxmimum value for enumration value of Blt operation. If a Blt operation
118
+                            ///< larger or equal to this enumration value, it is invalid.
119
+} EFI_UGA_BLT_OPERATION;
120
+
121
+/**
122
+    Blt a rectangle of pixels on the graphics screen.
123
+
124
+    @param[in] This          - Protocol instance pointer.
125
+    @param[in] BltBuffer     - Buffer containing data to blit into video buffer. This
126
+                               buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
127
+    @param[in] BltOperation  - Operation to perform on BlitBuffer and video memory
128
+    @param[in] SourceX       - X coordinate of source for the BltBuffer.
129
+    @param[in] SourceY       - Y coordinate of source for the BltBuffer.
130
+    @param[in] DestinationX  - X coordinate of destination for the BltBuffer.
131
+    @param[in] DestinationY  - Y coordinate of destination for the BltBuffer.
132
+    @param[in] Width         - Width of rectangle in BltBuffer in pixels.
133
+    @param[in] Height        - Hight of rectangle in BltBuffer in pixels.
134
+    @param[in] Delta         - OPTIONAL
135
+
136
+    @retval EFI_SUCCESS           - The Blt operation completed.
137
+    @retval EFI_INVALID_PARAMETER - BltOperation is not valid.
138
+    @retval EFI_DEVICE_ERROR      - A hardware error occured writting to the video buffer.
139
+
140
+**/
141
+typedef
142
+EFI_STATUS
143
+(EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT)(
144
+  IN  EFI_UGA_DRAW_PROTOCOL                   * This,
145
+  IN  EFI_UGA_PIXEL                           * BltBuffer, OPTIONAL
146
+  IN  EFI_UGA_BLT_OPERATION                   BltOperation,
147
+  IN  UINTN                                   SourceX,
148
+  IN  UINTN                                   SourceY,
149
+  IN  UINTN                                   DestinationX,
150
+  IN  UINTN                                   DestinationY,
151
+  IN  UINTN                                   Width,
152
+  IN  UINTN                                   Height,
153
+  IN  UINTN                                   Delta         OPTIONAL
154
+  );
155
+
156
+///
157
+/// This protocol provides a basic abstraction to set video modes and
158
+/// copy pixels to and from the graphics controller's frame buffer.
159
+///
160
+struct _EFI_UGA_DRAW_PROTOCOL {
161
+  EFI_UGA_DRAW_PROTOCOL_GET_MODE  GetMode;
162
+  EFI_UGA_DRAW_PROTOCOL_SET_MODE  SetMode;
163
+  EFI_UGA_DRAW_PROTOCOL_BLT       Blt;
164
+};
165
+
166
+extern EFI_GUID gEfiUgaDrawProtocolGuid;
167
+
168
+#endif

+ 194
- 0
src/include/ipxe/efi/Protocol/UnicodeCollation.h View File

@@ -0,0 +1,194 @@
1
+/** @file
2
+  Unicode Collation protocol that follows the UEFI 2.0 specification.
3
+  This protocol is used to allow code running in the boot services environment
4
+  to perform lexical comparison functions on Unicode strings for given languages.
5
+
6
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
7
+This program and the accompanying materials are licensed and made available under
8
+the terms and conditions of the BSD License that accompanies this distribution.
9
+The full text of the license may be found at
10
+http://opensource.org/licenses/bsd-license.php.
11
+
12
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
+
15
+**/
16
+
17
+#ifndef __UNICODE_COLLATION_H__
18
+#define __UNICODE_COLLATION_H__
19
+
20
+FILE_LICENCE ( BSD3 );
21
+
22
+#define EFI_UNICODE_COLLATION_PROTOCOL_GUID \
23
+  { \
24
+    0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
25
+  }
26
+
27
+#define EFI_UNICODE_COLLATION_PROTOCOL2_GUID \
28
+  { \
29
+    0xa4c751fc, 0x23ae, 0x4c3e, {0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49 } \
30
+  }
31
+
32
+typedef struct _EFI_UNICODE_COLLATION_PROTOCOL  EFI_UNICODE_COLLATION_PROTOCOL;
33
+
34
+
35
+///
36
+/// Protocol GUID name defined in EFI1.1.
37
+///
38
+#define UNICODE_COLLATION_PROTOCOL              EFI_UNICODE_COLLATION_PROTOCOL_GUID
39
+
40
+///
41
+/// Protocol defined in EFI1.1.
42
+///
43
+typedef EFI_UNICODE_COLLATION_PROTOCOL          UNICODE_COLLATION_INTERFACE;
44
+
45
+///
46
+/// Protocol data structures and defines
47
+///
48
+#define EFI_UNICODE_BYTE_ORDER_MARK (CHAR16) (0xfeff)
49
+
50
+//
51
+// Protocol member functions
52
+//
53
+/**
54
+  Performs a case-insensitive comparison of two Null-terminated strings.
55
+
56
+  @param  This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
57
+  @param  Str1 A pointer to a Null-terminated string.
58
+  @param  Str2 A pointer to a Null-terminated string.
59
+
60
+  @retval 0   Str1 is equivalent to Str2.
61
+  @retval >0  Str1 is lexically greater than Str2.
62
+  @retval <0  Str1 is lexically less than Str2.
63
+
64
+**/
65
+typedef
66
+INTN
67
+(EFIAPI *EFI_UNICODE_COLLATION_STRICOLL)(
68
+  IN EFI_UNICODE_COLLATION_PROTOCOL         *This,
69
+  IN CHAR16                                 *Str1,
70
+  IN CHAR16                                 *Str2
71
+  );
72
+
73
+/**
74
+  Performs a case-insensitive comparison of a Null-terminated
75
+  pattern string and a Null-terminated string.
76
+
77
+  @param  This    A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
78
+  @param  String  A pointer to a Null-terminated string.
79
+  @param  Pattern A pointer to a Null-terminated pattern string.
80
+
81
+  @retval TRUE    Pattern was found in String.
82
+  @retval FALSE   Pattern was not found in String.
83
+
84
+**/
85
+typedef
86
+BOOLEAN
87
+(EFIAPI *EFI_UNICODE_COLLATION_METAIMATCH)(
88
+  IN EFI_UNICODE_COLLATION_PROTOCOL         *This,
89
+  IN CHAR16                                 *String,
90
+  IN CHAR16                                 *Pattern
91
+  );
92
+
93
+/**
94
+  Converts all the characters in a Null-terminated string to
95
+  lower case characters.
96
+
97
+  @param  This   A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
98
+  @param  String A pointer to a Null-terminated string.
99
+
100
+**/
101
+typedef
102
+VOID
103
+(EFIAPI *EFI_UNICODE_COLLATION_STRLWR)(
104
+  IN EFI_UNICODE_COLLATION_PROTOCOL         *This,
105
+  IN OUT CHAR16                             *Str
106
+  );
107
+
108
+/**
109
+  Converts all the characters in a Null-terminated string to upper
110
+  case characters.
111
+
112
+  @param  This   A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
113
+  @param  String A pointer to a Null-terminated string.
114
+
115
+**/
116
+typedef
117
+VOID
118
+(EFIAPI *EFI_UNICODE_COLLATION_STRUPR)(
119
+  IN EFI_UNICODE_COLLATION_PROTOCOL         *This,
120
+  IN OUT CHAR16                             *Str
121
+  );
122
+
123
+/**
124
+  Converts an 8.3 FAT file name in an OEM character set to a Null-terminated
125
+  string.
126
+
127
+  @param  This    A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
128
+  @param  FatSize The size of the string Fat in bytes.
129
+  @param  Fat     A pointer to a Null-terminated string that contains an 8.3 file
130
+                  name using an 8-bit OEM character set.
131
+  @param  String  A pointer to a Null-terminated string. The string must
132
+                  be allocated in advance to hold FatSize characters.
133
+
134
+**/
135
+typedef
136
+VOID
137
+(EFIAPI *EFI_UNICODE_COLLATION_FATTOSTR)(
138
+  IN EFI_UNICODE_COLLATION_PROTOCOL         *This,
139
+  IN UINTN                                  FatSize,
140
+  IN CHAR8                                  *Fat,
141
+  OUT CHAR16                                *String
142
+  );
143
+
144
+/**
145
+  Converts a Null-terminated string to legal characters in a FAT
146
+  filename using an OEM character set.
147
+
148
+  @param  This    A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
149
+  @param  String  A pointer to a Null-terminated string.
150
+  @param  FatSize The size of the string Fat in bytes.
151
+  @param  Fat     A pointer to a string that contains the converted version of
152
+                  String using legal FAT characters from an OEM character set.
153
+
154
+  @retval TRUE    One or more conversions failed and were substituted with '_'
155
+  @retval FALSE   None of the conversions failed.
156
+
157
+**/
158
+typedef
159
+BOOLEAN
160
+(EFIAPI *EFI_UNICODE_COLLATION_STRTOFAT)(
161
+  IN EFI_UNICODE_COLLATION_PROTOCOL         *This,
162
+  IN CHAR16                                 *String,
163
+  IN UINTN                                  FatSize,
164
+  OUT CHAR8                                 *Fat
165
+  );
166
+
167
+///
168
+/// The EFI_UNICODE_COLLATION_PROTOCOL is used to perform case-insensitive
169
+/// comparisons of strings.
170
+///
171
+struct _EFI_UNICODE_COLLATION_PROTOCOL {
172
+  EFI_UNICODE_COLLATION_STRICOLL    StriColl;
173
+  EFI_UNICODE_COLLATION_METAIMATCH  MetaiMatch;
174
+  EFI_UNICODE_COLLATION_STRLWR      StrLwr;
175
+  EFI_UNICODE_COLLATION_STRUPR      StrUpr;
176
+
177
+  //
178
+  // for supporting fat volumes
179
+  //
180
+  EFI_UNICODE_COLLATION_FATTOSTR    FatToStr;
181
+  EFI_UNICODE_COLLATION_STRTOFAT    StrToFat;
182
+
183
+  ///
184
+  /// A Null-terminated ASCII string array that contains one or more language codes.
185
+  /// When this field is used for UnicodeCollation2, it is specified in RFC 4646 format.
186
+  /// When it is used for UnicodeCollation, it is specified in ISO 639-2 format.
187
+  ///
188
+  CHAR8                             *SupportedLanguages;
189
+};
190
+
191
+extern EFI_GUID gEfiUnicodeCollationProtocolGuid;
192
+extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid;
193
+
194
+#endif

+ 4
- 0
src/include/ipxe/efi/efi.h View File

@@ -159,6 +159,7 @@ extern EFI_GUID efi_block_io_protocol_guid;
159 159
 extern EFI_GUID efi_bus_specific_driver_override_protocol_guid;
160 160
 extern EFI_GUID efi_component_name_protocol_guid;
161 161
 extern EFI_GUID efi_component_name2_protocol_guid;
162
+extern EFI_GUID efi_console_control_protocol_guid;
162 163
 extern EFI_GUID efi_device_path_protocol_guid;
163 164
 extern EFI_GUID efi_dhcp4_protocol_guid;
164 165
 extern EFI_GUID efi_dhcp4_service_binding_protocol_guid;
@@ -182,6 +183,7 @@ extern EFI_GUID efi_nii31_protocol_guid;
182 183
 extern EFI_GUID efi_pci_io_protocol_guid;
183 184
 extern EFI_GUID efi_pci_root_bridge_io_protocol_guid;
184 185
 extern EFI_GUID efi_pxe_base_code_protocol_guid;
186
+extern EFI_GUID efi_serial_io_protocol_guid;
185 187
 extern EFI_GUID efi_simple_file_system_protocol_guid;
186 188
 extern EFI_GUID efi_simple_network_protocol_guid;
187 189
 extern EFI_GUID efi_tcg_protocol_guid;
@@ -189,6 +191,8 @@ extern EFI_GUID efi_tcp4_protocol_guid;
189 191
 extern EFI_GUID efi_tcp4_service_binding_protocol_guid;
190 192
 extern EFI_GUID efi_udp4_protocol_guid;
191 193
 extern EFI_GUID efi_udp4_service_binding_protocol_guid;
194
+extern EFI_GUID efi_uga_draw_protocol_guid;
195
+extern EFI_GUID efi_unicode_collation_protocol_guid;
192 196
 extern EFI_GUID efi_vlan_config_protocol_guid;
193 197
 
194 198
 extern EFI_HANDLE efi_image_handle;

+ 8
- 0
src/interface/efi/efi_debug.c View File

@@ -80,6 +80,8 @@ static struct efi_well_known_guid efi_well_known_guids[] = {
80 80
 	  "ComponentName" },
81 81
 	{ &efi_component_name2_protocol_guid,
82 82
 	  "ComponentName2" },
83
+	{ &efi_console_control_protocol_guid,
84
+	  "ConsoleControl" },
83 85
 	{ &efi_device_path_protocol_guid,
84 86
 	  "DevicePath" },
85 87
 	{ &efi_driver_binding_protocol_guid,
@@ -128,6 +130,8 @@ static struct efi_well_known_guid efi_well_known_guids[] = {
128 130
 	  "PciRootBridgeIo" },
129 131
 	{ &efi_pxe_base_code_protocol_guid,
130 132
 	  "PxeBaseCode" },
133
+	{ &efi_serial_io_protocol_guid,
134
+	  "SerialIo" },
131 135
 	{ &efi_simple_file_system_protocol_guid,
132 136
 	  "SimpleFileSystem" },
133 137
 	{ &efi_simple_network_protocol_guid,
@@ -142,6 +146,10 @@ static struct efi_well_known_guid efi_well_known_guids[] = {
142 146
 	  "Udp4" },
143 147
 	{ &efi_udp4_service_binding_protocol_guid,
144 148
 	  "Udp4Sb" },
149
+	{ &efi_uga_draw_protocol_guid,
150
+	  "UgaDraw" },
151
+	{ &efi_unicode_collation_protocol_guid,
152
+	  "UnicodeCollation" },
145 153
 	{ &efi_vlan_config_protocol_guid,
146 154
 	  "VlanConfig" },
147 155
 	{ &efi_vlan_config_dxe_guid,

+ 20
- 0
src/interface/efi/efi_guid.c View File

@@ -29,6 +29,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
29 29
 #include <ipxe/efi/Protocol/BusSpecificDriverOverride.h>
30 30
 #include <ipxe/efi/Protocol/ComponentName.h>
31 31
 #include <ipxe/efi/Protocol/ComponentName2.h>
32
+#include <ipxe/efi/Protocol/ConsoleControl/ConsoleControl.h>
32 33
 #include <ipxe/efi/Protocol/DevicePath.h>
33 34
 #include <ipxe/efi/Protocol/DevicePathToText.h>
34 35
 #include <ipxe/efi/Protocol/Dhcp4.h>
@@ -47,11 +48,14 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
47 48
 #include <ipxe/efi/Protocol/PciIo.h>
48 49
 #include <ipxe/efi/Protocol/PciRootBridgeIo.h>
49 50
 #include <ipxe/efi/Protocol/PxeBaseCode.h>
51
+#include <ipxe/efi/Protocol/SerialIo.h>
50 52
 #include <ipxe/efi/Protocol/SimpleFileSystem.h>
51 53
 #include <ipxe/efi/Protocol/SimpleNetwork.h>
52 54
 #include <ipxe/efi/Protocol/TcgService.h>
53 55
 #include <ipxe/efi/Protocol/Tcp4.h>
54 56
 #include <ipxe/efi/Protocol/Udp4.h>
57
+#include <ipxe/efi/Protocol/UgaDraw.h>
58
+#include <ipxe/efi/Protocol/UnicodeCollation.h>
55 59
 #include <ipxe/efi/Protocol/VlanConfig.h>
56 60
 
57 61
 /** @file
@@ -84,6 +88,10 @@ EFI_GUID efi_component_name_protocol_guid
84 88
 EFI_GUID efi_component_name2_protocol_guid
85 89
 	= EFI_COMPONENT_NAME2_PROTOCOL_GUID;
86 90
 
91
+/** Console control protocol GUID */
92
+EFI_GUID efi_console_control_protocol_guid
93
+	= EFI_CONSOLE_CONTROL_PROTOCOL_GUID;
94
+
87 95
 /** Device path protocol GUID */
88 96
 EFI_GUID efi_device_path_protocol_guid
89 97
 	= EFI_DEVICE_PATH_PROTOCOL_GUID;
@@ -176,6 +184,10 @@ EFI_GUID efi_pci_root_bridge_io_protocol_guid
176 184
 EFI_GUID efi_pxe_base_code_protocol_guid
177 185
 	= EFI_PXE_BASE_CODE_PROTOCOL_GUID;
178 186
 
187
+/** Serial I/O protocol GUID */
188
+EFI_GUID efi_serial_io_protocol_guid
189
+	= EFI_SERIAL_IO_PROTOCOL_GUID;
190
+
179 191
 /** Simple file system protocol GUID */
180 192
 EFI_GUID efi_simple_file_system_protocol_guid
181 193
 	= EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID;
@@ -204,6 +216,14 @@ EFI_GUID efi_udp4_protocol_guid
204 216
 EFI_GUID efi_udp4_service_binding_protocol_guid
205 217
 	= EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID;
206 218
 
219
+/** UGA draw protocol GUID */
220
+EFI_GUID efi_uga_draw_protocol_guid
221
+	= EFI_UGA_DRAW_PROTOCOL_GUID;
222
+
223
+/** Unicode collation protocol GUID */
224
+EFI_GUID efi_unicode_collation_protocol_guid
225
+	= EFI_UNICODE_COLLATION_PROTOCOL_GUID;
226
+
207 227
 /** VLAN configuration protocol GUID */
208 228
 EFI_GUID efi_vlan_config_protocol_guid
209 229
 	= EFI_VLAN_CONFIG_PROTOCOL_GUID;

Loading…
Cancel
Save