blob: 8fdabfbcbd6b0f5c53f2b8ed78b721f3424cdc91 [file] [log] [blame]
Andrew Walbrandc8ad202019-03-07 15:49:28 +00001# Copyright 2018 The Hafnium Authors.
Andrew Scull2d527c22018-11-27 14:21:08 +00002#
Andrew Walbran23417d82020-06-17 14:44:22 +01003# Use of this source code is governed by a BSD-style
4# license that can be found in the LICENSE file or at
5# https://opensource.org/licenses/BSD-3-Clause.
Andrew Scull2d527c22018-11-27 14:21:08 +00006
7import("//build/toolchain/embedded.gni")
8import("//build/toolchain/host.gni")
9
Olivier Deprez7e645932023-11-06 09:49:05 +010010group("aem_v8a_fvp_vhe") {
11 deps = [ "//src:hafnium(:aem_v8a_fvp_vhe_clang)" ]
12}
13
14group("qemu_aarch64_vhe") {
15 deps = [ "//src:hafnium(:qemu_aarch64_vhe_clang)" ]
16}
17
18group("rpi4") {
19 deps = [ "//src:hafnium(:rpi4_clang)" ]
20}
21
22group("secure_aem_v8a_fvp_vhe") {
23 deps = [ "//src:hafnium(:secure_aem_v8a_fvp_vhe_clang)" ]
24}
25
26group("secure_qemu_aarch64") {
27 deps = [ "//src:hafnium(:secure_qemu_aarch64_clang)" ]
28}
29
30group("secure_tc") {
31 deps = [ "//src:hafnium(:secure_tc_clang)" ]
32}
33
34group("secure_rd_fremont") {
35 deps = [ "//src:hafnium(:secure_rd_fremont_clang)" ]
36}
37
Jerry Wang49371572023-11-30 09:42:36 +000038group("secure_rd_fremont_cfg1") {
39 deps = [ "//src:hafnium(:secure_rd_fremont_cfg1_clang)" ]
40}
41
Andrew Scull2d527c22018-11-27 14:21:08 +000042group("root") {
43 deps = [
Olivier Deprez7e645932023-11-06 09:49:05 +010044 ":aem_v8a_fvp_vhe",
45 ":qemu_aarch64_vhe",
46 ":rpi4",
47 ":secure_aem_v8a_fvp_vhe",
48 ":secure_qemu_aarch64",
49 ":secure_rd_fremont",
Jerry Wang49371572023-11-30 09:42:36 +000050 ":secure_rd_fremont_cfg1",
Olivier Deprez7e645932023-11-06 09:49:05 +010051 ":secure_tc",
Raghu Krishnamurthye0ede852021-12-04 14:29:57 -080052 "//src/arch/aarch64/qemuloader:bl(:qemu_aarch64_vhe_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000053 ]
54}
55
56group("test_root") {
57 testonly = true
58
59 deps = [
60 "//src:unit_tests(:host_fake_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070061 "//test/arch(:aem_v8a_fvp_vhe_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070062 "//test/arch(:qemu_aarch64_vhe_clang)",
David Brazdil3d7b88b2019-07-22 17:19:35 +010063 "//test/arch(:rpi4_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070064 "//test/linux(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070065 "//test/linux(:qemu_aarch64_vhe_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000066 "//test/linux(:rpi4_vm_clang)",
Olivier Deprezacd0a4e2022-02-23 09:31:21 +010067 "//test/vmapi:partitions(:secure_aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070068 "//test/vmapi(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070069 "//test/vmapi(:qemu_aarch64_vhe_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000070 "//test/vmapi(:rpi4_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070071 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070072 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:qemu_aarch64_vhe_vm_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000073 ]
74}
75
76# Describe each of the platforms used in this project.
77
78host_toolchain("host_fake") {
79 use_platform = true
Andrew Walbranbc737c42018-12-07 14:24:16 +000080 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000081 max_cpus = 4
82 max_vms = 6
83}
84
Nishant Sharma74e645a2023-08-10 18:37:51 +010085# RD (Reference Design) is a collection of resources to provide a representative
86# view of typical compute subsystems that can be designed and implemented using
87# specific generations of Arm IP. RD-Fremont is the first RD platform with Realm
88# Management Extension (RME) support.
89# For more information please refer:
90# https://neoverse-reference-design.docs.arm.com/en/latest/platforms/rdfremont/readme.html
91aarch64_toolchains("secure_rd_fremont") {
92 cpu = "cortex-a57"
93 origin_address = "0xF9000000"
94 boot_flow = "//src/boot_flow:spmc"
95 console = "//src/arch/aarch64/pl011"
96 iommu = "//src/iommu:absent"
J-Alves57f5a662023-11-08 12:10:49 +000097 memory_protect = "//src/arch/aarch64/memory_protect:memory_protect"
Nishant Sharma74e645a2023-08-10 18:37:51 +010098 gic_version = 4
99 gicd_base_address = "0x30000000"
100 gicr_base_address = "0x301C0000"
101 gicr_frames = 16
102 heap_pages = 180
103 max_cpus = 16
104 max_vms = 16
105 toolchain_args = {
106 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
107 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
108 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
109 secure_world = "1"
110 pl011_base_address = "0x2A410000"
111 enable_mte = "1"
112 plat_log_level = "LOG_LEVEL_INFO"
113 plat_num_virtual_interrupts_ids = 1024
114 }
115}
116
Jerry Wang49371572023-11-30 09:42:36 +0000117aarch64_toolchains("secure_rd_fremont_cfg1") {
118 cpu = "cortex-a57"
119 origin_address = "0xF9000000"
120 boot_flow = "//src/boot_flow:spmc"
121 console = "//src/arch/aarch64/pl011"
122 iommu = "//src/iommu:absent"
J-Alves57f5a662023-11-08 12:10:49 +0000123 memory_protect = "//src/arch/aarch64/memory_protect:memory_protect"
Jerry Wang49371572023-11-30 09:42:36 +0000124 gic_version = 4
125 gicd_base_address = "0x30000000"
126 gicr_base_address = "0x30100000"
127 gicr_frames = 8
128 heap_pages = 180
129 max_cpus = 8
130 max_vms = 8
131 toolchain_args = {
132 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
133 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
134 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
135 secure_world = "1"
136 pl011_base_address = "0x2A410000"
137 enable_mte = "1"
138 plat_log_level = "LOG_LEVEL_INFO"
139 plat_num_virtual_interrupts_ids = 1024
140 }
141}
142
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700143aarch64_toolchains("secure_aem_v8a_fvp_vhe") {
144 cpu = "cortex-a57"
145 origin_address = "0x06000000"
146 boot_flow = "//src/boot_flow:spmc"
147 console = "//src/arch/aarch64/pl011"
148 iommu = "//src/arch/aarch64/arm_smmuv3"
J-Alves57f5a662023-11-08 12:10:49 +0000149 memory_protect = "//src/arch/aarch64/memory_protect:memory_protect"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700150 gic_version = 3
Madhukar Pappireddy48050f52023-08-29 13:52:33 -0500151 gic_enable_espi = 1
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700152 gicd_base_address = "0x2f000000"
153 gicr_base_address = "0x2f100000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000154 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700155 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700156 max_cpus = 8
157 max_vms = 16
Raghu Krishnamurthy510aa3e2021-11-28 07:20:45 -0800158 branch_protection = "standard"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700159 toolchain_args = {
160 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
161 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
162 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700163 secure_world = "1"
164 pl011_base_address = "0x1c090000"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700165 smmu_base_address = "0x2b400000"
166 smmu_memory_size = "0x100000"
Maksims Svecovsc3cda252021-09-30 12:20:11 +0100167 enable_mte = "1"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100168 plat_log_level = "LOG_LEVEL_INFO"
Madhukar Pappireddy48050f52023-08-29 13:52:33 -0500169 plat_num_virtual_interrupts_ids = 5120
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700170 }
171}
172
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700173aarch64_toolchains("aem_v8a_fvp_vhe") {
174 cpu = "cortex-a57"
175 origin_address = "0x80000000"
176 boot_flow = "//src/boot_flow:linux"
J-Alves57f5a662023-11-08 12:10:49 +0000177 memory_protect = "//src/memory_protect:absent"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700178 console = "//src/arch/aarch64/pl011"
179 iommu = "//src/arch/aarch64/arm_smmuv3"
180 gic_version = 3
181 gicd_base_address = "0x2f000000"
182 gicr_base_address = "0x2f100000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000183 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700184 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700185 max_cpus = 8
186 max_vms = 16
Raghu Krishnamurthy510aa3e2021-11-28 07:20:45 -0800187 branch_protection = "standard"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700188 toolchain_args = {
189 plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor"
190 pl011_base_address = "0x1c090000"
191 smmu_base_address = "0x2b400000"
192 smmu_memory_size = "0x100000"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100193 plat_log_level = "LOG_LEVEL_INFO"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700194 }
195}
196
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700197aarch64_toolchains("qemu_aarch64_vhe") {
198 cpu = "cortex-a57"
199 origin_address = "0x40001000"
200 boot_flow = "//src/boot_flow:linux"
201 console = "//src/arch/aarch64/pl011"
202 iommu = "//src/iommu:absent"
J-Alves57f5a662023-11-08 12:10:49 +0000203 memory_protect = "//src/memory_protect:absent"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700204 gic_version = 3
205 gicd_base_address = "0x08000000"
206 gicr_base_address = "0x080A0000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000207 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700208 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700209 max_cpus = 8
210 max_vms = 16
211 toolchain_args = {
Olivier Deprezd82b5e02021-07-05 11:16:16 +0200212 plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700213 pl011_base_address = "0x09000000"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100214 plat_log_level = "LOG_LEVEL_INFO"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700215 }
216}
217
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100218aarch64_toolchains("secure_qemu_aarch64") {
219 cpu = "cortex-a57"
220 origin_address = "0xe100000"
J-Alves57f5a662023-11-08 12:10:49 +0000221 memory_protect = "//src/memory_protect:absent"
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100222 boot_flow = "//src/boot_flow:spmc"
223 console = "//src/arch/aarch64/pl011"
224 iommu = "//src/iommu:absent"
225 gic_version = 3
226 gicd_base_address = "0x08000000"
227 gicr_base_address = "0x080A0000"
228 gicr_frames = 8
229 heap_pages = 180
230 max_cpus = 8
231 max_vms = 16
232 branch_protection = "standard"
233 toolchain_args = {
234 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
235 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
236 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
237 secure_world = "1"
238 pl011_base_address = "0x09000000"
239 hftest_ctrl = "//test/hftest:ctrl_uart"
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100240 enable_mte = "1"
241 plat_log_level = "LOG_LEVEL_INFO"
Madhukar Pappireddyffbe2e22023-02-02 17:45:30 -0600242 plat_num_virtual_interrupts_ids = 1024
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100243 }
244}
245
David Brazdil3d7b88b2019-07-22 17:19:35 +0100246aarch64_toolchains("rpi4") {
247 cpu = "cortex-a72"
248 origin_address = "0x80000"
249 boot_flow = "//src/boot_flow:linux"
Olivier Depreza7015472023-10-16 20:17:50 +0200250 console = "//project/reference/rpi4:mini_uart"
J-Alves57f5a662023-11-08 12:10:49 +0000251 memory_protect = "//src/memory_protect:absent"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000252 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100253 gic_version = 2
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700254 heap_pages = 180
David Brazdil3d7b88b2019-07-22 17:19:35 +0100255 max_cpus = 4
256 max_vms = 16
257 toolchain_args = {
Daniel Boulby0029f482021-03-25 14:19:21 +0000258 plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100259 gpio_base_address = "0xfe200000"
260 aux_base_address = "0xfe215000"
261 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000262 hftest_ctrl = "//test/hftest:ctrl_uart"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100263 plat_log_level = "LOG_LEVEL_INFO"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100264 }
265}
David Brazdilc702a032020-01-31 15:44:11 +0000266
Olivier Deprezb5ebdd72023-11-08 12:48:20 +0100267# The Total Compute platform provides an envelope for Arm's latest client IPs.
268# Release notes and user manual for the open source software stack targeting
269# the Total Compute Fixed Virtual Platform (FVP) are found here:
270# https://totalcompute.docs.arm.com/en/latest/
Usama Ariff0996a52021-08-09 14:28:30 +0100271aarch64_toolchains("secure_tc") {
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100272 cpu = "cortex-a57"
273 origin_address = "0xfd000000"
Olivier Deprez59e35f72020-11-10 17:15:18 +0100274 boot_flow = "//src/boot_flow:spmc"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100275 console = "//src/arch/aarch64/pl011"
276 iommu = "//src/iommu:absent"
J-Alves57f5a662023-11-08 12:10:49 +0000277 memory_protect = "//src/memory_protect:absent"
Madhukar Pappireddy89ee8cc2021-10-29 10:03:18 -0500278 gic_version = 4
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100279 gicd_base_address = "0x30000000"
Usama Arif2c636ff2021-04-01 11:09:25 +0100280 gicr_base_address = "0x30080000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000281 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700282 heap_pages = 180
Arunachalam Ganapathy51e81572021-01-20 14:57:41 +0000283 max_cpus = 8
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100284 max_vms = 16
285 toolchain_args = {
Daniel Boulby0029f482021-03-25 14:19:21 +0000286 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
Olivier Deprezcf039902021-01-25 15:32:39 +0100287 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
Olivier Deprezcc0eb842021-04-07 14:03:59 +0200288 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100289 secure_world = "1"
290 pl011_base_address = "0x7ff80000"
Maksims Svecovsc3cda252021-09-30 12:20:11 +0100291 enable_mte = "1"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100292 plat_log_level = "LOG_LEVEL_INFO"
Madhukar Pappireddyffbe2e22023-02-02 17:45:30 -0600293 plat_num_virtual_interrupts_ids = 1024
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100294 }
295}