git: 03de11635be1 - stable/14 - loader: Font module is EFI dependent

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 16 Apr 2024 20:12:35 UTC
The branch stable/14 has been updated by imp:

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

commit 03de11635be102d0ccfe7e81b550873d319e5a87
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-02-02 01:37:12 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-04-16 19:54:22 +0000

    loader: Font module is EFI dependent
    
    The font module is part of the gfx_fb support. Since we share this file
    between EFI and kboot, we only want to pass the font data to the kernel
    when we're booting from EFI, not kboot.
    
    Sponsored by:           Netflix
    
    (cherry picked from commit 784f925e507f441206279a1e8776629fa7cdd14c)
---
 stand/efi/loader/bootinfo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c
index f47d81e23591..13b6df9c5b06 100644
--- a/stand/efi/loader/bootinfo.c
+++ b/stand/efi/loader/bootinfo.c
@@ -386,10 +386,12 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs)
 	/* Pad to a page boundary. */
 	addr = roundup(addr, PAGE_SIZE);
 
+#ifdef EFI
 	addr = build_font_module(addr);
 
 	/* Pad to a page boundary. */
 	addr = roundup(addr, PAGE_SIZE);
+#endif
 
 	/* Copy our environment. */
 	envp = addr;