From nobody Sun Sep 04 15:39:10 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 4MLG671CStz4c1lh; Sun, 4 Sep 2022 15:39:11 +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 4MLG670gXsz3p0n; Sun, 4 Sep 2022 15:39:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662305951; 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=ClKuy6mlymcynyN4tqWtziZC1R6cN8zeQef5ZO9XLjQ=; b=Nsiew1w/FwH0KkJaVsNKM+uPXe/Nsh/dRinGEWsRhdiETFNMnxXBKM3dvlnJT7KDTa0Xqy rxVmR+naOR4pDZ6cJ8PLOB4GyM8YKP9AzZdFwL2jgFAmt4neyv49ZwYLem8tFmIK0of3+H wD8pc+GO8jOR/owxT87CDjsqQLnK7YvshosHsAn7ZRITfmQ78DcFBVzXNBk4T1SKQiuWnp 63QsI/Zu44JQ2wtFRlViTlZ73IVo8nwqXRlSgN+4hjFw6D+x4rltMHtyoM9G8zn/GUlnp5 abORMh8aDtmZ0Uyc3pm0oUw2UiF+4vILT/37go+bPjpGDjE35ujW70hta35p9Q== 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 4MLG666rB4zXZY; Sun, 4 Sep 2022 15:39:10 +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 284FdAEb061984; Sun, 4 Sep 2022 15:39:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 284FdAc3061983; Sun, 4 Sep 2022 15:39:10 GMT (envelope-from git) Date: Sun, 4 Sep 2022 15:39:10 GMT Message-Id: <202209041539.284FdAc3061983@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: cc7b630cec83 - main - stand/kboot: Add note about why we use MACHINE_ARCH here 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 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: cc7b630cec8320ad979af6b29cb67027f6a95456 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662305951; 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=ClKuy6mlymcynyN4tqWtziZC1R6cN8zeQef5ZO9XLjQ=; b=Nvk2l4VJkXZTdNYwbf+gUlGAACKY1ZzrjeJOO33wPXYg/VKcAIG9ApBiNOZEvHhhpMygVV 1ckWIT+PbTCv4oUrkJOLiNnxaTXhM3hUfuwZXj66juZp9/B8LktcKaD+R76/eRsj5Iq+gD J314So0VeA81BCfnT/G/lGPlJImguTJKE7E/VYgGrn/+/Jjwlcw99SKw5brhzIfQXGiFgu kCcwkDvi5z3nDimpiVwSaKkaL0dUGwLOuRLjSfolMd2KzQv4WI+cK8/5IfWW9uwox2+a6T vFAt9EoJcSBKuulQnYCO9oprrph52EBAugAgqrD+4T878+1ns6ChNabqzViXAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662305951; a=rsa-sha256; cv=none; b=P4CF2+vvhX4rUVb3yez0Eye/mVe51HyUiw4FzawSauFUaDlI+jM+QZhS84MXOMJsJ1dNq8 53OmVWVw61t9orf2n3lXpBBwSX6tXqNu+UgWcQE9hfToppAhJwhwJxPGfBRMH2H+gtnscp y9gU3CbeOH79j4jTbrSS4ByMnunPZsZddmWaaveh7hHHshDAQO+LcqZMk9GjNmYfONcy9P Up3gSipKS7Op8pjimtuTDBUMjqMZs0wUHPJyP5STQnHqOu1s//DbStKifPKLMZxYxguVm/ QAQDeSiEKIJMMD+1bRZPU+3jvyl15GGN4gZedGhY6rvZTUIxA8xqtkJC9CR9sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cc7b630cec8320ad979af6b29cb67027f6a95456 commit cc7b630cec8320ad979af6b29cb67027f6a95456 Author: Warner Losh AuthorDate: 2022-09-04 15:31:51 +0000 Commit: Warner Losh CommitDate: 2022-09-04 15:37:42 +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 --- 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"