From: Rob Clark <robdclark@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 06/12] efi_loader: start fleshing out efi_device_path_utilities
Date: Sun, 10 Sep 2017 09:22:27 -0400 [thread overview]
Message-ID: <20170910132236.14318-7-robdclark@gmail.com> (raw)
In-Reply-To: <20170910132236.14318-1-robdclark@gmail.com>
Not complete, but enough for Shell.efi and SCT.efi.
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
lib/efi_loader/efi_device_path_utilities.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/lib/efi_loader/efi_device_path_utilities.c b/lib/efi_loader/efi_device_path_utilities.c
index 4b97080f35..37b539e8ff 100644
--- a/lib/efi_loader/efi_device_path_utilities.c
+++ b/lib/efi_loader/efi_device_path_utilities.c
@@ -12,36 +12,40 @@
const efi_guid_t efi_guid_device_path_utilities_protocol =
EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID;
-static UINTN get_device_path_size(const struct efi_device_path *device_path)
+static UINTN EFIAPI get_device_path_size(const struct efi_device_path *device_path)
{
+ UINTN sz = 0;
EFI_ENTRY("%p", device_path);
- return EFI_EXIT(0);
+ /* size includes the END node: */
+ if (device_path)
+ sz = efi_dp_size(device_path) + sizeof(struct efi_device_path);
+ return EFI_EXIT(sz);
}
-static struct efi_device_path *duplicate_device_path(
+static struct efi_device_path * EFIAPI duplicate_device_path(
const struct efi_device_path *device_path)
{
EFI_ENTRY("%p", device_path);
- return EFI_EXIT(NULL);
+ return EFI_EXIT(efi_dp_dup(device_path));
}
-static struct efi_device_path *append_device_path(
+static struct efi_device_path * EFIAPI append_device_path(
const struct efi_device_path *src1,
const struct efi_device_path *src2)
{
EFI_ENTRY("%p, %p", src1, src2);
- return EFI_EXIT(NULL);
+ return EFI_EXIT(efi_dp_append(src1, src2));
}
-static struct efi_device_path *append_device_node(
+static struct efi_device_path * EFIAPI append_device_node(
const struct efi_device_path *device_path,
const struct efi_device_path *device_node)
{
EFI_ENTRY("%p, %p", device_path, device_node);
- return EFI_EXIT(NULL);
+ return EFI_EXIT(efi_dp_append_node(device_path, device_node));
}
-static struct efi_device_path *append_device_path_instance(
+static struct efi_device_path * EFIAPI append_device_path_instance(
const struct efi_device_path *device_path,
const struct efi_device_path *device_path_instance)
{
@@ -49,7 +53,7 @@ static struct efi_device_path *append_device_path_instance(
return EFI_EXIT(NULL);
}
-static struct efi_device_path *get_next_device_path_instance(
+static struct efi_device_path * EFIAPI get_next_device_path_instance(
struct efi_device_path **device_path_instance,
UINTN *device_path_instance_size)
{
@@ -57,14 +61,14 @@ static struct efi_device_path *get_next_device_path_instance(
return EFI_EXIT(NULL);
}
-static struct efi_device_path *create_device_node(
+static struct efi_device_path * EFIAPI create_device_node(
uint8_t node_type, uint8_t node_sub_type, uint16_t node_length)
{
EFI_ENTRY("%u, %u, %u", node_type, node_sub_type, node_length);
return EFI_EXIT(NULL);
}
-static bool is_device_path_multi_instance(
+static bool EFIAPI is_device_path_multi_instance(
const struct efi_device_path *device_path)
{
EFI_ENTRY("%p", device_path);
--
2.13.5
next prev parent reply other threads:[~2017-09-10 13:22 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-10 13:22 [U-Boot] [PATCH v1 00/12] efi_loader+video: support for Shell.efi Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 01/12] efi_loader: add stub EFI_DEVICE_PATH_UTILITIES_PROTOCOL Rob Clark
2017-10-04 17:13 ` Heinrich Schuchardt
2017-10-04 17:29 ` Heinrich Schuchardt
2017-10-04 18:00 ` Heinrich Schuchardt
2017-09-10 13:22 ` [U-Boot] [PATCH v1 02/12] efi_loader: add stub HII protocols Rob Clark
2017-10-04 17:45 ` Heinrich Schuchardt
2017-10-04 17:59 ` Heinrich Schuchardt
2017-09-10 13:22 ` [U-Boot] [PATCH v1 03/12] efi_loader: add EFI_UNICODE_COLLATION_PROTOCOL stub Rob Clark
2017-10-04 17:57 ` Heinrich Schuchardt
2017-10-04 18:35 ` Rob Clark
2017-10-04 18:57 ` Heinrich Schuchardt
2017-10-04 19:02 ` Heinrich Schuchardt
2017-10-04 19:01 ` Peter Jones
2017-09-10 13:22 ` [U-Boot] [PATCH v1 04/12] efi_loader: start fleshing out HII Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 05/12] efi_loader: flesh out unicode protocol Rob Clark
2017-09-10 13:22 ` Rob Clark [this message]
2017-09-10 13:22 ` [U-Boot] [PATCH v1 07/12] efi_loader: SIMPLE_TEXT_INPUT_EX plus wire up objects properly Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 08/12] efi_loader: console support for color attributes Rob Clark
2017-10-04 18:53 ` Heinrich Schuchardt
2017-10-04 20:54 ` Rob Clark
2017-10-04 22:01 ` Heinrich Schuchardt
2017-10-04 23:19 ` Rob Clark
2017-10-04 23:53 ` Heinrich Schuchardt
2017-10-05 0:00 ` Rob Clark
2017-10-05 0:12 ` Rob Clark
2017-10-05 0:33 ` Heinrich Schuchardt
2017-09-10 13:22 ` [U-Boot] [PATCH v1 09/12] dm: video: Fix cache flushes Rob Clark
2017-10-04 19:29 ` Heinrich Schuchardt
2017-09-10 13:22 ` [U-Boot] [PATCH v1 10/12] dm: video: Add basic ANSI escape sequence support Rob Clark
2017-09-12 12:30 ` Simon Glass
2017-09-12 13:06 ` Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 11/12] dm: video: Add color " Rob Clark
2017-09-10 13:22 ` [U-Boot] [PATCH v1 12/12] HACK: efi_loader: hacks for SCT Rob Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170910132236.14318-7-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox