Skip to content

Commit 231963f

Browse files
author
Nicolas Pitre
committed
boards: arm: Add unified FVP ARMv9-A board support
New board Targets: - fvp_base_revc_2xaem/v9a (basic ARMv9-A single core) - fvp_base_revc_2xaem/v9a/smp (ARMv9-A SMP 4 cores) - fvp_base_revc_2xaem/v9a/smp/ns (ARMv9-A SMP non-secure with TFA) Signed-off-by: Nicolas Pitre <[email protected]>
1 parent 361f659 commit 231963f

14 files changed

+375
-161
lines changed

boards/arm/fvp_base_revc_2xaem/Kconfig.fvp_base_revc_2xaem

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,27 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
config BOARD_FVP_BASE_REVC_2XAEM
5+
bool
6+
select SOC_SERIES_FVP_AEM
7+
8+
# Board variant symbols - these should be automatically generated by the build system
9+
# but we need to define them explicitly for the SOC selection logic to work
10+
config BOARD_FVP_BASE_REVC_2XAEM_V8A
11+
bool
12+
default y if BOARD_QUALIFIERS = "v8a"
513
select SOC_FVP_V8A
14+
15+
config BOARD_FVP_BASE_REVC_2XAEM_V8A_SMP
16+
bool
17+
default y if BOARD_QUALIFIERS = "v8a/smp" || BOARD_QUALIFIERS = "v8a/smp/ns"
18+
select BOARD_FVP_BASE_REVC_2XAEM_V8A
19+
20+
config BOARD_FVP_BASE_REVC_2XAEM_V9A
21+
bool
22+
default y if BOARD_QUALIFIERS = "v9a"
23+
select SOC_FVP_V9A
24+
25+
config BOARD_FVP_BASE_REVC_2XAEM_V9A_SMP
26+
bool
27+
default y if BOARD_QUALIFIERS = "v9a/smp" || BOARD_QUALIFIERS = "v9a/smp/ns"
28+
select BOARD_FVP_BASE_REVC_2XAEM_V9A

boards/arm/fvp_base_revc_2xaem/board.cmake

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@ set(ARMFVP_FLAGS
3232
-C cache_state_modelled=0
3333
)
3434

35+
# Add ARMv9-A specific configuration flags for all ARMv9-A variants
36+
if(CONFIG_ARMV9_A)
37+
set(ARMFVP_FLAGS ${ARMFVP_FLAGS}
38+
# Enable ARMv9.0 extension (includes all ARMv8.x features)
39+
-C cluster0.has_arm_v9-0=1
40+
# Enable SVE and SVE2 support (mandatory for ARMv9.0 compliance)
41+
-C cluster0.has_sve=1
42+
-C cluster0.sve.has_sve2=1
43+
-C cluster0.sve.sve2_version=2
44+
-C cluster0.sve.enable_at_reset=1
45+
# Enable enhanced PAC and BTI support (ARMv9.0 features)
46+
-C cluster0.enhanced_pac2_level=3
47+
-C cluster0.has_enhanced_pac=1
48+
)
49+
# Set minimum FVP version known to work with ARMv9.0 features (SVE2, enhanced PAC/BTI)
50+
set(ARMFVP_MIN_VERSION 11.29.27)
51+
endif()
52+
3553
if(CONFIG_BUILD_WITH_TFA)
3654
set(TFA_PLAT "fvp")
3755

boards/arm/fvp_base_revc_2xaem/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ board:
88
- name: smp
99
variants:
1010
- name: ns
11+
- name: v9a
12+
variants:
13+
- name: smp
14+
variants:
15+
- name: ns

boards/arm/fvp_base_revc_2xaem/doc/index.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ Board Variants
4343

4444
This board configuration supports multiple architecture variants:
4545

46-
* ``fvp_base_revc_2xaem/v8a`` - ARMv8-A (64-bit)
46+
* ``fvp_base_revc_2xaem/v8a`` - ARMv8-A (64-bit) with Cortex-A53 cores
4747
* ``fvp_base_revc_2xaem/v8a/smp`` - ARMv8-A SMP (4 cores)
4848
* ``fvp_base_revc_2xaem/v8a/smp/ns`` - ARMv8-A SMP Non-Secure
49-
* ``fvp_base_revc_2xaem/v9a`` - ARMv9-A (64-bit) [Future]
49+
* ``fvp_base_revc_2xaem/v9a`` - ARMv9-A (64-bit) with Cortex-A510 cores
50+
* ``fvp_base_revc_2xaem/v9a/smp`` - ARMv9-A SMP (4 cores)
51+
* ``fvp_base_revc_2xaem/v9a/smp/ns`` - ARMv9-A SMP Non-Secure
5052

5153
Devices
5254
========
@@ -93,6 +95,14 @@ ARM FVP emulated environment, for example, with the :zephyr:code-sample:`synchro
9395
This will build an image with the synchronization sample app for ARMv8-A.
9496
Then you can run it with ``west build -t run``.
9597

98+
For ARMv9-A variants:
99+
100+
.. zephyr-app-commands::
101+
:zephyr-app: samples/synchronization
102+
:host-os: unix
103+
:board: fvp_base_revc_2xaem/v9a
104+
:goals: build
105+
96106
For SMP variants:
97107

98108
.. zephyr-app-commands::
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
/*
2+
* Copyright (c) 2021 Carlo Caione <[email protected]>
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <mem.h>
7+
#include <zephyr/dt-bindings/interrupt-controller/arm-gic.h>
8+
9+
/ {
10+
chosen {
11+
/*
12+
* The SRAM node is actually located in the
13+
* DRAM region of the FVP Base RevC 2xAEM.
14+
*/
15+
zephyr,sram = &dram0;
16+
zephyr,flash = &flash0;
17+
zephyr,console = &uart0;
18+
zephyr,shell-uart = &uart0;
19+
};
20+
21+
psci {
22+
compatible = "arm,psci-0.2";
23+
method = "smc";
24+
};
25+
26+
cpus {
27+
#address-cells = <1>;
28+
#size-cells = <0>;
29+
30+
cpu0: cpu@0 {
31+
device_type = "cpu";
32+
reg = <0>;
33+
};
34+
35+
cpu1: cpu@100 {
36+
device_type = "cpu";
37+
reg = <0x100>;
38+
};
39+
40+
cpu2: cpu@200 {
41+
device_type = "cpu";
42+
reg = <0x200>;
43+
};
44+
45+
cpu3: cpu@300 {
46+
device_type = "cpu";
47+
reg = <0x300>;
48+
};
49+
};
50+
51+
timer {
52+
compatible = "arm,armv8-timer";
53+
interrupt-parent = <&gic>;
54+
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL
55+
IRQ_DEFAULT_PRIORITY>,
56+
<GIC_PPI 14 IRQ_TYPE_LEVEL
57+
IRQ_DEFAULT_PRIORITY>,
58+
<GIC_PPI 11 IRQ_TYPE_LEVEL
59+
IRQ_DEFAULT_PRIORITY>,
60+
<GIC_PPI 10 IRQ_TYPE_LEVEL
61+
IRQ_DEFAULT_PRIORITY>;
62+
};
63+
64+
uartclk: apb-pclk {
65+
compatible = "fixed-clock";
66+
clock-frequency = <24000000>;
67+
#clock-cells = <0>;
68+
};
69+
70+
soc {
71+
interrupt-parent = <&gic>;
72+
73+
gic: interrupt-controller@2f000000 {
74+
compatible = "arm,gic-v3", "arm,gic";
75+
reg = <0x2f000000 0x10000>, // GICD
76+
<0x2f100000 0x200000>; // GICR
77+
interrupt-controller;
78+
#interrupt-cells = <4>;
79+
status = "okay";
80+
#address-cells = <1>;
81+
#size-cells = <1>;
82+
83+
its: msi-controller@2f020000 {
84+
compatible = "arm,gic-v3-its";
85+
reg = <0x2f020000 0x20000>;
86+
status = "okay";
87+
};
88+
};
89+
90+
uart0: uart@1c090000 {
91+
compatible = "arm,pl011";
92+
reg = <0x1c090000 0x1000>;
93+
status = "disabled";
94+
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
95+
interrupt-names = "irq_5";
96+
clocks = <&uartclk>;
97+
};
98+
99+
uart1: uart@1c0a0000 {
100+
compatible = "arm,pl011";
101+
reg = <0x1c0a0000 0x1000>;
102+
status = "disabled";
103+
interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
104+
interrupt-names = "irq_6";
105+
clocks = <&uartclk>;
106+
};
107+
108+
uart2: uart@1c0b0000 {
109+
compatible = "arm,pl011";
110+
reg = <0x1c0b0000 0x1000>;
111+
status = "disabled";
112+
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
113+
interrupt-names = "irq_7";
114+
clocks = <&uartclk>;
115+
};
116+
117+
uart3: uart@1c0c0000 {
118+
compatible = "arm,pl011";
119+
reg = <0x1c0c0000 0x1000>;
120+
status = "disabled";
121+
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
122+
interrupt-names = "irq_8";
123+
clocks = <&uartclk>;
124+
};
125+
126+
ethernet@1a000000 {
127+
reg = <0x1a000000 0x1000>;
128+
129+
eth: ethernet {
130+
compatible = "smsc,lan91c111";
131+
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
132+
status = "disabled";
133+
134+
phy-handle = <&phy>;
135+
};
136+
137+
mdio: mdio {
138+
compatible = "smsc,lan91c111-mdio";
139+
status = "disabled";
140+
#address-cells = <1>;
141+
#size-cells = <0>;
142+
143+
phy: ethernet-phy@0 {
144+
compatible = "ethernet-phy";
145+
status = "disabled";
146+
reg = <0>;
147+
};
148+
};
149+
};
150+
151+
flash0: flash@0 {
152+
compatible = "soc-nv-flash";
153+
reg = <0x0 DT_SIZE_K(64)>;
154+
};
155+
156+
dram0: memory@88000000 {
157+
compatible = "mmio-dram";
158+
reg = <0x88000000 DT_SIZE_K(2048)>;
159+
};
160+
};
161+
};
162+
163+
&uart0 {
164+
status = "okay";
165+
current-speed = <115200>;
166+
};

0 commit comments

Comments
 (0)