get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2217990,
    "url": "http://patchwork.ozlabs.org/api/patches/2217990/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260331080117.2370092-5-ilias.apalodimas@linaro.org/",
    "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": "<20260331080117.2370092-5-ilias.apalodimas@linaro.org>",
    "list_archive_url": null,
    "date": "2026-03-31T08:01:14",
    "name": "[v2,4/4] common: Allow relocations on the top of the last bank",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5d1220a0d1bf265586fefe52484ddc565e6c35c9",
    "submitter": {
        "id": 74147,
        "url": "http://patchwork.ozlabs.org/api/people/74147/?format=api",
        "name": "Ilias Apalodimas",
        "email": "ilias.apalodimas@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260331080117.2370092-5-ilias.apalodimas@linaro.org/mbox/",
    "series": [
        {
            "id": 498138,
            "url": "http://patchwork.ozlabs.org/api/series/498138/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=498138",
            "date": "2026-03-31T08:01:10",
            "name": "Relocate U-Boot in the last bank",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/498138/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2217990/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217990/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 (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=bhKuy+hx;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=\"bhKuy+hx\";\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\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\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 4flLFG1Kgvz1yGH\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 19:02:26 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 4CD01840BE;\n\tTue, 31 Mar 2026 10:01:44 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id BC83F8408D; Tue, 31 Mar 2026 10:01:42 +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 65E5D84099\n for <u-boot@lists.denx.de>; Tue, 31 Mar 2026 10:01:39 +0200 (CEST)",
            "by mail-wm1-x334.google.com with SMTP id\n 5b1f17b1804b1-482f454be5bso60502745e9.0\n for <u-boot@lists.denx.de>; Tue, 31 Mar 2026 01:01:39 -0700 (PDT)",
            "from hera ([94.131.143.12]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-4887c9250afsm10087065e9.36.2026.03.31.01.01.37\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 31 Mar 2026 01:01:37 -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=1774944098; x=1775548898; 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=7oUxZQYLSGSVNDMCuRR2atuqUV38+bRliJUF+/W8O4A=;\n b=bhKuy+hxaBSTyuqov7bCBVC9r9Oc651d9PafAJXseKrnP7mq6FP5Ey97sK/xa2bCCa\n cIe8G77JHVlkI/hukMKbCEQ1mfKVbA4VAyhM6XC1FlUjl48+GGbXaaVM/a8g5vabSpCi\n RA3dHfVZKcVQEw0zS7ChrAMeWZltZ2u+32lai6ZANx3KNXAtwLlBL+g2XlNJqzIeknWQ\n DJx2d7ogePHXaN7IsxDQSSIL5htsFV7KFMttPSnQbhCV+WvlqvZ9EccbvVCj9CiA9Q7X\n NYLIbilk5w0gMaaeIEQAjW5OxXIesaNBdNhKaLGAYLWk7JDL0V/q0EpNQvmjasm7A4sp\n kxUg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774944098; x=1775548898;\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=7oUxZQYLSGSVNDMCuRR2atuqUV38+bRliJUF+/W8O4A=;\n b=dbYObwud+Ms2j1mWeR8SABviQKxLz7ePZ6ACgZf2diAvXh7WS3mt67Qr+bmkArtIgM\n fBZmF3La/ee6NTaPVrofNU3pqG/0gyB0C4rezOGQ8vcZOstcHUZnj9PLHVeek2zhAPqs\n LADvgrOV6PmGXexXlVnvKAm2VKVcsGI3GOlFvX5MOZtLUW4sm2QTxLPQYnUuGRALweY6\n J/sG3u0aZNW1hcce2nbKZpHPySCPrANG9Q+y6vXX2Mb3nUGDgE+GEHxps4As4fscHJ+T\n AfHRnAeKXZx1deOLgQyU10JjIE+tEksvhRO/TwJdg4jJ+pwgJQonKOSHgGlQ/zLxgZdc\n 2wSQ==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCUhPl9ACGf0zem8nZPXREBxMZFYh3McEQYgbAukDOFHbulf5wV6bj/QLZvi7tc7n9tXts50Jmo=@lists.denx.de",
        "X-Gm-Message-State": "AOJu0YxeBtAFjNjZuCUdleoIaAhH+IKYOR6Muj6RMWjQY09bej3Z/vez\n 3P5r+PNdxSDZCeCtP+koB1xK+JSqEAkHqaloHRds8/zGjmWWccGQaLCvLGJHCTPT2DQ=",
        "X-Gm-Gg": "ATEYQzz01gWPchZNJf5MQMcTC+mBMcywGqauXgq06QIW1btMekCnf9vqh33RuiWV0Vc\n zMn/S/S8DufrV0HdaHg5nHhnlJctsWs41sbwxSWV5XJ+uceK1F5DNQjazRsjfu0P/blRQUiooEO\n w+3vw0sb0ZzJ5te4PWlBmTstFEueZIVRePrv5Wt8x5oMS0Z553zl1a9ACBsVOHrTeWGoK6DKglK\n 59/xqloiwAEHGhOU1WNedyRBK9wqpJ1BU9N1mxQf9CYlnQmI6C5LxEbDaCidyu2iiWo2weARJJy\n nXvjMr3i2VfSw+UrPFvJ4oJxkx450ZBkaRmB1qYEfgwuIuMhgmpmhlV0vNzLhsPy5Sb6fx/igZ/\n T7HuFHhP9xuzTly3G36zNhJgXgWeFz2cldl+FUh8s2IeXZ5JcsbfVFIKG/HrQ65V9yh7S2xyl3+\n IB43V3U2NZ23fU9kScOHBpI9Hcbjghv3QIUSLEjPF7jPwcOaHRomr69QO47QeDAqDJAUWH2jqen\n V0V2g7C8n3OYAH9Ede/iXMUN6YZyI52TH7hXA/+TfcoXypdPaZSTrwgtFF8NzZsAamSmNNUnlrU\n KUnJkBJJvQrx5pjCBoyU3R5ua7ZG1IacwgQ9l8w5DnCKjaG7HVjuYSFpHDDOUTXDlo90gD1ixIq\n EvmseFkw8AoCcmXOOufVoUJRj1q7hjybsJTpwx0/t9mpJHHNV+U8PO3jum1hnP5/8d2lXSeg0aV\n k/6Lkw98LKJ2mjmsl2z9aOYT0yBKi/zLHNhkwmtzCTuNAxaOA+F/0ecqk+U71z",
        "X-Received": "by 2002:a05:600c:a408:b0:47e:e59c:67c5 with SMTP id\n 5b1f17b1804b1-488783820d1mr31232785e9.8.1774944098362;\n Tue, 31 Mar 2026 01:01:38 -0700 (PDT)",
        "From": "Ilias Apalodimas <ilias.apalodimas@linaro.org>",
        "To": "marek.vasut+renesas@mailbox.org,\n\ttrini@konsulko.com",
        "Cc": "Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n\tu-boot@lists.denx.de",
        "Subject": "[PATCH v2 4/4] common: Allow relocations on the top of the last bank",
        "Date": "Tue, 31 Mar 2026 11:01:14 +0300",
        "Message-ID": "<20260331080117.2370092-5-ilias.apalodimas@linaro.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260331080117.2370092-1-ilias.apalodimas@linaro.org>",
        "References": "<20260331080117.2370092-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\nAdd a Kconfig option and allow the common code to relocate U-Boot\nto the top of the last discovered bank.\n\nSigned-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>\n---\n Kconfig          |  7 +++++++\n common/board_f.c | 15 +++++++++++++++\n 2 files changed, 22 insertions(+)",
    "diff": "diff --git a/Kconfig b/Kconfig\nindex ce25ea24a60f..3ebdee1b2794 100644\n--- a/Kconfig\n+++ b/Kconfig\n@@ -474,6 +474,13 @@ config SKIP_RELOCATE\n \t  Skips relocation of U-Boot allowing for systems that have extremely\n \t  limited RAM to run U-Boot.\n \n+config RELOCATE_LAST_BANK\n+\tbool \"Relocate to the topmost memory address\"\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\n+\n endif # EXPERT\n \n config PHYS_64BIT\ndiff --git a/common/board_f.c b/common/board_f.c\nindex df2b0dc899bf..4270f368e653 100644\n--- a/common/board_f.c\n+++ b/common/board_f.c\n@@ -309,6 +309,8 @@ __weak int mach_cpu_init(void)\n /* Get the top of usable RAM */\n __weak phys_addr_t board_get_usable_ram_top(phys_size_t total_size)\n {\n+\tint ret;\n+\n #if defined(CFG_SYS_SDRAM_BASE) && CFG_SYS_SDRAM_BASE > 0\n \t/*\n \t * Detect whether we have so much RAM that it goes past the end of our\n@@ -321,6 +323,19 @@ __weak phys_addr_t board_get_usable_ram_top(phys_size_t total_size)\n \t\t */\n \t\treturn 0;\n #endif\n+\tif (IS_ENABLED(CONFIG_RELOCATE_LAST_BANK)) {\n+\t\tphys_addr_t old_top = gd->ram_top;\n+\n+\t\tret = fdtdec_setup_mem_ram_top();\n+\t\tif (ret)\n+\t\t\tdebug(\"failed to relocate to ram top\");\n+\t\tret = fdtdec_setup_ram_size();\n+\t\tif (ret) {\n+\t\t\tdebug(\"failed to calculate RAM size\");\n+\t\t\tgd->ram_top = old_top;\n+\t\t}\n+\t}\n+\n \treturn gd->ram_top;\n }\n \n",
    "prefixes": [
        "v2",
        "4/4"
    ]
}