From nobody Tue May 31 23:05:41 2022 X-Original-To: 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 E3D3F1B6C563 for ; Tue, 31 May 2022 23:05:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LCSYs1tkDz4WK0 for ; Tue, 31 May 2022 23:05:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe33.google.com with SMTP id h4so15104855vsr.13 for ; Tue, 31 May 2022 16:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NfGYbuNdwnHy5o2IqsTPfUKVtOPBZES6k660Vo07+ko=; b=M4K4AjgUhMVh3g0exba/wMQ680xh828by0rnysqN4cAXCTZLpiMF+jOL4rEzf8Vr41 D/alp3P5eseEomV4/5t0a8XeeY4lVFGIcFd/zAPHj0RHiB1gSssrJT5Rs/31Y7mp+Zl5 1ht1FWLX43/7HNH42sSu1Dinli1cFj6q2DMk2N4dLKOk0RNof9TdJCVlUTJvLSQE0K9p BJj+Usj53+UvCzznj+MKE1jVrDaKWl9beJ+gsqA+J/T3WtCl0tHy3hPWVR27uXfUjuob TI8V4dcZj6J5S2QexG0rrJRtUMW+6+TI8d4svw0yxzSPhm6TefzZR5Q2KvPZby7iCx1u i2UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NfGYbuNdwnHy5o2IqsTPfUKVtOPBZES6k660Vo07+ko=; b=xlFxmHt5BmkeRiWHzNi0PjHwWt2jdsnxlAd/pPzAPPnwfW0Y08VRFVcaiA12iyHtyP 8wLWMCUhs7LBm+TqoeeRDDbvnjrKrofsK25UiZiUflQL2oCsc2GH4kQm5lLiWqYqTzZO Ntf7l1oOioEQwj++/rql/CBDFCzaO5k471K1HLi3LrzuZ2vr8fvyxsc8E3daNBMKMxQz +Uwn8qt/CVHRlhTwGqMqxGRRBiq6t55rwiPcBdST56s5TqMaRFLbvc69jBjXXxltPlyV 6IBuXbw5L+40kUXeewPIiDP0pXEm8ez3KNtrcNRzIXtJ9UBWyaPzjgTlOyrCBznejYcy aExA== X-Gm-Message-State: AOAM531Qyq35R4isvBnQZ55B5Tya6SjRnMQzj1xYYQfVdFUot5mWadzd tPRbt70ObT1ITcaJBWOt+eURrBVCpiUBboppjZ8g23vVA/vSXw== X-Google-Smtp-Source: ABdhPJx+bgH6Qna1Wst9EFWtfQP9+PHQV3iXgfL4DAoOqSOEmWCCxBjtVK3ueOb/OlU5dUehjyT55CbjR++KIitmDcI= X-Received: by 2002:a05:6102:38d4:b0:337:a198:2fe9 with SMTP id k20-20020a05610238d400b00337a1982fe9mr20196760vst.83.1654038352715; Tue, 31 May 2022 16:05:52 -0700 (PDT) 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 References: <7BEE44CC-4D31-4CBC-BC12-9A327424299C@me.com> <20220530223432.D91C518F@slippy.cwsent.com> In-Reply-To: From: Warner Losh Date: Tue, 31 May 2022 17:05:41 -0600 Message-ID: Subject: Re: Loader can't find /boot/ua/loader.lua on UFS after main-n255828-18054d0220c To: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Cc: FreeBSD Current Content-Type: multipart/alternative; boundary="0000000000007573af05e056d04a" X-Rspamd-Queue-Id: 4LCSYs1tkDz4WK0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=M4K4AjgU; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::e33) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e33:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[current]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --0000000000007573af05e056d04a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 31, 2022 at 3:55 PM Olivier Cochard-Labb=C3=A9 wrote: > Same problem here: > - I'm building FreeBSD head on a builder machine, and NFS mounting its > /usr/src and /usr/obj to 4 others > > Results: > - 2 of them, UEFI+ZFS machines works great ((Thinkpad T420 and AMD Epyc > with Tyan motherboard) > - 2 of them, BIOS+UFS machines meet this "can't find /boot/ua/loader.lua" > (HP microserver and PC Engines APU2) > > I had to boot from an USB stick, mounting the system partition and "cp > boot/loader_4th.old boot/loader". > Kirk found that the boot loader defines MAXPHYS to be 128k, which only is for the BIOS loader since it's 32-bit. UEFI is 64-bits and just works because it's define to 1MB. So the UEFI machines with ZFS are doubly safe. Kirk has a change that relaxes the check and I think we should do this diff --git a/sys/sys/param.h b/sys/sys/param.h index 1f720ed31142..8cd9616e872e 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -176,7 +176,7 @@ #define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */ #endif #ifndef MAXPHYS /* max raw I/O transfer size */ -#ifdef __ILP32__ +#if defined(__ILP32__) && !defined(_STANDALONE) /* Always 1M for loader */ #define MAXPHYS (128 * 1024) #else #define MAXPHYS (1024 * 1024) as well to ensure that the loader always assumes a larger MAXPHYS (though I'd kinda like the loader to not define it at all, but that is a longer conversation after reflection not a quick fix to get people back up and running). Warner --0000000000007573af05e056d04a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, May 31, 2022 at 3:55 PM Olivi= er Cochard-Labb=C3=A9 <olivier@fr= eebsd.org> wrote:
Same problem here:
<= div>- I'm building FreeBSD head on a builder machine, and NFS mounting = its /usr/src and /usr/obj to 4 others

Results:
- 2 of them, UEFI+ZFS machines works great ((Thinkpad T420 and AMD E= pyc with Tyan motherboard)
- 2 of them, BIOS+UFS machines meet th= is "can't find /boot/ua/loader.lua" (HP microserver and PC En= gines APU2)

I had to boot from an USB stick, mount= ing the system partition and "cp boot/loader_4th.old boot/loader"= .

Kirk found that the boo= t loader defines MAXPHYS to be 128k, which only is for the BIOS loader sinc= e it's 32-bit. UEFI
is 64-bits and just works because it'= s define to 1MB. So the UEFI machines with ZFS are doubly safe. Kirk has a = change
that relaxes the check and I think we should do this
=

diff --git a/sys/sys/param.h b/sys/sys/param.h
index= 1f720ed31142..8cd9616e872e 100644
--- a/sys/sys/param.h
+++ b/sys/sy= s/param.h
@@ -176,7 +176,7 @@
=C2=A0#define DFLTPHYS =C2=A0 =C2=A0 = =C2=A0 (64 * 1024) =C2=A0 =C2=A0 /* default max raw I/O transfer size */=C2=A0#endif
=C2=A0#ifndef MAXPHYS =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0/* max raw I/O transfer size */
-#ifdef __ILP32__
+#if defined(__I= LP32__) && !defined(_STANDALONE) /* Always 1M for loader */
=C2= =A0#define MAXPHYS =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(= 128 * 1024)
=C2=A0#else
=C2=A0#define MAXPHYS =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(1024 * 1024)

as well to ensure that the loader always assumes a larger MAXPHYS (though= I'd kinda like the loader to not
define it at all, but that = is a longer conversation after reflection not a quick fix to get people bac= k up and
running).

Warner
--0000000000007573af05e056d04a--