From nobody Wed Sep 25 19:59:28 2024 X-Original-To: freebsd-current@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 4XDSJ16bYgz5XfLY for ; Wed, 25 Sep 2024 20:00:01 +0000 (UTC) (envelope-from matt@tnpi.net) Received: from mail.theartfarm.com (jails.theartfarm.com [IPv6:2605:ae00:329::2]) (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 (2048 bits) client-digest SHA256) (Client CN "mail.theartfarm.com", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDSJ00qRpz50k4 for ; Wed, 25 Sep 2024 20:00:00 +0000 (UTC) (envelope-from matt@tnpi.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tnpi.net header.s=mar2013 header.b=Wrgr6Zzg; spf=pass (mx1.freebsd.org: domain of matt@tnpi.net designates 2605:ae00:329::2 as permitted sender) smtp.mailfrom=matt@tnpi.net; dmarc=pass (policy=reject) header.from=tnpi.net Received: (Haraka outbound); Wed, 25 Sep 2024 10:59:51 -0900 Received-SPF: Pass (mail.theartfarm.com: domain of tnpi.net designates 2602:61:7e1b:ee00:3d82:3350:4926:bdf8 as permitted sender) receiver=mail.theartfarm.com; identity=mailfrom; client-ip=66.128.51.165 helo=smtpclient.apple; envelope-from= Received-SPF: None (mail.theartfarm.com: domain of smtpclient.apple does not designate 2602:61:7e1b:ee00:3d82:3350:4926:bdf8 as permitted sender) receiver=mail.theartfarm.com; identity=helo; client-ip=2602:61:7e1b:ee00:3d82:3350:4926:bdf8 helo=smtpclient.apple; envelope-from= Received: from smtpclient.apple ([2602:61:7e1b:ee00:3d82:3350:4926:bdf8]) by mail.theartfarm.com (Haraka/3.0.3) with ESMTPSA id 7D1B2768-A522-4523-A8A5-037D4438B4D1.1 envelope-from tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (authenticated bits=0); Wed, 25 Sep 2024 10:59:50 -0900 From: Matt Simerson Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: UEFI + SOL / COM ports = boot hang Date: Wed, 25 Sep 2024 12:59:28 -0700 References: <5FA60E35-C839-468F-A4E3-710FD4DEFAC8@tnpi.net> To: freebsd-current@freebsd.org In-Reply-To: <5FA60E35-C839-468F-A4E3-710FD4DEFAC8@tnpi.net> Message-Id: <8E7B326A-1459-459A-AD9D-EF261D847F69@tnpi.net> X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Status: No, score=-1.0 required=5.0 autolearn=no autolearn_force=no X-Spam-DCC: wuwien: dcc 1290; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on spamassassin X-Spam-Tests: ALL_TRUSTED,BAYES_40,SPF_HELO_NONE,SPF_PASS X-Haraka-Karma: score: 26, history: 0, awards: 086,133,162,100,182, pass:relaying, fail:rcpt_to X-Haraka-ASN: 209 X-Haraka-ASN-Org: CENTURYLINK-US-LEGACY-QWEST X-Haraka-GeoIP: NA, US, WA, Burien, 2676km X-Haraka-GeoIP-Received: 2602:61:7e1b:ee00:3d82:3350:4926:bdf8:US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tnpi.net; s=mar2013; h=from:subject:date:message-id:to:mime-version; bh=1ioRUnGgTfVDuHFWAC/Q2vpuvbkANXfLORoW0ClLIvo=; b=Wrgr6ZzgpL9lpki4VAvB98nKWPpTXCjO0GnsXaU5p77wYqfx1oNjHim3D5lf92InrZXpLkol8T UtTud0YlVQa7mNyzbWmK3+Mq3d5uCsMvYyxI+7U8pxBMKgGHgrefn1gRSX2aXTDNWwM4lJ/QbsGC bQX5tcVZaCh7wjqyVDxSB2NE3Y5GufKBwyVqtX6SChskaWIm5YX6BDJlHiNaR0nuOBgFF/zS0R7w ZYZjwnOD585RRpTb0a75MJO/lVwMdfQnEx40Tvr+K+CcGbNWOq5V4GYqlpLO+N1ut95rylG75bpI R04b7ToKjXlJgg/NydGp4df/pK0bCn5Y8Y9hrTeQ== X-Spamd-Result: default: False [-3.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[tnpi.net,reject]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[tnpi.net:s=mar2013]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[text/plain]; DKIM_TRACE(0.00)[tnpi.net:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:7819, ipnet:2605:ae00::/35, country:US]; ARC_NA(0.00)[]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEFALL_USER(0.00)[matt]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+] X-Rspamd-Queue-Id: 4XDSJ00qRpz50k4 X-Spamd-Bar: --- The default state of this server is that FreeBSD hangs when booting off = UEFI and the COM ports are enabled. That seems to be because console = includes or adds "efi" by default. Under every circumstance I've tested, = when console contains "efi", the server hangs at the same point shown in = the first message. The workaround I've found is setting: console=3D"comconsole" FreeBSD assumes that COM 1 is serial, which likely fails to initialize = and so with only that setting, the video console remains primary. When = that happens, I get no Beastie boot menu on either console. Since the = server is now bootable with COM ports, I can tell the kernel where to = find the serial port: # without the next 2 lines, the serial console isn't found and the video = console remains primary comconsole_port=3D"0x2F8" comconsole_speed=3D"115200" And now it boots, I get the Beastie menu on the serial console, and = later the FreeBSD kernel reports: Dual Console: Serial Primary, Video Secondary Changing the settings in BIOS related to console redirection seem not to = matter much at all. Pretty much any combination of settings works. This isn't perfect. The UEFI video console is certainly nicer, and I'd = prefer to have it be primary and serial be secondary. But I cannot = include 'efi' in loader.conf console setting while the COM ports are = enabled else FreeBSD hangs. The contents of the EFI variable ConOut with console ports disabled: # efivar -p -d 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut : = PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/AcpiAdr(0x80010100) With console ports enabled and console=3D"comconsole": # efivar -p -d 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut : = PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/AcpiAdr(0x80010100),/= PciRoot(0x0)/Pci(0x1f,0x0)/Serial(0x0)/Uart(115200,8,N,1)/UartFlowCtrl(Har= dware)/VenUtf8(),/PciRoot(0x0)/Pci(0x1f,0x0)/Serial(0x1)/Uart(115200,8,N,1= )/UartFlowCtrl(Hardware)/VenUtf8() =46rom dmesg: EFI framebuffer information: addr, size 0x9c000000, 0x300000 dimensions 1024 x 768 stride 1024 masks 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 .... VT(efifb): resolution 1024x768 ... vgapci0: port 0x2000-0x207f mem = 0x9c000000-0x9cffffff,0x9d000000-0x9d01ffff irq 16 at device 0.0 = numa-domain 0 on pci2 vgapci0: Boot video device I was hoping that setting hw.uart.console=3D"io:0x2f8,br:115200" in = loader.conf would help, but the server still hangs if 'efi' is included = in the console list. Messing with hint.uart.N as suggested in = https://wiki.freebsd.org/SerialConsole didn't help, I'm guessing that's = because those settings aren't used by loader.efi. Any ideas or pointers for other settings which may enable the EFI = console to be primary while also having a serial console? Thanks, Matt > On Sep 23, 2024, at 3:22=E2=80=AFPM, Matt Simerson = wrote: >=20 > I have a Quanta D52B-1U server. When I boot it via legacy BIOS, there = is no issue. When I boot with UEFI and COM ports & console redirection = disabled, there is no issue. However, when boot UEFI and enable the COM = ports and/or console redirection, the server hangs at boot time right = here: >=20 > Version 2.20.1276. Copyright (C) 2023 American Megatrends, Inc.BIOS = Date: 12/04/2023 17:24:26 Ver: 3B28.Q102=20 > Consoles: EFI console > Reading loader env vars from /efi/freebsd/loader.env > Setting currdev to disk0p1: > FreeBSD/amd64 EFI loader, Revision 1.1 >=20 > Command line arguments: loader.efi > Image base: 0x5e993000 > EFI version: 2.70 > EFI Firmware: American Megatrends (rev 5.14) > Console: efi (0x20000000) > Load Path: \EFI\FREEBSD\LOADER.EFI > Load Device: = PciRoot(0x9)/Pci(0x0,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-01-30-54-9D-E4-D2-5C)/H= D(1,GPT,F669D424-7170-11EF-83D1-A0369F6BA978,0x28,0x82000) > BootCurrent: 0000 > BootOrder: 0000[*] 0003 0006 0007 0002 0008 > BootInfo Path: = HD(1,GPT,F669D424-7170-11EF-83D1-A0369F6BA978,0x28,0x82000)/\EFI\FREEBSD\L= OADER.EFI > Ignoring Boot0000: Only one DP found > Trying ESP: = PciRoot(0x9)/Pci(0x0,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-01-30-54-9D-E4-D2-5C)/H= D(1,GPT,F669D424-7170-11EF-83D1-A0369F6BA978,0x28,0x82000) > Setting currdev to disk0p1: > Trying: = PciRoot(0x9)/Pci(0x0,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-01-30-54-9D-E4-D2-5C)/H= D(2,GPT,4F537B49-7176-11EF-83D1-A0369F6BA978,0x82028,0x1000000) > Setting currdev to disk0p2: > Trying: = PciRoot(0x9)/Pci(0x0,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-01-30-54-9D-E4-D2-5C)/H= D(3,GPT,B6D8B384-7176-11EFLoading /boot/defaults/loader.conf86860) > Loading /boot/defaults/loader.confdefault: > Loading /boot/device.hints > Loading /boot/loader.conf > Loading /boot/loader.conf.local > | >=20 > On one occasion, I left it setting there for minutes. >=20 > I currently have FreeBSD 14.1 installed and I also replicated this = when booting off a FreeBSD 15.0-CURRENT ISO.=20 >=20 > The chipset is Intel C621 & C624. Output from dmesg is here. >=20 > BIOS settings which enable console redirection and SOL are: >=20 > Super IO > Port 0, Disabled or Enabled (IO=3D3F8h, IRQ=3D4) > Port 1, Enabled (IO=3D2F8h, IRQ=3D3) <-- SOL port > Serial Port Console Redirection > COM0 > Console Redirection, Port is Disabled > SOL > Console Redirection, [Enabled] > Console Redirection Settings, (VT100, 115200, None) > Legacy Console Redirection Settings > Redirection COM Port: SOL (other option: COM0) > Serial Port for OOB Management/Windows EMS > Console Redirection: Enabled > Console Redirection Settings, Out-of-Band Mgmt Port: SOL (other = option: COM0) > Console Redirection Settings, (VT100, 115200, None) >=20 > There are variations on those settings which work for getting BIOS = POST messages and the FreeBSD loader messages redirected to the IPMI SOL = port. However, any combination that works also causes FreeBSD to hang = at exactly the same spot. >=20 > I'm accustomed to adding a few lines to loader.conf to tell FreeBSD = how to direct console output, but nothing added there makes any = difference. I've twiddled the hint.uart.* knobs in /boot/device.hints to = no avail. >=20 > This is what works on my Dell R630: >=20 > # console port via IPMI & DRAC > boot_multicons=3D"YES" > boot_serial=3D"YES" > console=3D"efi,comconsole" > # for legacy BIOS > #console=3D"comconsole,vidconsole" > comconsole_speed=3D"115200" >=20 > How does one go about troubleshooting this? >=20 > Matt