Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to easily run a SCMI server in various Execution Environments

Under construction

Running SCMI server with OP-TEE

The easiest way to test the SCMI server in OP-TEE is to built it for qemu Armv8Arm v8. OP-TEE documentation provides detailed information to build a qemu Armv8 Arm v8 dev environment here.The SCP-firmware is not yet part of the manifest but a PR is under review to add it : https://github.com/OP-TEE/manifest/pull/252

Similarly, SCMI server is not enabled by default for qemu_v8 platform but a PR is under review to enable compiling OP-TEE os with SCMI server: https://github.com/OP-TEE/build/pull/695. In the meantime, a manifest using the PR has been created https://github.com/vingu-linaro/manifest/tree/optee-with-scmi .

You just need to add WITH_SCMI=y option in the make command to enable the SCMI server. The whole sequence to use the pending PRs setup a dev environment with a SCMI server can be summarized:

$ mkdir <project-dir>

...

$ repo init -u https://github.com/vingu-linaro/manifest.git -m qemu_v8.xml -b optee-with-scmi -m qemu_v8.xml

$ repo sync

$ cd build

$ make toolchains

...

When booting with SCMI server, we use a dedicated DT instead of add an overlay DT to the one that is built on the fly by Qemu in order to provide a scmi node. The dts qemu-v8-scmi-overlay.dtso file is available in the build/qemu_v8 directory if someone needs to change it and is based applied on the dtb generated by Qemu.

The configuration of the scmi server is located in the directory : <project-dir>/SCP-firmware/product/optee-/fvp/fw/. The following scmi protocols have been enable with mock devices:

...

You will have to build a kernel image using the branch above and to prepare a rootfs with your favorite tool. Then start the FVP with:

shrinkwrap -I docker.io/shrinkwraptool/base-full:latest run --rtvar=KERNEL=<path-to-Image> --rtvar=ROOTFS=<path-to-rootfs> ffa-tftf.yaml

...