From nobody Thu Aug 11 17:01:50 2022 X-Original-To: dev-commits-src-main@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 4M3Y4p5zQrz4Z2Z2 for ; Thu, 11 Aug 2022 17:02:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) (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 4M3Y4p111Kz43J5 for ; Thu, 11 Aug 2022 17:02:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe35.google.com with SMTP id 125so18867194vsd.5 for ; Thu, 11 Aug 2022 10:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=4idOrjpIJBZ+gjsi3abnfIK4qHKeiOQV9DIR88S695M=; b=xquu+PGGPzI20IKrRb/SGnwsP5eAPcvFitZ4m1PCRyC/+EjF9Gos5K+i2dqXK20ex6 2qgrmtVLWuAOCRQSfj5k7/2q1ttFf7ADdZx3ZHOTQ2X1X01ODObCg6NCOyrrrzNBZd6R O32mGcFVlMHq/XH9vNTu+HcbwHReoxzSZR494WLqhkyxbWQSWK4SgIpdWnOqiQZ1BMZc dbRLdvxSPU7BYcgYot0231wSDRN4QHN93CG/3+CP2ZGdhGsTOE+Rs5MHqnZRgH+7Jx80 msDGg0W+e8Jp6IWo2jfr0owmpZfkzdfwgMLjeLZ8fvUTY35biVAVTXqsI6EcVYAVvXTb HBQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=4idOrjpIJBZ+gjsi3abnfIK4qHKeiOQV9DIR88S695M=; b=SyPJcpGfas85eI5cCqnNtp06BTUPM8jwcAiRDdknAvsovvr52jAVQBmQzs3WaQZg6s 0g9r5pyZ0OLRwVWTqlPhH+j1bMPkPUiKN0X2FijdwPmLuOIbE0HBsF3Y//xNqCTybWEm ZpFrM+9DyLYdHX4bcmu4fybEc9i4y8V8uCrjpEF0C/P+UUGh+Q3dusrtBUH+xYKbEYz1 R285H8tZ8x+QAc94uHt5BhNyr7COX2oViJacYF8hFmgrDDMRd4x7X64PmnTxQsRwpApc 7NMhOSm+aue13Uw1+z9k7lNeQRy2JqACdL2qteM3EhU9ZzchFwJDH6GHPMcu1y16ZG8R 1TzA== X-Gm-Message-State: ACgBeo1kemiQY2FzoHPsWH6n2CVAyy2G+7Sf2nU1FswdWOe8LU/O2m65 6ZaRVwlb/FkubScYXjK40+EJA/HC/zsDnuUSFsHz3YT/XqI= X-Google-Smtp-Source: AA6agR4kNxeUo9/4NAaLW3cn+rEhf74oq7br1BdeU9AEL68oL1DKszcsTSxbkdfYJAVF3hpvfCQU22dlOtkrK+tBdc0= X-Received: by 2002:a67:fdce:0:b0:388:485c:889c with SMTP id l14-20020a67fdce000000b00388485c889cmr13626092vsq.38.1660237321060; Thu, 11 Aug 2022 10:02:01 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202208110331.27B3VZj9007311@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 11 Aug 2022 11:01:50 -0600 Message-ID: Subject: Re: git: e2295b911723 - main - stand: i386/amd64: Always use elf format for /boot/loader and pxeldr To: John Baldwin Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000c3dbbd05e5fa1f24" X-Rspamd-Queue-Id: 4M3Y4p111Kz43J5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=xquu+PGG; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::e35) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e35:from]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; DMARC_NA(0.00)[bsdimp.com]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] X-ThisMailContainsUnwantedMimeParts: N --000000000000c3dbbd05e5fa1f24 Content-Type: text/plain; charset="UTF-8" Hey John, On Thu, Aug 11, 2022 at 10:44 AM John Baldwin wrote: > On 8/10/22 8:31 PM, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=e2295b9117233d8248fe919c6b28ef1d44a8950d > > > > commit e2295b9117233d8248fe919c6b28ef1d44a8950d > > Author: Warner Losh > > AuthorDate: 2022-08-11 03:18:32 +0000 > > Commit: Warner Losh > > CommitDate: 2022-08-11 03:28:22 +0000 > > > > stand: i386/amd64: Always use elf format for /boot/loader and pxeldr > > > > The first level boot blocks have understood how to load ELF code > since > > 1999. Switch /boot/loader and /boot/pxeldr over to being ELF format > so > > that in-tree tools can examine them more closely. In addition, one > > could, in theory, now have a 'lo-mem' and a 'hi-mem' segment > (though a > > lot of work would need to be done with bounce buffers, btx, code > segment > > marking, etc for an arrangement like that to work). > > > > As far as I can tell, this is the last a.out binary in the tree. > There > > are several raw binaries left, but everything else is ELF. > > Unfortunately not all of our boot blocks are ready for this. > > pxeboot consists of pxldr.S glued in front of a /boot/loader binary and > pxeldr.S > assumes an a.out header which it parses to know how large /boot/loader is > how > to relocate it and it's nested BTX kernel. > OK. I'll have to revert this and this size change then. I'll take your suggestion from IRC and move the size check against loader.bin and reduce the limit by 3,000 or so bytes. I should have checked this... > Similarly, cdboot.S used for booting of ISO images reads /boot/loader > directly > off of an ISO and also assumes an a.out header for /boot/loader. > Yea, I'd thought cdboot.S was pc98 only, but I see that's incorrect. Warner --000000000000c3dbbd05e5fa1f24 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey John,

On Thu, Aug 11, 2022 at 10:4= 4 AM John Baldwin <jhb@freebsd.org> wrote:
On = 8/10/22 8:31 PM, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL:
https://= cgit.FreeBSD.org/src/commit/?id=3De2295b9117233d8248fe919c6b28ef1d44a8950d<= /a>
>
> commit e2295b9117233d8248fe919c6b28ef1d44a8950d
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2022-08-11 03:18:32 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2022-08-11 03:28:22 +0000
>
>=C2=A0 =C2=A0 =C2=A0 stand: i386/amd64: Always use elf format for /boot= /loader and pxeldr
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 The first level boot blocks have understood how to= load ELF code since
>=C2=A0 =C2=A0 =C2=A0 1999. Switch /boot/loader and /boot/pxeldr over to= being ELF format so
>=C2=A0 =C2=A0 =C2=A0 that in-tree tools can examine them more closely. = In addition, one
>=C2=A0 =C2=A0 =C2=A0 could, in theory, now have a 'lo-mem' and = a 'hi-mem' segment (though a
>=C2=A0 =C2=A0 =C2=A0 lot of work would need to be done with bounce buff= ers, btx, code segment
>=C2=A0 =C2=A0 =C2=A0 marking, etc for an arrangement like that to work)= .
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 As far as I can tell, this is the last a.out binar= y in the tree. There
>=C2=A0 =C2=A0 =C2=A0 are several raw binaries left, but everything else= is ELF.

Unfortunately not all of our boot blocks are ready for this.

pxeboot consists of pxldr.S glued in front of a /boot/loader binary and pxe= ldr.S
assumes an a.out header which it parses to know how large /boot/loader is h= ow
to relocate it and it's nested BTX kernel.
--000000000000c3dbbd05e5fa1f24--