diff options
| author | Tom Rini <[email protected]> | 2024-01-14 09:34:14 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-01-14 09:34:14 -0500 |
| commit | 817fdce324cac70fb4216ba42976f7b9c2ba9f99 (patch) | |
| tree | b603968cc2de846e26382fd9e52945abf2391526 /cmd | |
| parent | 547d3dd28a46a18d59e00a153c8becca8d4e8cf9 (diff) | |
| parent | 55125bbfb48cb1330a692059bc972810f77b984a (diff) | |
Merge tag 'efi-2024-04-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2024-04-rc1
Documentation:
* update coreboot graphics documentation
* fix '---' rendering
UEFI:
* add missing pointer check after memory allocation in efidebug
* replace duplicate functions efi_dp_append and efi_dp_concat
* support fmp versioning for multi bank update
* avoid using dm_scan_other() in EFI app
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/eficonfig.c | 7 | ||||
| -rw-r--r-- | cmd/efidebug.c | 10 |
2 files changed, 11 insertions, 6 deletions
diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 34a59cb15d0..8234e602b8f 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -531,7 +531,7 @@ struct efi_device_path *eficonfig_create_device_path(struct efi_device_path *dp_ dp = efi_dp_shorten(dp_volume); if (!dp) dp = dp_volume; - dp = efi_dp_append(dp, &fp->dp); + dp = efi_dp_concat(dp, &fp->dp, false); free(buf); return dp; @@ -1484,7 +1484,8 @@ static efi_status_t eficonfig_edit_boot_option(u16 *varname, struct eficonfig_bo ret = EFI_OUT_OF_RESOURCES; goto out; } - initrd_dp = efi_dp_append((const struct efi_device_path *)&id_dp, dp); + initrd_dp = efi_dp_concat((const struct efi_device_path *)&id_dp, + dp, false); efi_free_pool(dp); } @@ -1495,7 +1496,7 @@ static efi_status_t eficonfig_edit_boot_option(u16 *varname, struct eficonfig_bo } final_dp_size = efi_dp_size(dp) + sizeof(END); if (initrd_dp) { - final_dp = efi_dp_concat(dp, initrd_dp); + final_dp = efi_dp_concat(dp, initrd_dp, true); final_dp_size += efi_dp_size(initrd_dp) + sizeof(END); } else { final_dp = efi_dp_dup(dp); diff --git a/cmd/efidebug.c b/cmd/efidebug.c index e10fbf891a4..aa8523797ef 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -699,8 +699,8 @@ struct efi_device_path *create_initrd_dp(const char *dev, const char *part, if (!short_fp) short_fp = tmp_fp; - initrd_dp = efi_dp_append((const struct efi_device_path *)&id_dp, - short_fp); + initrd_dp = efi_dp_concat((const struct efi_device_path *)&id_dp, + short_fp, false); out: efi_free_pool(tmp_dp); @@ -754,6 +754,10 @@ static int efi_boot_add_uri(int argc, char *const argv[], u16 *var_name16, uridp_len = sizeof(struct efi_device_path) + strlen(argv[3]) + 1; uridp = efi_alloc(uridp_len + sizeof(END)); + if (!uridp) { + log_err("Out of memory\n"); + return CMD_RET_FAILURE; + } uridp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; uridp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_URI; uridp->dp.length = uridp_len; @@ -916,7 +920,7 @@ static int do_efi_boot_add(struct cmd_tbl *cmdtp, int flag, goto out; } - final_fp = efi_dp_concat(file_path, initrd_dp); + final_fp = efi_dp_concat(file_path, initrd_dp, true); if (!final_fp) { printf("Cannot create final device path\n"); r = CMD_RET_FAILURE; |
