From: Heinrich Schuchardt Date: Sat, 7 Jul 2018 13:36:05 +0000 (+0200) Subject: efi_loader: update crc32 in InstallConfigurationTable X-Git-Tag: v2018.09-rc1~2^2~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=55d8ee3b7bfc7222fb9782737b73364e78364792;p=oweals%2Fu-boot.git efi_loader: update crc32 in InstallConfigurationTable If the number of installed tables is changed in InstallConfigurationTable() update the crc32 of the system table. Signed-off-by: Heinrich Schuchardt Signed-off-by: Alexander Graf --- diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 820d766b41..b9e54f551a 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1444,6 +1444,9 @@ efi_status_t efi_install_configuration_table(const efi_guid_t *guid, systab.nr_tables = i + 1; out: + /* systab.nr_tables may have changed. So we need to update the crc32 */ + efi_update_table_header_crc32(&systab.hdr); + /* Notify that the configuration table was changed */ list_for_each_entry(evt, &efi_events, link) { if (evt->group && !guidcmp(evt->group, guid)) {