diff options
author | Tom Rini <trini@konsulko.com> | 2023-11-30 09:33:31 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-11-30 09:33:31 -0500 |
commit | 4a363dd516856344558034027e40d903868f67b4 (patch) | |
tree | 64f693d7178aa2d5c94e08557194ccad2cf41e77 /lib/efi_loader | |
parent | 6357cf0cc4eaded5326cd10bca359ade2969708a (diff) | |
parent | e22d5799dc86298ad8388ddcb3b759e166c142b7 (diff) | |
download | u-boot-4a363dd516856344558034027e40d903868f67b4.tar.gz u-boot-4a363dd516856344558034027e40d903868f67b4.tar.bz2 u-boot-4a363dd516856344558034027e40d903868f67b4.zip |
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into next
Device tree improvents for Paz00 and DM PMIC convertion of recently
merged Tegra boards.
Diffstat (limited to 'lib/efi_loader')
-rw-r--r-- | lib/efi_loader/Kconfig | 14 | ||||
-rw-r--r-- | lib/efi_loader/efi_tcg2.c | 5 | ||||
-rw-r--r-- | lib/efi_loader/efi_var_file.c | 7 |
3 files changed, 17 insertions, 9 deletions
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index 2913d1c9df..ea807342f0 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -133,18 +133,20 @@ endif config EFI_VAR_BUF_SIZE int "Memory size of the UEFI variable store" - default 16384 if EFI_MM_COMM_TEE - default 65536 + default 131072 range 4096 2147483647 help This defines the size in bytes of the memory area reserved for keeping UEFI variables. - When using StandAloneMM (CONFIG_EFI_MM_COMM_TEE=y) this value should - match the value of PcdFlashNvStorageVariableSize used to compile the - StandAloneMM module. + When using StandAloneMM (CONFIG_EFI_MM_COMM_TEE=y) is used the + available size for storing variables is defined in + PcdFlashNvStorageVariableSize. + That value is probed at runtime from U-Boot. In that case, + EFI_VAR_BUF_SIZE represents the memory U-Boot reserves to present + runtime variables to the OS. - Minimum 4096, default 65536, or 16384 when using StandAloneMM. + Minimum 4096, default 131072 config EFI_GET_TIME bool "GetTime() runtime service" diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index 2eaa12b83b..463ea4c154 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -944,8 +944,11 @@ static efi_status_t efi_init_event_log(void) * Add SCRTM version to the log if previous firmmware * doesn't pass an eventlog. */ - if (!elog.found) + if (!elog.found) { ret = efi_append_scrtm_version(dev); + if (ret != EFI_SUCCESS) + goto free_pool; + } ret = create_final_event(); if (ret != EFI_SUCCESS) diff --git a/lib/efi_loader/efi_var_file.c b/lib/efi_loader/efi_var_file.c index 62e071bd83..d7dba05071 100644 --- a/lib/efi_loader/efi_var_file.c +++ b/lib/efi_loader/efi_var_file.c @@ -204,8 +204,11 @@ efi_status_t efi_var_restore(struct efi_var_file *buf, bool safe) * File ubootefi.var is read from the EFI system partitions and the variables * stored in the file are created. * - * In case the file does not exist yet or a variable cannot be set EFI_SUCCESS - * is returned. + * On first boot the file ubootefi.var does not exist yet. This is why we must + * return EFI_SUCCESS in this case. + * + * If the variable file is corrupted, e.g. incorrect CRC32, we do not want to + * stop the boot process. We deliberately return EFI_SUCCESS in this case, too. * * Return: status code */ |