From nobody Thu Jan 8 05:29:02 2026 X-Original-To: dev-commits-src-all@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 4dmtk71Gn1z5hpTt for ; Thu, 08 Jan 2026 05:29:03 +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 4dmtk65LvHz3Lyc for ; Thu, 08 Jan 2026 05:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767850142; 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=TzKQUpdGfMVzXDiGLulSgGtmzOJfPJb3kyA4XotYujE=; b=JIef+szX9OCWve288oQaC453Dgkf5rkUi69KL41brYDDLKeszG4rUdnlVMh+P5kAHpWcut CoqHFd+QtdhEdISNh/PlqxtU37FZoZSMA8K6d76Qi407vX3IOacMDSmxlz5xtqGESxt68R sB15sA55b1fQyl6Lxwdav0DIIukX7sPG1Ap5cQ9a7Y7agYZn3lO4DaYsMpxRifh5kz/HzX 3lU3bBBC9kYmZE1mxGOsszpxWvMPq+Hx8jlfVrJ1SPqmLIgXDXgIXL+hmm6P23vi77FFHp XyQAkO7/mXumGcRrnzDrbyEdz0RDVMTnXOWPtYqiXz0GkPme6LbE39vsKbO+ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767850142; 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=TzKQUpdGfMVzXDiGLulSgGtmzOJfPJb3kyA4XotYujE=; b=VznZi9omjg1UJhVi3jEweyRJ1Mgo8+eryOdk8ImdknrIftl8Ylk8/eIFM9I2EYjAMBQe+3 5mXvWY8OZUtSLcIi+aqlWus6ftY6OJjHbGU0KboEj/uBfw4hFEdzKwwoEXS6Jq39BdxagH eeCvoE089jtcjUgjSd7Q5I/w4HvNZmfO0P0t2wJWxEB6Ifz+dOH/9toWMwXsyIdekVXuGX ohJ4J/30XjRKZiHkMXndsKdeaMpFL++/y2jWg2a9BqTqNnWKhmdDfnZkRZqbXEXjCnEYH6 NjrhuF7x/Zqk1yt5Dny/Ef/o4Qg+ZuH8qANLsUPbo/9rPeBYFZa2GeFWmtGKEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767850142; a=rsa-sha256; cv=none; b=PCFe605bLVledHuGgp5QVFX3/QDSy4zhIIMiG2/NG3vr0ByhzPo8buCZBD0E+XL4HNnD08 VDe2jYaqRMrtOYa7IvffGGi2QTVSaa9rfnKyYr2lTcXcgBEuDGSrg94fpNJx+6R9ldhUhQ /dHj0gkX5fF3j3YBBRjxTTbw9gi5RKsB42SHbsJgNaImpxPf30yr5YADTyJykUmZjNDwSk G5iTdetMHwcgHPd2IehyNA01aocQTHUFY1vJ1Vaz5aOhkQG50YbFQTWoxHWDoO7/MadIu7 oO5qum2M9v9W06GvrH8eD70My8hNQGYsZGkxjVGVBnv15JhltYF7QnKhuxXNZw== 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 4dmtk63shbz8vl for ; Thu, 08 Jan 2026 05:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31ec1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 05:29:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jarmo Jaakkola From: Warner Losh Subject: git: d82698ac68c2 - main - loader.efi: Only use SPCR if enabled. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: d82698ac68c23d856716dc9f6524b9ef363d7eba Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 05:29:02 +0000 Message-Id: <695f409e.31ec1.6aa62f46@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d82698ac68c23d856716dc9f6524b9ef363d7eba commit d82698ac68c23d856716dc9f6524b9ef363d7eba Author: Jarmo Jaakkola AuthorDate: 2026-01-08 05:14:56 +0000 Commit: Warner Losh CommitDate: 2026-01-08 05:28:44 +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 --- 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 b731136fca4b..22dbd10a0f37 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -867,10 +867,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 @@ -886,8 +886,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 */