⚠️ The code is based on: https://gitlab.com/riseproject/riscv-optee/opensbi/-/tree/dev-optee-mpxy
Commit ID:
7d4c90953afe3bd86f9e2501bd4c2501e8db1898
init_coldboot()-
sbi_mpxy_init()- Allocate
struct mpxy_statefor each domain. sbi_platform_mpxy_init()- Call platform-defined
mpxy_init().- e.g. For generic platform:
fdt_mpxy_init().
- e.g. For generic platform:
- Call platform-defined
- Allocate
fdt_mpxy_init()- Iterate MPXY drivers in
fdt_mpxy_drivers[].MPXY drivers are generated at compile time:
1 2 3 4 5 6 7 8 9 10 11// lib/utils/mpxy/objects.mk libsbiutils-objs-$(CONFIG_FDT_MPXY) += mpxy/fdt_mpxy.o libsbiutils-objs-$(CONFIG_FDT_MPXY) += mpxy/fdt_mpxy_drivers.o carray-fdt_mpxy_drivers-$(CONFIG_FDT_MPXY_RPMI_MBOX) += fdt_mpxy_rpmi_mbox libsbiutils-objs-$(CONFIG_FDT_MPXY_RPMI_MBOX) += mpxy/fdt_mpxy_rpmi_mbox.o carray-fdt_mpxy_drivers-$(CONFIG_FDT_MPXY_MM) += fdt_mpxy_mm libsbiutils-objs-$(CONFIG_FDT_MPXY_MM) += mpxy/fdt_mpxy_mm.o carray-fdt_mpxy_drivers-$(CONFIG_FDT_MPXY_OPTEED) += fdt_mpxy_opteed libsbiutils-objs-$(CONFIG_FDT_MPXY_OPTEED) += mpxy/fdt_mpxy_opteed.oCall
drv->init().- e.g.
mpxy_opteed_init()
- e.g.
- Iterate MPXY drivers in
-
sbi_ecall_mpxy_handler()sbi_ecall_mpxy_handler()is the handler for SBI MPXY ecalls, which will call the corresponding function based on SBI function ID, e.g.