Skip to content

Commit 5ced8dd

Browse files
committed
feat: linux: Add information on REE FS alongside RPMB
Presently, TI's OP-TEE docs speak only of RPMB Secure Storage mechanism, and not of REE FS. REE FS is supported by-default, so mention it too. Signed-off-by: Suhaas Joshi <[email protected]>
1 parent acfa2f5 commit 5ced8dd

File tree

1 file changed

+42
-12
lines changed

1 file changed

+42
-12
lines changed

source/linux/Foundational_Components_OPTEE.rst

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,36 @@ of entropy can work around these issues.
7575
7676
$ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=k3-|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y
7777
78+
.. _optee-rpmb-flags:
7879

79-
Secure Storage with RPMB (For HS)
80-
*********************************
80+
OP-TEE Secure Storage
81+
*********************
8182

82-
OP-TEE provides secure storage functionality. TI SoCs with HS configuration have a
83-
KEK embedded in them that is programmed across OP-TEE instances that are distributed
84-
in a derived manner. Each HS device has its own HUK signing key (DKEK) which is different
85-
from other HS devices.
83+
OP-TEE provides secure storage functionality through two mechanisms:
84+
**REE FS** (Rich Execution Environment Filesystem) and **RPMB**
85+
(Replay Protected Memory Block).
8686

87-
For enabling RPMB support along with secure storage, additional flags need to be passed to
88-
the build instructions. The information for the flags can be found here.
87+
TI SDK enables REE FS by-default, and configures OP-TEE to store
88+
encrypted binary blobs created by REE FS in
89+
:file:`/var/lib/tee/`. The SDK also keeps RPMB disabled.
90+
91+
RPMB works in TI SoCs with HS configuration. These embed a KEK
92+
that programs across OP-TEE instances in a derived manner. Each HS
93+
device has its own HUK signing key (DKEK) which is different from
94+
other HS devices.
95+
96+
.. ifconfig:: CONFIG_part_variant not in ('AM62LX')
97+
98+
.. note::
99+
100+
Presently, AM62L does not support RPMB. This support will be added
101+
in subsequent releases. It does support REE FS.
102+
103+
The remaining devices support both: REE FS by-default and RPMB if
104+
OP-TEE binaries are re-compiled with required flags.
105+
106+
For learning more about secure storage in OP-TEE, and instructions to
107+
enable RPMB, refer:
89108
https://optee.readthedocs.io/en/latest/architecture/secure_storage.html
90109

91110
There is a hybrid mode in which both the flags i.e `CFG_REE_FS=y` and `CFG_RPMB_FS=y` are enabled.
@@ -100,22 +119,33 @@ E.g. For enabling hybrid mode of RPMB along with REE_FS
100119
101120
$ export CFG_CONSOLE_UART=0x8
102121
103-
.. parsed-literal::
122+
.. ifconfig:: CONFIG_part_variant not in ('AM62LX')
123+
124+
.. parsed-literal::
104125
105-
$ make CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_REE_FS=y CFG_RPMB_FS=y
126+
$ make CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_REE_FS=y CFG_RPMB_FS=y
106127
107-
OPTEE-client also needs to be updated to enable the use of real
108-
emmc instead of the virtual emmc that is enabled by default
128+
OPTEE-client also needs to be updated to enable the use of real
129+
emmc instead of the virtual emmc that is enabled by default
109130

110131
Getting OP-TEE Client source code
111132
---------------------------------
112133

134+
To get optee_client source code, do:
135+
136+
.. rubric:: Getting OP-TEE Client source code
137+
113138
.. code-block:: console
114139
115140
$ git clone https://github.com/OP-TEE/optee_client
116141
117142
.. rubric:: Building OP-TEE Client with RPMB support
118143

144+
To use emulated RPMB, set RPMB_EMU=1. Otherwise, set RPMB_EMU=0.
145+
146+
For example, the following command builds optee_client to use the real RPMB,
147+
instead of the emulated one.
148+
119149
.. code-block:: console
120150
121151
$ make CROSS_COMPILE="$CROSS_COMPILE_64" PLATFORM=k3 CFG_TEE_SUPP_LOG_LEVEL=2 RPMB_EMU=0 CFG_ARM64_core=y

0 commit comments

Comments
 (0)