OPTEE_00_01 - OP-TEE support
About
OP-TEE (Open Portable Trusted Execution Environment) is an open-source TEE designed for secure software execution implemented according to the GlobalPlatform TEE Client API and TEE Internal Core API. This project fosters collaboration among RISE members and individuals to develop OP-TEE for RISC-V.
Project Scope and Timelines
Components and Repos
QEMU Virt test environment
This implementation uses PMPs to isolate TEE and REE, no secure interrupt registered; software, timer and external interrupts will cause TEE managed exit to REE for interrupt handling.
Boot process overview:
Memory Layout:
Address | Usage | |
---|---|---|
RAM | 0x1_7FFF_FFFF | N/A |
0x0_F21F_FFFF | static shared memory | |
0x0_F1FF_FFFF | OP-TEE OS core & TA | |
0x0_8129_D800 | U-Boot proper load address | |
0x0_8015_FFFF | OpenSBI (data) | |
0x0_8013_FFFF | OpenSBI (text) | |
0x0_8000_A000 | U-Boot SPL | |
MMIO | 0x0_0C5F_FFFF | PLIC |
0x0_0C3F_FFFF | PLIC | |
0x0_1000_0FFF | UART | |
0x0_0200_FFFF | CLINT |
How to build and run optee_test:
git clone https://gitlab.com/riseproject/riscv-optee/buildroot.git -b dev-optee-mpxy-v2
cd buildroot
make qemu_riscv64_virt_optee_defconfig
make
./output/images/start-qemu.sh
# launch another terminal and connect to normal world
telnet localhost 64320
# run 'xtest' or 'optee_example*' in the shell
Stakeholders and Partners
RISE
Andes Technology
Randolph Sheng-Kai Lin <randolph@andestech.com>
Alvin Che-Chia Chang <alvinga@andestech.com>
Tim Ouyang <tim609@andestech.com>
Dependencies
MPXY/RPMI Specification
SBI_00_04 - Domain Context Switch Support
Measure of Success
Support QEMU virt (riscv64) in OP-TEE OS
Support OP-TEE SPD in OpenSBI
Support SMC-like RISC-V ABI in Linux and U-Boot OP-TEE drivers
Future Work
IOPMP: To allow domains to request access ownership of devices
AIA/APLIC: Secure/Non-secure interrupt handling
FF-A like ABI: Unified protocol used among Secure/Non-secure images (need to be standardised for RISC-V)
SmMTT: Additional secure features e.g. memory isolation, assigning interrupts to domains, etc.
RISE Requirements
None
Status
Dependency | MPXY/RPMI Specification | |
---|---|---|
Development | ONGOING | |
Development Timeline | 1H 2024 | |
Upstreaming | TBD | URL: |
Upstream version | ||
Contacts | Tim Ouyang (Andes) | @Tim Ouyang |