SBI_00_04 - Domain Context Switch Support

About

The domain context component in OpenSBI provides basic CPU context management routines for existing OpenSBI domain. The context component was initially designed to facilitate the suspension and resumption of domains, enabling secure domains to efficiently share CPU resources, and allowing the UEFI Secure Variable or TEE service to run within it.

Project Scope and Timelines

The reference architecture shown below illustrates the scenario of employing enhanced secure domains to support runtime services, with the opensbi context providing synchronous context switching when a service is called.

  • Context switch support for standalonemm
  • Context switch support for TEE (like OP-TEE)

Components and Repos.

Based on OpenSBI v1.4

Stakeholders and Partners

Dependencies

None,

Measure of Success

Code upstream to OpenSBI

RISE Requirements

None,

Status

Dependency


Development

COMPLETED

URL: NA
Development Timeline1H 2024
Upstreaming

COMPLETED

URL:
Upstream version

ContactsYong Li

Anup

Updates

  

Main Patch merged 

https://github.com/riscv-software-src/opensbi/commit/e11025c52d70c8a6042965d5f368ae9d14bd80d6


Two hot fixes from Andes under review

https://patchwork.ozlabs.org/project/opensbi/patch/20240328033303.883674-2-peterlin@andestech.com/

https://patchwork.ozlabs.org/project/opensbi/patch/20240328033303.883674-3-peterlin@andestech.com/


Updates

  

v4 patch in review, also verified patch in Andes's OPTEE PoC

https://patchwork.ozlabs.org/project/opensbi/patch/b0e8ae4bbf4b44872da58d357d9362cdb70c89f3.1709723680.git.2931013282@sjtu.edu.cn/

 

Verified the patch can work with OP-TEE

https://github.com/yli147/opensbi/tree/dev-rpxy-optee-v3

https://github.com/yli147/optee_os/tree/dev-rpxy-optee-v3

https://github.com/yli147/linux/tree/dev-rpxy-optee-v3

https://github.com/yli147/test_optee/tree/dev-rpxy-optee-v3