{"id":2175501,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2175501/?format=json","project":{"id":67,"url":"http://patchwork.ozlabs.org/api/1.0/projects/67/?format=json","name":"OpenSBI development","link_name":"opensbi","list_id":"opensbi.lists.infradead.org","list_email":"opensbi@lists.infradead.org","web_url":"https://github.com/riscv/opensbi","scm_url":"","webscm_url":""},"msgid":"<20251218104243.562667-2-ganboing@gmail.com>","date":"2025-12-18T10:42:37","name":"[v6,1/7] lib: sbi_hart_pmp: make sbi_hart_pmp_fence public","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"baf4488c11c6d7e17f646d8b68034c72d0281fa3","submitter":{"id":86401,"url":"http://patchwork.ozlabs.org/api/1.0/people/86401/?format=json","name":"Bo Gan","email":"ganboing@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/opensbi/patch/20251218104243.562667-2-ganboing@gmail.com/mbox/","series":[{"id":485819,"url":"http://patchwork.ozlabs.org/api/1.0/series/485819/?format=json","date":"2025-12-18T10:42:37","name":"Initial ESWIN/EIC7700 and Hifive P550 support","version":6,"mbox":"http://patchwork.ozlabs.org/series/485819/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2175501/checks/","tags":{},"headers":{"Return-Path":"\n <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","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 secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=EZKF2yzN;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=j97LbLky;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\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 4dX6kG5bllz1y2f\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 18 Dec 2025 21:44:54 +1100 (AEDT)","from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vWBUz-00000008FgC-246l;\n\tThu, 18 Dec 2025 10:44:45 +0000","from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vWBUw-00000008Ff6-2HXx\n\tfor opensbi@lists.infradead.org;\n\tThu, 18 Dec 2025 10:44:43 +0000","by mail-pf1-x432.google.com with SMTP id\n d2e1a72fcca58-7f0db5700b2so470776b3a.0\n        for <opensbi@lists.infradead.org>;\n Thu, 18 Dec 2025 02:44:42 -0800 (PST)","from m91p.airy.home ([172.92.174.155])\n        by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-7fe11d3e004sm2264795b3a.15.2025.12.18.02.44.39\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Thu, 18 Dec 2025 02:44:40 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=KEmrynXiQYis7qTw4N/IKvLY7vBO7ZmEU2usUuc/qTc=; b=EZKF2yzNCRJlLX\n\tqtNpNNzMxcgDJPjXPHrU9x7t9S626BnlBx+F4/V5XQ5NfWgkJy6wIVRT4ZTQmYdtg9VwkBg+IwrRA\n\tWoHnrTakwcGg0w/x7OOVkStB2Ou9mwCeJvEugMd+nabCPH+d0y9mNueiaUgCdYO2b7Qq1Ul3OaLak\n\tInAEsfrvm6QAF9e0w7Qbpb9wx54Wk2qVHaoutEl3a+uMUk6zT8T8sSoJ09NL75aFk1FQ5aRerc3Tf\n\t++0n4M49i4TlM1IPtTFvgC7RdEcrhyI9aQyjjWruBwFxOMqLlE7oIBq+9Bk7R+65jIUQChugQD+k6\n\tAJsv7CGmau0Y3jadZMMQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20230601; t=1766054681; x=1766659481;\n darn=lists.infradead.org;\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=EDzwK0Mtm7yPyEjl5uEK/H1TTT4dfwzDLrYmM6RpVAE=;\n        b=j97LbLkyYypdruxQ1KZsPaWOxzRE9KLeYQu5Y7CbKFpmkqGEfyL/TsPXocdWqQJkDZ\n         Cinvf2lyL8ZT4M6xEpbQB1Okowm4YwxIledK9Wg+oxDQ3x6OSD0ZI7z9DWVvRdM5b4AR\n         GX0nFExrKPuMHHS3AgDpbqzNw4CHdqQvub1zRXAnLXINeQBLU7qbgXK6IK6DwBLM2x5A\n         0hRv2RHmkJvCs5NIfyX8Pj5z0lZR7k26qJfgT/OY4M59iQvlkpUOsi9iuNB6XL0sjzWi\n         InESg9eUYMJFr+BuIpKXeBZQPSQOMhatLKO5Zo5PLKidyTWsxY0EWXkk2bv/9VKFZ6d1\n         qQ2g=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20230601; t=1766054681; x=1766659481;\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=EDzwK0Mtm7yPyEjl5uEK/H1TTT4dfwzDLrYmM6RpVAE=;\n        b=jXMEnH/B98nwovyezMp6hGXu0gu4D5mpXdh0jetOypbKoZ4vK/dONJl/COhYPEXRP5\n         QjziPJOsoCUvc/QVR2XLN6rsYtayYg7K76G0hm0vysE3TWzPrULNzUIHQPKU0BnZu3TG\n         9sL/eu2mhRv326Wltl7G4rcQkxW+qKggOtCRBr6d+kWFwgIBwuApfZ/KxUnFwoxrxUDy\n         0bCcK0O64maaabGaQ9p9/aYrcBZcbMFwxGOjy6Dkc+TZjPTwkf2oh/c2q2ScxL68XDBp\n         cJstuAUSBlQxnU3fqt6+pW7Gm7XKBacLzx+hWGnvAU9ITG2wVBXvBDP5cW1lsB+MDbmj\n         yqFw==","X-Gm-Message-State":"AOJu0YwN7YiNgsxyzfM1FvWoBBNbeXzBTFE6Jp+Qd1P3ZAOMdySMkXo6\n\tvVOMNvQLyKwbAp5/DLKOFN0Isgy7E62cSCrZfOCOQymSQsfi16y1AHaYLYlFdg==","X-Gm-Gg":"AY/fxX4mG+JNH8bvuXB+Wk8eKR/y0Ps85fSQ2Zi7kyjMDxjzttvCP0PN97IGtvyawVF\n\tJ89lJisUpWUiyMYYcPYVsCWbpYTM25pbmT6m5d/uUesQRsGsJenbeAGw2GhGZNTx9OofpKuudsz\n\tpSoXe7v8v5Ks9amYEKoFcLwAA+AEJsGmYZ4pd4IT1KV4l6uUyFiC0u2Jd+o534bimvh4nA8LfUQ\n\tuhWaAmBq5na4V5PanNpR+eOlMeyVjZ+qCBcdOxsHvAtVx3z5jw+Sbelb5lNXoSzSdhjt69RNFwm\n\tCPtIYedz9arsFgnVhciFjvOERD29FclFJjRYjm9Cjk3mFJ1l8d/Mb2P6g0npoFEGjeoXFD+6+Da\n\t15RvCe+vd1g9roJkgwtNB6Hi0mYzUKtkRFlDv1HcgS73Nx0DK27riLu8Mu8cxbJ7JmoHQ+9jOj5\n\tUHZToeUBxlBXQYh+YhdNJ2+fc=","X-Google-Smtp-Source":"\n AGHT+IF8g7A1QzkQGIgSWGpTpvE20e3RgzbMZ2HbovVRcYuXa32bPZ/eQn8PFYLspsymMWPJAWE8mg==","X-Received":"by 2002:a05:6a00:288f:b0:7e8:4398:b360 with SMTP id\n d2e1a72fcca58-7f66969f560mr18353123b3a.51.1766054680968;\n        Thu, 18 Dec 2025 02:44:40 -0800 (PST)","From":"Bo Gan <ganboing@gmail.com>","To":"opensbi@lists.infradead.org","Cc":"linmin@eswincomputing.com,\n\tpinkesh.vaghela@einfochips.com,\n\tgaohan@iscas.ac.cn,\n\tsamuel@sholland.org,\n\twangxiang@iscas.ac.cn","Subject":"[PATCH v6 1/7] lib: sbi_hart_pmp: make sbi_hart_pmp_fence public","Date":"Thu, 18 Dec 2025 02:42:37 -0800","Message-Id":"<20251218104243.562667-2-ganboing@gmail.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20251218104243.562667-1-ganboing@gmail.com>","References":"<20251218104243.562667-1-ganboing@gmail.com>","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20251218_024442_575312_E529B0B2 ","X-CRM114-Status":"UNSURE (   9.03  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-2.1 (--)","X-Spam-Report":"Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  sbi_hart_pmp_fence can now be utilized by other\n hart-protection\n    implementation. Signed-off-by: Bo Gan --- include/sbi/sbi_hart_pmp.h | 1\n   + lib/sbi/sbi_hart_pmp.c | 2 +- 2 files changed, 2 insertions(+),\n 1 deletion(-)    \n Content analysis details:   (-2.1 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/, no\n                             trust\n                             [2607:f8b0:4864:20:0:0:0:432 listed in]\n                             [list.dnswl.org]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail\n provider\n                             [ganboing(at)gmail.com]","X-BeenThere":"opensbi@lists.infradead.org","X-Mailman-Version":"2.1.34","Precedence":"list","List-Id":"<opensbi.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/opensbi/>","List-Post":"<mailto:opensbi@lists.infradead.org>","List-Help":"<mailto:opensbi-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"opensbi\" <opensbi-bounces@lists.infradead.org>","Errors-To":"opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"sbi_hart_pmp_fence can now be utilized by other hart-protection\nimplementation.\n\nSigned-off-by: Bo Gan <ganboing@gmail.com>\n---\n include/sbi/sbi_hart_pmp.h | 1 +\n lib/sbi/sbi_hart_pmp.c     | 2 +-\n 2 files changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/include/sbi/sbi_hart_pmp.h b/include/sbi/sbi_hart_pmp.h\nindex f54e8b2a..a7765d17 100644\n--- a/include/sbi/sbi_hart_pmp.h\n+++ b/include/sbi/sbi_hart_pmp.h\n@@ -15,6 +15,7 @@ unsigned int sbi_hart_pmp_count(struct sbi_scratch *scratch);\n unsigned int sbi_hart_pmp_log2gran(struct sbi_scratch *scratch);\n unsigned int sbi_hart_pmp_addrbits(struct sbi_scratch *scratch);\n bool sbi_hart_smepmp_is_fw_region(unsigned int pmp_idx);\n+void sbi_hart_pmp_fence(void);\n int sbi_hart_pmp_init(struct sbi_scratch *scratch);\n \n #endif\ndiff --git a/lib/sbi/sbi_hart_pmp.c b/lib/sbi/sbi_hart_pmp.c\nindex 62bc859a..7f970ca3 100644\n--- a/lib/sbi/sbi_hart_pmp.c\n+++ b/lib/sbi/sbi_hart_pmp.c\n@@ -62,7 +62,7 @@ bool sbi_hart_smepmp_is_fw_region(unsigned int pmp_idx)\n \treturn bitmap_test(fw_smepmp_ids, pmp_idx) ? true : false;\n }\n \n-static void sbi_hart_pmp_fence(void)\n+void sbi_hart_pmp_fence(void)\n {\n \t/*\n \t * As per section 3.7.2 of privileged specification v1.12,\n","prefixes":["v6","1/7"]}