How to use the secure display feature

Revision as of 15:22, 24 June 2024 by Registered User
Applicable for STM32MP13x lines, STM32MP25x lines

Under construction.png Coming soon

1. Article purpose[edit source]

This article aims to explain how to use the secure display hardware feature thanks to:

This article also explains how to configure and use a Trusted User Interface / Trusted Application example for demonstrating the secure display hardware feature.


2. Prerequisites[edit source]

To run the Trusted User Interface / Trusted Application example, required hardware boards and software stacks are listed below:


3. LTDC Secure layer description[edit source]

On STM32MP13x lines More info.png, the LTDC layer2 can be set as secure (under ETZPC control), whereas the layer1 is always non-secure.

On STM32MP25x lines More info.png, the LTDC layer3 can be set as secure (under RIFSC internal peripheral control), whereas layer1 and layer2 are always non-secure, with grouped regs and additional interrupt set:

  • The RISUP differentiates the access right of accesses performed toward the following RIF protected peripheral ID:
    • "LTDC common": LTDC common registers, about panel info, synchronization, interface
    • "LTDC_L1L2" (layer 1 and 2): for the window of any two default applications
    • "LTDC_L3": LTDC layer 3, for the window of a potentially secure application, or any default application if there is no secure layer
    • "LTDC_ROT": LTDC rotation, with information about the rotation buffers
  • The RIMU differentiates the bus transactions emitted by the following AXI masters:
    • "RIMU_L1L2": read access only for layer 1 and 2, always non-protected
    • "RIMU_L3": read access only for layer 3, potentially protected
    • "RIMU_ROT": write of blended pixels, and read of to-be-rotated pixels, potentially protected, because containing blended pixels of the protected layer 3
Info white.png Information
Please refer to the STM32 MPU reference manuals for more details on the LTDC secure display hardware feature.


4. Related softwares and Configurations[edit source]

5. = Device Tree[edit source]

5.1. OP-TEE[edit source]

header file of LTDC HAL module

5.2. Linux kernel[edit source]

5.3. Userland Trusted Application example[edit source]

6. Debug and Traces[edit source]

7. How to run the TUI TA example[edit source]

Boot the board, then use the optee-tui-client binary example, using the following commands:

Get the help information:

optee-tui-client
Usage:
       --print-screen-info
       --blank-screen <color> (value in ARGB format, ex. 0xFF112233)
       --display-image <x>,<y>,<width>,<height>,<path> (file in raw ARGB format)
       --draw-pin-pad

Get the display information:

 optee-tui-client --print-screen-info
D/TA:  TA_InvokeCommandEntryPoint:160 result: 0
D/TA:  TA_InvokeCommandEntryPoint:160 result: 0
width: 1024
height: 600
width DPI: 160
height DPI: 160
color depth: 0
D/TA:  TA_InvokeCommandEntryPoint:160 result: 0
Info white.png Information
All traces starting with "D/TA:..." are related to the OP-TEE Trusted Application debug mode.
 optee-tui-client --blank-screen  0xFF0000
D/TA:  TA_InvokeCommandEntryPoint:160 result: 0
D/TA:  TA_InvokeCommandEntryPoint:160 result: 0
Hit Ctrl-C to quit
^C
Info white.png Information
Use the key sequence "CTRL+C" in the console to stop the example.
 optee-tui-client --draw-pin-pad
D/TA:  TA_InvokeCommandEntryPoint:160 result: 0
D/TA:  TA_InvokeCommandEntryPoint:160 result: -65529
TEEC_InvokeCommand 7 failed with code 0xffff0007 origin 0x4


8. How to go further[edit source]

9. References[edit source]