The librpmi is an implementation of RISC-V Platform Management Interface.
The librpmi implements RPMI shared memory transport, RPMI message protocol and various Service groups and Services as defined in the RPMI specification.
The librpmi can be used by -
-
RISC-V platform vendors to implement RPMI services in their platform microcontroller firmware.
-
System-level partitions to implement RPMI services running as separate OpenSBI domain
-
Hypervisors/emulators/simulators to emulate RPMI services for the Guest/VM
-
RPMI Transport Layer
- Shared memory-based transport implementation
- Support for multiple concurrent RPMI transport instances
- Per-transport service group configuration (Base group always enabled)
-
RPMI Service Groups
- Implements a subset of RPMI service groups; see COMPLIANCE.md for per-service status
- See COMPLIANCE.md for complete implementation and test coverage status
-
Platform Integration
- Clean HAL (Hardware Abstraction Layer) interface for platform-specific operations
- Minimal platform dependencies for easy porting
-
Testing & Documentation
- Extensible test framework for service group validation
- Comprehensive API documentation (HTML and PDF via Doxygen)
The librpmi supports GNU Make and comes with a simple Makefile that generates
librpmi.a, shared library objects (librpmi.so.*), and test applications
under the build directory.
// defaut without debug logs and tests, compiler optimizations are on
make
// Enable debug logs and build tests, compiler optimizations are off
make LIBRPMI_TEST=y LIBRPMI_DEBUG=y
// Cross compilation
make CROSS_COMPILE=<compiler prefix>
By default, make generates:
build/librpmi.abuild/librpmi.so.<major>.<minor>.<patch>- symlinks
build/librpmi.so.<soversion>andbuild/librpmi.so
The platform vendors may also integrate librpmi sources directly into the
platform microcontroller firmware and extend firmware build system to
build the librpmi sources rather than using librpmi.a.
The repository can build Debian and RPM packages for systems that want to consume librpmi as an installed library instead of integrating the source tree or manually copying build artifacts. These packages provide a repeatable way to install the runtime library, development files, and source content needed by downstream projects such as emulators, hypervisors, firmware build flows, and distribution packaging pipelines.
Debian packages can be built with:
make deb-pkgThis stages the Debian packaging from packaging/debian and writes the package
outputs under build/deb. The generated packages are:
librpmi0: runtime shared library (librpmi.so.*).librpmi-dev: headers, static library, linker symlink, andpkg-configmetadata for building applications against librpmi.librpmi-src: source content installed under/usr/src/librpmifor users that need to inspect or rebuild the library sources.
Install the generated Debian packages with:
sudo dpkg -i build/deb/librpmi0_*.deb \
build/deb/librpmi-dev_*.deb \
build/deb/librpmi-src_*.debRPM packages can be built with:
make rpm-pkgThis uses packaging/rpm/librpmi.spec and writes the RPM build tree under
build/rpmbuild. The generated RPM packages are:
librpmi: runtime shared library (librpmi.so.*).librpmi-devel: headers, static library, linker symlink, andpkg-configmetadata for building applications against librpmi.librpmi-source: source content installed under/usr/src/librpmi.
Install the generated RPM packages with the system package manager, for example:
sudo dnf install build/rpmbuild/RPMS/*/*.rpmThe librpmi supports doxygen which can generate both html and pdf
documentation under build\docs directory.
make docs
This generates pdf file build/docs/latex/refman.pdf and html documentation
at build/docs/html.
Build test binaries -
make LIBRPMI_TEST=yRun tests -
make checkRefer: README in test folder
The librpmi is provided under 2-Clause BSD License
