get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2223746/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2223746,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2223746/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260416055948.130041-7-ilias.apalodimas@linaro.org/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.1/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
    },
    "msgid": "<20260416055948.130041-7-ilias.apalodimas@linaro.org>",
    "date": "2026-04-16T05:59:42",
    "name": "[v2,6/6] common: Add an option to relocate on ram top",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8fc4256c896af473a252a6d2438a4ba67d14a735",
    "submitter": {
        "id": 74147,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/74147/?format=api",
        "name": "Ilias Apalodimas",
        "email": "ilias.apalodimas@linaro.org"
    },
    "delegate": {
        "id": 3651,
        "url": "http://patchwork.ozlabs.org/api/1.1/users/3651/?format=api",
        "username": "trini",
        "first_name": "Tom",
        "last_name": "Rini",
        "email": "trini@ti.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260416055948.130041-7-ilias.apalodimas@linaro.org/mbox/",
    "series": [
        {
            "id": 500079,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/500079/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=500079",
            "date": "2026-04-16T05:59:37",
            "name": "Relocate U-Boot in the last bank",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/500079/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223746/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223746/checks/",
    "tags": {},
    "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 (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=wo8YNK0K;\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=linaro.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.b=\"wo8YNK0K\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org"
        ],
        "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)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fx6pJ05jtz1yG9\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 16:01:27 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 8E7B484242;\n\tThu, 16 Apr 2026 08:00:25 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 3E14984207; Thu, 16 Apr 2026 08:00:23 +0200 (CEST)",
            "from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n [IPv6:2a00:1450:4864:20::334])\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 D697D8421D\n for <u-boot@lists.denx.de>; Thu, 16 Apr 2026 08:00:19 +0200 (CEST)",
            "by mail-wm1-x334.google.com with SMTP id\n 5b1f17b1804b1-4838c15e3cbso70959085e9.3\n for <u-boot@lists.denx.de>; Wed, 15 Apr 2026 23:00:19 -0700 (PDT)",
            "from hera ([94.131.143.12]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488f0e9a770sm36379755e9.19.2026.04.15.23.00.17\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 15 Apr 2026 23:00:18 -0700 (PDT)"
        ],
        "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=linaro.org; s=google; t=1776319219; x=1776924019; 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=keTZjmJ9L2wjNIMe4PYzgordnJwPs5xudOLPG6AHzeI=;\n b=wo8YNK0KBiNt3tQF0DvJ8A52Ia1T3gkc9Bzjo8ImSZmsor6NhzYfOyNfNhmEK6fXwO\n l2+CXtkR5PCp5N/yWMna2bjdMnJ2MmqboJJaKOYkGt6uVMoZKHCP+YYJ9SHYK4i4O0k/\n ZM5Ao5CrXYfQzLaBAUCXk5ODl39vwKk5z5m8fBJ/z89aszD6dgp+zuCEPV3u5epz7RVi\n s/JKwqdiyvLDfBUfjM1z5rs3VTvmwEE+HTwuRC6hLVdCLFoXEYRc9458c0vq1fScp/qP\n um17uRhazXg7GWxsA6wFTOxiR4aGYI78wajxKov5hTM6jFni6iUEYU32XtDJuwTwHAa2\n khrg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776319219; x=1776924019;\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:message-id:reply-to;\n bh=keTZjmJ9L2wjNIMe4PYzgordnJwPs5xudOLPG6AHzeI=;\n b=a4SjSKG0+GqHV3hI/6BICn+JYr8x2vqKsUGsWO81zltDIYtjc0c5zmzwxNh3Ooa/g+\n VcnZgOSqElWlGGU+X+E29UowxrHPQ7tCkQW5nyaT7C529iQzpb8exlH5koc4d9QG9o0c\n +I4RUH8AaOqnumNbeMsI2nKdipVOrqJ0zDsJ29Z+mTg8GExSYVNSdICD16aXUJ7yodst\n K7kJWOrCZyMyVAI90+6JyC+Z6RcrKaRnj3l425dRC/3VLUy76XACc0S7z7dXOLrXmIwh\n PxO12k/x/467wzCoFblGIa58dr1hFpIk+BrMgn/wFWTbXjsi16vf64tgm5eq3FFH7W7X\n PwSg==",
        "X-Forwarded-Encrypted": "i=1;\n AFNElJ+R0H8OmPdDobWI9nZBJW6zszQP7Z72wO9Ie9MFBtvFRE1zn5RYUGFffR3gh/7ts+gxG2FkN+8=@lists.denx.de",
        "X-Gm-Message-State": "AOJu0YxT+dd1BO3PuSHd3ZHKS6poeQD8Vj3jjX1V57IKZCy5hk3x1wnE\n aM6e6/tAZPwOT908PMa9cm7ULY8QnCqtOOz4hS0THysBU6MJRNf149TTUMWiaf/01rs=",
        "X-Gm-Gg": "AeBDiesVE5/t+GTZw40GDeqttN6xOIYk8QHX1wW2E+BDVd2tbSd5RJLc8pyFgEZL3vq\n cEmgxSXCnZNTP6/fAxUUUkXsvgh+zGCpMt/DO33Mm+QHSDNovlCmUlDXr0CiVOjWvb3yg4cx5iX\n YKOpmMEzU17j51gQyiQzZ8S0G3lHnozc0mgKQ6+olpAn04C3lKPPFvCjJeHMYj02fCMtSwVckEH\n GTNtT37spAFwME4QM5Zhm3P0Q/8OT8vaIPKXHatebF5VUDNyqp6HV9SZNrA4ckh66QftEll7JMs\n KfoCcJQ+PkUi43/OJDGD7ImQyZjmu/5OSt8KzIIG50s8/fQNSodXQq3xSWjRInHl8PZkZs3711N\n XapteF5aQNE8jYdKA+pJK+zTPfz2gYBByePL2f/5TZ+cE/A/t2pGH29V6wASpmQq691hIuBECpg\n TPrespzBBE0qrcxVy/Wnpp8nsEydBNFMADZIauY8L5WIKN2MH+uYaC3ZgKDc0ttDBnPtCEY2+s9\n rDTSlupekVXnGIaHdSicuD6LvDO92tStnQqb1d9I12WAKy/A5BUYmf+x2CAkEL3m3VfSu3wuE7H\n /Uj8V144m/Fgi8FdhnPgux93VLi97pY1T9t++gemZ5TDriymryO+MDi2P7xRDcZFwlalpohom5W\n lX1TM8Igsd39MxpWoE0DoT1x6Sou8paR78BH4eFsXexAN/xXVfa4x8GVK9noqIYgyefs9GNXhFv\n Pt7Z7FJachoBPZxxjc2iykrGG3jcCQFdK2TM24r6eJforsoZAvdPd4Q4hSA/Q/",
        "X-Received": "by 2002:a05:600c:1987:b0:488:b187:d8ed with SMTP id\n 5b1f17b1804b1-488d67bf765mr342601795e9.2.1776319219051;\n Wed, 15 Apr 2026 23:00:19 -0700 (PDT)",
        "From": "Ilias Apalodimas <ilias.apalodimas@linaro.org>",
        "To": "trini@konsulko.com",
        "Cc": "marek.vasut+renesas@mailbox.org, jonas@kwiboo.se, anshuld@ti.com,\n sjg@chromium.org, Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n u-boot@lists.denx.de",
        "Subject": "[PATCH v2 6/6] common: Add an option to relocate on ram top",
        "Date": "Thu, 16 Apr 2026 08:59:42 +0300",
        "Message-ID": "<20260416055948.130041-7-ilias.apalodimas@linaro.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260416055948.130041-1-ilias.apalodimas@linaro.org>",
        "References": "<20260416055948.130041-1-ilias.apalodimas@linaro.org>",
        "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": "Right now we only relocate u-boot to the top of the first\nmemory bank unless the board specific code overwrites it.\nThis is problematic when loading big binaries as it\nfragments the contiguous memory space for no apparent reason.\n\nIt's worth noting that there are cases where we must not relocate\nabove the 4GiB boundary (64bit hardware with 32bit only capable\nDMA). E.g This will break platforms, if the ethernet\ncontroller cannot DMA above 4 GiB, and once U-Boot does\nget relocated above 4 GiB, the packet buffer which is built\ninto the U-Boot binary is also relocated above 4 GiB.\n\nA previous patch moves the bi_dram[] info from bd to gd and make\nthe memory bank information available early. So move the\ndram_init_banksize() INITCALL before the relocation address calculation\nand use it to derive the address.\n\nAlso add a Kconfig option and allow the common code to relocate U-Boot\nto the top of the last discovered bank.\n\nReviewed-by: Anshul Dalal <anshuld@ti.com>\nTested-by: Anshul Dalal <anshuld@ti.com>\nSigned-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>\n---\n Kconfig          | 10 ++++++++++\n common/board_f.c | 25 +++++++++++++++++++------\n 2 files changed, 29 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/Kconfig b/Kconfig\nindex 7f00e76ba786..63c273ca8c8f 100644\n--- a/Kconfig\n+++ b/Kconfig\n@@ -491,6 +491,16 @@ config SKIP_RELOCATE_CODE_DATA_OFFSET\n \t  Offset of the read-write memory which contains data, from read-only\n \t  memory which contains executable text.\n \n+config RELOC_ADDR_TOP\n+\tbool \"Relocate to the topmost memory address\"\n+\tdepends on EXPERT\n+\thelp\n+\t  When U-Boot relocates, it chooses the end of the first memory bank.\n+\t  Enable this if you have multiple banks and want U-Boot to relocate\n+\t  to the topmost memory address. This will use the information of the\n+\t  board memory banks configured with dram_init_banksize().\n+\t  Use this if you are certain all of the devices can DMA to high memory.\n+\n endif # EXPERT\n \n config PHYS_64BIT\ndiff --git a/common/board_f.c b/common/board_f.c\nindex 4ac22dca9e7c..f95e789257ad 100644\n--- a/common/board_f.c\n+++ b/common/board_f.c\n@@ -339,7 +339,22 @@ static int setup_ram_base(void)\n static int setup_ram_config(void)\n {\n \tdebug(\"Monitor len: %08x\\n\", gd->mon_len);\n-#if CONFIG_VAL(SYS_MEM_TOP_HIDE)\n+\n+\tif (CONFIG_IS_ENABLED(RELOC_ADDR_TOP)) {\n+\t\tint bank;\n+\t\tphys_size_t total_size = 0;\n+\n+\t\tfor (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) {\n+\t\t\tif (gd->ram_top <= gd->bi_dram[bank].start)\n+\t\t\t\tgd->ram_top = gd->bi_dram[bank].start +\n+\t\t\t\t\t\tgd->bi_dram[bank].size;\n+\t\t\ttotal_size += gd->bi_dram[bank].size;\n+\t\t}\n+\t\tgd->ram_size = total_size;\n+\t} else {\n+\t\tgd->ram_top = gd->ram_base + get_effective_memsize();\n+\t\tgd->ram_top = board_get_usable_ram_top(gd->mon_len);\n+\t}\n \t/*\n \t * Subtract specified amount of memory to hide so that it won't\n \t * get \"touched\" at all by U-Boot. By fixing up gd->ram_size\n@@ -350,10 +365,8 @@ static int setup_ram_config(void)\n \t * memory size from the SDRAM controller setup will have to\n \t * get fixed.\n \t */\n-\tgd->ram_size -= CONFIG_SYS_MEM_TOP_HIDE;\n-#endif\n-\tgd->ram_top = gd->ram_base + get_effective_memsize();\n-\tgd->ram_top = board_get_usable_ram_top(gd->mon_len);\n+\tif (CONFIG_IS_ENABLED(SYS_MEM_TOP_HIDE))\n+\t\tgd->ram_size -= CONFIG_SYS_MEM_TOP_HIDE;\n \n \tdebug(\"Ram top: %08llx\\n\", (unsigned long long)gd->ram_top);\n \tdebug(\"Ram size: %08llx\\n\", (unsigned long long)gd->ram_size);\n@@ -970,6 +983,7 @@ static void initcall_run_f(void)\n \t *  - board info struct\n \t */\n \tINITCALL(setup_ram_base);\n+\tINITCALL(dram_init_banksize);\n \tINITCALL(setup_ram_config);\n \tINITCALL(setup_dest_addr);\n #if CONFIG_IS_ENABLED(OF_BOARD_FIXUP) && \\\n@@ -998,7 +1012,6 @@ static void initcall_run_f(void)\n \tINITCALL(reserve_bloblist);\n \tINITCALL(reserve_arch);\n \tINITCALL(reserve_stacks);\n-\tINITCALL(dram_init_banksize);\n \tINITCALL(show_dram_config);\n \tWATCHDOG_RESET();\n \tINITCALL(setup_bdinfo);\n",
    "prefixes": [
        "v2",
        "6/6"
    ]
}