diff options
author | Tom Rini <trini@konsulko.com> | 2023-07-11 13:27:32 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-11 13:27:32 -0400 |
commit | 8e21064cb3452950b09301baec06d86e37342471 (patch) | |
tree | a54f8b93191c102403147e44d8fd2fb2c9c9b65f | |
parent | 7876a695468c9bc17a6dc02054da101450468a40 (diff) | |
parent | e05a4b12a056fd7fe22e85715c8f5e5e811fb551 (diff) | |
download | u-boot-8e21064cb3452950b09301baec06d86e37342471.tar.gz u-boot-8e21064cb3452950b09301baec06d86e37342471.tar.bz2 u-boot-8e21064cb3452950b09301baec06d86e37342471.zip |
Merge tag 'efi-2023-07-rc7' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2023-07-rc7
Documentation:
* Fix links to Linux kernel documentation
UEFI:
* Fix memory leak in efidebug dh subcommand
* Fix underflow when calculating remaining variable store size
* Increase default variable store size to 64 KiB
* mkeficapsule: fix efi_firmware_management_capsule_header data type
-rw-r--r-- | arch/x86/include/asm/bootparam.h | 2 | ||||
-rw-r--r-- | cmd/efidebug.c | 1 | ||||
-rw-r--r-- | doc/develop/docstyle.rst | 2 | ||||
-rw-r--r-- | doc/usage/blkmap.rst | 2 | ||||
-rw-r--r-- | lib/efi_loader/Kconfig | 5 | ||||
-rw-r--r-- | lib/efi_loader/efi_var_mem.c | 4 | ||||
-rw-r--r-- | tools/eficapsule.h | 2 |
7 files changed, 12 insertions, 6 deletions
diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h index ea816ca746..ac4865300f 100644 --- a/arch/x86/include/asm/bootparam.h +++ b/arch/x86/include/asm/bootparam.h @@ -62,7 +62,7 @@ struct setup_indirect { /** * struct setup_header - Information needed by Linux to boot * - * See https://www.kernel.org/doc/html/latest/x86/boot.html + * See https://www.kernel.org/doc/html/latest/arch/x86/boot.html */ struct setup_header { __u8 setup_sects; diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 9622430c47..0be3af3e76 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -486,6 +486,7 @@ static int do_efi_show_handles(struct cmd_tbl *cmdtp, int flag, if (guidcmp(guid[j], &efi_guid_device_path)) printf(" %pUs\n", guid[j]); } + efi_free_pool(guid); } efi_free_pool(handles); diff --git a/doc/develop/docstyle.rst b/doc/develop/docstyle.rst index f9ba83a559..50506d6857 100644 --- a/doc/develop/docstyle.rst +++ b/doc/develop/docstyle.rst @@ -20,7 +20,7 @@ We apply the following rules: * For documentation we use reStructured text conforming to the requirements of `Sphinx <https://www.sphinx-doc.org>`_. * For documentation within code we follow the Linux kernel guide - `Writing kernel-doc comments <https://docs.kernel.org/doc-guide/kernel-doc.html>`_. + `Writing kernel-doc comments <https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html>`_. * We try to stick to 80 columns per line in documents. * For tables we prefer simple tables over grid tables. We avoid list tables as they make the reStructured text documents hard to read. diff --git a/doc/usage/blkmap.rst b/doc/usage/blkmap.rst index dbfa8e5aad..7337ea507a 100644 --- a/doc/usage/blkmap.rst +++ b/doc/usage/blkmap.rst @@ -19,7 +19,7 @@ wherever they might be located. The implementation is loosely modeled on Linux's "Device Mapper" subsystem, see `kernel documentation`_ for more information. -.. _kernel documentation: https://docs.kernel.org/admin-guide/device-mapper/index.html +.. _kernel documentation: https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/index.html Example: Netbooting an Ext4 Image diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index c5835e6ef6..a22e47616f 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -96,7 +96,8 @@ endif config EFI_VAR_BUF_SIZE int "Memory size of the UEFI variable store" - default 16384 + default 16384 if EFI_MM_COMM_TEE + default 65536 range 4096 2147483647 help This defines the size in bytes of the memory area reserved for keeping @@ -106,7 +107,7 @@ config EFI_VAR_BUF_SIZE match the value of PcdFlashNvStorageVariableSize used to compile the StandAloneMM module. - Minimum 4096, default 16384. + Minimum 4096, default 65536, or 16384 when using StandAloneMM. config EFI_GET_TIME bool "GetTime() runtime service" diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c index d6b65aed12..5fa7dcb8d3 100644 --- a/lib/efi_loader/efi_var_mem.c +++ b/lib/efi_loader/efi_var_mem.c @@ -177,6 +177,10 @@ efi_status_t __efi_runtime efi_var_mem_ins( u64 __efi_runtime efi_var_mem_free(void) { + if (efi_var_buf->length + sizeof(struct efi_var_entry) >= + EFI_VAR_BUF_SIZE) + return 0; + return EFI_VAR_BUF_SIZE - efi_var_buf->length - sizeof(struct efi_var_entry); } diff --git a/tools/eficapsule.h b/tools/eficapsule.h index 753fb73313..2099a2e9b8 100644 --- a/tools/eficapsule.h +++ b/tools/eficapsule.h @@ -63,7 +63,7 @@ struct efi_firmware_management_capsule_header { uint32_t version; uint16_t embedded_driver_count; uint16_t payload_item_count; - uint32_t item_offset_list[]; + uint64_t item_offset_list[]; } __packed; /* image_capsule_support */ |