Lines Matching +full:firmware +full:- +full:initialised

1 // SPDX-License-Identifier: GPL-2.0+
39 while (offset <= len - sizeof(*node) && in validate_device_path()
40 node->length >= sizeof(*node) && in validate_device_path()
41 node->length <= len - offset) { in validate_device_path()
42 offset += node->length; in validate_device_path()
44 if ((node->type == EFI_DEV_END_PATH || in validate_device_path()
45 node->type == EFI_DEV_END_PATH2) && in validate_device_path()
46 node->sub_type == EFI_DEV_END_ENTIRE) in validate_device_path()
53 * If we're here then either node->length pointed past the end in validate_device_path()
64 /* An array of 16-bit integers */ in validate_boot_order()
101 desclength = ucs2_strsize((efi_char16_t *)(buffer + 6), len - 6) + 2; in validate_load_option()
126 /* A single 16-bit integer */ in validate_uint16()
191 * @var_name: an array of @len non-NUL characters.
192 * @match_name: a NUL-terminated pattern string, optionally ending in "*". A
195 * @match: on output, the number of non-wildcard characters in @match_name
217 * We've reached a non-wildcard char in @match_name. in variable_matches()
300 strsize2 = ucs2_strsize(entry->var.VariableName, EFI_VAR_NAME_LEN); in variable_is_present()
302 !memcmp(variable_name, &(entry->var.VariableName), in variable_is_present()
304 !efi_guidcmp(entry->var.VendorGuid, in variable_is_present()
325 * The variable name is, by definition, a NULL-terminated in var_name_strnsize()
330 c = variable_name[(len / sizeof(c)) - 1]; in var_name_strnsize()
340 * disable the sysfs workqueue since the firmware is buggy.
355 printk(KERN_WARNING "efivars: duplicate variable: %s-%pUl\n", in dup_variable_bug()
361 * efivar_init - build the initial list of EFI variables
363 * @data: function-specific data to pass to @func
364 * @head: initialised head of variable list
366 * Get every EFI variable from the firmware and invoke @func. @func
384 return -ENOMEM; in efivar_init()
410 * Some firmware implementations return the in efivar_init()
430 err = -EOPNOTSUPP; in efivar_init()
456 * efivar_entry_add - add entry to variable list
469 list_add(&entry->list, head); in efivar_entry_add()
476 * __efivar_entry_add - add entry to variable list
482 list_add(&entry->list, head); in __efivar_entry_add()
486 * efivar_entry_remove - remove entry from variable list
493 list_del(&entry->list); in efivar_entry_remove()
497 * efivar_entry_list_del_unlock - remove entry from variable list
502 * NOTE: slightly weird locking semantics here - we expect to be
509 list_del(&entry->list); in efivar_entry_list_del_unlock()
514 * efivar_entry_delete - delete variable and remove entry from list
517 * Delete the variable from the firmware and remove @entry from the
521 * Returns 0 on success, -EINTR if we can't grab the semaphore,
533 status = efivar_set_variable_locked(entry->var.VariableName, in efivar_entry_delete()
534 &entry->var.VendorGuid, in efivar_entry_delete()
546 * efivar_entry_size - obtain the size of a variable
561 status = efivar_get_variable(entry->var.VariableName, in efivar_entry_size()
562 &entry->var.VendorGuid, NULL, size, NULL); in efivar_entry_size()
572 * __efivar_entry_get - call get_variable()
587 status = efivar_get_variable(entry->var.VariableName, in __efivar_entry_get()
588 &entry->var.VendorGuid, in __efivar_entry_get()
595 * efivar_entry_get - call get_variable()
616 * efivar_entry_set_get_size - call set_variable() and get new size (atomic)
629 * Returns 0 on success, -EINVAL if the variable data is invalid,
630 * -ENOSPC if the firmware does not have enough available space, or a
640 efi_char16_t *name = entry->var.VariableName; in efivar_entry_set_get_size()
641 efi_guid_t *vendor = &entry->var.VendorGuid; in efivar_entry_set_get_size()
648 return -EINVAL; in efivar_entry_set_get_size()
675 status = efivar_get_variable(entry->var.VariableName, in efivar_entry_set_get_size()
676 &entry->var.VendorGuid, in efivar_entry_set_get_size()
696 * efivar_entry_iter - iterate over variable list
699 * @data: function-specific data to pass to callback
706 * - a non-zero return value indicates an error and terminates the loop
707 * - @func is called from atomic context