• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..22-Aug-2025-

readme.rst A D22-Aug-20256.9 KiB181138

readme.rst

1#############
2Corstone-1000
3#############
4
5************
6Introduction
7************
8
9The ARM's Corstone-1000 platform is a reference implementation of PSA FF-M
10architecture where NSPE and SPE environments are partitioned/isolated into
11Cortex-A35 and Cortex-M0+ respectively.
12
13Cortex-M0+ acting as Secure Enclave is the Root-of-trust of SoC. Its
14software comprises of two boot loading stages, i.e. Bl1 and Bl2 (based on
15mcuboot) and TF-M as run time software. Cortex-A35, also referred as host,
16is treated as non-secure from the Secure Enclave perspective.
17The Cortex-A35 is brought out of rest by Secure Enclave in aarch64 bit mode,
18and boots the software ecosystem based on linux, u-boot, UEFI run time
19services, TF-A, Secure Partitions and Optee.
20
21The communication between NSPE and SPE is based on PSA IPC protocol running on
22top of the RSE communication protocol. The Corstone-1000 supports only the
23`Embed protocol`, and the ATU support is removed.
24
25The secure enclave subsystem has ARM's CC-312 (Crypto Cell) hardware to
26accelerate cryptographic operations. Additionally, platform supports Secure Debug
27using SDC-600 as the communication interface between host debugger and platform
28target. The platform has the build option to enable secure debug protocol to
29unlock debug ports during boot time. The protocol is based on ARM's ADAC
30(Authenticated Debug Access Control) standard.
31
32
33***********
34System boot
35***********
36
37- The SoC reset brings Secure Enclave (SE), that is Cortex-M0+, out of rest.
38- SE executes the BL1_1 ROM code which handles the hardware initialization. On
39  the first boot, it handles the provisioning and the hashes of the keys used
40  for image verification are saved in the OTP memory. The BL1_2 binary is also
41  saved in the OTP.
42- BL1_1 loads BL1_2 from OTP, verifies and transfers the execution to it.
43- BL1_2 loads, verifies and transfers the execution to BL2 which is based on
44  MCUBoot.
45- BL2 loads and verifies TF-M and the host's initial boot loader image.
46- BL2 transfers the execution to the TF-M.
47- During TF-M initialization, the host is taken out of rest.
48
49.. note::
50
51  In the current implementation the provisioning bundle, that is used by the BL1_1,
52  is also stored in ROM.
53
54
55*****
56Build
57*****
58
59Platform solution
60=================
61
62The platform binaries are build using Yocto. Below is the user guide:
63
64`Arm Corstone-1000 User Guide`_
65
66
67Building TF-M
68-------------
69
70Follow the instructions in :doc:`Building instructions </building/tfm_build_instruction>`.
71
72
73Build instructions for the FVP
74^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75``-DTFM_PLATFORM=arm/corstone1000 -DPLATFORM_IS_FVP=TRUE``
76
77Build instructions for the FPGA
78^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79``-DTFM_PLATFORM=arm/corstone1000``
80
81Secure Test
82===========
83
84This section can be used to test the secure enclave software independently from
85the host. The below configuration builds the secure enclave binaries with regression test
86frame integrated. On boot, secure enclave software stack is brought up, and
87regression tests starts executing at the end of the initialization process. In the
88below configuration, host software support is disabled, and meant only
89to test/verify the secure enclave software.
90
91Follow the instructions in :doc:`Building instructions </building/tests_build_instruction>`.
92
93In the case of Corstone-1000 the build and run commands are the following.
94
95FVP
96---
97
98- Download Corstone-1000 FVP from : `Arm Ecosystem FVPs`_
99- Install FVP by running the shell script.
100- Running of the binary will boot secure enclave software stack and then the enabled
101  regression tests from tf-m-tests are executed. (See `Enabled tests`_)
102
103.. code-block:: bash
104
105    cd <tf-m-tests-root>/tests_reg
106    cmake -S spe -B build_spe -DTFM_PLATFORM=arm/corstone1000 \
107        -DCONFIG_TFM_SOURCE_PATH=<tf-m-root> \
108        -DTFM_TOOLCHAIN_FILE=<tf-m-root>/toolchain_GNUARM.cmake \
109        -DTEST_S=ON   \
110        -DCMAKE_BUILD_TYPE=Debug  \
111        -DTEST_PSA_API=OFF  \
112        -DTEST_S_PS=OFF  \
113        -DTEST_S_ITS=OFF  \
114        -DTEST_S_IPC=OFF  \
115        -DPLATFORM_IS_FVP=True
116    cmake --build build_spe -- install
117    dd conv=notrunc bs=1 if=build_spe/bin/bl1_1.bin of=build_spe/bin/bl1.bin seek=0
118    dd conv=notrunc bs=1 if=build_spe/bin/bl1_provisioning_bundle.bin of=build_spe/bin/bl1.bin seek=51200
119    ./<tf-m-root>/platform/ext/target/arm/corstone1000/create-flash-image.sh build_spe/bin cs1000.bin
120
121    <path-to-FVP-installation>/models/Linux64_GCC-9.3/FVP_Corstone-1000 \
122          -C se.trustedBootROMloader.fname="build_spe/bin/bl1.bin"  \
123          -C board.flashloader0.fname="none"  \
124          -C board.xnvm_size=64  \
125          -C se.trustedSRAM_config=6  \
126          -C se.BootROM_config="3"  \
127          -C board.smsc_91c111.enabled=0  \
128          -C board.hostbridge.userNetworking=true \
129          --data board.flash0=build_spe/bin/cs1000.bin@0x68000000  \
130          -C diagnostics=4  \
131          -C disable_visualisation=true  \
132          -C board.se_flash_size=8192  \
133          -C se.secenc_terminal.start_telnet=1  \
134          -C se.cryptocell.USER_OTP_FILTERING_DISABLE=1
135
136.. note::
137
138   The nvm_image.bin has to be deleted in-between the FVP runs in order to start
139   from a clean state.
140
141FPGA
142----
143
144- Follow the above pointed platform user guide to setup the FPGA board.
145- Use the BL1 generated from the below commands to place it inside FPGA board SD Card.
146- Use the cs1000.bin created from the below commands to place it inside FPGA board SD Card.
147
148.. code-block:: bash
149
150    cd <tf-m-tests-root>/tests_reg
151    cmake -S spe -B build_spe -DTFM_PLATFORM=arm/corstone1000 \
152        -DCONFIG_TFM_SOURCE_PATH=<tf-m-root> \
153        -DTFM_TOOLCHAIN_FILE=<tf-m-root>/toolchain_GNUARM.cmake \
154        -DTEST_S=ON   \
155        -DCMAKE_BUILD_TYPE=Debug  \
156        -DTEST_PSA_API=OFF  \
157        -DTEST_S_PS=OFF  \
158        -DTEST_S_ITS=OFF  \
159        -DTEST_S_IPC=OFF
160    cmake --build build_spe -- install
161    dd conv=notrunc bs=1 if=build_spe/bin/bl1_1.bin of=build_spe/bin/bl1.bin seek=0
162    dd conv=notrunc bs=1 if=build_spe/bin/bl1_provisioning_bundle.bin of=build_spe/bin/bl1.bin seek=51200
163    ./<tf-m-root>/platform/ext/target/arm/corstone1000/create-flash-image.sh build_spe/bin cs1000.bin
164    cp build_spe/bin/bl1.bin <path-to-FPGA-SD-CARD>/SOFTWARE/
165    cp build_spe/bin/cs1000.bin <path-to-FPGA-SD-CARD>/SOFTWARE/
166
167.. note::
168
169   .. _Enabled tests:
170
171   Enabled Tests: Some of the regression tests have to be disabled as adding all
172   of them would exceed the available RAM size. So there is a need to select few
173   tests but not all. Other test configurations can be found in the
174   :doc:`Test Configuration </configuration/test_configuration>`.
175
176
177*Copyright (c) 2021-2025, Arm Limited. All rights reserved.*
178
179.. _Arm Ecosystem FVPs: https://developer.arm.com/documentation/100966/1128/Arm--Corstone-1000-FVP?lang=en
180.. _Arm Corstone-1000 User Guide: https://corstone1000.docs.arm.com/en/latest/user-guide.html
181