lib: sbi: Add SBI Message Proxy (MPXY) framework

Introduce SBI Message Proxy (MPXY) framework which allows platform specific
code or drivers to register message protocol specific channels.

This framework enables the supervisor software to send messages belonging
to different message protocols via OpenSBI firmware.

Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
Co-developed-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
Co-developed-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
This commit is contained in:
Rahul Pathak authored and Anup Patel committed 2024-12-06 09:26:50 +05:30
1 parent 591a98bdd5
commit 7939bf1329
7 files changed
+915 -7

No files matched your search

+17
View File
@@ -126,6 +126,9 @@ struct sbi_platform_operations {
/** Initialize platform timer during cold boot */
int (*timer_init)(void);
/** Initialize the platform Message Proxy(MPXY) driver */
int (*mpxy_init)(void);
/** Check if SBI vendor extension is implemented or not */
bool (*vendor_ext_check)(void);
/** platform specific SBI extension implementation provider */
@@ -582,6 +585,20 @@ static inline int sbi_platform_timer_init(const struct sbi_platform *plat)
return 0;
}
/**
* Initialize the platform Message Proxy drivers
*
* @param plat pointer to struct sbi_platform
*
* @return 0 on success and negative error code on failure
*/
static inline int sbi_platform_mpxy_init(const struct sbi_platform *plat)
{
if (plat && sbi_platform_ops(plat)->mpxy_init)
return sbi_platform_ops(plat)->mpxy_init();
return 0;
}
/**
* Check if SBI vendor extension is implemented or not.
*