SCMI protocols for power management
If the RISC-V platform is using SCMI protocols for power management, when we try to upstream the code, the SCMI code should be part of the library private to the specific platform (under '/platform/<platform_name>') or it can be a general library ( under '/lib/utils') ?
It can be a general library under lib/utils if it useful to other platforms as well.
The SCMI protocol parts can be under lib/utils whereas SCMI transport can be under platform/
Regards, Anup
Thanks for the reply. The SCMI protocol library should be general enough to be used by other platforms as well.
Is it OK if the SCMI code is adapted/ported from ATF ?
Yes, we can have a ported version of SCMI protocol library under lib/utils but please make sure that:
- Original sources are licensed under BSD 2-clause
- Preserve copyright of original authors. You may append additional copyright
General caution in-context of SCMI:
- SCMI is an ARM proprietary specification
- There could/will be portion of SCMI spec which refer to ARM ISA (e.g. MPIDR_EL1) which won't fit in RISC-V world.
Ideally, we should have some SCMI equivalent RISC-V specification for messaging interface.
Regards, Anup
Thanks for the advise.
The SCMI code from ATF is BSD 3-clause, is that OK ?
I have seen some of the libraries used in OpenSBI are licensed under BSD 3-clause as well:
https://github.com/riscv-software-src/opensbi/tree/bd355213bfbb209c047e8cc0df56936f6705477f/lib/utils/libquad
Yes, BSD 3-clause should be fine.
Here are my 2 cents: Just skimming through SCMI spec, It has numerous references to PSCI system reset & ACPI power states. Those will be different in RISC-V world.
If you plan to use SCMI, it can't be standardized in RISC-V in the future due to legal reasons. We had few rounds of discussion around this in 2020 during platform specification. The implementation can be added in OpenSBI but it will be partial implementation at best.
It would be great to have similar messaging protocol for RISC-V. In the beginning, it can be kept in OpenSBI as well. If ther eis more interest from other RISC-V vendors, we can try to standardize through RVI as well.
Thanks. I totally agree with you. The minimal or base SCMI implementation (sufficient for common use cases) will be part of the "3rd party" protocol in OpenSBI. Eventually, it shall be replaced with similar messaging protocol defined and standardized for RISC-V world.
We (Ventana) are also interested in a SCMI-like messaging protocol which is RISC-V focused.
Maybe we can call it RISC-V SCMP ?
I would suggest having an initial draft of RISC-V SCMP spec under <opensbi_source>/docs directory. If more RISC-V members are interested then we can RISC-V International can standardise it in future.
Regards, Anup
SCMP (System Control and Management Protocol) sounds good to me. Does it means we are going to have an equivalent "SCP-Firmware" (link below) as well in the future, right ?
https://github.com/ARM-software/SCP-firmware
I think having an open RISC-V SCMP specification is a good starting point.
Typically SCP-style power management firmware have a lot of implementation specific details so SoC vendors (just like ARM world) may want to keep it closed source. In fact, the ARM SCP-firmware is mainly used for ARM evaluation boards and other companies (Qualcomm for example) have their own SCP-style firmware.
Regards, Anup