Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2230815/?format=api
{ "id": 2230815, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230815/?format=api", "web_url": "http://patchwork.ozlabs.org/project/opensbi/patch/20260430045528.420437-8-npiggin@gmail.com/", "project": { "id": 67, "url": "http://patchwork.ozlabs.org/api/1.1/projects/67/?format=api", "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": "<20260430045528.420437-8-npiggin@gmail.com>", "date": "2026-04-30T04:55:24", "name": "[6/7] lib: sbi: Add hart_ prefix to PMP functions", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1888eac5b650bebf33063cecb152e1e5fe1b8cdb", "submitter": { "id": 69518, "url": "http://patchwork.ozlabs.org/api/1.1/people/69518/?format=api", "name": "Nicholas Piggin", "email": "npiggin@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/opensbi/patch/20260430045528.420437-8-npiggin@gmail.com/mbox/", "series": [ { "id": 502193, "url": "http://patchwork.ozlabs.org/api/1.1/series/502193/?format=api", "web_url": "http://patchwork.ozlabs.org/project/opensbi/list/?series=502193", "date": "2026-04-30T04:55:18", "name": "Make PMP encoding usable for non-hart PMPs", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502193/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2230815/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2230815/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=0cuGNeJc;\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=20251104 header.b=gDWdxUbc;\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 4g5hhg6lfkz1yGq\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 14:56:19 +1000 (AEST)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wIJRe-00000004gFK-3499;\n\tThu, 30 Apr 2026 04:56:14 +0000", "from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wIJRc-00000004gEW-1UEl\n\tfor opensbi@lists.infradead.org;\n\tThu, 30 Apr 2026 04:56:13 +0000", "by mail-pg1-x532.google.com with SMTP id\n 41be03b00d2f7-c79506f3c40so162303a12.1\n for <opensbi@lists.infradead.org>;\n Wed, 29 Apr 2026 21:56:12 -0700 (PDT)", "from localhost ([124.158.97.178])\n by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c7fd5e6cf20sm3746277a12.3.2026.04.29.21.56.08\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 29 Apr 2026 21:56:09 -0700 (PDT)" ], "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=uP8xmn/48k1h0sVsfof/h1wuIjhHkQCjB4A90uI5sOs=; b=0cuGNeJcarwg8q\n\ttBwvj4mC4319ci1l7cWRZF6/jPQ8ksjdSqnurbc1dnJyf/wNCZt4JvGTY4inZFZJruUTvy+jiUX3h\n\tccYwX2cNA797hNN1YMXhfG/jqUOyziQeSat9EFEm04gDAX5DOQn8nAh6SdXoqCuo3CPG4UEMXAwMo\n\tpNdDYmMpvv3DD82Q8KgmKnWZ8UR4FLJ2YPzh8av/8p7w7hScUK0kAKk20FMQ4Diz1G4iSRehL+TWs\n\tii/st9eZYdi+LDa8nezsyaHrdjoxesi3kh0b6S42wPcbYbNUhUqK3G38STSkbf1PAezFy+fxAm4Nm\n\tavSv4QG8iGil/SiVR55g==;", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777524970; x=1778129770;\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=4wzDogUQvoSkhk9vFb3XQ8fdLIe6z+NsDYZSHynFcmI=;\n b=gDWdxUbcvEFvIdDOdmnP/JDsW5IpQmKwqPYbXfKydsfbL0g8wW8O01s+oyo8A6zKox\n IJJLcmm+axZ/qMGcbTtKwC439dg45YsZc9SvsXJj4sOhE15kQkVj2tSi04X8NuEYup4l\n 9r+8ei6so1pFkZFZ5xBx6T8dI+Luk9kqGlyRZE63hZOCyR05iHEJaAs8OpxLyvKzFXcb\n fhytN2Sokw9yM9XcjVfRCWL156kkKBnX/zAcE9t6PONUwgj0HCUPGZOPxDW17Rf8w3y2\n 6h/ONnu6gfiiXrPFjq9Hc/ByMHoo/gKNnSGkxidZ/PLhs5CLqEr2euWs48bBzUwE9l4v\n 9IhA==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777524970; x=1778129770;\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=4wzDogUQvoSkhk9vFb3XQ8fdLIe6z+NsDYZSHynFcmI=;\n b=CdRWSH1zaEBwg73YOatfljJnp+XsV4/H4s/jhkP4sEYkl+Ery74neUVYI9J7qq3GqY\n Vkg16loybJoT3JvJ81iwBDpk8VLNfkwq+liplegaFb+56NmhN/OJwFVYHu7AA4ezarP+\n LTCnGo+9brMQ4yTTw44iHZsDDA2VA9UfRTe3g8V6UFn2Wxxan5+BRSmX7D/SU7tfs1+e\n wv24YDYcKNc4qtDAw3EhMuCRQJ6lTwMf3vPWBzvfwRA95ybqn12ujCVFYlWTLg+Hvc0Q\n 2yXzlowgYuXq+cgMiU9BPitninyWvToJlfOq6YFxFwUi37K/T9QRWbiV9hJJFum1Kd/n\n 68Rw==", "X-Gm-Message-State": "AOJu0Yx/pZEP0MIPvJkwSEBjwUt8BFTjX6+Lte5Pe+JTXEI0P3rHEYgm\n\t6oxPws36iSynPnXYIe/bQgahFXX5qnugbhrGkoqca/x4rLIsxx0ZPAXfdkr+kQ==", "X-Gm-Gg": "AeBDiesFtz5wnhGhqdOs3xxZfKwncRWxxzhcuxh6/F/dc9TQvUz5n6oRXQtg3cEcUcB\n\tZ8QHr7qGKW8OgEVh/zRWyRwPykAQtCQjuAMvH5I7syK6Zrl9B3VqtcVnUOtSG4z/e1jp2ek9XOo\n\t2ksIzyNEpGLFO4kuK0z3jPJb+3QSlTXbXybT1EPc0/gGs9LTnsLi9kYHag0k5st/8Kq44RfH67o\n\t7fmjRPZMe3ECR7Fl0vVPN6lQL/Kiv2t0aVwP1g+JXipWH8f5BKeB4RbOHi8CKhLhbVBOWot1L6P\n\tE15guz79JA8uo7vWp3TmtuCh0fQ1Jn5evi4W+u5ztCp0vK57uhrTYmukJvuFI7vev2A66AwqSee\n\t6o9nTphG5+LC6rE6+vyNVcWwl+0apbD/AHI/gEJMgWXB8HGYV8PnNLPWT/JYy+ziWEorkqU2Efy\n\tgeI4RGNixc82jFhxZMtl7ZugyDSkrH4dXuw2jFHPe7T3c=", "X-Received": "by 2002:a05:6a21:3086:b0:398:8d38:c60c with SMTP id\n adf61e73a8af0-3a3cf7f1e01mr1488680637.55.1777524970284;\n Wed, 29 Apr 2026 21:56:10 -0700 (PDT)", "From": "Nicholas Piggin <npiggin@gmail.com>", "To": "opensbi@lists.infradead.org", "Cc": "Nicholas Piggin <npiggin@gmail.com>", "Subject": "[PATCH 6/7] lib: sbi: Add hart_ prefix to PMP functions", "Date": "Thu, 30 Apr 2026 14:55:24 +1000", "Message-ID": "<20260430045528.420437-8-npiggin@gmail.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260430045528.420437-1-npiggin@gmail.com>", "References": "<20260430045528.420437-1-npiggin@gmail.com>", "MIME-Version": "1.0", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260429_215612_401798_B759DC6D ", "X-CRM114-Status": "GOOD ( 16.78 )", "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: PMP functions that deal with hart PMP CSRs are given a\n hart_\n prefix,\n to distinguish from RISC-V PMP encoding functions. The is_pmp_entry_mapped()\n function is changed a little more, to align with other PMP conventions,\n and\n made to return a bool to make it more obvious that it returns a bool and\n not an SBI_ return code.\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:532 listed in]\n [list.dnswl.org]\n 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS SPF: sender matches SPF record\n -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n author's\n domain\n 0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID Message has at least one valid DKIM or DK\n signature\n -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from\n envelope-from domain\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 [npiggin(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": "PMP functions that deal with hart PMP CSRs are given a hart_ prefix, to\ndistinguish from RISC-V PMP encoding functions.\n\nThe is_pmp_entry_mapped() function is changed a little more, to align\nwith other PMP conventions, and made to return a bool to make it more\nobvious that it returns a bool and not an SBI_ return code.\n\nSigned-off-by: Nicholas Piggin <npiggin@gmail.com>\n---\n include/sbi/riscv_asm.h | 10 +++++----\n lib/sbi/riscv_asm.c | 10 ++++-----\n lib/sbi/sbi_hart_pmp.c | 18 ++++++++--------\n platform/generic/eswin/eic770x.c | 36 ++++++++++++++++----------------\n 4 files changed, 38 insertions(+), 36 deletions(-)", "diff": "diff --git a/include/sbi/riscv_asm.h b/include/sbi/riscv_asm.h\nindex 0cf3fc37..f845320b 100644\n--- a/include/sbi/riscv_asm.h\n+++ b/include/sbi/riscv_asm.h\n@@ -81,6 +81,8 @@\n \n #ifndef __ASSEMBLER__\n \n+#include <sbi/sbi_types.h>\n+\n #define csr_swap(csr, val) \\\n \t({ \\\n \t\tregister unsigned long __v = (unsigned long)(val); \\\n@@ -210,15 +212,15 @@ int misa_xlen(void);\n void misa_string(int xlen, char *out, unsigned int out_sz);\n \n /* Disable pmp entry at a given index */\n-int pmp_disable(unsigned int n);\n+int hart_pmp_disable(unsigned int n);\n \n /* Check if the matching field is set */\n-int is_pmp_entry_mapped(unsigned long entry);\n+bool hart_is_pmp_enabled(unsigned int n);\n \n-int pmp_set(unsigned int n, unsigned long prot, unsigned long addr,\n+int hart_pmp_set(unsigned int n, unsigned long prot, unsigned long addr,\n \t unsigned long log2len);\n \n-int pmp_get(unsigned int n, unsigned long *prot_out, unsigned long *addr_out,\n+int hart_pmp_get(unsigned int n, unsigned long *prot_out, unsigned long *addr_out,\n \t unsigned long *log2len);\n \n #endif /* !__ASSEMBLER__ */\ndiff --git a/lib/sbi/riscv_asm.c b/lib/sbi/riscv_asm.c\nindex c0ad4dbe..98a93462 100644\n--- a/lib/sbi/riscv_asm.c\n+++ b/lib/sbi/riscv_asm.c\n@@ -332,7 +332,7 @@ static int hart_pmp_write(pmp_t *pmp, unsigned int n)\n \treturn SBI_OK;\n }\n \n-int pmp_disable(unsigned int n)\n+int hart_pmp_disable(unsigned int n)\n {\n \tpmp_t pmp;\n \tint rc;\n@@ -346,17 +346,17 @@ int pmp_disable(unsigned int n)\n \treturn hart_pmp_write(&pmp, n);\n }\n \n-int is_pmp_entry_mapped(unsigned long entry)\n+bool hart_is_pmp_enabled(unsigned int n)\n {\n \tpmp_t pmp;\n \n-\tif (hart_pmp_read(&pmp, entry) != SBI_OK)\n+\tif (hart_pmp_read(&pmp, n) != SBI_OK)\n \t\treturn false;\n \n \treturn pmp_is_enabled(&pmp);\n }\n \n-int pmp_set(unsigned int n, unsigned long prot, unsigned long addr,\n+int hart_pmp_set(unsigned int n, unsigned long prot, unsigned long addr,\n \t unsigned long log2len)\n {\n \tpmp_t pmp;\n@@ -369,7 +369,7 @@ int pmp_set(unsigned int n, unsigned long prot, unsigned long addr,\n \treturn hart_pmp_write(&pmp, n);\n }\n \n-int pmp_get(unsigned int n, unsigned long *prot_out, unsigned long *addr_out,\n+int hart_pmp_get(unsigned int n, unsigned long *prot_out, unsigned long *addr_out,\n \t unsigned long *log2len)\n {\n \tpmp_t pmp;\ndiff --git a/lib/sbi/sbi_hart_pmp.c b/lib/sbi/sbi_hart_pmp.c\nindex 02a3b3c4..8b7b091c 100644\n--- a/lib/sbi/sbi_hart_pmp.c\n+++ b/lib/sbi/sbi_hart_pmp.c\n@@ -100,7 +100,7 @@ static void sbi_hart_smepmp_set(struct sbi_scratch *scratch,\n \t\tsbi_platform_pmp_set(sbi_platform_ptr(scratch),\n \t\t\t\t pmp_idx, reg->flags, pmp_flags,\n \t\t\t\t reg->base, reg->order);\n-\t\tpmp_set(pmp_idx, pmp_flags, reg->base, reg->order);\n+\t\thart_pmp_set(pmp_idx, pmp_flags, reg->base, reg->order);\n \t} else {\n \t\tsbi_printf(\"Can not configure pmp for domain %s because\"\n \t\t\t \" memory region address 0x%lx or size 0x%lx \"\n@@ -139,7 +139,7 @@ static int sbi_hart_smepmp_configure(struct sbi_scratch *scratch)\n \tcsr_set(CSR_MSECCFG, MSECCFG_RLB);\n \n \t/* Disable the reserved entry */\n-\tpmp_disable(SBI_SMEPMP_RESV_ENTRY);\n+\thart_pmp_disable(SBI_SMEPMP_RESV_ENTRY);\n \n \t/* Program M-only regions when MML is not set. */\n \tpmp_idx = 0;\n@@ -206,7 +206,7 @@ static int sbi_hart_smepmp_configure(struct sbi_scratch *scratch)\n \t}\n \t/* Disable remaining PMP entries */\n \tfor(; pmp_idx < pmp_count; pmp_idx++)\n-\t\tpmp_disable(pmp_idx);\n+\t\thart_pmp_disable(pmp_idx);\n \n \t/*\n \t * All entries are programmed.\n@@ -224,7 +224,7 @@ static int sbi_hart_smepmp_map_range(struct sbi_scratch *scratch,\n \tunsigned int pmp_flags = (PMP_W | PMP_X);\n \tunsigned long order, base = 0;\n \n-\tif (is_pmp_entry_mapped(SBI_SMEPMP_RESV_ENTRY))\n+\tif (hart_is_pmp_enabled(SBI_SMEPMP_RESV_ENTRY))\n \t\treturn SBI_ENOSPC;\n \n \tfor (order = MAX(sbi_hart_pmp_log2gran(scratch), log2roundup(size));\n@@ -244,7 +244,7 @@ static int sbi_hart_smepmp_map_range(struct sbi_scratch *scratch,\n \tsbi_platform_pmp_set(sbi_platform_ptr(scratch), SBI_SMEPMP_RESV_ENTRY,\n \t\t\t SBI_DOMAIN_MEMREGION_SHARED_SURW_MRW,\n \t\t\t pmp_flags, base, order);\n-\tpmp_set(SBI_SMEPMP_RESV_ENTRY, pmp_flags, base, order);\n+\thart_pmp_set(SBI_SMEPMP_RESV_ENTRY, pmp_flags, base, order);\n \n \treturn SBI_OK;\n }\n@@ -253,7 +253,7 @@ static int sbi_hart_smepmp_unmap_range(struct sbi_scratch *scratch,\n \t\t\t\t unsigned long addr, unsigned long size)\n {\n \tsbi_platform_pmp_disable(sbi_platform_ptr(scratch), SBI_SMEPMP_RESV_ENTRY);\n-\treturn pmp_disable(SBI_SMEPMP_RESV_ENTRY);\n+\treturn hart_pmp_disable(SBI_SMEPMP_RESV_ENTRY);\n }\n \n static int sbi_hart_oldpmp_configure(struct sbi_scratch *scratch)\n@@ -281,7 +281,7 @@ static int sbi_hart_oldpmp_configure(struct sbi_scratch *scratch)\n \t\t\tsbi_platform_pmp_set(sbi_platform_ptr(scratch),\n \t\t\t\t\t pmp_idx, reg->flags, pmp_flags,\n \t\t\t\t\t reg->base, reg->order);\n-\t\t\tpmp_set(pmp_idx++, pmp_flags, reg->base, reg->order);\n+\t\t\thart_pmp_set(pmp_idx++, pmp_flags, reg->base, reg->order);\n \t\t} else {\n \t\t\tsbi_printf(\"Can not configure pmp for domain %s because\"\n \t\t\t\t \" memory region address 0x%lx or size 0x%lx \"\n@@ -291,7 +291,7 @@ static int sbi_hart_oldpmp_configure(struct sbi_scratch *scratch)\n \t}\n \t/* Disable remaining PMP entries */\n \tfor(; pmp_idx < pmp_count; pmp_idx++)\n-\t\tpmp_disable(pmp_idx);\n+\t\thart_pmp_disable(pmp_idx);\n \n \tsbi_hart_pmp_fence();\n \treturn 0;\n@@ -307,7 +307,7 @@ static void sbi_hart_pmp_unconfigure(struct sbi_scratch *scratch)\n \t\t\tcontinue;\n \n \t\tsbi_platform_pmp_disable(sbi_platform_ptr(scratch), i);\n-\t\tpmp_disable(i);\n+\t\thart_pmp_disable(i);\n \t}\n }\n \ndiff --git a/platform/generic/eswin/eic770x.c b/platform/generic/eswin/eic770x.c\nindex 7330df9f..dfca0c41 100644\n--- a/platform/generic/eswin/eic770x.c\n+++ b/platform/generic/eswin/eic770x.c\n@@ -254,21 +254,21 @@ static int eswin_eic7700_final_init(bool cold_boot)\n \t\t\t\t __func__);\n \t\t\treturn SBI_EFAIL;\n \t\t}\n-\t\tpmp_set(pmp_idx++, sbi_domain_get_oldpmp_flags(reg),\n-\t\t\treg->base, reg->order);\n+\t\thart_pmp_set(pmp_idx++, sbi_domain_get_oldpmp_flags(reg),\n+\t\t\t reg->base, reg->order);\n \t}\n \n-\tpmp_set(PMP_RESERVED_A, PMP_L, EIC770X_L3_ZERO_REMOTE,\n-\t\t\t log2roundup(EIC770X_L3_ZERO_SIZE));\n+\thart_pmp_set(PMP_RESERVED_A, PMP_L, EIC770X_L3_ZERO_REMOTE,\n+\t\t log2roundup(EIC770X_L3_ZERO_SIZE));\n \t/**\n \t * Enable P550 internal + System Port, so OpenSBI can access\n \t * CLINT/PLIC/UART. Might be overwritten in pmp_configure.\n \t */\n-\tpmp_set(PMP_FREE_A_START + PMP_FREE_A_COUNT - 1, 0, 0,\n-\t\tlog2roundup(EIC770X_MEMPORT_BASE));\n+\thart_pmp_set(PMP_FREE_A_START + PMP_FREE_A_COUNT - 1, 0, 0,\n+\t\t log2roundup(EIC770X_MEMPORT_BASE));\n \n-\tpmp_set(PMP_RESERVED_B, PMP_L, 0,\n-\t\tlog2roundup(EIC770X_MEMPORT_LIMIT));\n+\thart_pmp_set(PMP_RESERVED_B, PMP_L, 0,\n+\t\t log2roundup(EIC770X_MEMPORT_LIMIT));\n \t/**\n \t * These must come after the setup of PMP, as we are about to\n \t * enable speculation and HW prefetcher bits\n@@ -321,13 +321,13 @@ static int eswin_eic7700_pmp_configure(struct sbi_scratch *scratch)\n \t\tif (pmp_idx >= pmp_max)\n \t\t\tgoto no_more_pmp;\n \n-\t\tpmp_set(pmp_idx++, sbi_domain_get_oldpmp_flags(reg),\n-\t\t\treg->base, reg->order);\n+\t\thart_pmp_set(pmp_idx++, sbi_domain_get_oldpmp_flags(reg),\n+\t\t\t reg->base, reg->order);\n \t\tprev = reg;\n \t}\n \t/* Disable the rest */\n \twhile (pmp_idx < pmp_max)\n-\t\tpmp_disable(pmp_idx++);\n+\t\thart_pmp_disable(pmp_idx++);\n \n \t/* Process the second free range B [7-7] */\n \tpmp_idx = PMP_FREE_B_START,\n@@ -340,12 +340,12 @@ static int eswin_eic7700_pmp_configure(struct sbi_scratch *scratch)\n \t\tif (pmp_idx >= pmp_max)\n \t\t\tgoto no_more_pmp;\n \n-\t\tpmp_set(pmp_idx++, sbi_domain_get_oldpmp_flags(reg),\n-\t\t\treg->base, reg->order);\n+\t\thart_pmp_set(pmp_idx++, sbi_domain_get_oldpmp_flags(reg),\n+\t\t\t reg->base, reg->order);\n \t}\n \t/* Disable the rest */\n \twhile (pmp_idx < pmp_max)\n-\t\tpmp_disable(pmp_idx++);\n+\t\thart_pmp_disable(pmp_idx++);\n \n \tsbi_hart_pmp_fence();\n \treturn 0;\n@@ -357,14 +357,14 @@ no_more_pmp:\n static void eswin_eic7700_pmp_unconfigure(struct sbi_scratch *scratch)\n {\n \t/* Enable P550 internal + System Port */\n-\tpmp_set(PMP_FREE_A_START + PMP_FREE_A_COUNT - 1, 0, 0,\n-\t\tlog2roundup(EIC770X_MEMPORT_BASE));\n+\thart_pmp_set(PMP_FREE_A_START + PMP_FREE_A_COUNT - 1, 0, 0,\n+\t\t log2roundup(EIC770X_MEMPORT_BASE));\n \n \tfor (unsigned int i = 0; i < PMP_FREE_A_COUNT - 1; i++)\n-\t\tpmp_disable(i + PMP_FREE_A_START);\n+\t\thart_pmp_disable(i + PMP_FREE_A_START);\n \n \tfor (unsigned int i = 0; i < PMP_FREE_B_COUNT; i++)\n-\t\tpmp_disable(i + PMP_FREE_B_START);\n+\t\thart_pmp_disable(i + PMP_FREE_B_START);\n }\n \n static struct sbi_hart_protection eswin_eic7700_pmp_protection = {\n", "prefixes": [ "6/7" ] }