lv_uefi_private.h
Functions
-
bool lv_uefi_protocol_test(EFI_HANDLE handle, EFI_GUID *protocol)
Test if a protocol is installed at a handle.
- Parameters:
handle – The handle on which the protocol might be installed.
protocol – The guid of the protocol.
- Returns:
TRUE if the protocol is installed, FALSE if not.
-
void *lv_uefi_protocol_open(EFI_HANDLE handle, EFI_GUID *protocol)
Open a protocol.
- Parameters:
handle – The handle on which the protocol is installed.
protocol – The guid of the protocol.
- Returns:
A pointer to the interface, NULL if the protocol couldn't be opened.
-
void lv_uefi_protocol_close(EFI_HANDLE handle, EFI_GUID *protocol)
Close a protocol.
- Parameters:
handle – The handle on which the protocol is installed.
protocol – The guid of the protocol.
-
size_t lv_uefi_ucs2_to_ascii(const CHAR16 *ucs2, char *ascii, size_t ascii_len)
Convert an UCS-2 string to an ASCII string. The string must contain only characters >= 0x20 and <= 0X7E.
- Parameters:
ucs2 – The UCS-2 string.
ascii – The buffer to store the ASCII string.
ascii_len – The size of the buffer in ASCII characters.
- Returns:
The number of characters written to the buffer or 0 if there was an error.
-
size_t lv_uefi_ascii_to_ucs2(const char *ascii, CHAR16 *ucs2, size_t ucs2_len)
Convert an ASCII string to an UCS-2 string. The string must contain only characters >= 0x20 and <= 0X7E.
- Parameters:
ascii – The ASCII string.
ucs2 – The buffer to store the UCS-2 string.
ucs2_len – The size of the buffer in UCS-2 characters.
- Returns:
The number of bytes written to the buffer or 0 if there was an error.
Variables
-
EFI_HANDLE gLvEfiImageHandle
Internal cache for the image handle (source: application entry point)
-
EFI_SYSTEM_TABLE *gLvEfiST
Internal cache for the system table (source: application entry point)
-
EFI_BOOT_SERVICES *gLvEfiBS
Internal cache for the boot services table (source: gLvEfiST)
-
EFI_RUNTIME_SERVICES *gLvEfiRT
Internal cache for the boot runtime service table (source: gLvEfiST)