From nobody Fri Sep 20 14:59:17 2024 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 4X9FsL1BK5z5XT8f; Fri, 20 Sep 2024 14:59:18 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X9FsK6sRKz4NT0; Fri, 20 Sep 2024 14:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726844358; 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=WbCyf2RYWMYwxg470oEHlA1zJ8LokzasWRSU1xTefk0=; b=siCoTByLvFdAD4RkJw+0MXgvh6pjA612o+Z9G5aKCI2ls5FXQNJe8oIWpAWs/86jvck2dF 3TAElYFUKfttj+YSXUrOe6wF13qUtPpheCNINBCHkYyzoMWJDBuIoTZB+HkTpAjGt5SMz/ 4ZtMbb0GyWBnYGKgBlLIEQrH/3pzYf6J+Wr+Niu7eS6095R/5rc2VU3gGe4W/vWE4iBedP iS+vBpm/PrrfX9KQJXJohnqDjwQ1o6fGNe4Nnx/U/OOM8DtaWjqv6AQ4HSI2EzXCzNSROp 3ovIs1vAmjFifaHazF1BHZ9gRBUosmFdA+4bh7aAM443/MkyEBcG8c2MZuVEWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726844358; a=rsa-sha256; cv=none; b=PMS3rb0TqRAAmy2CzTv/ZVx0Y8Yq/BFxWv4x+1hpiw1Zk+OZp4Yncklp56QUg56wwepM9k 2s6H4Wr0yjmCQOR0bvy2uPLR7MZcoWl51uCwMSuhzbS6GXtB+0f9ucxH+XyLYO7rDLSX7z tLcYNPhP3ssR+wH8SMZDNnMZ2HiKxlcaO2E6KvksdehCVbWGZT+taUatq3LJQ06AHHs4Da hQn92h0V6au4sBlOWAdA1JXShsHDRNdQ86aIXTblZg1qOSPECLQUiwFKex0+6tzIZCXNKv NDhLk4c0753nt9TJUftpJOfjdPjnwYbyUtGkH9H5xpg9zfQZ1Aa15G/LWvVVnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726844358; 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=WbCyf2RYWMYwxg470oEHlA1zJ8LokzasWRSU1xTefk0=; b=q6QTVJHz3g3wX3R5UHoaP/ER1WIhc3TIWthWeufDme8ZvpUBBzS/2NW61lKScfDKiJU5/a xrsnMMw6P5WO0+tZEiQGqRZN9FbJZ9gm0eoEbQbi6X8zB77PgZatYNrF/vKNlUJ5AQ89qh 6DRVGSHe54iNnMK+ANPotr9YWfB0qGbj/2xJ2YWosXGhmnnyMOdBp94Qstp/oxlRh3DcxX BqB1ox2FUJwr/o+rm7bFtKK1u/fYP3kl/SKpOGIX4SgHZ9nX6iMNej312Q/6ElqLMvjKrO D3GTKJHac1wisVaOf9NpZ3UuJIyxM4nKaqJFMqIXPLQt7teFe30Kr3s+ebfRVw== 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 4X9FsK67kWzv7N; Fri, 20 Sep 2024 14:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48KExHAw046623; Fri, 20 Sep 2024 14:59:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48KExHBL046620; Fri, 20 Sep 2024 14:59:17 GMT (envelope-from git) Date: Fri, 20 Sep 2024 14:59:17 GMT Message-Id: <202409201459.48KExHBL046620@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: f0d5b1bdf075 - main - stand/efi: Add a 32-bit variant of libefi 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: f0d5b1bdf075c68ddb1dcfbc5a0eda0214510b5b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f0d5b1bdf075c68ddb1dcfbc5a0eda0214510b5b commit f0d5b1bdf075c68ddb1dcfbc5a0eda0214510b5b Author: Ahmad Khalifa AuthorDate: 2024-05-14 19:37:13 +0000 Commit: Warner Losh CommitDate: 2024-09-20 14:45:05 +0000 stand/efi: Add a 32-bit variant of libefi In preparation for supporting 64-bit machines with 32-bit UEFI firmware, add a 32-bit variant of libefi since we need to compile both the 64-bit version and the 32-bit version at the same time. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 --- stand/Makefile | 1 + stand/defs.mk | 10 +++++++--- stand/efi/Makefile | 1 + stand/efi/libefi32/Makefile | 4 ++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/stand/Makefile b/stand/Makefile index 225113384b13..ce91802d4a8b 100644 --- a/stand/Makefile +++ b/stand/Makefile @@ -66,6 +66,7 @@ SUBDIR_DEPEND_${MACHINE}+= libofw SUBDIR+=${_x} .if defined(LIB32LIST) && ${LIB32LIST:M${_x}} SUBDIR+=${_x}32 +INTERP_DEPENDS+=${_x}32 .endif .if ${_x} != "libsa" SUBDIR_DEPEND_${_x}+= libsa diff --git a/stand/defs.mk b/stand/defs.mk index bd19c8d8e125..0e84df0f4633 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -40,7 +40,14 @@ WARNS?= 1 BOOTSRC= ${SRCTOP}/stand EFISRC= ${BOOTSRC}/efi EFIINC= ${EFISRC}/include +# For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is +# built 32-bit and some 64-bit (lib*, efi). Centralize all the 32-bit magic here +# and activate it when DO32 is explicitly defined to be 1. +.if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1 +EFIINCMD= ${EFIINC}/i386 +.else EFIINCMD= ${EFIINC}/${MACHINE} +.endif FDTSRC= ${BOOTSRC}/fdt FICLSRC= ${BOOTSRC}/ficl LDRSRC= ${BOOTSRC}/common @@ -130,9 +137,6 @@ CFLAGS+= -m32 -mcpu=powerpc -mbig-endian CFLAGS+= -m32 -mcpu=powerpc -mlittle-endian .endif -# For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is -# build 32-bit and some 64-bit (lib*, efi). Centralize all the 32-bit magic here -# and activate it when DO32 is explicitly defined to be 1. .if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1 CFLAGS+= -m32 # LD_FLAGS is passed directly to ${LD}, not via ${CC}: diff --git a/stand/efi/Makefile b/stand/efi/Makefile index c6ef92b26838..1a9cf68749a1 100644 --- a/stand/efi/Makefile +++ b/stand/efi/Makefile @@ -3,6 +3,7 @@ NO_OBJ=t .include SUBDIR.yes+= libefi +SUBDIR.${MK_LOADER_IA32}+= libefi32 SUBDIR.${MK_FDT}+= fdt SUBDIR.yes+= .WAIT diff --git a/stand/efi/libefi32/Makefile b/stand/efi/libefi32/Makefile new file mode 100644 index 000000000000..779c7e604686 --- /dev/null +++ b/stand/efi/libefi32/Makefile @@ -0,0 +1,4 @@ +DO32=1 + +.PATH: ${.CURDIR}/../libefi +.include "${.CURDIR}/../libefi/Makefile"