aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-06-10 10:00:01 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-06-10 11:43:37 +0200
commit535321c2ea76de44896330040d2e43aa4645d026 (patch)
tree04c9d624459f2693c76ed2eaf33d4ea48db95943
parente91b68fd6b83d6e4c862000630d240b339cc5a7b (diff)
downloadu-boot-535321c2ea76de44896330040d2e43aa4645d026.zip
u-boot-535321c2ea76de44896330040d2e43aa4645d026.tar.gz
u-boot-535321c2ea76de44896330040d2e43aa4645d026.tar.bz2
efi_loader: rename struct efi_initrd_dp to efi_lo_dp_prefix
As we now also store device-tree device-paths in load options rename struct efi_initrd_dp to efi_lo_dp_prefix. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r--cmd/eficonfig.c4
-rw-r--r--cmd/efidebug.c4
-rw-r--r--include/efi_load_initrd.h12
-rw-r--r--lib/efi_loader/efi_load_initrd.c2
-rw-r--r--lib/efi_loader/initrddump.c2
5 files changed, 17 insertions, 7 deletions
diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c
index 6108b42..bea09e4 100644
--- a/cmd/eficonfig.c
+++ b/cmd/eficonfig.c
@@ -1401,7 +1401,7 @@ static efi_status_t eficonfig_edit_boot_option(u16 *varname, struct eficonfig_bo
struct efi_device_path *initrd_device_dp = NULL;
struct efi_device_path *fdt_device_dp = NULL;
- const struct efi_initrd_dp initrd_prefix = {
+ const struct efi_lo_dp_prefix initrd_prefix = {
.vendor = {
{
DEVICE_PATH_TYPE_MEDIA_DEVICE,
@@ -1417,7 +1417,7 @@ static efi_status_t eficonfig_edit_boot_option(u16 *varname, struct eficonfig_bo
}
};
- const struct efi_initrd_dp fdt_prefix = {
+ const struct efi_lo_dp_prefix fdt_prefix = {
.vendor = {
{
DEVICE_PATH_TYPE_MEDIA_DEVICE,
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 0830591..1a191eb 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -684,7 +684,7 @@ struct efi_device_path *create_lo_dp_part(const char *dev, const char *part,
struct efi_device_path *dp = NULL;
const struct efi_device_path *dp_prefix;
efi_status_t ret;
- const struct efi_initrd_dp fdt_dp = {
+ const struct efi_lo_dp_prefix fdt_dp = {
.vendor = {
{
DEVICE_PATH_TYPE_MEDIA_DEVICE,
@@ -699,7 +699,7 @@ struct efi_device_path *create_lo_dp_part(const char *dev, const char *part,
sizeof(fdt_dp.end),
}
};
- const struct efi_initrd_dp initrd_dp = {
+ const struct efi_lo_dp_prefix initrd_dp = {
.vendor = {
{
DEVICE_PATH_TYPE_MEDIA_DEVICE,
diff --git a/include/efi_load_initrd.h b/include/efi_load_initrd.h
index be5d5a7..9feafb1 100644
--- a/include/efi_load_initrd.h
+++ b/include/efi_load_initrd.h
@@ -18,7 +18,17 @@
0xac, 0x74, 0xca, 0x55, 0x52, 0x31, 0xcc, 0x68)
extern const efi_guid_t efi_lf2_initrd_guid;
-struct efi_initrd_dp {
+/**
+ * struct efi_lo_dp_prefix - separator device path used in load options
+ *
+ * We use vendor media device nodes in UEFI load options to separate
+ * the binary, initrd, and fdt device-paths. This structure contains
+ * the vendor media device node and an end node.
+ *
+ * @vendor: vendor media device node
+ * @end: end node
+ */
+struct efi_lo_dp_prefix {
struct efi_device_path_vendor vendor;
struct efi_device_path end;
} __packed;
diff --git a/lib/efi_loader/efi_load_initrd.c b/lib/efi_loader/efi_load_initrd.c
index d911354..2350843 100644
--- a/lib/efi_loader/efi_load_initrd.c
+++ b/lib/efi_loader/efi_load_initrd.c
@@ -24,7 +24,7 @@ static const struct efi_load_file_protocol efi_lf2_protocol = {
* Device path defined by Linux to identify the handle providing the
* EFI_LOAD_FILE2_PROTOCOL used for loading the initial ramdisk.
*/
-static const struct efi_initrd_dp dp_lf2_handle = {
+static const struct efi_lo_dp_prefix dp_lf2_handle = {
.vendor = {
{
DEVICE_PATH_TYPE_MEDIA_DEVICE,
diff --git a/lib/efi_loader/initrddump.c b/lib/efi_loader/initrddump.c
index 0004b6b..6151190 100644
--- a/lib/efi_loader/initrddump.c
+++ b/lib/efi_loader/initrddump.c
@@ -33,7 +33,7 @@ static bool nocolor;
* Device path defined by Linux to identify the handle providing the
* EFI_LOAD_FILE2_PROTOCOL used for loading the initial ramdisk.
*/
-static const struct efi_initrd_dp initrd_dp = {
+static const struct efi_lo_dp_prefix initrd_dp = {
.vendor = {
{
DEVICE_PATH_TYPE_MEDIA_DEVICE,