summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-07-23 22:29:53 -0400
committerTom Rini <trini@konsulko.com>2019-07-23 22:29:53 -0400
commitfe4243870df152f839f88e5aa355f53cfba0a866 (patch)
tree6f748cbe5c48597a4075ebea87344c4763736686 /cmd
parentff8c23e784f57a7098e91a200ed7f5a48612b653 (diff)
parentf62be16ddb76a32e6315bb9517b49e639726e1fa (diff)
downloadu-boot-fe4243870df152f839f88e5aa355f53cfba0a866.tar.gz
u-boot-fe4243870df152f839f88e5aa355f53cfba0a866.tar.bz2
u-boot-fe4243870df152f839f88e5aa355f53cfba0a866.zip
Merge tag 'efi-2019-10-rc1-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for v2019.10-rc1 (2) * Implement the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event. * Address errors of type -Werror=address-of-packed-member when building with GCC9.1 * Fix an error when adding memory add addres 0x00000000. * Rework some code comments for Sphinx compliance.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bootefi.c20
-rw-r--r--cmd/efidebug.c16
2 files changed, 25 insertions, 11 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index c19256e00d..a45bfd139f 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -24,7 +24,7 @@ DECLARE_GLOBAL_DATA_PTR;
static struct efi_device_path *bootefi_image_path;
static struct efi_device_path *bootefi_device_path;
-/*
+/**
* Set the load options of an image from an environment variable.
*
* @handle: the image handle
@@ -143,7 +143,7 @@ done:
return ret;
}
-/*
+/**
* efi_carve_out_dt_rsv() - Carve out DT reserved memory ranges
*
* The mem_rsv entries of the FDT are added to the memory map. Any failures are
@@ -169,8 +169,8 @@ static void efi_carve_out_dt_rsv(void *fdt)
pages = efi_size_in_pages(size + (addr & EFI_PAGE_MASK));
addr &= ~EFI_PAGE_MASK;
- if (!efi_add_memory_map(addr, pages, EFI_RESERVED_MEMORY_TYPE,
- false))
+ if (efi_add_memory_map(addr, pages, EFI_RESERVED_MEMORY_TYPE,
+ false) != EFI_SUCCESS)
printf("FDT memrsv map %d: Failed to add to map\n", i);
}
}
@@ -342,7 +342,7 @@ static int do_efibootmgr(void)
return CMD_RET_SUCCESS;
}
-/*
+/**
* do_bootefi_image() - execute EFI binary
*
* Set up memory image for the binary to be loaded, prepare device path, and
@@ -612,6 +612,16 @@ U_BOOT_CMD(
bootefi_help_text
);
+/**
+ * efi_set_bootdev() - set boot device
+ *
+ * This function is called when a file is loaded, e.g. via the 'load' command.
+ * We use the path to this file to inform the UEFI binary about the boot device.
+ *
+ * @dev: device, e.g. "MMC"
+ * @devnr: number of the device, e.g. "1:2"
+ * @path: path to file loaded
+ */
void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
{
struct efi_device_path *device, *image;
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index cb152b3339..02dc491a68 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -394,6 +394,7 @@ static const struct efi_mem_attrs {
/**
* print_memory_attributes() - print memory map attributes
+ *
* @attributes: Attribute value
*
* Print memory map attributes
@@ -487,9 +488,9 @@ static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag,
* Return: CMD_RET_SUCCESS on success,
* CMD_RET_USAGE or CMD_RET_RET_FAILURE on failure
*
- * Implement efidebug "boot add" sub-command.
- * Create or change UEFI load option.
- * - boot add <id> <label> <interface> <devnum>[:<part>] <file> <options>
+ * Implement efidebug "boot add" sub-command. Create or change UEFI load option.
+ *
+ * efidebug boot add <id> <label> <interface> <devnum>[:<part>] <file> <options>
*/
static int do_efi_boot_add(cmd_tbl_t *cmdtp, int flag,
int argc, char * const argv[])
@@ -587,7 +588,8 @@ out:
*
* Implement efidebug "boot rm" sub-command.
* Delete UEFI load options.
- * - boot rm <id> ...
+ *
+ * efidebug boot rm <id> ...
*/
static int do_efi_boot_rm(cmd_tbl_t *cmdtp, int flag,
int argc, char * const argv[])
@@ -890,7 +892,8 @@ out:
*
* Implement efidebug "boot next" sub-command.
* Set BootNext variable.
- * - boot next <id>
+ *
+ * efidebug boot next <id>
*/
static int do_efi_boot_next(cmd_tbl_t *cmdtp, int flag,
int argc, char * const argv[])
@@ -938,7 +941,8 @@ out:
*
* Implement efidebug "boot order" sub-command.
* Show order of UEFI load options, or change it in BootOrder variable.
- * - boot order [<id> ...]
+ *
+ * efidebug boot order [<id> ...]
*/
static int do_efi_boot_order(cmd_tbl_t *cmdtp, int flag,
int argc, char * const argv[])