Lines Matching +full:hex +full:- +full:encoded
1 // SPDX-License-Identifier: GPL-2.0+
19 * Mapping between EFI variables and u-boot variables:
25 * efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_OsIndicationsSupported=
27 * efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_BootOrder=
33 * + ro - read-only
34 * + boot - boot-services access
35 * + run - runtime access
44 * + utf8 - raw utf8 string
45 * + blob - arbitrary length hex string
51 #define PREFIX_LEN (strlen("efi_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_"))
54 * efi_to_native() - convert the UEFI variable name and vendor GUID to U-Boot
57 * The U-Boot variable name is a concatenation of prefix 'efi', the hexstring
58 * encoded vendor GUID, and the UTF-8 encoded UEFI variable name separated by
59 * underscores, e.g. 'efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_BootOrder'.
61 * @native: pointer to pointer to U-Boot variable name
85 * prefix() - skip over prefix
102 * parse_attr() - decode attributes part of variable value
104 * Convert the string encoded attributes of a UEFI variable to a bit mask.
107 * @str: value of U-Boot variable
109 * Return: pointer to remainder of U-Boot variable value
149 * efi_efi_get_variable() - retrieve value of a UEFI variable
245 * parse_uboot_variable() - parse a u-boot variable and get uefi-related
247 * @variable: whole data of u-boot variable (ie. name=value)
249 * @variable_name: name of uefi variable in u16, null-terminated
253 * A uefi variable is encoded into a u-boot variable as described above.
254 * This function parses such a u-boot variable and retrieve uefi-related
260 otherwise non-zero status code
284 name_len = end - name; in parse_uboot_variable()
298 c = *(name - 1); in parse_uboot_variable()
299 *(name - 1) = '\0'; /* guid need be null-terminated here */ in parse_uboot_variable()
301 *(name - 1) = c; in parse_uboot_variable()
310 * efi_get_next_variable_name() - enumerate the current variable names
341 /* check null-terminated string */ in efi_get_next_variable_name()
348 /* search for the last-returned variable */ in efi_get_next_variable_name()
382 snprintf(regex, 256, "efi_.*-.*-.*-.*-.*_.*"); in efi_get_next_variable_name()
400 * efi_efi_set_variable() - set value of a UEFI variable
470 u32 attr = 1 << (ffs(attributes) - 1); in efi_set_variable()