From patchwork Thu Feb 12 00:13:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1826 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1770855276; bh=tMM0+UBs/ZGnkmTdliP12xOqGnSMeRg376a6jDBxVWw=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DYm/aWUA07X7U8bUoAkSqL9363uvcPbSUbS+dMMQsmqfyayfJA36+NdnTiqVDdiO8 5JZgTnzGSnbUzpzYWvDO7eVLRzuCGIZ+dCBUWTXFgMbHOgpPN1QTG965m6FpRW5UWf vwFBKBSrlZn2lknILti3MdCj+0y796g0u7MD2r4dQxGrT0ckle6v16jqFiakKWH2tU dF7EdsKhXw0soTcaw0QhxVNqK7y+Uv+NvLWg576A28kyq5zYBE6yMBFW9yzcrJgbX5 zrQ8t3/Jaf5cDHu505gfHPUHcWASKNnpGOVgHH+WNT4VLqNPVIhMCqMlQI3nqTh/Tj msAxdxMUPeGBg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DE3BB69A9E for ; Wed, 11 Feb 2026 17:14:36 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id cMvAEcIKXGB2 for ; Wed, 11 Feb 2026 17:14:36 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1770855274; bh=tMM0+UBs/ZGnkmTdliP12xOqGnSMeRg376a6jDBxVWw=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=M6Pnh8IAQFbND5y+gkxjfrmMpY+s5YUHlkDo8Jhf6j6/yNTJodNt/y6UrSnRSqxj8 GcxqYTQP7Aeh2EL4nH1jhX5Lnl8RTm2s+X+8Zi85+6gE6YfuK3fc4hNkbS8yae9InF 8jjDotpIGJoL6NpgeDmukVLQLMxxR9CB6RIVKm9DHkJs2gN3K+k4GQezeJ35ZCrgTA dJw3pzcD6G+CW346HzGPvTaQCp3pEAySwo3sNk3OafwNX5y5NeOt1WRB8yvji3ixnA Yi9h7tTTobL0jXlM4yrr8toiRGPxHmKB/IwD0SszLDCtaH7JBYQuvuG2+t5vYLcYH/ yEreUdL6ZpWvw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E07F669A88 for ; Wed, 11 Feb 2026 17:14:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1770855271; bh=TjsAhvwguOAESKRcPw5gE/mvORkNOcPP2PuSU7Zbamg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r/nlZ1XDSP8IevvMqju/pXUKVWlaDJ1DDD9kpSATXydb/iRYn5Noh74lZ5POTUraS 6CTmrBGCN7pfJ7hFIDEbDCaqlI+dWe7xaWVGCniwDXiWpiohb3K9AZkBfRtPQuYGzu M/plxNJmAkzaz2SygdcsTTvMhfBpH7m40tFygURN5n7QIzAZboZA0DrEyqVRtm1uls bBC4B43Uc0gsQf1NMjo83TSqbmG8c1002YAxenqEXshX2p8rLpbMGIshMgHPwtUYf6 KU67HBx/MZekH/5FqW+VFnebjylZPE3DBg1rPhZqjHpwmSPF1lhCOxOzHzXXQyHS7y DFHHWzJqxt4zA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D0B5969A88; Wed, 11 Feb 2026 17:14:31 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 4mxt8DJvWZkN; Wed, 11 Feb 2026 17:14:31 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1770855270; bh=UWm9QYuo61abosHEwqHFPg3/mzklH/PuHqjdu5sI3rI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sJrj8qv3jOmltKmVGGkQn3N0LYKeaH3rnVcNYu1pLihABqN8a7PXMzxEqcFiPKucA U7INeAvFHxGn6dzUvQpSPE4pSLz9JubNoVDMM5exA/+IR99z1qaZDPXLEt6nHpwYdI 1GqJzeujlgjIdVk4ma1rQ5A/tas7NEMxowi+qZWOyu70zwjf7y2BFxPWoA67yJlmK9 IymhEFkpLXhGOzX0oLP3W5yP6zkXKzGMMiy/AunjXLB3jN26tBKBcEO9wwA2TSEbPi xktSy+v7qvzHTZEPdfAh8pBUTgZBDPTw9TfWrNcXuRXdQktfRd7G21jVpKEpMMW+2A RWyr5S2Hpuw0A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 59F0069A93; Wed, 11 Feb 2026 17:14:30 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 11 Feb 2026 17:13:54 -0700 Message-ID: <20260212001410.1919749-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260212001410.1919749-1-sjg@u-boot.org> References: <20260212001410.1919749-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 5ERDIZSMN545PTAY6H6NLBYJKI7NTCZL X-Message-ID-Hash: 5ERDIZSMN545PTAY6H6NLBYJKI7NTCZL X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , "Claude Opus 4 . 6" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 03/15] riscv: Disable OF_BOARD_FIXUP for EFI applications List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The OF_BOARD_FIXUP event handler riscv_fdt_copy_resv_mem_node() tries to expand the FDT in place by 1 KiB to copy reserved-memory nodes from the firmware device tree. For EFI applications the FDT is embedded with no extra space, so fdt_open_into() fails and causes a crash. Disable OF_BOARD_FIXUP for EFI_APP builds. The EFI application does not need to copy firmware reserved-memory nodes since it runs on top of the UEFI firmware which manages its own memory map. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 3434dd0e169..378a974f06c 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -500,7 +500,7 @@ config STACK_SIZE_SHIFT default 14 config OF_BOARD_FIXUP - default y if OF_SEPARATE && RISCV_SMODE + default y if OF_SEPARATE && RISCV_SMODE && !EFI_APP menu "Use assembly optimized implementation of memory routines"