aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2025-01-21 17:36:29 +0530
committerAnup Patel <anup@brainfault.org>2025-02-13 11:10:03 +0530
commitec09918426a5ccff5de09cd41c3f36d0ad5443f1 (patch)
tree44e0064c815b9b81ed5b7b764773a0bf4bd18493 /include
parent61abd975f22f96ac900c3482945bdc2f82f6a9f6 (diff)
downloadopensbi-ec09918426a5ccff5de09cd41c3f36d0ad5443f1.tar.gz
opensbi-ec09918426a5ccff5de09cd41c3f36d0ad5443f1.tar.bz2
opensbi-ec09918426a5ccff5de09cd41c3f36d0ad5443f1.zip
lib: sbi: Update MPXY framework and SBI extension as per latest spec
The latest SBI 3.0 spec defines a new sbi_mpxy_get_shmem_size() function and simplifies sbi_mpxy_set_shmem() function so update the MPXY framework and SBI extension accordingly. Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_ecall_interface.h15
-rw-r--r--include/sbi/sbi_mpxy.h12
2 files changed, 15 insertions, 12 deletions
diff --git a/include/sbi/sbi_ecall_interface.h b/include/sbi/sbi_ecall_interface.h
index 0b6b5714..46a813e8 100644
--- a/include/sbi/sbi_ecall_interface.h
+++ b/include/sbi/sbi_ecall_interface.h
@@ -423,13 +423,14 @@ enum sbi_sse_state {
#define SBI_SSE_EVENT_PLATFORM_BIT (1 << 14)
/* SBI function IDs for MPXY extension */
-#define SBI_EXT_MPXY_SET_SHMEM 0x0
-#define SBI_EXT_MPXY_GET_CHANNEL_IDS 0x1
-#define SBI_EXT_MPXY_READ_ATTRS 0x2
-#define SBI_EXT_MPXY_WRITE_ATTRS 0x3
-#define SBI_EXT_MPXY_SEND_MSG_WITH_RESP 0x4
-#define SBI_EXT_MPXY_SEND_MSG_NO_RESP 0x5
-#define SBI_EXT_MPXY_GET_NOTIFICATION_EVENTS 0x6
+#define SBI_EXT_MPXY_GET_SHMEM_SIZE 0x0
+#define SBI_EXT_MPXY_SET_SHMEM 0x1
+#define SBI_EXT_MPXY_GET_CHANNEL_IDS 0x2
+#define SBI_EXT_MPXY_READ_ATTRS 0x3
+#define SBI_EXT_MPXY_WRITE_ATTRS 0x4
+#define SBI_EXT_MPXY_SEND_MSG_WITH_RESP 0x5
+#define SBI_EXT_MPXY_SEND_MSG_WITHOUT_RESP 0x6
+#define SBI_EXT_MPXY_GET_NOTIFICATION_EVENTS 0x7
/* SBI base specification related macros */
#define SBI_SPEC_VERSION_MAJOR_OFFSET 24
diff --git a/include/sbi/sbi_mpxy.h b/include/sbi/sbi_mpxy.h
index e30a17d1..9da2791e 100644
--- a/include/sbi/sbi_mpxy.h
+++ b/include/sbi/sbi_mpxy.h
@@ -153,11 +153,13 @@ int sbi_mpxy_init(struct sbi_scratch *scratch);
/** Check if some Message proxy channel is available */
bool sbi_mpxy_channel_available(void);
-/** Set Message proxy shared memory on the calling HART */
-int sbi_mpxy_set_shmem(unsigned long shmem_size,
- unsigned long shmem_phys_lo,
- unsigned long shmem_phys_hi,
- unsigned long flags);
+/** Get message proxy shared memory size */
+unsigned long sbi_mpxy_get_shmem_size(void);
+
+/** Set message proxy shared memory on the calling HART */
+int sbi_mpxy_set_shmem(unsigned long shmem_phys_lo,
+ unsigned long shmem_phys_hi,
+ unsigned long flags);
/** Get channel IDs list */
int sbi_mpxy_get_channel_ids(u32 start_index);