@@ -75,47 +75,81 @@ 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.
89- https://optee.readthedocs.io/en/latest/architecture/secure_storage.html
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/ `.
9090
91- There is a hybrid mode in which both the flags i.e `CFG_REE_FS=y ` and `CFG_RPMB_FS=y ` are enabled.
92- This mode stores the state of the Secure Storage directory in RPMB partition to check for the
93- integrity of the data present in it. It is the recommended way.
91+ .. ifconfig :: CONFIG_part_variant in ('AM62LX')
9492
95- E.g. For enabling hybrid mode of RPMB along with REE_FS
93+ .. note ::
9694
97- .. ifconfig :: CONFIG_part_variant in ('J721S2')
95+ Presently, AM62L does not support RPMB. This support will be added
96+ in subsequent releases. It does support REE FS.
9897
99- .. code-block :: console
98+ The remaining devices support both: REE FS by-default and RPMB if
99+ OP-TEE binaries are re-compiled with required flags.
100100
101- $ export CFG_CONSOLE_UART=0x8
101+ For learning more about secure storage in OP-TEE, refer:
102+ https://optee.readthedocs.io/en/latest/architecture/secure_storage.html
102103
103- .. parsed-literal ::
104+ .. ifconfig :: CONFIG_part_variant not in ('AM62LX')
105+
106+ RPMB works in TI SoCs with HS configuration. These embed a KEK
107+ that programs across OP-TEE instances in a derived manner. Each HS
108+ device has its own HUK signing key (DKEK), which is different from
109+ other HS devices. TI SDK disables RPMB by-default. To enable it,
110+ re-compiling OP-TEE with ``CFG_RPMB_FS=y `` flag.
111+
112+ For learning more about secure storage in OP-TEE, and instructions to
113+ enable RPMB, refer:
114+ https://optee.readthedocs.io/en/latest/architecture/secure_storage.html
115+
116+ There is a hybrid mode in which both the flags i.e `CFG_REE_FS=y ` and `CFG_RPMB_FS=y ` are enabled.
117+ This mode stores the state of the Secure Storage directory in RPMB partition to check for the
118+ integrity of the data present in it. It is the recommended way.
119+
120+ E.g. For enabling hybrid mode of RPMB along with REE_FS
121+
122+ .. ifconfig :: CONFIG_part_variant in ('J721S2')
104123
105- $ make CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_REE_FS=y CFG_RPMB_FS=y
124+ .. code-block :: console
106125
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
126+ $ export CFG_CONSOLE_UART=0x8
127+
128+ .. parsed-literal ::
129+
130+ $ make CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_REE_FS=y CFG_RPMB_FS=y
131+
132+ OPTEE-client also needs to be updated to enable the use of real
133+ emmc instead of the virtual emmc that is enabled by default
109134
110135Getting OP-TEE Client source code
111136---------------------------------
112137
138+ To get optee_client source code, do:
139+
140+ .. rubric :: Getting OP-TEE Client source code
141+
113142.. code-block :: console
114143
115144 $ git clone https://github.com/OP-TEE/optee_client
116145
117146 .. rubric :: Building OP-TEE Client with RPMB support
118147
148+ To use emulated RPMB, set RPMB_EMU=1. Otherwise, set RPMB_EMU=0.
149+
150+ For example, the following command builds optee_client to use the real RPMB,
151+ instead of the emulated one.
152+
119153.. code-block :: console
120154
121155 $ make CROSS_COMPILE="$CROSS_COMPILE_64" PLATFORM=k3 CFG_TEE_SUPP_LOG_LEVEL=2 RPMB_EMU=0 CFG_ARM64_core=y
0 commit comments