mirror of https://github.com/ipxe/ipxe.git
[efi] Add definitions of GUIDs observed when booting shim.efi and grub.efi
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/41/head
parent
f0c6c4efd8
commit
a09dd5c03d
|
@ -0,0 +1,301 @@
|
|||
/** @file
|
||||
Serial IO protocol as defined in the UEFI 2.0 specification.
|
||||
|
||||
Abstraction of a basic serial device. Targeted at 16550 UART, but
|
||||
could be much more generic.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __SERIAL_IO_PROTOCOL_H__
|
||||
#define __SERIAL_IO_PROTOCOL_H__
|
||||
|
||||
FILE_LICENCE ( BSD3 );
|
||||
|
||||
#define EFI_SERIAL_IO_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD } \
|
||||
}
|
||||
|
||||
///
|
||||
/// Protocol GUID defined in EFI1.1.
|
||||
///
|
||||
#define SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL_GUID
|
||||
|
||||
typedef struct _EFI_SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL;
|
||||
|
||||
|
||||
///
|
||||
/// Backward-compatible with EFI1.1.
|
||||
///
|
||||
typedef EFI_SERIAL_IO_PROTOCOL SERIAL_IO_INTERFACE;
|
||||
|
||||
///
|
||||
/// Parity type that is computed or checked as each character is transmitted or received. If the
|
||||
/// device does not support parity, the value is the default parity value.
|
||||
///
|
||||
typedef enum {
|
||||
DefaultParity,
|
||||
NoParity,
|
||||
EvenParity,
|
||||
OddParity,
|
||||
MarkParity,
|
||||
SpaceParity
|
||||
} EFI_PARITY_TYPE;
|
||||
|
||||
///
|
||||
/// Stop bits type
|
||||
///
|
||||
typedef enum {
|
||||
DefaultStopBits,
|
||||
OneStopBit,
|
||||
OneFiveStopBits,
|
||||
TwoStopBits
|
||||
} EFI_STOP_BITS_TYPE;
|
||||
|
||||
//
|
||||
// define for Control bits, grouped by read only, write only, and read write
|
||||
//
|
||||
//
|
||||
// Read Only
|
||||
//
|
||||
#define EFI_SERIAL_CLEAR_TO_SEND 0x00000010
|
||||
#define EFI_SERIAL_DATA_SET_READY 0x00000020
|
||||
#define EFI_SERIAL_RING_INDICATE 0x00000040
|
||||
#define EFI_SERIAL_CARRIER_DETECT 0x00000080
|
||||
#define EFI_SERIAL_INPUT_BUFFER_EMPTY 0x00000100
|
||||
#define EFI_SERIAL_OUTPUT_BUFFER_EMPTY 0x00000200
|
||||
|
||||
//
|
||||
// Write Only
|
||||
//
|
||||
#define EFI_SERIAL_REQUEST_TO_SEND 0x00000002
|
||||
#define EFI_SERIAL_DATA_TERMINAL_READY 0x00000001
|
||||
|
||||
//
|
||||
// Read Write
|
||||
//
|
||||
#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x00001000
|
||||
#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x00002000
|
||||
#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x00004000
|
||||
|
||||
//
|
||||
// Serial IO Member Functions
|
||||
//
|
||||
/**
|
||||
Reset the serial device.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
|
||||
@retval EFI_SUCCESS The device was reset.
|
||||
@retval EFI_DEVICE_ERROR The serial device could not be reset.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_RESET)(
|
||||
IN EFI_SERIAL_IO_PROTOCOL *This
|
||||
);
|
||||
|
||||
/**
|
||||
Sets the baud rate, receive FIFO depth, transmit/receice time out, parity,
|
||||
data buts, and stop bits on a serial device.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param BaudRate The requested baud rate. A BaudRate value of 0 will use the
|
||||
device's default interface speed.
|
||||
@param ReveiveFifoDepth The requested depth of the FIFO on the receive side of the
|
||||
serial interface. A ReceiveFifoDepth value of 0 will use
|
||||
the device's default FIFO depth.
|
||||
@param Timeout The requested time out for a single character in microseconds.
|
||||
This timeout applies to both the transmit and receive side of the
|
||||
interface. A Timeout value of 0 will use the device's default time
|
||||
out value.
|
||||
@param Parity The type of parity to use on this serial device. A Parity value of
|
||||
DefaultParity will use the device's default parity value.
|
||||
@param DataBits The number of data bits to use on the serial device. A DataBits
|
||||
vaule of 0 will use the device's default data bit setting.
|
||||
@param StopBits The number of stop bits to use on this serial device. A StopBits
|
||||
value of DefaultStopBits will use the device's default number of
|
||||
stop bits.
|
||||
|
||||
@retval EFI_SUCCESS The device was reset.
|
||||
@retval EFI_DEVICE_ERROR The serial device could not be reset.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_SET_ATTRIBUTES)(
|
||||
IN EFI_SERIAL_IO_PROTOCOL *This,
|
||||
IN UINT64 BaudRate,
|
||||
IN UINT32 ReceiveFifoDepth,
|
||||
IN UINT32 Timeout,
|
||||
IN EFI_PARITY_TYPE Parity,
|
||||
IN UINT8 DataBits,
|
||||
IN EFI_STOP_BITS_TYPE StopBits
|
||||
);
|
||||
|
||||
/**
|
||||
Set the control bits on a serial device
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Control Set the bits of Control that are settable.
|
||||
|
||||
@retval EFI_SUCCESS The new control bits were set on the serial device.
|
||||
@retval EFI_UNSUPPORTED The serial device does not support this operation.
|
||||
@retval EFI_DEVICE_ERROR The serial device is not functioning correctly.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_SET_CONTROL_BITS)(
|
||||
IN EFI_SERIAL_IO_PROTOCOL *This,
|
||||
IN UINT32 Control
|
||||
);
|
||||
|
||||
/**
|
||||
Retrieves the status of thecontrol bits on a serial device
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Control A pointer to return the current Control signals from the serial device.
|
||||
|
||||
@retval EFI_SUCCESS The control bits were read from the serial device.
|
||||
@retval EFI_DEVICE_ERROR The serial device is not functioning correctly.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_GET_CONTROL_BITS)(
|
||||
IN EFI_SERIAL_IO_PROTOCOL *This,
|
||||
OUT UINT32 *Control
|
||||
);
|
||||
|
||||
/**
|
||||
Writes data to a serial device.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param BufferSize On input, the size of the Buffer. On output, the amount of
|
||||
data actually written.
|
||||
@param Buffer The buffer of data to write
|
||||
|
||||
@retval EFI_SUCCESS The data was written.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||
@retval EFI_TIMEOUT The data write was stopped due to a timeout.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_WRITE)(
|
||||
IN EFI_SERIAL_IO_PROTOCOL *This,
|
||||
IN OUT UINTN *BufferSize,
|
||||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
Writes data to a serial device.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param BufferSize On input, the size of the Buffer. On output, the amount of
|
||||
data returned in Buffer.
|
||||
@param Buffer The buffer to return the data into.
|
||||
|
||||
@retval EFI_SUCCESS The data was read.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||
@retval EFI_TIMEOUT The data write was stopped due to a timeout.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_READ)(
|
||||
IN EFI_SERIAL_IO_PROTOCOL *This,
|
||||
IN OUT UINTN *BufferSize,
|
||||
OUT VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
@par Data Structure Description:
|
||||
The data values in SERIAL_IO_MODE are read-only and are updated by the code
|
||||
that produces the SERIAL_IO_PROTOCOL member functions.
|
||||
|
||||
@param ControlMask
|
||||
A mask for the Control bits that the device supports. The device
|
||||
must always support the Input Buffer Empty control bit.
|
||||
|
||||
@param TimeOut
|
||||
If applicable, the number of microseconds to wait before timing out
|
||||
a Read or Write operation.
|
||||
|
||||
@param BaudRate
|
||||
If applicable, the current baud rate setting of the device; otherwise,
|
||||
baud rate has the value of zero to indicate that device runs at the
|
||||
device's designed speed.
|
||||
|
||||
@param ReceiveFifoDepth
|
||||
The number of characters the device will buffer on input
|
||||
|
||||
@param DataBits
|
||||
The number of characters the device will buffer on input
|
||||
|
||||
@param Parity
|
||||
If applicable, this is the EFI_PARITY_TYPE that is computed or
|
||||
checked as each character is transmitted or reveived. If the device
|
||||
does not support parity the value is the default parity value.
|
||||
|
||||
@param StopBits
|
||||
If applicable, the EFI_STOP_BITS_TYPE number of stop bits per
|
||||
character. If the device does not support stop bits the value is
|
||||
the default stop bit values.
|
||||
|
||||
**/
|
||||
typedef struct {
|
||||
UINT32 ControlMask;
|
||||
|
||||
//
|
||||
// current Attributes
|
||||
//
|
||||
UINT32 Timeout;
|
||||
UINT64 BaudRate;
|
||||
UINT32 ReceiveFifoDepth;
|
||||
UINT32 DataBits;
|
||||
UINT32 Parity;
|
||||
UINT32 StopBits;
|
||||
} EFI_SERIAL_IO_MODE;
|
||||
|
||||
#define EFI_SERIAL_IO_PROTOCOL_REVISION 0x00010000
|
||||
#define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION
|
||||
|
||||
///
|
||||
/// The Serial I/O protocol is used to communicate with UART-style serial devices.
|
||||
/// These can be standard UART serial ports in PC-AT systems, serial ports attached
|
||||
/// to a USB interface, or potentially any character-based I/O device.
|
||||
///
|
||||
struct _EFI_SERIAL_IO_PROTOCOL {
|
||||
///
|
||||
/// The revision to which the EFI_SERIAL_IO_PROTOCOL adheres. All future revisions
|
||||
/// must be backwards compatible. If a future version is not backwards compatible,
|
||||
/// it is not the same GUID.
|
||||
///
|
||||
UINT32 Revision;
|
||||
EFI_SERIAL_RESET Reset;
|
||||
EFI_SERIAL_SET_ATTRIBUTES SetAttributes;
|
||||
EFI_SERIAL_SET_CONTROL_BITS SetControl;
|
||||
EFI_SERIAL_GET_CONTROL_BITS GetControl;
|
||||
EFI_SERIAL_WRITE Write;
|
||||
EFI_SERIAL_READ Read;
|
||||
///
|
||||
/// Pointer to SERIAL_IO_MODE data.
|
||||
///
|
||||
EFI_SERIAL_IO_MODE *Mode;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiSerialIoProtocolGuid;
|
||||
|
||||
#endif
|
|
@ -0,0 +1,168 @@
|
|||
/** @file
|
||||
UGA Draw protocol from the EFI 1.10 specification.
|
||||
|
||||
Abstraction of a very simple graphics device.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __UGA_DRAW_H__
|
||||
#define __UGA_DRAW_H__
|
||||
|
||||
FILE_LICENCE ( BSD3 );
|
||||
|
||||
|
||||
#define EFI_UGA_DRAW_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL;
|
||||
|
||||
/**
|
||||
Return the current video mode information.
|
||||
|
||||
@param This The EFI_UGA_DRAW_PROTOCOL instance.
|
||||
@param HorizontalResolution The size of video screen in pixels in the X dimension.
|
||||
@param VerticalResolution The size of video screen in pixels in the Y dimension.
|
||||
@param ColorDepth Number of bits per pixel, currently defined to be 32.
|
||||
@param RefreshRate The refresh rate of the monitor in Hertz.
|
||||
|
||||
@retval EFI_SUCCESS Mode information returned.
|
||||
@retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
|
||||
@retval EFI_INVALID_PARAMETER One of the input args was NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_UGA_DRAW_PROTOCOL_GET_MODE)(
|
||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||
OUT UINT32 *HorizontalResolution,
|
||||
OUT UINT32 *VerticalResolution,
|
||||
OUT UINT32 *ColorDepth,
|
||||
OUT UINT32 *RefreshRate
|
||||
);
|
||||
|
||||
/**
|
||||
Set the current video mode information.
|
||||
|
||||
@param This The EFI_UGA_DRAW_PROTOCOL instance.
|
||||
@param HorizontalResolution The size of video screen in pixels in the X dimension.
|
||||
@param VerticalResolution The size of video screen in pixels in the Y dimension.
|
||||
@param ColorDepth Number of bits per pixel, currently defined to be 32.
|
||||
@param RefreshRate The refresh rate of the monitor in Hertz.
|
||||
|
||||
@retval EFI_SUCCESS Mode information returned.
|
||||
@retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_UGA_DRAW_PROTOCOL_SET_MODE)(
|
||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||
IN UINT32 HorizontalResolution,
|
||||
IN UINT32 VerticalResolution,
|
||||
IN UINT32 ColorDepth,
|
||||
IN UINT32 RefreshRate
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
UINT8 Blue;
|
||||
UINT8 Green;
|
||||
UINT8 Red;
|
||||
UINT8 Reserved;
|
||||
} EFI_UGA_PIXEL;
|
||||
|
||||
typedef union {
|
||||
EFI_UGA_PIXEL Pixel;
|
||||
UINT32 Raw;
|
||||
} EFI_UGA_PIXEL_UNION;
|
||||
|
||||
///
|
||||
/// Enumration value for actions of Blt operations.
|
||||
///
|
||||
typedef enum {
|
||||
EfiUgaVideoFill, ///< Write data from the BltBuffer pixel (SourceX, SourceY)
|
||||
///< directly to every pixel of the video display rectangle
|
||||
///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
||||
///< Only one pixel will be used from the BltBuffer. Delta is NOT used.
|
||||
|
||||
EfiUgaVideoToBltBuffer, ///< Read data from the video display rectangle
|
||||
///< (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
||||
///< the BltBuffer rectangle (DestinationX, DestinationY )
|
||||
///< (DestinationX + Width, DestinationY + Height). If DestinationX or
|
||||
///< DestinationY is not zero then Delta must be set to the length in bytes
|
||||
///< of a row in the BltBuffer.
|
||||
|
||||
EfiUgaBltBufferToVideo, ///< Write data from the BltBuffer rectangle
|
||||
///< (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
||||
///< video display rectangle (DestinationX, DestinationY)
|
||||
///< (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
||||
///< not zero then Delta must be set to the length in bytes of a row in the
|
||||
///< BltBuffer.
|
||||
|
||||
EfiUgaVideoToVideo, ///< Copy from the video display rectangle (SourceX, SourceY)
|
||||
///< (SourceX + Width, SourceY + Height) .to the video display rectangle
|
||||
///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
||||
///< The BltBuffer and Delta are not used in this mode.
|
||||
|
||||
EfiUgaBltMax ///< Maxmimum value for enumration value of Blt operation. If a Blt operation
|
||||
///< larger or equal to this enumration value, it is invalid.
|
||||
} EFI_UGA_BLT_OPERATION;
|
||||
|
||||
/**
|
||||
Blt a rectangle of pixels on the graphics screen.
|
||||
|
||||
@param[in] This - Protocol instance pointer.
|
||||
@param[in] BltBuffer - Buffer containing data to blit into video buffer. This
|
||||
buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
|
||||
@param[in] BltOperation - Operation to perform on BlitBuffer and video memory
|
||||
@param[in] SourceX - X coordinate of source for the BltBuffer.
|
||||
@param[in] SourceY - Y coordinate of source for the BltBuffer.
|
||||
@param[in] DestinationX - X coordinate of destination for the BltBuffer.
|
||||
@param[in] DestinationY - Y coordinate of destination for the BltBuffer.
|
||||
@param[in] Width - Width of rectangle in BltBuffer in pixels.
|
||||
@param[in] Height - Hight of rectangle in BltBuffer in pixels.
|
||||
@param[in] Delta - OPTIONAL
|
||||
|
||||
@retval EFI_SUCCESS - The Blt operation completed.
|
||||
@retval EFI_INVALID_PARAMETER - BltOperation is not valid.
|
||||
@retval EFI_DEVICE_ERROR - A hardware error occured writting to the video buffer.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT)(
|
||||
IN EFI_UGA_DRAW_PROTOCOL * This,
|
||||
IN EFI_UGA_PIXEL * BltBuffer, OPTIONAL
|
||||
IN EFI_UGA_BLT_OPERATION BltOperation,
|
||||
IN UINTN SourceX,
|
||||
IN UINTN SourceY,
|
||||
IN UINTN DestinationX,
|
||||
IN UINTN DestinationY,
|
||||
IN UINTN Width,
|
||||
IN UINTN Height,
|
||||
IN UINTN Delta OPTIONAL
|
||||
);
|
||||
|
||||
///
|
||||
/// This protocol provides a basic abstraction to set video modes and
|
||||
/// copy pixels to and from the graphics controller's frame buffer.
|
||||
///
|
||||
struct _EFI_UGA_DRAW_PROTOCOL {
|
||||
EFI_UGA_DRAW_PROTOCOL_GET_MODE GetMode;
|
||||
EFI_UGA_DRAW_PROTOCOL_SET_MODE SetMode;
|
||||
EFI_UGA_DRAW_PROTOCOL_BLT Blt;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiUgaDrawProtocolGuid;
|
||||
|
||||
#endif
|
|
@ -0,0 +1,194 @@
|
|||
/** @file
|
||||
Unicode Collation protocol that follows the UEFI 2.0 specification.
|
||||
This protocol is used to allow code running in the boot services environment
|
||||
to perform lexical comparison functions on Unicode strings for given languages.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __UNICODE_COLLATION_H__
|
||||
#define __UNICODE_COLLATION_H__
|
||||
|
||||
FILE_LICENCE ( BSD3 );
|
||||
|
||||
#define EFI_UNICODE_COLLATION_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
#define EFI_UNICODE_COLLATION_PROTOCOL2_GUID \
|
||||
{ \
|
||||
0xa4c751fc, 0x23ae, 0x4c3e, {0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL;
|
||||
|
||||
|
||||
///
|
||||
/// Protocol GUID name defined in EFI1.1.
|
||||
///
|
||||
#define UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL_GUID
|
||||
|
||||
///
|
||||
/// Protocol defined in EFI1.1.
|
||||
///
|
||||
typedef EFI_UNICODE_COLLATION_PROTOCOL UNICODE_COLLATION_INTERFACE;
|
||||
|
||||
///
|
||||
/// Protocol data structures and defines
|
||||
///
|
||||
#define EFI_UNICODE_BYTE_ORDER_MARK (CHAR16) (0xfeff)
|
||||
|
||||
//
|
||||
// Protocol member functions
|
||||
//
|
||||
/**
|
||||
Performs a case-insensitive comparison of two Null-terminated strings.
|
||||
|
||||
@param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
|
||||
@param Str1 A pointer to a Null-terminated string.
|
||||
@param Str2 A pointer to a Null-terminated string.
|
||||
|
||||
@retval 0 Str1 is equivalent to Str2.
|
||||
@retval >0 Str1 is lexically greater than Str2.
|
||||
@retval <0 Str1 is lexically less than Str2.
|
||||
|
||||
**/
|
||||
typedef
|
||||
INTN
|
||||
(EFIAPI *EFI_UNICODE_COLLATION_STRICOLL)(
|
||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||
IN CHAR16 *Str1,
|
||||
IN CHAR16 *Str2
|
||||
);
|
||||
|
||||
/**
|
||||
Performs a case-insensitive comparison of a Null-terminated
|
||||
pattern string and a Null-terminated string.
|
||||
|
||||
@param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
|
||||
@param String A pointer to a Null-terminated string.
|
||||
@param Pattern A pointer to a Null-terminated pattern string.
|
||||
|
||||
@retval TRUE Pattern was found in String.
|
||||
@retval FALSE Pattern was not found in String.
|
||||
|
||||
**/
|
||||
typedef
|
||||
BOOLEAN
|
||||
(EFIAPI *EFI_UNICODE_COLLATION_METAIMATCH)(
|
||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||
IN CHAR16 *String,
|
||||
IN CHAR16 *Pattern
|
||||
);
|
||||
|
||||
/**
|
||||
Converts all the characters in a Null-terminated string to
|
||||
lower case characters.
|
||||
|
||||
@param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
|
||||
@param String A pointer to a Null-terminated string.
|
||||
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *EFI_UNICODE_COLLATION_STRLWR)(
|
||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||
IN OUT CHAR16 *Str
|
||||
);
|
||||
|
||||
/**
|
||||
Converts all the characters in a Null-terminated string to upper
|
||||
case characters.
|
||||
|
||||
@param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
|
||||
@param String A pointer to a Null-terminated string.
|
||||
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *EFI_UNICODE_COLLATION_STRUPR)(
|
||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||
IN OUT CHAR16 *Str
|
||||
);
|
||||
|
||||
/**
|
||||
Converts an 8.3 FAT file name in an OEM character set to a Null-terminated
|
||||
string.
|
||||
|
||||
@param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
|
||||
@param FatSize The size of the string Fat in bytes.
|
||||
@param Fat A pointer to a Null-terminated string that contains an 8.3 file
|
||||
name using an 8-bit OEM character set.
|
||||
@param String A pointer to a Null-terminated string. The string must
|
||||
be allocated in advance to hold FatSize characters.
|
||||
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *EFI_UNICODE_COLLATION_FATTOSTR)(
|
||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||
IN UINTN FatSize,
|
||||
IN CHAR8 *Fat,
|
||||
OUT CHAR16 *String
|
||||
);
|
||||
|
||||
/**
|
||||
Converts a Null-terminated string to legal characters in a FAT
|
||||
filename using an OEM character set.
|
||||
|
||||
@param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
|
||||
@param String A pointer to a Null-terminated string.
|
||||
@param FatSize The size of the string Fat in bytes.
|
||||
@param Fat A pointer to a string that contains the converted version of
|
||||
String using legal FAT characters from an OEM character set.
|
||||
|
||||
@retval TRUE One or more conversions failed and were substituted with '_'
|
||||
@retval FALSE None of the conversions failed.
|
||||
|
||||
**/
|
||||
typedef
|
||||
BOOLEAN
|
||||
(EFIAPI *EFI_UNICODE_COLLATION_STRTOFAT)(
|
||||
IN EFI_UNICODE_COLLATION_PROTOCOL *This,
|
||||
IN CHAR16 *String,
|
||||
IN UINTN FatSize,
|
||||
OUT CHAR8 *Fat
|
||||
);
|
||||
|
||||
///
|
||||
/// The EFI_UNICODE_COLLATION_PROTOCOL is used to perform case-insensitive
|
||||
/// comparisons of strings.
|
||||
///
|
||||
struct _EFI_UNICODE_COLLATION_PROTOCOL {
|
||||
EFI_UNICODE_COLLATION_STRICOLL StriColl;
|
||||
EFI_UNICODE_COLLATION_METAIMATCH MetaiMatch;
|
||||
EFI_UNICODE_COLLATION_STRLWR StrLwr;
|
||||
EFI_UNICODE_COLLATION_STRUPR StrUpr;
|
||||
|
||||
//
|
||||
// for supporting fat volumes
|
||||
//
|
||||
EFI_UNICODE_COLLATION_FATTOSTR FatToStr;
|
||||
EFI_UNICODE_COLLATION_STRTOFAT StrToFat;
|
||||
|
||||
///
|
||||
/// A Null-terminated ASCII string array that contains one or more language codes.
|
||||
/// When this field is used for UnicodeCollation2, it is specified in RFC 4646 format.
|
||||
/// When it is used for UnicodeCollation, it is specified in ISO 639-2 format.
|
||||
///
|
||||
CHAR8 *SupportedLanguages;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiUnicodeCollationProtocolGuid;
|
||||
extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid;
|
||||
|
||||
#endif
|
|
@ -159,6 +159,7 @@ extern EFI_GUID efi_block_io_protocol_guid;
|
|||
extern EFI_GUID efi_bus_specific_driver_override_protocol_guid;
|
||||
extern EFI_GUID efi_component_name_protocol_guid;
|
||||
extern EFI_GUID efi_component_name2_protocol_guid;
|
||||
extern EFI_GUID efi_console_control_protocol_guid;
|
||||
extern EFI_GUID efi_device_path_protocol_guid;
|
||||
extern EFI_GUID efi_dhcp4_protocol_guid;
|
||||
extern EFI_GUID efi_dhcp4_service_binding_protocol_guid;
|
||||
|
@ -182,6 +183,7 @@ extern EFI_GUID efi_nii31_protocol_guid;
|
|||
extern EFI_GUID efi_pci_io_protocol_guid;
|
||||
extern EFI_GUID efi_pci_root_bridge_io_protocol_guid;
|
||||
extern EFI_GUID efi_pxe_base_code_protocol_guid;
|
||||
extern EFI_GUID efi_serial_io_protocol_guid;
|
||||
extern EFI_GUID efi_simple_file_system_protocol_guid;
|
||||
extern EFI_GUID efi_simple_network_protocol_guid;
|
||||
extern EFI_GUID efi_tcg_protocol_guid;
|
||||
|
@ -189,6 +191,8 @@ extern EFI_GUID efi_tcp4_protocol_guid;
|
|||
extern EFI_GUID efi_tcp4_service_binding_protocol_guid;
|
||||
extern EFI_GUID efi_udp4_protocol_guid;
|
||||
extern EFI_GUID efi_udp4_service_binding_protocol_guid;
|
||||
extern EFI_GUID efi_uga_draw_protocol_guid;
|
||||
extern EFI_GUID efi_unicode_collation_protocol_guid;
|
||||
extern EFI_GUID efi_vlan_config_protocol_guid;
|
||||
|
||||
extern EFI_HANDLE efi_image_handle;
|
||||
|
|
|
@ -80,6 +80,8 @@ static struct efi_well_known_guid efi_well_known_guids[] = {
|
|||
"ComponentName" },
|
||||
{ &efi_component_name2_protocol_guid,
|
||||
"ComponentName2" },
|
||||
{ &efi_console_control_protocol_guid,
|
||||
"ConsoleControl" },
|
||||
{ &efi_device_path_protocol_guid,
|
||||
"DevicePath" },
|
||||
{ &efi_driver_binding_protocol_guid,
|
||||
|
@ -128,6 +130,8 @@ static struct efi_well_known_guid efi_well_known_guids[] = {
|
|||
"PciRootBridgeIo" },
|
||||
{ &efi_pxe_base_code_protocol_guid,
|
||||
"PxeBaseCode" },
|
||||
{ &efi_serial_io_protocol_guid,
|
||||
"SerialIo" },
|
||||
{ &efi_simple_file_system_protocol_guid,
|
||||
"SimpleFileSystem" },
|
||||
{ &efi_simple_network_protocol_guid,
|
||||
|
@ -142,6 +146,10 @@ static struct efi_well_known_guid efi_well_known_guids[] = {
|
|||
"Udp4" },
|
||||
{ &efi_udp4_service_binding_protocol_guid,
|
||||
"Udp4Sb" },
|
||||
{ &efi_uga_draw_protocol_guid,
|
||||
"UgaDraw" },
|
||||
{ &efi_unicode_collation_protocol_guid,
|
||||
"UnicodeCollation" },
|
||||
{ &efi_vlan_config_protocol_guid,
|
||||
"VlanConfig" },
|
||||
{ &efi_vlan_config_dxe_guid,
|
||||
|
|
|
@ -29,6 +29,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
|||
#include <ipxe/efi/Protocol/BusSpecificDriverOverride.h>
|
||||
#include <ipxe/efi/Protocol/ComponentName.h>
|
||||
#include <ipxe/efi/Protocol/ComponentName2.h>
|
||||
#include <ipxe/efi/Protocol/ConsoleControl/ConsoleControl.h>
|
||||
#include <ipxe/efi/Protocol/DevicePath.h>
|
||||
#include <ipxe/efi/Protocol/DevicePathToText.h>
|
||||
#include <ipxe/efi/Protocol/Dhcp4.h>
|
||||
|
@ -47,11 +48,14 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
|||
#include <ipxe/efi/Protocol/PciIo.h>
|
||||
#include <ipxe/efi/Protocol/PciRootBridgeIo.h>
|
||||
#include <ipxe/efi/Protocol/PxeBaseCode.h>
|
||||
#include <ipxe/efi/Protocol/SerialIo.h>
|
||||
#include <ipxe/efi/Protocol/SimpleFileSystem.h>
|
||||
#include <ipxe/efi/Protocol/SimpleNetwork.h>
|
||||
#include <ipxe/efi/Protocol/TcgService.h>
|
||||
#include <ipxe/efi/Protocol/Tcp4.h>
|
||||
#include <ipxe/efi/Protocol/Udp4.h>
|
||||
#include <ipxe/efi/Protocol/UgaDraw.h>
|
||||
#include <ipxe/efi/Protocol/UnicodeCollation.h>
|
||||
#include <ipxe/efi/Protocol/VlanConfig.h>
|
||||
|
||||
/** @file
|
||||
|
@ -84,6 +88,10 @@ EFI_GUID efi_component_name_protocol_guid
|
|||
EFI_GUID efi_component_name2_protocol_guid
|
||||
= EFI_COMPONENT_NAME2_PROTOCOL_GUID;
|
||||
|
||||
/** Console control protocol GUID */
|
||||
EFI_GUID efi_console_control_protocol_guid
|
||||
= EFI_CONSOLE_CONTROL_PROTOCOL_GUID;
|
||||
|
||||
/** Device path protocol GUID */
|
||||
EFI_GUID efi_device_path_protocol_guid
|
||||
= EFI_DEVICE_PATH_PROTOCOL_GUID;
|
||||
|
@ -176,6 +184,10 @@ EFI_GUID efi_pci_root_bridge_io_protocol_guid
|
|||
EFI_GUID efi_pxe_base_code_protocol_guid
|
||||
= EFI_PXE_BASE_CODE_PROTOCOL_GUID;
|
||||
|
||||
/** Serial I/O protocol GUID */
|
||||
EFI_GUID efi_serial_io_protocol_guid
|
||||
= EFI_SERIAL_IO_PROTOCOL_GUID;
|
||||
|
||||
/** Simple file system protocol GUID */
|
||||
EFI_GUID efi_simple_file_system_protocol_guid
|
||||
= EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID;
|
||||
|
@ -204,6 +216,14 @@ EFI_GUID efi_udp4_protocol_guid
|
|||
EFI_GUID efi_udp4_service_binding_protocol_guid
|
||||
= EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID;
|
||||
|
||||
/** UGA draw protocol GUID */
|
||||
EFI_GUID efi_uga_draw_protocol_guid
|
||||
= EFI_UGA_DRAW_PROTOCOL_GUID;
|
||||
|
||||
/** Unicode collation protocol GUID */
|
||||
EFI_GUID efi_unicode_collation_protocol_guid
|
||||
= EFI_UNICODE_COLLATION_PROTOCOL_GUID;
|
||||
|
||||
/** VLAN configuration protocol GUID */
|
||||
EFI_GUID efi_vlan_config_protocol_guid
|
||||
= EFI_VLAN_CONFIG_PROTOCOL_GUID;
|
||||
|
|
Loading…
Reference in New Issue