From patchwork Sat Feb 14 02:13:03 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1869 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=1771035254; bh=uIRMcZXtuu1ZzPI8E2m1DyZYCEAka/WmNi9Fx7BqflU=; 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=DE8FncXrt6BJY6XkRqMPuXl+QSXJn5Sk5fewpzKnrAJZbAGJu68MrmoXIzKJA5GbJ NbpZQ4wFU+/6S0TkirVJn8PJD72gxfxL41gg/zSpoD4tT8FmzxRVVwg91kAdwsszlX /GhBFJJTJ34RsgCOldTpIwzLGd8X0QRBOdR0Ne7D5LKHTmKi56Hn2wIVeQYsPWmqtH 10EFrSMja9LmjxUWxJRtx+fe4kOabIwc6buVIAcLJLqeW0Abp6ILX9o+IyZQawomOQ GY1UAKUs2TBB5zUkwNaTDCmfbWd5eG5XwY/RSWepYm6Sd279uUfjx6h2+7O09EsW3O W1NIeibEggwDA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2A2D469B5B for ; Fri, 13 Feb 2026 19:14:14 -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 6-3dMHuLUKtG for ; Fri, 13 Feb 2026 19:14:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771035254; bh=uIRMcZXtuu1ZzPI8E2m1DyZYCEAka/WmNi9Fx7BqflU=; 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=DE8FncXrt6BJY6XkRqMPuXl+QSXJn5Sk5fewpzKnrAJZbAGJu68MrmoXIzKJA5GbJ NbpZQ4wFU+/6S0TkirVJn8PJD72gxfxL41gg/zSpoD4tT8FmzxRVVwg91kAdwsszlX /GhBFJJTJ34RsgCOldTpIwzLGd8X0QRBOdR0Ne7D5LKHTmKi56Hn2wIVeQYsPWmqtH 10EFrSMja9LmjxUWxJRtx+fe4kOabIwc6buVIAcLJLqeW0Abp6ILX9o+IyZQawomOQ GY1UAKUs2TBB5zUkwNaTDCmfbWd5eG5XwY/RSWepYm6Sd279uUfjx6h2+7O09EsW3O W1NIeibEggwDA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1923569B58 for ; Fri, 13 Feb 2026 19:14:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771035252; bh=Hj7NiSlPwo7QNmTjSKJ5C45NZSO344y6B6fqBeUyfQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nJPr6L6nozsCZMdO9y8bYpVmga3IVtZB908lm+cD/APxVQ/vSDfi8xNecwZuBVHNe FhrNmb2QqQ6/Pp4RApFZtLy+c0KnqiRfXKJdsHRKQt49LW62M/+qBTA66y4eZr4eam jzzNZzgHmvTHDOPF+/KwEaFgLDmN/2W4SVoajo8/HEKsjmEN7dA7NRh5a10Wy/4xZL lTPfczJu1d+B+gbMYBlf/Cz8uUYPYWDEDSnQ/k1uRX3UgqvYk7hHjWFUJayyGFLIKy CpeOtRoQYlZthKp9bCYd/RZySMirm0v8QmPUWzjToe/8DCLj+s6WKRI5stcvradDaa gwGJBFP6UTzQQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 808B369B56; Fri, 13 Feb 2026 19:14:12 -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 D5-D6z1595F8; Fri, 13 Feb 2026 19:14:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771035248; bh=IJYwtbozy190/a0KuMSRoawJzn1FTyXDr74DRv8+uPc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YsJMi5hWzcyJVtbiNfB3F/pTnOnlrCQdgi3u3XTLdi6KZkIfV6UtpM3Dc8dqxBTVr CYP+rATqODJvE6Q2Cp9MkABQzSSHolCm5PrLN5AO2z2hgGC0uoLvl3TxPNxIMMNqTW +mgeDpxJnPMQRRbJT0+oDhc2LmhmJh7+xSP+d44Gte0vyWRSzjv1Jnvuoxr05iYS57 0wNQxeh41Zr1W/r1QSiaikeS1r5E3uUzaxi6OE8AXe+M4k+QRmN3kF3FA2jSqYubda 3UPEqSAMCDyZ1yAPk/tm/W2EfEXMMugEmjVmnAUPr3wqwxKsXRD0pkASc9TBGHvjva 65+uXY2Cfth+w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 37DD369A69; Fri, 13 Feb 2026 19:14:08 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 19:13:03 -0700 Message-ID: <20260214021317.816170-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260214021317.816170-1-sjg@u-boot.org> References: <20260214021317.816170-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: KNBES3IDYX3TWWDPA4UNFM4MMYAJHWQJ X-Message-ID-Hash: KNBES3IDYX3TWWDPA4UNFM4MMYAJHWQJ 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: Simon Glass , "Claude Opus 4 . 6" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 09/13] x86: binman: Extract common ROM entries into a template 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 x86 ROM image (u-boot.rom) contains a set of entries that are common to all x86 boards: the start16/reset16 vectors and image-header. These are currently inlined in the &rom node, making them hard to reuse. Add a 'binman' label to the binman node and use it to add a rom_common template containing these shared entries. The &rom node then pulls them in with insert-template, so board-specific dtsi files can also reference the template. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- arch/x86/dts/u-boot.dtsi | 66 ++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/arch/x86/dts/u-boot.dtsi b/arch/x86/dts/u-boot.dtsi index c26b855edc9..630f85db31a 100644 --- a/arch/x86/dts/u-boot.dtsi +++ b/arch/x86/dts/u-boot.dtsi @@ -7,7 +7,7 @@ #include / { - binman { + binman: binman { multiple-images; rom: rom { }; @@ -15,12 +15,43 @@ }; #ifdef CONFIG_ROM_SIZE +&binman { + rom_common: template { + end-at-4gb; + sort-by-offset; + pad-byte = <0xff>; + size = ; +#ifdef CONFIG_TPL + x86-start16-tpl { + offset = ; + }; + x86-reset16-tpl { + offset = ; + }; +#elif defined(CONFIG_SPL) + x86-start16-spl { + offset = ; + }; + x86-reset16-spl { + offset = ; + }; +#else + x86-start16 { + offset = ; + }; + x86-reset16 { + offset = ; + }; +#endif + image-header { + location = "end"; + }; + }; +}; + &rom { filename = "u-boot.rom"; - end-at-4gb; - sort-by-offset; - pad-byte = <0xff>; - size = ; + insert-template = <&rom_common>; #ifdef CONFIG_HAVE_INTEL_ME intel-descriptor { filename = CONFIG_FLASH_DESCRIPTOR_FILE; @@ -163,30 +194,5 @@ offset = ; }; #endif -#ifdef CONFIG_TPL - x86-start16-tpl { - offset = ; - }; - x86-reset16-tpl { - offset = ; - }; -#elif defined(CONFIG_SPL) - x86-start16-spl { - offset = ; - }; - x86-reset16-spl { - offset = ; - }; -#else - x86-start16 { - offset = ; - }; - x86-reset16 { - offset = ; - }; -#endif - image-header { - location = "end"; - }; }; #endif