From nobody Tue Jan 24 22:12:26 2023 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 4P1h6M21Qpz3bfs9; Tue, 24 Jan 2023 22:12:27 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P1h6M1Sspz3CsG; Tue, 24 Jan 2023 22:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iA47WDCT4hfJ2qV3GcgCCmkmZ8eQbYNBEC+Q+QutaqM=; b=RBCrCM3I3eeXTVptdAs65SYrRX8TtqNgqDmZ2zHL03eH1ZuvR8uClPdrHWRnqPiKStbVNk 6JRH7o9mZwWEpxu+70zCI93RZGbHFChWWEW3slx4us+dS09aj9VfzYiWO5bLuKtRdZ+5Ho MRdR13YPGitfKBSUpwNNhDSOBMHCSDXFSOb761K8y/muC8x9+cW0K//JdnwMrzMUC4Djy4 I2cXndF/ti7SARiBbkKJ0iD1EVcTCqlimd4VOlUZu7l+8WHW/05fKeXmWPI1UmLtkeHZQH /yb3b4yoLxbcTiOFoxyDphENEu2cBIwqyOLVIxdP1Hyf0Ezigqm+CI72xoudkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iA47WDCT4hfJ2qV3GcgCCmkmZ8eQbYNBEC+Q+QutaqM=; b=p1hV2F1V1n/xcywPCHFcf23pmU1HuP49f/O62AGFtw1SOK6oL2h6xxgeW/2bQCiOMR00Q1 uqokDs1gazO+MWg2MZCF/UFSKCWHk6rU1iYuBK84jixJGPrAhZ747EI9t99EQnlChTc/Sd ZqhFJz5djsLD2XyXWcO89Neho06lSmaVKE+P3eWA/PCjF0XX6cbRebNXEyr2CQ1MCVx0G2 0wNx8H76XpwnMST0VDdS8FzsLDG15q4/5fYSWmj0QXujVema9gkxOQAy/1f/yBpgAAJoms IS9b0pQe4spS9JpjUlP1vXw025MQMjxPOoSCNJsvgaWJsN8iUvweEDDoddm4OA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598347; a=rsa-sha256; cv=none; b=cNjbnfYBf5QNu/cdkna2Z4v7FrP2027dsmwhknVw3GavBvzkiQ/vOu2P7Buu56rXC2D0dG q8UnlMvuf+rbvQr8csK/CxkZNgCpd+U5U70PfMWNrg9XZ8W1TcLCoYFa9d1FunEiZPXva5 orOg46hBehE8klkovi9UvNK2sr/2qUC4Ywh6ELcdbfrDLwKLyidxtSXB2UwNTj8lwoDoen JYqB0uH29szginHBW7hfVBabrcaBYcavnJavmNzfe/dTjmK/yw054LlCGutTxyEzsl3P0q U/vjAqoXJ9E7IyDpvb/2obOCH+tQD0yMSYUDMmQM8gojzIBYpidwKKYEwJoevw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P1h6M0Pn4zQPb; Tue, 24 Jan 2023 22:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30OMCQKQ087038; Tue, 24 Jan 2023 22:12:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMCQMV087037; Tue, 24 Jan 2023 22:12:26 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:12:26 GMT Message-Id: <202301242212.30OMCQMV087037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: ae04175ec32d - stable/13 - stand/kboot: Add note about why we use MACHINE_ARCH here 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: ae04175ec32d2ae43cfbd49ea143a29c887c7287 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ae04175ec32d2ae43cfbd49ea143a29c887c7287 commit ae04175ec32d2ae43cfbd49ea143a29c887c7287 Author: Warner Losh AuthorDate: 2022-09-04 15:31:51 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:33 +0000 stand/kboot: Add note about why we use MACHINE_ARCH here Normally in the boot loader, we key off of MACHINE since that specifies the kernel and the loader is very tuned to each type of MACHINE in general. In this case, however, we're producing a Linux binary, with Linux system calls encoded in it. These align better along the MACHINE_ARCH axis of FreeBSD. For PowerPC the system calls are radically different for each of our MACHINE_ARCHes, with only powerpc64 and powerpc64le sharing the same numbers and memory layout. The same was true about mips when it was in the tree. 32-bit arm uses the same layout, however, for both armv6 and armv7 ports: that can be easily shared in the unlikely event we support that in the future. Sponsored by: Netflix (cherry picked from commit cc7b630cec8320ad979af6b29cb67027f6a95456) --- stand/kboot/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stand/kboot/Makefile b/stand/kboot/Makefile index c204af8b17e7..518e945a596e 100644 --- a/stand/kboot/Makefile +++ b/stand/kboot/Makefile @@ -35,6 +35,9 @@ CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken .include "${BOOTSRC}/fdt.mk" +# Note: Since we're producing a userland binary, we key off of MACHINE_ARCH +# instead of the more normal MACHINE since the changes between different flavors +# of MACHINE_ARCH are large enough in Linux that it's easier that way. .PATH: ${.CURDIR}/arch/${MACHINE_ARCH} .include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"