Milestone 8
Milestone 8 Status
This milestone is planned.
Background
OP-TEE requires support for NX, RO, RW permission expression for data in OP-TEE Core using the physical memory protections (PMP) as defined in the OpenSBI Domain Management Framework. OP-TEE Core’s architecture-specific code responsible for expressing access attributes for code and data need to be extended for RISC-V
At present the Core and trusted application region is described in a single PMP unit in the OpenSBI Domain device tree settings. OP-TEE Core’s .text and .data need different permission expressions using PMP. OPTEE Core modifications are needed to put OP-TEE Core’s .text and .data sections into suitably separate address regions (from an NAPOT point of view).
Separating the core .text and .data sections into NAPOT-compatible regions allows the OpenSBI domain device tree to describe and enforce different access rights for each.
Milestone Description
Milestone 8 gives OP-TEE core code and data distinct physical-memory permissions through the OpenSBI Domain Management Framework and RISC-V physical memory protection.
Requirements
- Express non-executable, read-only, and read-write data permissions for OP-TEE core through PMP.
- Extend the RISC-V architecture-specific OP-TEE code that describes access attributes for code and data.
- Place OP-TEE core
.textand.datain separate address regions suitable for NAPOT representation. - Assign different permissions to the
.textand.dataregions. - Determine the start address and length of each region for use in the OpenSBI domain device tree.
- Update the OpenSBI domain configuration to describe the separated regions and their permissions.
- Validate that permitted accesses succeed and disallowed writes or instruction fetches are rejected.
Deliverables
- OP-TEE core layout changes that separate
.textand.datainto appropriately aligned regions. - An updated OpenSBI device tree describing the OP-TEE core regions and permissions.
- Tests or documented procedures that verify the resulting access controls.