Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2193720/?format=api
{ "id": 2193720, "url": "http://patchwork.ozlabs.org/api/patches/2193720/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260205234158.3768337-1-trini@konsulko.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260205234158.3768337-1-trini@konsulko.com>", "list_archive_url": null, "date": "2026-02-05T23:41:58", "name": "[v2] arm: spl: Ensure 8 byte alignment of appended DTB without separate BSS", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "beeff95e0e788656e70733ceda320304d76b8a69", "submitter": { "id": 65875, "url": "http://patchwork.ozlabs.org/api/people/65875/?format=api", "name": "Tom Rini", "email": "trini@konsulko.com" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260205234158.3768337-1-trini@konsulko.com/mbox/", "series": [ { "id": 491220, "url": "http://patchwork.ozlabs.org/api/series/491220/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=491220", "date": "2026-02-05T23:41:58", "name": "[v2] arm: spl: Ensure 8 byte alignment of appended DTB without separate BSS", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/491220/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2193720/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2193720/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256\n header.s=google header.b=KdF+kYlL;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=konsulko.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=konsulko.com header.i=@konsulko.com\n header.b=\"KdF+kYlL\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=konsulko.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=trini@konsulko.com" ], "Received": [ "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f6YfW1qqRz1xvh\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 06 Feb 2026 10:42:10 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id BF90F8382A;\n\tFri, 6 Feb 2026 00:42:06 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 43546838FA; Fri, 6 Feb 2026 00:42:05 +0100 (CET)", "from mail-oi1-x229.google.com (mail-oi1-x229.google.com\n [IPv6:2607:f8b0:4864:20::229])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id A74DD800AE\n for <u-boot@lists.denx.de>; Fri, 6 Feb 2026 00:42:01 +0100 (CET)", "by mail-oi1-x229.google.com with SMTP id\n 5614622812f47-45c93313721so1028700b6e.2\n for <u-boot@lists.denx.de>; Thu, 05 Feb 2026 15:42:01 -0800 (PST)", "from bill-the-cat.. (fixed-189-203-103-235.totalplay.net.\n [189.203.103.235]) by smtp.gmail.com with ESMTPSA id\n 5614622812f47-462fe9a12d0sm291048b6e.1.2026.02.05.15.41.58\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 05 Feb 2026 15:41:59 -0800 (PST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=konsulko.com; s=google; t=1770334920; x=1770939720; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=5iUXu8bv0lTWHLjdMVLhsOJLXzO7RHxzCt7+pJ5vMc8=;\n b=KdF+kYlLrLfhwx9N9P5t+AN1gfll5zQWowkgnIhSLRUB7vSKk28LVP2L6EIdDaBbTI\n Xf0IsYJ5CMaRbUyYsI3Han3rWbhGdu+Db+bNTUATAYYXS5zsDk9C5hSOOobqoJhknYiM\n lx/k/0UxgOTWctPr1GpgCZoRzYCdaO9s9xQA8=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770334920; x=1770939720;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date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vzcDryJBY0JTBPKtzk60aT6djvuRUJtmvUYaGAHxnmNeoADJPHp0H\n glNIchzHzb549HyPE0i8XllCJITcEbqiShA3O/vwg==", "X-Received": "by 2002:a05:6808:13cb:b0:459:9630:3739 with SMTP id\n 5614622812f47-462fcb51059mr573497b6e.18.1770334920052;\n Thu, 05 Feb 2026 15:42:00 -0800 (PST)", "From": "Tom Rini <trini@konsulko.com>", "To": "u-boot@lists.denx.de", "Cc": "Brian Sune <briansune@gmail.com>, Phil Phil Sutter <phil@nwl.cc>,\n Richard Henderson <richard.henderson@linaro.org>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Marek Vasut <marek.vasut+renesas@mailbox.org>,\n Nobuhiro Iwamatsu <iwamatsu@nigauri.org>,\n Nathan Barrett-Morrison <nathan.morrison@timesys.com>,\n Greg Malysa <malysagreg@gmail.com>, Ian Roberts <ian.roberts@timesys.com>,\n Vasileios Bimpikas <vasileios.bimpikas@analog.com>,\n Utsav Agarwal <utsav.agarwal@analog.com>,\n Arturs Artamonovs <arturs.artamonovs@analog.com>, adsp-linux@analog.com", "Subject": "[PATCH v2] arm: spl: Ensure 8 byte alignment of appended DTB without\n separate BSS", "Date": "Thu, 5 Feb 2026 17:41:58 -0600", "Message-ID": "<20260205234158.3768337-1-trini@konsulko.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260130183635.2612933-1-trini@konsulko.com>", "References": "<20260130183635.2612933-1-trini@konsulko.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "Historically, when we have an appended device tree and also our\nresulting binary will contain the BSS section, we have ensured that\neverything will be where it's expected to be by declaring that the BSS\nis overlayed with a symbol matches the end of the port of the ELF binary\nthat is objcopy'd to the binary we concatenate with. This in turn means\nthat the logic to generate a \"pad\" file, which is the size found in the\n__bss_size symbol, will be correct and then we can concatenate the\ndevice tree and it will begin at __bss_size at run time.\n\nWith commit 5ffc1dcc26d3 (\"arm: Remove rel.dyn from SPL linker scripts\")\nwe removed this overlay as part of trying to ensure that we met both the\nrequirements of the device tree to be 8 byte aligned as well as that our\nlogic to generate the -pad file would match what ended up in the\nresulting binary. While it was correct to remove an unused section it\ndid not solve ultimately solve the problem for all cases.\n\nTo really fix the problem, we need to do two things. First, our final\nsection prior to _image_binary_end must be 8 byte aligned (for the case\nof having a separate BSS and so our appended DTB exists at this\nlocation). This cannot be '.binman_sym_table' as it may be empty, and in\nturn the ELF type would be NOBITS and so not copied with objcopy. The\n__u_boot_list section will never be empty, so it is our final section,\nand ends with a '. = ALIGN(8)' statement. Second, as this is the end of\nour copied data it is safe to declare that the BSS starts here, so use\nthe OVERLAY keyword to place the BSS here.\n\nFixes: 5ffc1dcc26d3 (\"arm: Remove rel.dyn from SPL linker scripts\")\nReported-by: Brian Sune <briansune@gmail.com>\nReported-by: Phil Phil Sutter <phil@nwl.cc>\nSigned-off-by: Tom Rini <trini@konsulko.com>\n---\nCc: Richard Henderson <richard.henderson@linaro.org>\nCc: Ilias Apalodimas <ilias.apalodimas@linaro.org>\nCc: Marek Vasut <marek.vasut+renesas@mailbox.org>\nCc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>\nCc: Nathan Barrett-Morrison <nathan.morrison@timesys.com>\nCc: Greg Malysa <malysagreg@gmail.com>\nCc: Ian Roberts <ian.roberts@timesys.com>\nCc: Vasileios Bimpikas <vasileios.bimpikas@analog.com>\nCc: Utsav Agarwal <utsav.agarwal@analog.com>\nCc: Arturs Artamonovs <arturs.artamonovs@analog.com>\nCc: adsp-linux@analog.com\n\nSo, first, with the exception of:\naxm brppt2 imx28_btt3 imx28_xea mk808 taurus work_92105\nall platforms using arch/arm/cpu/u-boot-spl.lds do NOT enable\nCONFIG_SPL_SEPARATE_BSS. And of those, only brppt2 enables SPL_OF_REAL.\nAs an aside, I'm thinking that there is room for a clean-up / merger of\narch/arm/cpu/u-boot-spl.lds and arch/arm/mach-omap2/u-boot-spl.lds\n(*widely* used outside of mach-omap2). But for this patch, that one case\nis handled correctly, with the first change I explained. All other 32bit\nplatforms are handled with the second.\n\nWhich means second, 64bit ARM platforms. With the exception of:\nsocfpga_agilex7m socfpga_n5x_atf socfpga_n5x_vab socfpga_stratix10_atf\nall ARM64 SPL_FRAMEWORK using platforms use the\narch/arm/cpu/armv8/u-boot-spl.lds explicitly. These other ones set\nCONFIG_SPL_LDSCRIPT to a non-existant file and then fall back to using\narch/arm/cpu/armv8/u-boot-spl.lds. There are only 4 platforms which\ndon't use a separate BSS section and so could trip up the above as well:\nr8a779g0_whitehawk r8a779g3_sparrowhawk sc598-som-ezkit-spl sc598-som-ezlite-spl\nI have inspected the Renesas platforms manually, and I'm a little unsure\nhow this case works on the two sc598 platforms.\n---\n arch/arm/cpu/armv8/u-boot-spl.lds | 15 ++++++++-------\n arch/arm/cpu/u-boot-spl.lds | 12 ++++++------\n 2 files changed, 14 insertions(+), 13 deletions(-)", "diff": "diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds\nindex b732133ce76d..39020a1fddde 100644\n--- a/arch/arm/cpu/armv8/u-boot-spl.lds\n+++ b/arch/arm/cpu/armv8/u-boot-spl.lds\n@@ -49,12 +49,6 @@ SECTIONS\n \t} >.sram\n #endif\n \n-\t__u_boot_list : {\n-\t\t. = ALIGN(8);\n-\t\tKEEP(*(SORT(__u_boot_list*)));\n-\t\t. = ALIGN(8);\n-\t} >.sram\n-\n \t.binman_sym_table : {\n \t\t. = ALIGN(8);\n \t\t__binman_sym_start = .;\n@@ -63,6 +57,12 @@ SECTIONS\n \t\t. = ALIGN(8);\n \t} > .sram\n \n+\t__u_boot_list : {\n+\t\t. = ALIGN(8);\n+\t\tKEEP(*(SORT(__u_boot_list*)));\n+\t\t. = ALIGN(8);\n+\t} >.sram\n+\n \t__image_copy_end = .;\n \t_end = .;\n \t_image_binary_end = .;\n@@ -75,7 +75,7 @@ SECTIONS\n \t\t__bss_end = .;\n \t} >.sdram\n #else\n-\t.bss (NOLOAD) : {\n+\t.bss _image_binary_end (OVERLAY) : {\n \t\t__bss_start = .;\n \t\t*(.bss*)\n \t\t . = ALIGN(8);\n@@ -99,5 +99,6 @@ SECTIONS\n \n ASSERT(_image_binary_end % 8 == 0, \\\n \"_image_binary_end must be 8-byte aligned for device tree\");\n+\n ASSERT(ADDR(.bss) % 8 == 0, \\\n \".bss must be 8-byte aligned\");\ndiff --git a/arch/arm/cpu/u-boot-spl.lds b/arch/arm/cpu/u-boot-spl.lds\nindex c578c3ebf821..97083319d39d 100644\n--- a/arch/arm/cpu/u-boot-spl.lds\n+++ b/arch/arm/cpu/u-boot-spl.lds\n@@ -31,16 +31,16 @@ SECTIONS\n \t\t*(.data*)\n \t}\n \n-\t. = ALIGN(4);\n-\t__u_boot_list : {\n-\t\tKEEP(*(SORT(__u_boot_list*)));\n-\t}\n-\n \t. = ALIGN(4);\n \t.binman_sym_table : {\n \t\t__binman_sym_start = .;\n \t\tKEEP(*(SORT(.binman_sym*)));\n \t\t__binman_sym_end = .;\n+\t}\n+\n+\t. = ALIGN(4);\n+\t__u_boot_list : {\n+\t\tKEEP(*(SORT(__u_boot_list*)));\n \t\t. = ALIGN(8);\n \t}\n \n@@ -48,7 +48,7 @@ SECTIONS\n \t_image_binary_end = .;\n \t_end = .;\n \n-\t.bss : {\n+\t.bss _image_binary_end (OVERLAY) : {\n \t\t__bss_start = .;\n \t\t*(.bss*)\n \t\t . = ALIGN(8);\n", "prefixes": [ "v2" ] }