From: Trammell Hudson <hudson@trmm.net>
To: xen-devel@lists.xenproject.org
Cc: roger.pau@citrix.com, jbeulich@suse.com,
andrew.cooper3@citrix.com, wl@xen.org
Subject: [PATCH v4 2/4] efi/boot.c: add handle_file_info()
Date: Mon, 14 Sep 2020 07:50:11 -0400 [thread overview]
Message-ID: <20200914115013.814079-3-hudson@trmm.net> (raw)
In-Reply-To: <20200914115013.814079-1-hudson@trmm.net>
Add a separate function to display the address ranges used by
the files and call `efi_arch_handle_module()` on the modules.
Signed-off-by: Trammell Hudson <hudson@trmm.net>
---
xen/common/efi/boot.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 7156139174..57df89cacb 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -539,6 +539,22 @@ static char * __init split_string(char *s)
return NULL;
}
+static void __init handle_file_info(CHAR16 *name,
+ struct file *file, char *options)
+{
+ if ( file == &cfg )
+ return;
+
+ PrintStr(name);
+ PrintStr(L": ");
+ DisplayUint(file->addr, 2 * sizeof(file->addr));
+ PrintStr(L"-");
+ DisplayUint(file->addr + file->size, 2 * sizeof(file->addr));
+ PrintStr(newline);
+
+ efi_arch_handle_module(file, name, options);
+}
+
static bool __init read_file(EFI_FILE_HANDLE dir_handle, CHAR16 *name,
struct file *file, char *options)
{
@@ -583,16 +599,7 @@ static bool __init read_file(EFI_FILE_HANDLE dir_handle, CHAR16 *name,
else
{
file->size = size;
- if ( file != &cfg )
- {
- PrintStr(name);
- PrintStr(L": ");
- DisplayUint(file->addr, 2 * sizeof(file->addr));
- PrintStr(L"-");
- DisplayUint(file->addr + size, 2 * sizeof(file->addr));
- PrintStr(newline);
- efi_arch_handle_module(file, name, options);
- }
+ handle_file_info(name, file, options);
ret = FileHandle->Read(FileHandle, &file->size, file->ptr);
if ( !EFI_ERROR(ret) && file->size != size )
--
2.25.1
next prev parent reply other threads:[~2020-09-14 11:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 11:50 [PATCH v4 0/4] efi: Unified Xen hypervisor/kernel/initrd images Trammell Hudson
2020-09-14 11:50 ` [PATCH v4 1/4] efi/boot.c: add file.need_to_free Trammell Hudson
2020-09-16 6:43 ` Roger Pau Monné
2020-09-17 11:06 ` Jan Beulich
2020-09-14 11:50 ` Trammell Hudson [this message]
2020-09-16 6:46 ` [PATCH v4 2/4] efi/boot.c: add handle_file_info() Roger Pau Monné
2020-09-17 11:29 ` Jan Beulich
2020-09-14 11:50 ` [PATCH v4 3/4] efi: Enable booting unified hypervisor/kernel/initrd images Trammell Hudson
2020-09-16 7:32 ` Roger Pau Monné
2020-09-16 8:37 ` Trammell Hudson
2020-09-16 9:47 ` Jan Beulich
2020-09-16 10:15 ` Roger Pau Monné
2020-09-17 12:33 ` Jan Beulich
2020-09-17 13:04 ` Trammell Hudson
2020-09-17 13:33 ` Trammell Hudson
2020-09-17 15:10 ` Jan Beulich
2020-09-17 15:21 ` Jan Beulich
2020-09-14 11:50 ` [PATCH v4 4/4] efi: Do not use command line if secure boot is enabled Trammell Hudson
2020-09-16 7:45 ` Roger Pau Monné
2020-09-16 8:50 ` Trammell Hudson
2020-09-16 9:57 ` Jan Beulich
2020-09-17 12:51 ` Jan Beulich
2020-09-17 14:05 ` Trammell Hudson
2020-09-17 15:26 ` Jan Beulich
2020-09-17 15:45 ` Trammell Hudson
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=20200914115013.814079-3-hudson@trmm.net \
--to=hudson@trmm.net \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.