From nobody Tue Jan 13 17:48:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4drGtZ0M98z6NTMw for ; Tue, 13 Jan 2026 17:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4drGtY64rwz3pjQ for ; Tue, 13 Jan 2026 17:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768326485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QLlKdDhdzXxveF80pnXY61b86fhGvc/4pCdrcDtKf8E=; b=RBWErOCXoXQw5wx0XEkBw9PTvy1f3vmQzlsI7HjJMoIYkWBZLgq2YinJcOLs/z7Hv6H2tX 7YV+1B4BNB2mWNpWHy6Aqf/qpp5XgWdHU5c7PS4clEaMhtnrJ46zqlFJABy598KCvHAoc7 Jhn816X7JPz3E3WlXVKaImzCePKC0shV5wxCUsuTaQP1QgZ+hjPde7OehLEYbYn/dPZihP sQPNhbj8CIurdZIY/wZqwCm6MXEGg/3q+UQbBNRNXPnkX16l5l7uqg/Brud9Dn8FEBefb+ pUAWxGGUZtHDg6tGmA4CsFxEGP0F8GGGpnIEkyZh0GFfmvnUw3A6L/8tWbIl1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768326485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QLlKdDhdzXxveF80pnXY61b86fhGvc/4pCdrcDtKf8E=; b=swnLKBKEjPxUHIk4RMc1+xdLZag0EeiWXdaGCcnRp713Cl0BEjgHoy907756QD71drhDVI okMP9e0hrNhPUWli0PolqFROZUJRFkWvq/1K8QivyxvpQs1c5VDApMS4looIG5uza7VyRi oJqj7FHZFdwHOhvEAKlpjMB/4Mvi3BbgPR5sejPNMPhlSzZDmUdPmMIJnICI4kVdk56Mhy 5QbS11TReqGAYX9jwZCKFIDtGLzdz6h9TdC35cVFcL095V7CraHZ4ESLK/2z/N40LqGbTq 4xp0hNwJ96sscr/JaHyj9J/yHDscxfL7XvJOaHOuaXHQyPYJdiWFUoq+dpcgHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768326485; a=rsa-sha256; cv=none; b=ZmjVGwqLd9YZVIR5WA88yzilpXkd0gVye9NCM3nJ+0naVsEvLjh76vPLIVzeAsU17sCgrU g3LPpRYmaNxqmWZNWhqjl5NoE3TkYWnTmdtb0ldP+Mymxfvrd4y22dviWnPW5f/vfn6zcX EqmTx2PAC4k25pUIWew38SOYEyyRnuW8NwodD4thCsDYGdf6eU3RLGMYBXqYzsf6M0SQvO 40PU3dKjg0V6KX997Zk4b9KJz8MM/hPEt36VqJu558fRLUguPseyOI7lV5AuPj1Re4Velc xueq3BHA9Hu+I1ft//BpVsxJNRON6TrHaBFIYgfmI2ZNwE9RHAaLAZBZHc8EOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4drGtY5PGbz6vD for ; Tue, 13 Jan 2026 17:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3795d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 13 Jan 2026 17:48:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jarmo Jaakkola From: Warner Losh Subject: git: 34c94bee0cee - stable/15 - loader.efi: Only use SPCR if enabled. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 34c94bee0cee0cbf67e14d47809acc751fca8da5 Auto-Submitted: auto-generated Date: Tue, 13 Jan 2026 17:48:05 +0000 Message-Id: <69668555.3795d.7e64eee1@gitrepo.freebsd.org> The branch stable/15 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=34c94bee0cee0cbf67e14d47809acc751fca8da5 commit 34c94bee0cee0cbf67e14d47809acc751fca8da5 Author: Jarmo Jaakkola AuthorDate: 2026-01-08 05:14:56 +0000 Commit: Warner Losh CommitDate: 2026-01-13 17:30:21 +0000 loader.efi: Only use SPCR if enabled. SerialPort in the SPCR is zeroed when serial redirection is disabled, rather than the SPCR being omitted from the ACPI tables ony many systems. Check to see that SerialPort.Address is non-zero before using. FreeBSD would fail to boot on systems that could have a serial port redireciton, but don't have it enabled because the loader would create a bogus hw.uart.console. While one could unset this value to boot, you couldn't do that automatically very easily. Instead, don't even look at the SPCR table if the SerialPort is zero'd. PR: 292206 MFC After: 3 days Sponsored by: Netflix Co-authored-by: Warner Losh Closes: https://github.com/freebsd/freebsd-src/pull/1948 (cherry picked from commit d82698ac68c23d856716dc9f6524b9ef363d7eba) --- stand/efi/loader/main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 436676368447..607d765a3245 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -850,10 +850,10 @@ acpi_uart_parity(UINT8 p) } /* - * See if we can find a SPCR ACPI table in the static tables. If so, then it - * describes the serial console that's been redirected to, so we know that at - * least there's a serial console. this is most important for embedded systems - * that don't have traidtional PC serial ports. + * See if we can find an enabled SPCR ACPI table in the static tables. If so, + * then it describes the serial console that's been redirected to, so we know + * that at least there's a serial console. This is most important for embedded + * systems that don't have traidtional PC serial ports. * * All the two letter variables in this function correspond to their usage in * the uart(4) console string. We use io == -1 to select between I/O ports and @@ -869,8 +869,12 @@ check_acpi_spcr(void) const char *dt, *pa; char *val = NULL; + /* + * The SPCR is enabled when SerialPort is non-zero. Address being zero + * should suffice to see if it's disabled. + */ spcr = acpi_find_table(ACPI_SIG_SPCR); - if (spcr == NULL) + if (spcr == NULL || spcr->SerialPort.Address == 0) return (0); dt = acpi_uart_type(spcr->InterfaceType); if (dt == NULL) { /* Kernel can't use unknown types */