From nobody Thu Sep 24 07:01:26 2026 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 4hr4WC2FT4z6thJg for ; Thu, 24 Sep 2026 07:01: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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hr4WC1Xqkz3D3P for ; Thu, 24 Sep 2026 07:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790233287; 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=ZMD3SsgedZuWeqR9VcZfa606zydDSdRtMd0/gt1FEuQ=; b=Zn5uLlyMyDYJh5HOrJA1bVdoFbUJBZ74kwTCkBvgj8mgmzYk4NODsBJ35deq9+7giXO+Z3 KR8qm5Z4xzt7Jyl4uZnxtIHxmrKSDoVylGzwipoAJGKc+o9L2bjneRqPtAWoV/qG1XST1T ZHcxtWlacissqQXKr0ABjQFfaqxhym/fOvJcTu8OcKho848dWannFPbgSGa33xbtdVKlCV CtMXpCZJVcc7dTajiakn+oWAi7JNcBDRX7UVZuJFNqhYJ6FiQS6fC6fXQTR8GwjVtLz6s/ 9ap3fOTWZk4v6B/x0cfgvhTjzK3DrCxUMSTZ0z8hhDFD8V6nqwxdWDZ4vqDdVQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790233287; b=CwcEGZNIrip7n93H0cTE2ugFQe6VFAdgRdEWa9+OuDRr7/0E8FNky65ZItN1xiXhiVuErb C7EFeGszDJjuHJTBBoWiLhMBFxfyrFfIYAlAT0QXzdHEcwWWIo9gNkoAxWB8C0GpNv//Xr MYQCB50gxepVda98g+ybkQTXZkFzBL6EB5RYmETB/a0XHytIbZXxkKD9LQ6oDekbtW5v0C BJM2UIHBhBbkmjr1cziT9cNKcEVN/eb4bordxhE8oipd4NbePAYdxTNAyrZk7bgpuXAVjV NSMHsrpcd9wyKrN56TZQCfBlVK3gGY0WTp7KGz+C4gwlqFueRqBsfTYV7bRrCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790233287; 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=ZMD3SsgedZuWeqR9VcZfa606zydDSdRtMd0/gt1FEuQ=; b=G+bQ8j2rUsNZCZkxfDG9TExP4nBQhE7ik1oc4uscJtlp03831FpY4aTdccudl4CvKH9BVI tPiZfQ/rN7VKv5FshhgRhvENAbiZ/wuG47WaiZ675ZsNJuchrmu4mO8hc9e3N2RHXbMczm Z5MpUZhjPp0Uu0hA8gkGtP3fbMgotMeCpJVLLUi0EF9OTHYRBpuCW8/vsVgTxhjDQGlyOB ILI+vRyHt+D+lfEsLPELUCDG0z7+LYbDmDcl8ejT/W1cnFJzDk7n0coFXEF7w8cJvLD9mr 1MPjJ+6OJC8nXqLAogMdXVTOwqBHtbZV+1C1oKtjqo4ibtHYGlnCm15whlqo3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hr4WB6RDBz1RWd for ; Thu, 24 Sep 2026 07:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22c29 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 24 Sep 2026 07:01:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 85fb40bad584 - main - loader.efi: Use EfiLoaderData memory type for ram disks 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 85fb40bad584e7d8c503e5a99bb81cc2d3cf9fee Auto-Submitted: auto-generated Date: Thu, 24 Sep 2026 07:01:26 +0000 Message-Id: <6ab4cac6.22c29.302aaac8@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=85fb40bad584e7d8c503e5a99bb81cc2d3cf9fee commit 85fb40bad584e7d8c503e5a99bb81cc2d3cf9fee Author: Warner Losh AuthorDate: 2026-09-24 06:48:16 +0000 Commit: Warner Losh CommitDate: 2026-09-24 06:59:42 +0000 loader.efi: Use EfiLoaderData memory type for ram disks For the images we read into the memory, use EfiLoaderData memory type instead of EfiReservedMemoryType. The kernel handles the former properly and won't reallocate it. While the latter isn't necessarily mapped, which can cause ram disks to fault when loaded. memdisk_uefi.efi used the latter type, but also registered the device as an ACPI RAM disk, which we don't do. Fixes: afee781523e45 Sponsored by: Netflix --- stand/efi/loader/decompress.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/decompress.c b/stand/efi/loader/decompress.c index e10daaa423ad..fbf800f87862 100644 --- a/stand/efi/loader/decompress.c +++ b/stand/efi/loader/decompress.c @@ -19,7 +19,14 @@ #define ULL(x) ((unsigned long long)(x)) -static EFI_MEMORY_TYPE mem_type = EfiReservedMemoryType; +/* + * While memdisk_uefi.efi used EfiReservedMemoryType, we need to use + * EfiLoaderData instead, the standard memory type the loader uses to pass + * memory to the kernel. This is also safe if we're chain booting to another efi + * progarm since the memory will be available to that program. The other type + * isn't necessarily in the pmap, so the md driver fails. + */ +static EFI_MEMORY_TYPE mem_type = EfiLoaderData; struct decomp_state {