]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: xilinx: Update ESRT after copying GUID
authorPadmarao Begari <padmarao.begari@amd.com>
Tue, 4 Nov 2025 12:57:25 +0000 (18:27 +0530)
committerMichal Simek <michal.simek@amd.com>
Fri, 19 Dec 2025 07:25:26 +0000 (08:25 +0100)
The EFI System Resource Table (ESRT) is updated after the firmware
image GUID is copied to the fw_images structure. This ensures that
the ESRT accurately reflects the current firmware resources.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20251104125725.1628068-1-padmarao.begari@amd.com
board/xilinx/common/board.c

index 26facb6daeab27909fe88a8eb44b6b8d91e6396f..ab50a795e6b4178c9f541517425679be314a2b3b 100644 (file)
@@ -766,6 +766,17 @@ int fwu_platform_hook(struct udevice *dev, struct fwu_data *data)
        /* Copy image type GUID */
        memcpy(&fw_images[0].image_type_id, &img_entry->image_type_guid, 16);
 
+       if (IS_ENABLED(CONFIG_EFI_ESRT)) {
+               efi_status_t ret;
+
+               /* Rebuild the ESRT to reflect any updated FW images. */
+               ret = efi_esrt_populate();
+               if (ret != EFI_SUCCESS) {
+                       log_warning("ESRT update failed\n");
+                       return ret;
+               }
+       }
+
        return 0;
 }