Skip to content

Commit 224742a

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 e8a5cf4 commit 224742a

15 files changed

+408
-172
lines changed

boards/arm/fvp_base_revc_2xaem/Kconfig.fvp_base_revc_2xaem

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
config BOARD_FVP_BASE_REVC_2XAEM
5-
select SOC_FVP_V8A
5+
bool
6+
select SOC_SERIES_FVP_AEM
7+
select SOC_FVP_V8A if BOARD_QUALIFIERS = "v8a"
8+
select SOC_FVP_V8A if BOARD_QUALIFIERS = "v8a/smp"
9+
select SOC_FVP_V8A if BOARD_QUALIFIERS = "v8a/smp/ns"
10+
select SOC_FVP_V9A if BOARD_QUALIFIERS = "v9a"
11+
select SOC_FVP_V9A if BOARD_QUALIFIERS = "v9a/smp"
12+
select SOC_FVP_V9A if BOARD_QUALIFIERS = "v9a/smp/ns"

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
The following board targets are available:
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: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
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+
v2m_sysreg: sysreg@1c010000 {
91+
compatible = "arm,vexpress-sysreg";
92+
reg = <0x1c010000 0x1000>;
93+
};
94+
95+
pwrc: power-controller@1c100000 {
96+
compatible = "arm,fvp-pwrc";
97+
reg = <0x1c100000 0x1000>;
98+
arm,vexpress-sysreg = <&v2m_sysreg>;
99+
};
100+
101+
uart0: uart@1c090000 {
102+
compatible = "arm,pl011";
103+
reg = <0x1c090000 0x1000>;
104+
status = "disabled";
105+
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
106+
interrupt-names = "irq_5";
107+
clocks = <&uartclk>;
108+
};
109+
110+
uart1: uart@1c0a0000 {
111+
compatible = "arm,pl011";
112+
reg = <0x1c0a0000 0x1000>;
113+
status = "disabled";
114+
interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
115+
interrupt-names = "irq_6";
116+
clocks = <&uartclk>;
117+
};
118+
119+
uart2: uart@1c0b0000 {
120+
compatible = "arm,pl011";
121+
reg = <0x1c0b0000 0x1000>;
122+
status = "disabled";
123+
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
124+
interrupt-names = "irq_7";
125+
clocks = <&uartclk>;
126+
};
127+
128+
uart3: uart@1c0c0000 {
129+
compatible = "arm,pl011";
130+
reg = <0x1c0c0000 0x1000>;
131+
status = "disabled";
132+
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
133+
interrupt-names = "irq_8";
134+
clocks = <&uartclk>;
135+
};
136+
137+
ethernet@1a000000 {
138+
reg = <0x1a000000 0x1000>;
139+
140+
eth: ethernet {
141+
compatible = "smsc,lan91c111";
142+
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
143+
status = "disabled";
144+
145+
phy-handle = <&phy>;
146+
};
147+
148+
mdio: mdio {
149+
compatible = "smsc,lan91c111-mdio";
150+
status = "disabled";
151+
#address-cells = <1>;
152+
#size-cells = <0>;
153+
154+
phy: ethernet-phy@0 {
155+
compatible = "ethernet-phy";
156+
status = "disabled";
157+
reg = <0>;
158+
};
159+
};
160+
};
161+
162+
flash0: flash@0 {
163+
compatible = "soc-nv-flash";
164+
reg = <0x0 DT_SIZE_K(64)>;
165+
};
166+
167+
dram0: memory@88000000 {
168+
compatible = "mmio-dram";
169+
reg = <0x88000000 DT_SIZE_K(2048)>;
170+
};
171+
};
172+
};
173+
174+
&uart0 {
175+
status = "okay";
176+
current-speed = <115200>;
177+
};

0 commit comments

Comments
 (0)