firmware: rpmi: add support for the SBI MPXY transport
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/5 firmware: rpmi: add support for the SBI MPXY transport
This adds an RPMI transport driver for the Supervisor Binary Interface (SBI) message proxy (MPXY) extension [1].
This is for S-Mode U-Boot where some supervisor software (such as OpenSBI) runs in M-Mode and handles the low level communication with the PuC.
[1]: https://github.com/riscv-non-isa/riscv-sbi-doc (chapter 20)
---
Changes in v3: None
Changes in v2: (from Yao Zi review)
- Reorder headers
- Remove struct sbi_mpxy_rpmi_channel_attrs and struct sbi_mpxy_channel_attrs for simpler u32 arrays
- Don't null check pointers before free()
--- arch/riscv/include/asm/sbi.h | 57 ++++ drivers/firmware/rpmi/Kconfig | 9 + drivers/firmware/rpmi/Makefile | 1 + drivers/firmware/rpmi/rpmi-sbi-mpxy.c | 410 ++++++++++++++++++++++++++ 4 files changed, 477 insertions(+) create mode 100644 drivers/firmware/rpmi/rpmi-sbi-mpxy.c
arch/riscv/include/asm/sbi.h +57 -0
@@ -10,6 +10,7 @@#define _ASM_RISCV_SBI_H#include <linux/types.h> +#include <linux/errno.h> enum sbi_ext_id {SBI_EXT_0_1_SET_TIMER =0x0 ,
@@ -104,6 +105,17 @@ enum sbi_ext_dbcn_fid { SBI_EXT_DBCN_CONSOLE_WRITE_BYTE, }; +enum sbi_ext_mpxy_fid { +SBI_EXT_MPXY_GET_SHMEM_SIZE =0 , +SBI_EXT_MPXY_SET_SHMEM , +SBI_EXT_MPXY_GET_CHANNEL_IDS , +SBI_EXT_MPXY_READ_ATTRS , +SBI_EXT_MPXY_WRITE_ATTRS , +SBI_EXT_MPXY_SEND_MSG_WITH_RESP , +SBI_EXT_MPXY_SEND_MSG_WITHOUT_RESP , +SBI_EXT_MPXY_GET_NOTIFICATION_EVENTS , +}; +#ifdef CONFIG_SBI_V01 #define SBI_EXT_SET_TIMER SBI_EXT_0_1_SET_TIMER#define SBI_FID_SET_TIMER 0
@@ -132,6 +144,14 @@ enum sbi_ext_dbcn_fid {#define SBI_SPEC_VERSION_MAJOR_MASK 0x7f#define SBI_SPEC_VERSION_MINOR_MASK 0xffffff +static inline unsigned long sbi_mk_version (unsigned long major, +unsigned long minor) +{ +return ((major &SBI_SPEC_VERSION_MAJOR_MASK ) + <<SBI_SPEC_VERSION_MAJOR_SHIFT ) | + (minor &SBI_SPEC_VERSION_MINOR_MASK ); +} +/* SBI return error codes */ #define SBI_SUCCESS 0#define SBI_ERR_FAILURE -1
@@ -139,6 +159,43 @@ enum sbi_ext_dbcn_fid {#define SBI_ERR_INVALID_PARAM -3#define SBI_ERR_DENIED -4#define SBI_ERR_INVALID_ADDRESS -5 +#define SBI_ERR_ALREADY_AVAILABLE -6 +#define SBI_ERR_ALREADY_STARTED -7 +#define SBI_ERR_ALREADY_STOPPED -8 +#define SBI_ERR_NO_SHMEM -9 +#define SBI_ERR_INVALID_STATE -10 +#define SBI_ERR_BAD_RANGE -11 +#define SBI_ERR_TIMEOUT -12 +#define SBI_ERR_IO -13 +#define SBI_ERR_DENIED_LOCKED -14 + +static inline int sbi_to_linux_error (int err) +{ +switch (err) { +case SBI_SUCCESS : +return 0 ; +case SBI_ERR_DENIED : +case SBI_ERR_DENIED_LOCKED : +return -EPERM ; +case SBI_ERR_INVALID_PARAM : +case SBI_ERR_INVALID_STATE : +return -EINVAL ; +case SBI_ERR_BAD_RANGE : +return -ERANGE ; +case SBI_ERR_INVALID_ADDRESS : +return -EFAULT ; +case SBI_ERR_NO_SHMEM : +return -ENOMEM ; +case SBI_ERR_TIMEOUT : +return -ETIMEDOUT ; +case SBI_ERR_IO : +return -EIO ; +case SBI_ERR_NOT_SUPPORTED : +case SBI_ERR_FAILURE : +default : +return -EOPNOTSUPP ; + }; +}struct sbiret {long error;
drivers/firmware/rpmi/Kconfig +9 -0
@@ -7,3 +7,12 @@ config RPMI_FIRMWARE protocol for communication between an Application Processor (AP) and a platform microcontroller (PuC). The RPMI specification is available at: https://github.com/riscv-non-isa/riscv-rpmi + +config RPMI_SBI_MPXY + bool "RPMI over SBI MPXY transport" + depends on RPMI_FIRMWARE && SBI + help + Enable support for transport of RPMI messages over the message proxy + (MPXY) extension of the supervisor binary interface (SBI). The + specification for the MPXY extension is available at: + https://github.com/riscv-non-isa/riscv-sbi-doc (chapter 20)
drivers/firmware/rpmi/Makefile +1 -0
@@ -1 +1,2 @@ obj-y += rpmi-uclass.o +obj-$(CONFIG_RPMI_SBI_MPXY) += rpmi-sbi-mpxy.o
drivers/firmware/rpmi/rpmi-sbi-mpxy.c new file +410 -0
410 lines not on this page · raw message
Signature · 1 line
2.52.0
PATCH v3 2/5 firmware: rpmi: add support for shared memory transport
In reply to a message not in the archiveAdd support for transport of RPMI messages over shared memory as described in the RPMI spec [1]. This uses two or four ring buffers composed of a fixed number of "slots" to pass messages between the AP and the PuC. U-Boot is the Application processor (AP) and sends messages through the a2p-req queue and receives response though the p2a-ack queue. There is no support for platform microcontroller (PuC) initiated requests nor notifications.
This transport can be used in M or S mode U-Boot, but in the S-mode case, one must make sure that the supervisor software isn't already using the AP side of the shared memory.
[1]: https://github.com/riscv-non-isa/riscv-rpmi (chapter 2)
---
Changes in v3: None
Changes in v2: (from Yao Zi review)
- Reorder headers
- Don't null check pointers before free()
--- drivers/firmware/rpmi/Kconfig | 8 + drivers/firmware/rpmi/Makefile | 1 + drivers/firmware/rpmi/rpmi-shmem.c | 473 +++++++++++++++++++++++++++++ include/rpmi_proto.h | 23 ++ 4 files changed, 505 insertions(+) create mode 100644 drivers/firmware/rpmi/rpmi-shmem.c
drivers/firmware/rpmi/Kconfig +8 -0
@@ -16,3 +16,11 @@ config RPMI_SBI_MPXY (MPXY) extension of the supervisor binary interface (SBI). The specification for the MPXY extension is available at: https://github.com/riscv-non-isa/riscv-sbi-doc (chapter 20) + +config RPMI_SHMEM + bool "RPMI over shared memory transport" + depends on RPMI_FIRMWARE + help + Enable support for transport of RPMI messages over shared memory as + described in chapter 2 of the RPMI specification, available at: + https://github.com/riscv-non-isa/riscv-rpmi
drivers/firmware/rpmi/Makefile +1 -0
@@ -1,2 +1,3 @@ obj-y += rpmi-uclass.o obj-$(CONFIG_RPMI_SBI_MPXY) += rpmi-sbi-mpxy.o +obj-$(CONFIG_RPMI_SHMEM) += rpmi-shmem.o
drivers/firmware/rpmi/rpmi-shmem.c new file +473 -0
473 lines not on this page · raw message
include/rpmi_proto.h +23 -0
@@ -60,4 +60,27 @@ enum rpmi_servicegroup_id { RPMI_SRVGRP_VENDOR_END = 0xFFFF, }; +/** RPMI Base ServiceGroup Service IDs */ +enum rpmi_base_service_id { +RPMI_BASE_SRV_ENABLE_NOTIFICATION =0x01 , +RPMI_BASE_SRV_GET_IMPLEMENTATION_VERSION =0x02 , +RPMI_BASE_SRV_GET_IMPLEMENTATION_IDN =0x03 , +RPMI_BASE_SRV_GET_SPEC_VERSION =0x04 , +RPMI_BASE_SRV_GET_PLATFORM_INFO =0x05 , +RPMI_BASE_SRV_PROBE_SERVICE_GROUP =0x06 , +RPMI_BASE_SRV_GET_ATTRIBUTES =0x07 , +}; + +/** RPMI Messages Types */ +enum rpmi_message_type { +/* Normal request backed with ack */ +RPMI_MSG_NORMAL_REQUEST =0x0 , +/* Request without any ack */ +RPMI_MSG_POSTED_REQUEST =0x1 , +/* Acknowledgment for normal request message */ +RPMI_MSG_ACKNOWLDGEMENT =0x2 , +/* Notification message */ +RPMI_MSG_NOTIFICATION =0x3 , +}; +#endif
Signature · 1 line
2.52.0
PATCH v3 3/5 drivers: clk: add support for RPMI clocks
In reply to a message not in the archiveThe RISC-V Platform Management Interface (RPMI) defines a service group for control and monitoring of clocks [1]. This can be exposed as a UCLASS_CLK driver.
[1]: https://github.com/riscv-non-isa/riscv-rpmi (chapter 4.8)
---
Changes in v3: None
Changes in v2: (from Yao Zi review)
- Reorder headers
- Don't null check pointers before free()
- Remove transition_latency from struct rpmi_clk_def as its unused
- Simplify last return path of _rpmi_clk_enable_disable()
- Move the call to _rpmi_clk_get_rate() from _rpmi_clk_set_rate() to rpmi_clk_set_rate()
--- MAINTAINERS | 1 + drivers/clk/Kconfig | 7 + drivers/clk/Makefile | 1 + drivers/clk/clk_rpmi.c | 344 +++++++++++++++++++++++++++++++++++++++++ include/rpmi_proto.h | 39 +++++ 5 files changed, 392 insertions(+) create mode 100644 drivers/clk/clk_rpmi.c
MAINTAINERS +1 -0
@@ -1623,6 +1623,7 @@ F: doc/README.rockusb RPMI M: Charles Perry <[email protected]> S: Maintained +F: drivers/clk/clk_rpmi.c F: drivers/firmware/rpmi/ F: include/rpmi*
drivers/clk/Kconfig +7 -0
@@ -181,6 +181,13 @@ config CLK_OCTEON help Enable this to support the clocks on Octeon MIPS platforms. +config CLK_RPMI + bool "Enable RPMI clock driver" + depends on CLK && RPMI_FIRMWARE + help + Enable this option if you want to support clock devices exposed + by RISC-V Platform Management Interface (RPMI). + config SANDBOX_CLK_CCF bool "Sandbox Common Clock Framework [CCF] support" depends on SANDBOX
drivers/clk/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_CLK_OWL) += owl/ obj-$(CONFIG_CLK_QCOM) += qcom/ obj-$(CONFIG_CLK_RENESAS) += renesas/ obj-$(CONFIG_$(PHASE_)CLK_RS9_PCIE) += clk-renesas-pcie.o +obj-$(CONFIG_CLK_RPMI) += clk_rpmi.o obj-$(CONFIG_$(PHASE_)CLK_SCMI) += clk_scmi.o obj-$(CONFIG_CLK_SIFIVE) += sifive/ obj-$(CONFIG_CLK_SOPHGO) += sophgo/
drivers/clk/clk_rpmi.c new file +344 -0
344 lines not on this page · raw message
include/rpmi_proto.h +39 -0
@@ -83,4 +83,43 @@ enum rpmi_message_type { RPMI_MSG_NOTIFICATION = 0x3, }; +/* RPMI clock service IDs */ +enum rpmi_clock_service_id { +RPMI_CLK_SRV_ENABLE_NOTIFICATION =0x01 , +RPMI_CLK_SRV_GET_NUM_CLOCKS =0x02 , +RPMI_CLK_SRV_GET_ATTRIBUTES =0x03 , +RPMI_CLK_SRV_GET_SUPPORTED_RATES =0x04 , +RPMI_CLK_SRV_SET_CONFIG =0x05 , +RPMI_CLK_SRV_GET_CONFIG =0x06 , +RPMI_CLK_SRV_SET_RATE =0x07 , +RPMI_CLK_SRV_GET_RATE =0x08 , +RPMI_CLK_SRV_ID_MAX_COUNT +}; + +/** Clock rate match mode */ +enum rpmi_clock_rate_match { +RPMI_CLK_RATE_MATCH_PLATFORM =0 , +RPMI_CLK_RATE_MATCH_ROUND_DOWN =1 , +RPMI_CLK_RATE_MATCH_ROUND_UP =2 , +RPMI_CLK_RATE_MATCH_MAX +}; + +/** Supported clock states */ +enum rpmi_clock_state { +RPMI_CLK_STATE_DISABLED =0 , +RPMI_CLK_STATE_ENABLED =1 , +RPMI_CLK_STATE_MAX +}; + +/** Clock type based on rate format */ +enum rpmi_clock_type { +RPMI_CLK_TYPE_DISCRETE =0 , +RPMI_CLK_TYPE_LINEAR =1 , +RPMI_CLK_TYPE_MAX +}; + +#define RPMI_CLK_NAME_LEN 16 + +#define RPMI_CLOCK_RATE_INVALID (-1ULL) +#endif
Signature · 1 line
2.52.0
PATCH v3 4/5 firmware: rpmi: add a test and a sandbox driver
In reply to a message not in the archiveCreate a new transport layer that sends the messages to a simulated RPMI firmware.
For now, this only contains a simulation of the clock service group which is implemented using code from librpmi [1] and adapted.
Also add a test in test/dm that makes use of the RPMI clock driver.
---
Changes in v3: None
Changes in v2:
- Reorder headers
--- MAINTAINERS | 1 + arch/sandbox/dts/test.dts | 12 + configs/sandbox_defconfig | 2 + drivers/firmware/rpmi/Kconfig | 3 +- drivers/firmware/rpmi/Makefile | 1 + drivers/firmware/rpmi/rpmi-sandbox-clock.c | 446 +++++++++++++++++++++ drivers/firmware/rpmi/rpmi-sandbox.c | 156 +++++++ drivers/firmware/rpmi/rpmi-sandbox.h | 47 +++ test/dm/Makefile | 1 + test/dm/rpmi.c | 48 +++ 10 files changed, 716 insertions(+), 1 deletion(-) create mode 100644 drivers/firmware/rpmi/rpmi-sandbox-clock.c create mode 100644 drivers/firmware/rpmi/rpmi-sandbox.c create mode 100644 drivers/firmware/rpmi/rpmi-sandbox.h create mode 100644 test/dm/rpmi.c
MAINTAINERS +1 -0
@@ -1626,6 +1626,7 @@ S: Maintained F: drivers/clk/clk_rpmi.c F: drivers/firmware/rpmi/ F: include/rpmi* +F: test/dm/rpmi.c SANDBOX M: Simon Glass <[email protected]>
arch/sandbox/dts/test.dts +12 -0
@@ -874,6 +874,18 @@ sm: secure-monitor { compatible = "sandbox,sm"; }; + + rpmi: rpmi { + compatible = "sandbox,rpmi-transport"; + #mbox-cells = <1>; + }; + + rpmi_clock: rpmi-clock { + compatible = "riscv,rpmi-clock"; + mboxes = <&rpmi 0x8>; + #clock-cells = <1>; + clocks = <&rpmi_clock 0>, <&rpmi_clock 1>, <&rpmi_clock 2>, <&rpmi_clock 3>; + }; }; fpga {
configs/sandbox_defconfig +2 -0
@@ -195,6 +195,7 @@ CONFIG_BUTTON_GPIO=y CONFIG_CLK=y CONFIG_CLK_K210=y CONFIG_CLK_K210_SET_RATE=y +CONFIG_CLK_RPMI=y CONFIG_SANDBOX_CLK_CCF=y CONFIG_CLK_SCMI=y CONFIG_CPU=y
@@ -211,6 +212,7 @@ CONFIG_FASTBOOT_FLASH=y CONFIG_FASTBOOT_FLASH_MMC_DEV=0 CONFIG_ARM_FFA_TRANSPORT=y CONFIG_SCMI_FIRMWARE=y +CONFIG_RPMI_FIRMWARE=y CONFIG_FPGA_ALTERA=y CONFIG_FPGA_STRATIX_II=y CONFIG_FPGA_STRATIX_V=y
drivers/firmware/rpmi/Kconfig +2 -1
@@ -1,6 +1,7 @@ config RPMI_FIRMWARE bool "Enable RPMI support" - depends on RISCV && DM && OF_CONTROL + depends on RISCV || SANDBOX + depends on DM && OF_CONTROL select FIRMWARE help RISC-V Platform Management Interface (RPMI) defines an OS-agnostic
drivers/firmware/rpmi/Makefile +1 -0
@@ -1,3 +1,4 @@ obj-y += rpmi-uclass.o obj-$(CONFIG_RPMI_SBI_MPXY) += rpmi-sbi-mpxy.o obj-$(CONFIG_RPMI_SHMEM) += rpmi-shmem.o +obj-$(CONFIG_SANDBOX) += rpmi-sandbox.o rpmi-sandbox-clock.o
drivers/firmware/rpmi/rpmi-sandbox-clock.c new file +446 -0
446 lines not on this page · raw message
drivers/firmware/rpmi/rpmi-sandbox.c new file +156 -0
156 lines not on this page · raw message
drivers/firmware/rpmi/rpmi-sandbox.h new file +47 -0
47 lines not on this page · raw message
test/dm/Makefile +1 -0
@@ -111,6 +111,7 @@ obj-$(CONFIG_CMD_RKMTD) += rkmtd.o obj-$(CONFIG_$(PHASE_)DM_RNG) += rng.o obj-$(CONFIG_DM_RTC) += rtc.o obj-$(CONFIG_SCMI_FIRMWARE) += scmi.o +obj-$(CONFIG_RPMI_FIRMWARE) += rpmi.o obj-$(CONFIG_SCSI) += scsi.o obj-$(CONFIG_DM_SERIAL) += serial.o obj-$(CONFIG_DM_SPI_FLASH) += sf.o
test/dm/rpmi.c new file +48 -0
48 lines not on this page · raw message
Signature · 1 line
2.52.0
PATCH v3 5/5 drivers: firmware: rpmi: Add the mpxy command
In reply to a message not in the archiveFrom: Rahul Pathak <[email protected]>
Add the mpxy command which allows listing MPXY channels, reading/writing arbitrary channel attributes and sending raw messages.
The mpxy command is useful for interacting with custom RPMI service groups that have no associated driver. It can also be useful for debugging and testing SBI proxy drivers as well as the PuC firmware.
---
Changes in v3:
- Add this patch
--- cmd/riscv/Makefile | 1 + drivers/firmware/rpmi/Kconfig | 7 + drivers/firmware/rpmi/rpmi-sbi-mpxy.c | 392 +++++++++++++++++++++++++- 3 files changed, 396 insertions(+), 4 deletions(-)
cmd/riscv/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_CMD_EXCEPTION) += exception.o obj-$(CONFIG_CMD_SBI) += sbi.o +obj-$(CONFIG_CMD_MPXY) += sbi_mpxy_cmd.o
drivers/firmware/rpmi/Kconfig +7 -0
@@ -18,6 +18,13 @@ config RPMI_SBI_MPXY specification for the MPXY extension is available at: https://github.com/riscv-non-isa/riscv-sbi-doc (chapter 20) +config CMD_MPXY + bool "mpxy command" + depends on RPMI_SBI_MPXY + help + Enable the 'mpxy' U-Boot command for listing MPXY channels, + reading/writing arbitrary channel attributes and sending raw messages. + config RPMI_SHMEM bool "RPMI over shared memory transport" depends on RPMI_FIRMWARE
drivers/firmware/rpmi/rpmi-sbi-mpxy.c +388 -4
425 lines not on this page · raw message
Signature · 1 line
2.52.0
Re: [PATCH v3 0/5] Add support for RPMI to U-Boot
In reply to a message not in the archiveHi, +Paul
first of all do not use mailing list on denx.de.
Quoted 6 lines · Charles Perry
Hello,
This series adds support for RISC-V Platform Management Interface (RPMI) to U-Boot. RPMI is an OS-agnostic protocol for communication between an Application Processor (AP) and a Platform Microcontroller (PuC) [1]. The goals and purpose of RPMI are similar to ARM's SCMI.
I have raised my concern at riscv minisummit at LPC and also talked to Paul (riscv kernel maintainer) that this is not the right way to go. We already have SCMI and there is no reason to introduce RPMI when it is said it is serving the same purpose.
R is for risc-v. It means it is not cpu neutral platform management interface as was positioned. It has less features then scmi. We have risc-v in programmable logic and scmi server for platform management which service ARM cores too. There is only SMC transport layer which is ARM specific. The rest is completely soc neutral.
I don't know history around it but make no sense to me to introduce it at all.
Thanks,
Michal
Re: [PATCH v3 0/5] Add support for RPMI to U-Boot
Quoted 1 line · Michal Simek
Hi, +Paul
Hello Michal,
Quoted 2 lines
first of all do not use mailing list on denx.de.
Ok, I sent this series at around the time U-Boot changed to [email protected]. Sorry for that.
Quoted 12 lines · Charles Perry
Quoted 6 lines
Hello,
This series adds support for RISC-V Platform Management Interface (RPMI) to U-Boot. RPMI is an OS-agnostic protocol for communication between an Application Processor (AP) and a Platform Microcontroller (PuC) [1]. The goals and purpose of RPMI are similar to ARM's SCMI.
I have raised my concern at riscv minisummit at LPC and also talked to Paul (riscv kernel maintainer) that this is not the right way to go. We already have SCMI and there is no reason to introduce RPMI when it is said it is serving the same purpose.
Cool! Thanks for bringing this topic to LPC!
That being said, I don't understand why we can't have both SCMI and RPMI. For sure its more code to maintain, but there are other things at play than just the functionnality. We discussed this in v2 [1], the points of contention were:
* Anup said that the main blocker for him is that the SCMI spec is not community driven while RPMI is.
* Conor mentionned that for SCMI to be usable on Risc-V, OpenSBI needs to accept SCMI related patches.
* I pointed out that SCP-firmware doesn't receive any upstream contribution [2] while librpmi does. Features of newer SCMI specs like reparenting clocks are not available in upstream SCP-firmware
* It was also mentionned that there is already a clock driver available in upstream Linux [3] and a power-domain driver has approved recently [4]. So RPMI already has some traction.
Quoted 6 lines
R is for risc-v. It means it is not cpu neutral platform management interface as was positioned. It has less features then scmi. We have risc-v in programmable logic and scmi server for platform management which service ARM cores too. There is only SMC transport layer which is ARM specific. The rest is completely soc neutral.
I understand that you are building heterogenous systems and that having only one protocol to support will solve lots of problems for you, but that doesn't mean we have to roll back all the progress that was made so far for RPMI.
My suggestion is that we stick to what we have in RPMI for the protocols that overlaps with SCMI and have a ratified spec as of now which are:
* clocks
* power domains
* voltages
* performance domains
* system shutdown/suspend
There's however protocols in SCMI that have no RPMI counterpart ratified. Those are:
* Reset domain
* Pin control (There's an open PR for this [5])
* Sensor management
* Telemetry (A PR was closed for this last month [6])
And for these protocols, you should be able to make suggestions and steer the RPMI spec so that it looks more like SCMI so that we can reuse existing drivers in Linux, U-Boot, zephyr, etc.
[1]: https://lore.kernel.org/all/[email protected]/
[2]: https://gitlab.arm.com/firmware/SCP-firmware/-/commit/f76402dfefc7557b97aac6226c0b1302e2dc5e12
[3]: https://elixir.bootlin.com/linux/v7.2.9/source/drivers/clk/clk-rpmi.c
[4]: https://lore.kernel.org/all/[email protected]/
[5]: https://github.com/riscv-non-isa/riscv-rpmi/pull/163
[6]: https://github.com/riscv-non-isa/riscv-rpmi/pull/162
Thanks,
Charles
Quoted 5 lines
I don't know history around it but make no sense to me to introduce it at all.
Thanks,
Michal
Re: [PATCH v3 0/5] Add support for RPMI to U-Boot
Quoted 26 lines · Charles Perry
Quoted 1 line · Michal Simek
Hi, +Paul
Hello Michal,
Quoted 2 lines
first of all do not use mailing list on denx.de.
Ok, I sent this series at around the time U-Boot changed to [email protected]. Sorry for that.
Quoted 12 lines · Charles Perry
Quoted 6 lines
Hello,
This series adds support for RISC-V Platform Management Interface (RPMI) to U-Boot. RPMI is an OS-agnostic protocol for communication between an Application Processor (AP) and a Platform Microcontroller (PuC) [1]. The goals and purpose of RPMI are similar to ARM's SCMI.
I have raised my concern at riscv minisummit at LPC and also talked to Paul (riscv kernel maintainer) that this is not the right way to go. We already have SCMI and there is no reason to introduce RPMI when it is said it is serving the same purpose.
Cool! Thanks for bringing this topic to LPC!
Quoted 7 lines
That being said, I don't understand why we can't have both SCMI and RPMI. For sure its more code to maintain, but there are other things at play than just the functionnality. We discussed this in v2 [1], the points of contention were:
* Anup said that the main blocker for him is that the SCMI spec is not community driven while RPMI is.
Based on my information none really starts to talk to ARM about SCMI and this has been introduced serving the same purpose. None should introduce another interface which does the same thing. That never was the right way to go.
Thanks,
Michal
Re: [PATCH v3 0/5] Add support for RPMI to U-Boot
Quoted 34 lines · Michal Simek
Quoted 31 lines · Charles Perry
Quoted 1 line · Michal Simek
Hi, +Paul
Hello Michal,
Quoted 2 lines
first of all do not use mailing list on denx.de.
Ok, I sent this series at around the time U-Boot changed to [email protected]. Sorry for that.
Quoted 12 lines · Charles Perry
Quoted 6 lines
Hello,
This series adds support for RISC-V Platform Management Interface (RPMI) to U-Boot. RPMI is an OS-agnostic protocol for communication between an Application Processor (AP) and a Platform Microcontroller (PuC) [1]. The goals and purpose of RPMI are similar to ARM's SCMI.
I have raised my concern at riscv minisummit at LPC and also talked to Paul (riscv kernel maintainer) that this is not the right way to go. We already have SCMI and there is no reason to introduce RPMI when it is said it is serving the same purpose.
Cool! Thanks for bringing this topic to LPC!
That being said, I don't understand why we can't have both SCMI and RPMI. For sure its more code to maintain, but there are other things at play than just the functionnality. We discussed this in v2 [1], the points of contention were:
Quoted 7 lines
Quoted 2 lines
* Anup said that the main blocker for him is that the SCMI spec is not community driven while RPMI is.
Based on my information none really starts to talk to ARM about SCMI and this has been introduced serving the same purpose. None should introduce another interface which does the same thing. That never was the right way to go.
Thanks,
Michal
Hello Michal,
RPMI is already used in the Linux kernel since 2025.
U-Boot has already lot of alternative interfaces implemented:
* Xen and QEMU/KVM
* half a dozen file systems
* MBR and GPT
* FIT images and UEFI
I can't see anything special about RPMI.
As nobody, including you, seems to be interested in driving a discussion with ARM which would set back RISC-V for months or years, we should proceed implementing what is needed.
Best regards
Heinrich
Re: [PATCH v3 0/5] Add support for RPMI to U-Boot
Quoted 49 lines · Heinrich Schuchardt
Quoted 34 lines · Michal Simek
Quoted 31 lines · Charles Perry
Quoted 1 line · Michal Simek
Hi, +Paul
Hello Michal,
Quoted 2 lines
first of all do not use mailing list on denx.de.
Ok, I sent this series at around the time U-Boot changed to [email protected]. Sorry for that.
Quoted 12 lines · Charles Perry
Quoted 6 lines
Hello,
This series adds support for RISC-V Platform Management Interface (RPMI) to U-Boot. RPMI is an OS-agnostic protocol for communication between an Application Processor (AP) and a Platform Microcontroller (PuC) [1]. The goals and purpose of RPMI are similar to ARM's SCMI.
I have raised my concern at riscv minisummit at LPC and also talked to Paul (riscv kernel maintainer) that this is not the right way to go. We already have SCMI and there is no reason to introduce RPMI when it is said it is serving the same purpose.
Cool! Thanks for bringing this topic to LPC!
That being said, I don't understand why we can't have both SCMI and RPMI. For sure its more code to maintain, but there are other things at play than just the functionnality. We discussed this in v2 [1], the points of contention were:
Quoted 7 lines
Quoted 2 lines
* Anup said that the main blocker for him is that the SCMI spec is not community driven while RPMI is.
Based on my information none really starts to talk to ARM about SCMI and this has been introduced serving the same purpose. None should introduce another interface which does the same thing. That never was the right way to go.
Thanks,
MichalHello Michal,
RPMI is already used in the Linux kernel since 2025.
U-Boot has already lot of alternative interfaces implemented:
Quoted 8 lines
* Xen and QEMU/KVM
* half a dozen file systems
* MBR and GPT
* FIT images and UEFII can't see anything special about RPMI.
As nobody, including you, seems to be interested in driving a discussion with ARM which would set back RISC-V for months or years, we should proceed implementing what is needed.
When I found it I have raised this concern with ARM too.
I have also sent one patch
https://lore.kernel.org/all/d7f7e8c9589d937b60e43168845ab4fda15037a3.1783603600.git.michal.simek@amd.com/
and based on my discussions at LPC/OSSE I will send another version.
Thanks,
Michal
Re: [PATCH v3 0/5] Add support for RPMI to U-Boot
Hi Michal,
It is not correct to say that SCMI already exists and so RPMI is not needed. If you read the RPMI specification you will find that the two differ significantly. I don't mean overlapping names, but how things are defined and implemented in the spec. Compare the transport, compare the defined messages.
RPMI defines many service groups that have no counterpart in SCMI like System MSI/System IRQ, TEE, RAS Agent, Management Mode, CPPC, Logging, Request Forward and others. Together they cover use cases ranging from typical systems to confidential computing and virtualization, all in one specification.
There is also a difference in governance, which is visible from the licences of the two specifications.
RPMI is under CC-BY 4 license which allows anyone to adapt it and share modified versions with attribution, and changes are developed in the open under RISC-V International. The development does not happen behind closed door but rather any indivudial/organization can also take part in the discussions.
I think open source projects always give users/vendors freedom
to use any protocol which suits their platform. It must not be dictated that everyone must stick to one interface. As Heinrich pointed out that U-Boot already supports alternatives for various things and
Linux and OpenSBI already support RPMI. Adding RPMI support to U-Boot does not take anything away from SCMI.
Platforms that use SCMI can continue to do so, and platforms built on RPMI get the support they need.
So RPMI is not another interface that does the same thing. It is a broader specification, developed openly by the community that uses it in which you and anyone can also take part.
Sorry for the big post.
Regards,
Rahul
Quoted 74 lines · Michal Simek
Quoted 56 lines · Heinrich Schuchardt
Quoted 37 lines · Michal Simek
Quoted 26 lines · Charles Perry
Quoted 1 line · Michal Simek
Hi, +Paul
Hello Michal,
Quoted 2 lines
first of all do not use mailing list on denx.de.
Ok, I sent this series at around the time U-Boot changed to [email protected]. Sorry for that.
Quoted 12 lines · Charles Perry
Quoted 6 lines
Hello,
This series adds support for RISC-V Platform Management Interface (RPMI) to U-Boot. RPMI is an OS-agnostic protocol for communication between an Application Processor (AP) and a Platform Microcontroller (PuC) [1]. The goals and purpose of RPMI are similar to ARM's SCMI.
I have raised my concern at riscv minisummit at LPC and also talked to Paul (riscv kernel maintainer) that this is not the right way to go. We already have SCMI and there is no reason to introduce RPMI when it is said it is serving the same purpose.
Cool! Thanks for bringing this topic to LPC!
Quoted 7 lines
That being said, I don't understand why we can't have both SCMI and RPMI. For sure its more code to maintain, but there are other things at play than just the functionnality. We discussed this in v2 [1], the points of contention were:
* Anup said that the main blocker for him is that the SCMI spec is not community driven while RPMI is.
Quoted 6 lines
Based on my information none really starts to talk to ARM about SCMI and this has been introduced serving the same purpose. None should introduce another interface which does the same thing. That never was the right way to go.
Thanks,
MichalHello Michal,
RPMI is already used in the Linux kernel since 2025.
U-Boot has already lot of alternative interfaces implemented:
* Xen and QEMU/KVM
* half a dozen file systems
* MBR and GPT
* FIT images and UEFIQuoted 5 lines
I can't see anything special about RPMI.
As nobody, including you, seems to be interested in driving a discussion with ARM which would set back RISC-V for months or years, we should proceed implementing what is needed.
When I found it I have raised this concern with ARM too.
I have also sent one patch
https://lore.kernel.org/all/d7f7e8c9589d937b60e43168845ab4fda15037a3.1783603600.git.michal.simek@amd.com/and based on my discussions at LPC/OSSE I will send another version.
Thanks,
Michal
Re: [PATCH v3 0/5] Add support for RPMI to U-Boot
Hi,
Quoted 14 lines · Rahul Pathak
Hi Michal,
It is not correct to say that SCMI already exists and so RPMI is not needed. If you read the RPMI specification you will find that the two differ significantly. I don't mean overlapping names, but how things are defined and implemented in the spec. Compare the transport, compare the defined messages.
RPMI defines many service groups that have no counterpart in SCMI like System MSI/System IRQ, TEE, RAS Agent, Management Mode, CPPC, Logging, Request Forward and others. Together they cover use cases ranging from typical systems to confidential computing and virtualization, all in one specification.
Quoted 8 lines
There is also a difference in governance, which is visible from the licences of the two specifications.
RPMI is under CC-BY 4 license which allows anyone to adapt it and share modified versions with attribution, and changes are developed in the open under RISC-V International. The development does not happen behind closed door but rather any indivudial/organization can also take part in the discussions.
I don't think license is an argument here because someone decided not to talk to ARM about it. Based on my information none really talked to ARM to change that license for SCMI (if that was an issue) or move it to neutral place. I have already talked to ARM about it.
Quoted 7 lines
I think open source projects always give users/vendors freedom
to use any protocol which suits their platform. It must not be dictated that everyone must stick to one interface. As Heinrich pointed out that U-Boot already supports alternatives for various things and
Linux and OpenSBI already support RPMI. Adding RPMI support to U-Boot does not take anything away from SCMI.
Quoted 6 lines
Platforms that use SCMI can continue to do so, and platforms built on RPMI get the support they need.
So RPMI is not another interface that does the same thing. It is a broader specification, developed openly by the community that uses it in which you and anyone can also take part.
It wasn't my cover letter which described
"The goals and purpose of RPMI are similar to ARM's SCMI."
I am just saying that it looks like that you are creating parallel firmware interface instead of extending/reusing existing one without really even trying to talk to other vendors. I would prefer if we can work together on one spec and extend it to cover both architectures.
When you have heterogeneous systems where you have mix of ARM and RISC-V cores make no sense to have SCMI and RPMI servers both running to serve the same purpose.
Thanks,
Michal
Re: [PATCH v3 0/5] Add support for RPMI to U-Boot
Quoted 49 lines · Michal Simek
Hi,
Quoted 14 lines · Rahul Pathak
Hi Michal,
It is not correct to say that SCMI already exists and so RPMI is not needed. If you read the RPMI specification you will find that the two differ significantly. I don't mean overlapping names, but how things are defined and implemented in the spec. Compare the transport, compare the defined messages.
RPMI defines many service groups that have no counterpart in SCMI like System MSI/System IRQ, TEE, RAS Agent, Management Mode, CPPC, Logging, Request Forward and others. Together they cover use cases ranging from typical systems to confidential computing and virtualization, all in one specification.
Quoted 8 lines
There is also a difference in governance, which is visible from the licences of the two specifications.
RPMI is under CC-BY 4 license which allows anyone to adapt it and share modified versions with attribution, and changes are developed in the open under RISC-V International. The development does not happen behind closed door but rather any indivudial/organization can also take part in the discussions.
I don't think license is an argument here because someone decided not to talk to ARM about it. Based on my information none really talked to ARM to change that license for SCMI (if that was an issue) or move it to neutral place.
I have already talked to ARM about it.Quoted 7 lines
I think open source projects always give users/vendors freedom
to use any protocol which suits their platform. It must not be dictated that everyone must stick to one interface. As Heinrich pointed out that U-Boot already supports alternatives for various things and
Linux and OpenSBI already support RPMI. Adding RPMI support to U-Boot does not take anything away from SCMI.Quoted 6 lines
Platforms that use SCMI can continue to do so, and platforms built on RPMI get the support they need.
So RPMI is not another interface that does the same thing. It is a broader specification, developed openly by the community that uses it in which you and anyone can also take part.
It wasn't my cover letter which described
"The goals and purpose of RPMI are similar to ARM's SCMI."
Quoted 8 lines
I am just saying that it looks like that you are creating parallel firmware interface instead of extending/reusing existing one without really even trying to talk to other vendors. I would prefer if we can work together on one spec and extend it to cover both architectures.
When you have heterogeneous systems where you have mix of ARM and RISC-V cores make no sense to have SCMI and RPMI servers both running to serve the same purpose.
I believe we have ended up in an "either/or" situation. It would have been great if N years ago, SCMI was adopted for RISC-V. I hope one or the other, and not a 3rd one, is adopted for new architectures (looking at loongarch...). But for today, I think U-Boot will need to follow along with what the kernel has already been doing and have RPMI for the RISC-V platforms which don't use SCMI.
Signature · 1 line
Tom
Re: [PATCH v3 0/5] Add support for RPMI to U-Boot
In reply to Michal SimekQuoted 42 lines · Michal Simek
Hi,
Quoted 14 lines · Rahul Pathak
Hi Michal,
It is not correct to say that SCMI already exists and so RPMI is not needed. If you read the RPMI specification you will find that the two differ significantly. I don't mean overlapping names, but how things are defined and implemented in the spec. Compare the transport, compare the defined messages.
RPMI defines many service groups that have no counterpart in SCMI like System MSI/System IRQ, TEE, RAS Agent, Management Mode, CPPC, Logging, Request Forward and others. Together they cover use cases ranging from typical systems to confidential computing and virtualization, all in one specification.
Quoted 8 lines
There is also a difference in governance, which is visible from the licences of the two specifications.
RPMI is under CC-BY 4 license which allows anyone to adapt it and share modified versions with attribution, and changes are developed in the open under RISC-V International. The development does not happen behind closed door but rather any indivudial/organization can also take part in the discussions.
I don't think license is an argument here because someone decided not to talk to ARM about it. Based on my information none really talked to ARM to change that license for SCMI (if that was an issue) or move it to neutral place.
I have already talked to ARM about it.Quoted 10 lines
I think open source projects always give users/vendors freedom
to use any protocol which suits their platform. It must not be dictated that everyone must stick to one interface. As Heinrich pointed out that U-Boot already supports alternatives for various things and
Linux and OpenSBI already support RPMI. Adding RPMI support to U-Boot does not take anything away from SCMI.Platforms that use SCMI can continue to do so, and platforms built on RPMI get the support they need.
Quoted 6 lines
Quoted 3 lines
So RPMI is not another interface that does the same thing. It is a broader specification, developed openly by the community that uses it in which you and anyone can also take part.
It wasn't my cover letter which described
"The goals and purpose of RPMI are similar to ARM's SCMI."
I can change that part a bit.
I do think it's good to mention SCMI at least once because it will give some anchoring to readers new to RPMI.
Thanks,
Charles
Quoted 17 lines
I am just saying that it looks like that you are creating parallel firmware interface instead of extending/reusing existing one without really even trying to talk to other vendors. I would prefer if we can work together on one spec and extend it to cover both architectures.
When you have heterogeneous systems where you have mix of ARM and RISC-V cores make no sense to have SCMI and RPMI servers both running to serve the same purpose.
Thanks,
Michal