Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1644802/?format=api
{ "id": 1644802, "url": "http://patchwork.ozlabs.org/api/patches/1644802/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20220617104726.158688-12-pan@semihalf.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": "<20220617104726.158688-12-pan@semihalf.com>", "list_archive_url": null, "date": "2022-06-17T10:47:26", "name": "[v3,11/11] socfpga: arria10: Allow dcache_enable before relocation", "commit_ref": "e26ecebc684bfe74f6c27cca151c3490d1ed5d8f", "pull_url": null, "state": "accepted", "archived": false, "hash": "2065784ceae27c173762dea96c8780b8f6a4e8a1", "submitter": { "id": 82560, "url": "http://patchwork.ozlabs.org/api/people/82560/?format=api", "name": "Paweł Anikiel", "email": "pan@semihalf.com" }, "delegate": { "id": 88515, "url": "http://patchwork.ozlabs.org/api/users/88515/?format=api", "username": "simongoldschmidt", "first_name": "Simon", "last_name": "Goldschmidt", "email": "simon.k.r.goldschmidt@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20220617104726.158688-12-pan@semihalf.com/mbox/", "series": [ { "id": 305278, "url": "http://patchwork.ozlabs.org/api/series/305278/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=305278", "date": "2022-06-17T10:47:15", "name": "Add Chameleon v3 support", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/305278/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1644802/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1644802/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=semihalf.com header.i=@semihalf.com header.a=rsa-sha256\n header.s=google header.b=XSYHPELS;\n\tdkim-atps=neutral", "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=<UNKNOWN>)", "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=semihalf.com", "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=semihalf.com header.i=@semihalf.com\n header.b=\"XSYHPELS\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=semihalf.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=pan@semihalf.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 RSA-PSS (2048 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4LPbQw4rY0z9s5V\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Jun 2022 20:50:00 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 24E378445C;\n\tFri, 17 Jun 2022 12:48:29 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 9B7828445A; Fri, 17 Jun 2022 12:48:25 +0200 (CEST)", "from mail-lj1-x230.google.com (mail-lj1-x230.google.com\n [IPv6:2a00:1450:4864:20::230])\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 2BAE384459\n for <u-boot@lists.denx.de>; Fri, 17 Jun 2022 12:48:23 +0200 (CEST)", "by mail-lj1-x230.google.com with SMTP id d18so4321305ljc.4\n for <u-boot@lists.denx.de>; Fri, 17 Jun 2022 03:48:23 -0700 (PDT)", "from panikiel.roam.corp.google.com\n (staticline-31-182-204-250.toya.net.pl. [31.182.204.250])\n by smtp.gmail.com with ESMTPSA id\n a17-20020ac25e71000000b00479342519e5sm592379lfr.210.2022.06.17.03.48.00\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 17 Jun 2022 03:48:01 -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,SPF_HELO_NONE,SPF_PASS,\n T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no\n version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com;\n s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=8+Axa1Zzfz0vwAJ5d/8M6C0fUjlmFfzYMPCv9Z1lOkg=;\n b=XSYHPELScqToUW7TNIKi0H6tghnudc88oeDRuKLGvwgT7C2EuewfNlvPbjjXakW9rv\n 7xY7XgHIkdWAHBjhQ9Lf1vWILPiNjHgfUkAdXEidxLxsggxpOjTsNBl//W8T+SQF68Bj\n BBed27tRZ1FDJB9Big2Squ7hQIk+hfa1vs3HVUNjIpxJXeb9VRhwppgX4a+g4PyR+N3a\n hdYwYKPZpbPBfqCcdaZvZ/UBiotElGtyvPioChkuIxaKa44J18BszWfnaD7ilFHFy752\n pPCGgwPy27lFNM/zC/FXBUrwjBspCP/IUtLKZ9c0x6RW+bfPWpnJWWg+9cEHMIOuN2sf\n 30CA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=8+Axa1Zzfz0vwAJ5d/8M6C0fUjlmFfzYMPCv9Z1lOkg=;\n b=Dt7PhHqQuvS8hGgvg90rHsDZl7zTY4poZd/sXtv7YXsEqsTBasZMnRZys5GVgBKCWg\n 9djoxXbnxB3o2qlR59ktMWYgMNRsroUU04zQJTtpykWCMajtZovMZzN8VQIGKxMFTa9Z\n 2WFrqYADtAqfb6K2hWtjs0BXxZ1IPkSpY7bce3A+DlzguKQ6rG5Dy+Nirs52RKQ7NBNW\n IrBT6aRlIHZDRBuUokaJrHd3V9eC1sc1Uc3gIng5JOUhS/dcBhmz3JVuybv9Cv+b6uK0\n l/61Tl6VozzKxjtq3IrTT5lft/k9FnMPEk3VFebSRovQQFwOhem5hZBkSUI5/8A54LjB\n 1oQw==", "X-Gm-Message-State": "AJIora8bfRPFSlg1tyPMFgykSI+y96NcENJ5uFcQU2fAf9NPdk3DT5l4\n IzYcLaf2hXkGQF36p5YqIwi9+g==", "X-Google-Smtp-Source": "\n AGRyM1tjVAGEHCrdpRTotocpfZZet6ZlsKN5+xJaMspTdytxCu6vVSkkDK2ZDv9i12mrRT7fI7RjqA==", "X-Received": "by 2002:a05:651c:239:b0:255:a237:7ebd with SMTP id\n z25-20020a05651c023900b00255a2377ebdmr4934998ljn.401.1655462882474;\n Fri, 17 Jun 2022 03:48:02 -0700 (PDT)", "From": "=?utf-8?q?Pawe=C5=82_Anikiel?= <pan@semihalf.com>", "To": "marex@denx.de, simon.k.r.goldschmidt@gmail.com, tien.fong.chee@intel.com,\n michal.simek@xilinx.com", "Cc": "u-boot@lists.denx.de, sjg@chromium.org, festevam@denx.de,\n jagan@amarulasolutions.com, andre.przywara@arm.com, narmstrong@baylibre.com,\n pbrobinson@gmail.com, tharvey@gateworks.com, paul.liu@linaro.org,\n christianshewitt@gmail.com, adrian.fiergolski@fastree3d.com,\n marek.behun@nic.cz, wd@denx.de, elly.siew.chin.lim@intel.com,\n upstream@semihalf.com, amstan@chromium.org,\n =?utf-8?q?Pawe=C5=82_Anikiel?= <pan@semihalf.com>", "Subject": "[PATCH v3 11/11] socfpga: arria10: Allow dcache_enable before\n relocation", "Date": "Fri, 17 Jun 2022 12:47:26 +0200", "Message-Id": "<20220617104726.158688-12-pan@semihalf.com>", "X-Mailer": "git-send-email 2.36.1.476.g0c4daa206d-goog", "In-Reply-To": "<20220617104726.158688-1-pan@semihalf.com>", "References": "<20220617104726.158688-1-pan@semihalf.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "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.5 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "Before relocating to SDRAM, the ECC is initialized by clearing the\nwhole SDRAM. In order to speed this up, dcache_enable is used (see\nsdram_init_ecc_bits).\n\nSince commit 503eea451903 (\"arm: cp15: update DACR value to activate\naccess control\"), this no longer works, because running code in OCRAM\nwith the XN bit set causes a page fault. Override dram_bank_mmu_setup\nto disable XN in the OCRAM and setup DRAM dcache before relocation.\n\nSigned-off-by: Paweł Anikiel <pan@semihalf.com>\nReviewed-by: Simon Glass <sjg@chromium.org>\n---\n arch/arm/mach-socfpga/misc_arria10.c | 26 ++++++++++++++++++++++++++\n 1 file changed, 26 insertions(+)", "diff": "diff --git a/arch/arm/mach-socfpga/misc_arria10.c b/arch/arm/mach-socfpga/misc_arria10.c\nindex 0ed2adfd84..7ce888d197 100644\n--- a/arch/arm/mach-socfpga/misc_arria10.c\n+++ b/arch/arm/mach-socfpga/misc_arria10.c\n@@ -246,3 +246,29 @@ int qspi_flash_software_reset(void)\n \treturn 0;\n }\n #endif\n+\n+void dram_bank_mmu_setup(int bank)\n+{\n+\tstruct bd_info *bd = gd->bd;\n+\tu32 start, size;\n+\tint i;\n+\n+\t/* If we're still in OCRAM, don't set the XN bit on it */\n+\tif (!(gd->flags & GD_FLG_RELOC)) {\n+\t\tset_section_dcache(\n+\t\t\tCONFIG_SYS_INIT_RAM_ADDR >> MMU_SECTION_SHIFT,\n+\t\t\tDCACHE_WRITETHROUGH);\n+\t}\n+\n+\t/*\n+\t * The default implementation of this function allows the DRAM dcache\n+\t * to be enabled only after relocation. However, to speed up ECC\n+\t * initialization, we want to be able to enable DRAM dcache before\n+\t * relocation, so we don't check GD_FLG_RELOC (this assumes bd->bi_dram\n+\t * is set first).\n+\t */\n+\tstart = bd->bi_dram[bank].start >> MMU_SECTION_SHIFT;\n+\tsize = bd->bi_dram[bank].size >> MMU_SECTION_SHIFT;\n+\tfor (i = start; i < start + size; i++)\n+\t\tset_section_dcache(i, DCACHE_DEFAULT_OPTION);\n+}\n", "prefixes": [ "v3", "11/11" ] }