diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-07-01 07:35:52 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-07-01 07:35:52 +0300 |
commit | 937d96d2d567fe0d86a2f39a7f988bf31c66d3e6 (patch) | |
tree | a88dc437f56d4c8cf30a815fa9161090ab60b9aa /include/linux | |
parent | 5d95ff84e62be914b4a4dabfa814e4096b05b1b0 (diff) | |
parent | 2e28a798c3092ea42b968fa16ac835969d124898 (diff) | |
download | linux-937d96d2d567fe0d86a2f39a7f988bf31c66d3e6.tar.xz |
Merge tag 'efi-next-for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Pull EFI updates from Ard Biesheuvel:
"Although some more stuff is brewing, the EFI changes that are ready
for mainline are few this cycle:
- improve the PCI DMA paranoia logic in the EFI stub
- some constification changes
- add statfs support to efivarfs
- allow user space to enumerate updatable firmware resources without
CAP_SYS_ADMIN"
* tag 'efi-next-for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
efi/libstub: Disable PCI DMA before grabbing the EFI memory map
efi/esrt: Allow ESRT access without CAP_SYS_ADMIN
efivarfs: expose used and total size
efi: make kobj_type structure constant
efi: x86: make kobj_type structure constant
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/efi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 18d83a613635..ab088c662e88 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -1056,6 +1056,7 @@ struct efivar_operations { efi_set_variable_t *set_variable; efi_set_variable_t *set_variable_nonblocking; efi_query_variable_store_t *query_variable_store; + efi_query_variable_info_t *query_variable_info; }; struct efivars { @@ -1063,6 +1064,12 @@ struct efivars { const struct efivar_operations *ops; }; +#ifdef CONFIG_X86 +u64 __attribute_const__ efivar_reserved_space(void); +#else +static inline u64 efivar_reserved_space(void) { return 0; } +#endif + /* * The maximum size of VariableName + Data = 1024 * Therefore, it's reasonable to save that much @@ -1101,6 +1108,10 @@ efi_status_t efivar_set_variable_locked(efi_char16_t *name, efi_guid_t *vendor, efi_status_t efivar_set_variable(efi_char16_t *name, efi_guid_t *vendor, u32 attr, unsigned long data_size, void *data); +efi_status_t efivar_query_variable_info(u32 attr, u64 *storage_space, + u64 *remaining_space, + u64 *max_variable_size); + #if IS_ENABLED(CONFIG_EFI_CAPSULE_LOADER) extern bool efi_capsule_pending(int *reset_type); |