FreeBSD Bugzilla – Attachment 275337 Details for
Bug 299090
loader.efi: hw.uart.console in loader.conf is replaced by the SPCR value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] loader.efi: Don't replace a hw.uart.console set by the user
0001-loader.efi-Don-t-replace-a-hw.uart.console-set-by-th.patch (text/plain), 1.48 KB, created by
Rick Richard
on 2026-10-03 11:57:30 UTC
(
hide
)
Description:
[PATCH] loader.efi: Don't replace a hw.uart.console set by the user
Filename:
MIME Type:
Creator:
Rick Richard
Created:
2026-10-03 11:57:30 UTC
Size:
1.48 KB
patch
obsolete
>From 6e41e504b2b66ab3446f3ff0c7fe029aa1b0bc32 Mon Sep 17 00:00:00 2001 >From: Rick Richard <rick@sloservers.com> >Date: Sat, 3 Oct 2026 09:00:00 -0700 >Subject: [PATCH] loader.efi: Don't replace a hw.uart.console set by the user > >check_acpi_spcr() sets hw.uart.console from the SPCR table every time >it runs, and parse_uefi_con_out() runs again whenever the console mode >is updated. loader.lua runs efi-autoresizecons right after reading >loader.conf, so a hw.uart.console from loader.conf is replaced by the >SPCR value before boot. > >Leave an existing value alone, as the x86 code in bootinfo.c already >does. > >Fixes: 70253b538f68 ("loader.efi: Parse SPCR table entry in ACPI tables") >MFC after: 1 week >Signed-off-by: Rick Richard <rick@sloservers.com> >--- > stand/efi/loader/main.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c >index bfb221e..03fa2dd 100644 >--- a/stand/efi/loader/main.c >+++ b/stand/efi/loader/main.c >@@ -974,6 +974,14 @@ check_acpi_spcr(void) > spcr = acpi_find_table(ACPI_SIG_SPCR); > if (spcr == NULL || spcr->SerialPort.Address == 0) > return (0); >+ >+ /* >+ * We're called again whenever the console mode changes, after >+ * loader.conf has been read. Don't replace the user's setting. >+ */ >+ if (getenv("hw.uart.console") != NULL) >+ return (RB_SERIAL); >+ > dt = acpi_uart_type(spcr->InterfaceType); > if (dt == NULL) { /* Kernel can't use unknown types */ > printf("UART Type %d not known\n", spcr->InterfaceType); >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 299090
: 275337