Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 2021 14:26:48 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c8db60c0673d - main - Split out the loader efifb setup to a new function
Message-ID:  <202103031426.123EQmU4082875@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=c8db60c0673d4bb7a3a3e2c043804e1ed1108c2f

commit c8db60c0673d4bb7a3a3e2c043804e1ed1108c2f
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2021-02-26 11:47:34 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2021-03-03 14:18:02 +0000

    Split out the loader efifb setup to a new function
    
    This makes bi_load_efi_data cleaner to add common acpi setup code.
    
    Reviewed by:    imp, tsoome
    Sponsored by:   Innovate UK
    Differential Revision:  https://reviews.freebsd.org/D28936
---
 stand/efi/loader/bootinfo.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c
index 9924901d29e6..327751e32f0b 100644
--- a/stand/efi/loader/bootinfo.c
+++ b/stand/efi/loader/bootinfo.c
@@ -299,6 +299,9 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs)
 	bool do_vmap;
 
 #if defined(__amd64__) || defined(__aarch64__)
+static void
+bi_load_efifb(struct preloaded_file *kfp)
+{
 	struct efi_fb efifb;
 
 	efifb.fb_addr = gfx_state.tg_fb.fb_addr;
@@ -321,6 +324,25 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs)
 
 	if (efifb.fb_addr != 0)
 		file_addmetadata(kfp, MODINFOMD_EFI_FB, sizeof(efifb), &efifb);
+}
+#endif
+
+static int
+bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs)
+{
+	EFI_MEMORY_DESCRIPTOR *mm;
+	EFI_PHYSICAL_ADDRESS addr = 0;
+	EFI_STATUS status;
+	const char *efi_novmap;
+	size_t efisz;
+	UINTN efi_mapkey;
+	UINTN dsz, pages, retry, sz;
+	UINT32 mmver;
+	struct efi_map_header *efihdr;
+	bool do_vmap;
+
+#if defined(__amd64__) || defined(__aarch64__)
+	bi_load_efifb(kfp);
 #endif
 
 	do_vmap = true;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103031426.123EQmU4082875>