-
Notifications
You must be signed in to change notification settings - Fork 8.7k
RFC: boards: arm: add Corstone-1000-A320 FVP board support #104035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
npitre
wants to merge
5
commits into
zephyrproject-rtos:main
Choose a base branch
from
npitre:corstone1000_a320
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5bdce7b
arch: arm64: add ISB between SVE trap control and ZCR register writes
e221520
cmake: emu: armfvp: allow boards to skip generic firmware arguments
ba9a4eb
modules: update west.yml and patches for Corstone-1000-A320 support
bea19aa
boards: arm: add Corstone-1000-A320 FVP board support
08c01b4
boards: arm: add SMP variant for Corstone-1000-A320 FVP
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Copyright (c) 2026 BayLibre SAS | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| if BOARD_FVP_CORSTONE1000 | ||
|
|
||
| config BUILD_OUTPUT_BIN | ||
| default y | ||
|
|
||
| endif # BOARD_FVP_CORSTONE1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Copyright (c) 2026 BayLibre SAS | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config BOARD_FVP_CORSTONE1000 | ||
| select SOC_A320 if BOARD_FVP_CORSTONE1000_A320 | ||
| select SOC_A320 if BOARD_FVP_CORSTONE1000_A320_SMP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Copyright (c) 2026 BayLibre SAS | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| if BOARD_FVP_CORSTONE1000 | ||
|
|
||
| config CORSTONE1000_TFM_DEBUG | ||
| bool "Build TF-M in debug mode" | ||
| default y | ||
| help | ||
| Build TF-M with debug configuration. | ||
|
|
||
| config CORSTONE1000_TFM_LOG_LEVEL | ||
| int "TF-M log level (0=NONE, 1=ERROR, 2=WARNING, 3=INFO, 4=DEBUG)" | ||
| default 3 | ||
| range 0 4 | ||
| help | ||
| Set the log level for TF-M BL1 and MCUboot BL2. | ||
| DEBUG is very verbose and significantly slows boot. | ||
|
|
||
| config CORSTONE1000_TFA_DEBUG | ||
| bool "Build TF-A in debug mode" | ||
| default n | ||
| help | ||
| Build TF-A with debug configuration. | ||
|
|
||
| endif # BOARD_FVP_CORSTONE1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| # Copyright (c) 2026 BayLibre SAS | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| set(SUPPORTED_EMU_PLATFORMS armfvp) | ||
| set(ARMFVP_BIN_NAME FVP_Corstone-1000-A320) | ||
|
|
||
| # Corstone-1000 handles firmware loading entirely in ARMFVP_FLAGS below. | ||
| # Skip the generic bp.secureflashloader / bp.flashloader0 / cluster0.cpu0 | ||
| # arguments that armfvp.cmake would otherwise add for CONFIG_ARMV8_A_NS boards. | ||
| set(ARMFVP_SKIP_FW_ARGS TRUE) | ||
|
|
||
| # Find the FVP binary. Board-specific HINTS supplement the global ARMFVP_BIN_PATH. | ||
| find_program(ARMFVP | ||
| NAMES ${ARMFVP_BIN_NAME} | ||
| HINTS | ||
| ${ARMFVP_BIN_PATH} | ||
| $ENV{ARMFVP_BIN_PATH} | ||
| ) | ||
|
|
||
| # Set minimum FVP version for Corstone-1000-A320 | ||
| set(ARMFVP_MIN_VERSION 11.27.31) | ||
|
|
||
| # ============================================================================= | ||
| # FVP Configuration | ||
| # ============================================================================= | ||
|
|
||
| # With sysbuild, CMAKE_BINARY_DIR is the sub-build (e.g. build/hello_world). | ||
| # Firmware images are assembled in the parent build/firmware/ directory. | ||
| get_filename_component(_build_root "${CMAKE_BINARY_DIR}/.." ABSOLUTE) | ||
| set(_firmware_dir "${_build_root}/firmware") | ||
|
|
||
| # Allow environment overrides for pre-built firmware | ||
| if(DEFINED ENV{CORSTONE1000_BL1_FILE}) | ||
| set(_bl1_file $ENV{CORSTONE1000_BL1_FILE}) | ||
| else() | ||
| set(_bl1_file "${_firmware_dir}/bl1.bin") | ||
| endif() | ||
|
|
||
| if(DEFINED ENV{CORSTONE1000_FLASH_FILE}) | ||
| set(_flash_file $ENV{CORSTONE1000_FLASH_FILE}) | ||
| else() | ||
| set(_flash_file "${_firmware_dir}/cs1000.bin") | ||
| endif() | ||
|
|
||
| set(ARMFVP_FLAGS | ||
| # --- Firmware loading --- | ||
| -C se.trustedBootROMloader.fname=${_bl1_file} | ||
| --data board.flash0=${_flash_file}@0x68000000 | ||
|
|
||
| # --- Terminal configuration --- | ||
| # mode=raw is required on all terminals, otherwise zero output appears | ||
| -C se.secenc_terminal.start_telnet=0 | ||
| -C se.secenc_terminal.mode=raw | ||
| -C host.host_terminal_0.start_telnet=0 | ||
| -C host.host_terminal_0.mode=raw | ||
| -C host.host_terminal_1.start_telnet=0 | ||
| -C host.host_terminal_1.mode=raw | ||
|
|
||
| # --- UART output to console --- | ||
| -C se.uart0.out_file=- | ||
| -C se.uart0.unbuffered_output=1 | ||
| -C host.uart0.out_file=- | ||
| -C host.uart0.unbuffered_output=1 | ||
| -C host.uart0.uart_enable=1 | ||
| -C host.uart1.out_file=- | ||
| -C host.uart1.unbuffered_output=1 | ||
|
|
||
| # --- Hardware configuration --- | ||
| -C board.xnvm_size=64 | ||
| -C se.trustedSRAM_config=6 | ||
| -C se.BootROM_config=3 | ||
| -C board.se_flash_size=8192 | ||
| -C se.nvm.update_raw_image=0 | ||
| -C se.cryptocell.USER_OTP_FILTERING_DISABLE=1 | ||
| -C host.gic.ITS-count=0 | ||
| -C board.smsc_91c111.enabled=0 | ||
| -C disable_visualisation=true | ||
| ) | ||
|
|
||
| # ============================================================================= | ||
| # TF-A Configuration | ||
| # ============================================================================= | ||
|
|
||
| if(CONFIG_BUILD_WITH_TFA) | ||
| # TF-A platform for Corstone-1000 with Cortex-A320 | ||
| set(TFA_PLAT "corstone1000") | ||
|
|
||
| # Extra arguments for Cortex-A320 support | ||
| # Aligned with Yocto meta-arm CORSTONE1000-2025.12 reference build | ||
| set(TFA_EXTRA_ARGS | ||
| TARGET_PLATFORM=fvp | ||
| CORSTONE1000_CORTEX_A320=1 | ||
| HW_ASSISTED_COHERENCY=1 | ||
| USE_COHERENT_MEM=0 | ||
| CTX_INCLUDE_AARCH32_REGS=0 | ||
| NEED_BL32=no | ||
| ENABLE_PIE=1 | ||
| RESET_TO_BL2=1 | ||
| FVP_USE_GIC_DRIVER=FVP_GICV3 | ||
| ENABLE_FEAT_HCX=1 | ||
| ENABLE_FEAT_FGT=1 | ||
| ENABLE_FEAT_ECV=1 | ||
| ENABLE_FEAT_MTE2=1 | ||
| ENABLE_FEAT_AMU=1 | ||
| ENABLE_FEAT_CSV2_2=1 | ||
| ENABLE_SVE_FOR_NS=1 | ||
| ENABLE_SVE_FOR_SWD=1 | ||
| ENABLE_STACK_PROTECTOR=strong | ||
| # Multi-core PSCI support for secondary CPU boot | ||
| ENABLE_MULTICORE=1 | ||
| ) | ||
|
|
||
| # Output paths depend on debug/release | ||
| if(CONFIG_TFA_MAKE_BUILD_TYPE_DEBUG) | ||
| set(TFA_OUTPUT_DIR ${TFA_BINARY_DIR}/corstone1000/debug) | ||
| else() | ||
| set(TFA_OUTPUT_DIR ${TFA_BINARY_DIR}/corstone1000/release) | ||
| endif() | ||
|
|
||
| # Note: Corstone-1000 TF-A doesn't build BL1 (Secure Enclave handles boot) | ||
| # The FIP contains BL2, BL31, and BL33 (Zephyr) | ||
| set(FVP_FIP_FILE ${TFA_OUTPUT_DIR}/fip.bin) | ||
| endif() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| board: | ||
| name: fvp_corstone1000 | ||
| full_name: Arm Corstone-1000-A320 Fixed Virtual Platform | ||
| vendor: arm | ||
| socs: | ||
| - name: a320 | ||
| variants: | ||
| - name: smp |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bottom variable seems unused, you might want to use https://github.com/zephyrproject-rtos/zephyr/blob/main/cmake/modules/python.cmake#L14 to find a minimum version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ARMFVP_MIN_VERSIONis consumed bycmake/emu/armfvp.cmake— it queries the FVP binary version at configure time and warns if it is below the board-specified minimum. This is the existing mechanism used by other FVP boards (e.g.fvp_base_revc_2xaem).