blob: 46c7f0f011b52e1929ad1811963000c2764d140f [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
Jerry Wang11129b92024-10-22 09:47:08 +010034group("secure_rd_v3") {
35 deps = [ "//src:hafnium(:secure_rd_v3_clang)" ]
Olivier Deprez7e645932023-11-06 09:49:05 +010036}
37
Jerry Wang11129b92024-10-22 09:47:08 +010038group("secure_rd_v3_cfg1") {
39 deps = [ "//src:hafnium(:secure_rd_v3_cfg1_clang)" ]
Jerry Wang49371572023-11-30 09:42:36 +000040}
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",
Jerry Wang11129b92024-10-22 09:47:08 +010049 ":secure_rd_v3",
50 ":secure_rd_v3_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)",
Olivier Deprezacd0a4e2022-02-23 09:31:21 +010064 "//test/vmapi:partitions(:secure_aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070065 "//test/vmapi(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070066 "//test/vmapi(:qemu_aarch64_vhe_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000067 "//test/vmapi(:rpi4_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070068 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070069 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:qemu_aarch64_vhe_vm_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000070 ]
71}
72
73# Describe each of the platforms used in this project.
74
75host_toolchain("host_fake") {
76 use_platform = true
Andrew Walbranbc737c42018-12-07 14:24:16 +000077 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000078 max_cpus = 4
79 max_vms = 6
80}
81
Nishant Sharma74e645a2023-08-10 18:37:51 +010082# RD (Reference Design) is a collection of resources to provide a representative
83# view of typical compute subsystems that can be designed and implemented using
Jerry Wang11129b92024-10-22 09:47:08 +010084# specific generations of Arm IP. RD-V3 is the first RD platform with Realm
Nishant Sharma74e645a2023-08-10 18:37:51 +010085# Management Extension (RME) support.
86# For more information please refer:
Jerry Wang11129b92024-10-22 09:47:08 +010087# https://neoverse-reference-design.docs.arm.com/en/latest/platforms/rdv3.html
88aarch64_toolchains("secure_rd_v3") {
Nishant Sharma74e645a2023-08-10 18:37:51 +010089 cpu = "cortex-a57"
90 origin_address = "0xF9000000"
91 boot_flow = "//src/boot_flow:spmc"
92 console = "//src/arch/aarch64/pl011"
93 iommu = "//src/iommu:absent"
J-Alves57f5a662023-11-08 12:10:49 +000094 memory_protect = "//src/arch/aarch64/memory_protect:memory_protect"
Nishant Sharma74e645a2023-08-10 18:37:51 +010095 gic_version = 4
96 gicd_base_address = "0x30000000"
97 gicr_base_address = "0x301C0000"
98 gicr_frames = 16
99 heap_pages = 180
100 max_cpus = 16
101 max_vms = 16
102 toolchain_args = {
Karl Meakin51e484e2024-11-28 13:38:16 +0000103 ffa_role = "//src/ffa:spmc"
Nishant Sharma74e645a2023-08-10 18:37:51 +0100104 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
105 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
106 secure_world = "1"
107 pl011_base_address = "0x2A410000"
108 enable_mte = "1"
109 plat_log_level = "LOG_LEVEL_INFO"
110 plat_num_virtual_interrupts_ids = 1024
111 }
112}
113
Jerry Wang11129b92024-10-22 09:47:08 +0100114aarch64_toolchains("secure_rd_v3_cfg1") {
Jerry Wang49371572023-11-30 09:42:36 +0000115 cpu = "cortex-a57"
116 origin_address = "0xF9000000"
117 boot_flow = "//src/boot_flow:spmc"
118 console = "//src/arch/aarch64/pl011"
119 iommu = "//src/iommu:absent"
J-Alves57f5a662023-11-08 12:10:49 +0000120 memory_protect = "//src/arch/aarch64/memory_protect:memory_protect"
Jerry Wang49371572023-11-30 09:42:36 +0000121 gic_version = 4
122 gicd_base_address = "0x30000000"
123 gicr_base_address = "0x30100000"
124 gicr_frames = 8
125 heap_pages = 180
126 max_cpus = 8
127 max_vms = 8
128 toolchain_args = {
Karl Meakin51e484e2024-11-28 13:38:16 +0000129 ffa_role = "//src/ffa:spmc"
Jerry Wang49371572023-11-30 09:42:36 +0000130 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
131 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
132 secure_world = "1"
133 pl011_base_address = "0x2A410000"
134 enable_mte = "1"
135 plat_log_level = "LOG_LEVEL_INFO"
136 plat_num_virtual_interrupts_ids = 1024
137 }
138}
139
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700140aarch64_toolchains("secure_aem_v8a_fvp_vhe") {
141 cpu = "cortex-a57"
142 origin_address = "0x06000000"
143 boot_flow = "//src/boot_flow:spmc"
144 console = "//src/arch/aarch64/pl011"
145 iommu = "//src/arch/aarch64/arm_smmuv3"
J-Alves57f5a662023-11-08 12:10:49 +0000146 memory_protect = "//src/arch/aarch64/memory_protect:memory_protect"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700147 gic_version = 3
Madhukar Pappireddy48050f52023-08-29 13:52:33 -0500148 gic_enable_espi = 1
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700149 gicd_base_address = "0x2f000000"
150 gicr_base_address = "0x2f100000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000151 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700152 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700153 max_cpus = 8
154 max_vms = 16
Raghu Krishnamurthy510aa3e2021-11-28 07:20:45 -0800155 branch_protection = "standard"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700156 toolchain_args = {
Karl Meakin51e484e2024-11-28 13:38:16 +0000157 ffa_role = "//src/ffa:spmc"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700158 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
159 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700160 secure_world = "1"
161 pl011_base_address = "0x1c090000"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700162 smmu_base_address = "0x2b400000"
163 smmu_memory_size = "0x100000"
Maksims Svecovsc3cda252021-09-30 12:20:11 +0100164 enable_mte = "1"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100165 plat_log_level = "LOG_LEVEL_INFO"
Madhukar Pappireddy48050f52023-08-29 13:52:33 -0500166 plat_num_virtual_interrupts_ids = 5120
Madhukar Pappireddy47b58482023-10-11 16:02:05 -0500167 plat_partition_max_dma_devices = 1
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700168 }
169}
170
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700171aarch64_toolchains("aem_v8a_fvp_vhe") {
172 cpu = "cortex-a57"
173 origin_address = "0x80000000"
174 boot_flow = "//src/boot_flow:linux"
J-Alves57f5a662023-11-08 12:10:49 +0000175 memory_protect = "//src/memory_protect:absent"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700176 console = "//src/arch/aarch64/pl011"
177 iommu = "//src/arch/aarch64/arm_smmuv3"
178 gic_version = 3
179 gicd_base_address = "0x2f000000"
180 gicr_base_address = "0x2f100000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000181 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700182 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700183 max_cpus = 8
184 max_vms = 16
Raghu Krishnamurthy510aa3e2021-11-28 07:20:45 -0800185 branch_protection = "standard"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700186 toolchain_args = {
Karl Meakin51e484e2024-11-28 13:38:16 +0000187 ffa_role = "//src/ffa:hypervisor"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700188 pl011_base_address = "0x1c090000"
189 smmu_base_address = "0x2b400000"
190 smmu_memory_size = "0x100000"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100191 plat_log_level = "LOG_LEVEL_INFO"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700192 }
193}
194
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700195aarch64_toolchains("qemu_aarch64_vhe") {
196 cpu = "cortex-a57"
197 origin_address = "0x40001000"
198 boot_flow = "//src/boot_flow:linux"
199 console = "//src/arch/aarch64/pl011"
200 iommu = "//src/iommu:absent"
J-Alves57f5a662023-11-08 12:10:49 +0000201 memory_protect = "//src/memory_protect:absent"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700202 gic_version = 3
203 gicd_base_address = "0x08000000"
204 gicr_base_address = "0x080A0000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000205 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700206 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700207 max_cpus = 8
208 max_vms = 16
209 toolchain_args = {
Karl Meakin51e484e2024-11-28 13:38:16 +0000210 ffa_role = "//src/ffa:hypervisor"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700211 pl011_base_address = "0x09000000"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100212 plat_log_level = "LOG_LEVEL_INFO"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700213 }
214}
215
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100216aarch64_toolchains("secure_qemu_aarch64") {
217 cpu = "cortex-a57"
218 origin_address = "0xe100000"
J-Alves57f5a662023-11-08 12:10:49 +0000219 memory_protect = "//src/memory_protect:absent"
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100220 boot_flow = "//src/boot_flow:spmc"
221 console = "//src/arch/aarch64/pl011"
222 iommu = "//src/iommu:absent"
223 gic_version = 3
224 gicd_base_address = "0x08000000"
225 gicr_base_address = "0x080A0000"
226 gicr_frames = 8
227 heap_pages = 180
228 max_cpus = 8
229 max_vms = 16
230 branch_protection = "standard"
231 toolchain_args = {
Karl Meakin51e484e2024-11-28 13:38:16 +0000232 ffa_role = "//src/ffa:spmc"
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100233 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
234 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
235 secure_world = "1"
236 pl011_base_address = "0x09000000"
237 hftest_ctrl = "//test/hftest:ctrl_uart"
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100238 enable_mte = "1"
239 plat_log_level = "LOG_LEVEL_INFO"
Madhukar Pappireddyffbe2e22023-02-02 17:45:30 -0600240 plat_num_virtual_interrupts_ids = 1024
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100241 }
242}
243
David Brazdil3d7b88b2019-07-22 17:19:35 +0100244aarch64_toolchains("rpi4") {
245 cpu = "cortex-a72"
246 origin_address = "0x80000"
247 boot_flow = "//src/boot_flow:linux"
Olivier Depreza7015472023-10-16 20:17:50 +0200248 console = "//project/reference/rpi4:mini_uart"
J-Alves57f5a662023-11-08 12:10:49 +0000249 memory_protect = "//src/memory_protect:absent"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000250 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100251 gic_version = 2
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700252 heap_pages = 180
David Brazdil3d7b88b2019-07-22 17:19:35 +0100253 max_cpus = 4
254 max_vms = 16
255 toolchain_args = {
Karl Meakin51e484e2024-11-28 13:38:16 +0000256 ffa_role = "//src/ffa:hypervisor"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100257 gpio_base_address = "0xfe200000"
258 aux_base_address = "0xfe215000"
259 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000260 hftest_ctrl = "//test/hftest:ctrl_uart"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100261 plat_log_level = "LOG_LEVEL_INFO"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100262 }
263}
David Brazdilc702a032020-01-31 15:44:11 +0000264
Olivier Deprezb5ebdd72023-11-08 12:48:20 +0100265# The Total Compute platform provides an envelope for Arm's latest client IPs.
266# Release notes and user manual for the open source software stack targeting
267# the Total Compute Fixed Virtual Platform (FVP) are found here:
268# https://totalcompute.docs.arm.com/en/latest/
Usama Ariff0996a52021-08-09 14:28:30 +0100269aarch64_toolchains("secure_tc") {
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100270 cpu = "cortex-a57"
271 origin_address = "0xfd000000"
Olivier Deprez59e35f72020-11-10 17:15:18 +0100272 boot_flow = "//src/boot_flow:spmc"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100273 console = "//src/arch/aarch64/pl011"
274 iommu = "//src/iommu:absent"
J-Alves57f5a662023-11-08 12:10:49 +0000275 memory_protect = "//src/memory_protect:absent"
Madhukar Pappireddy89ee8cc2021-10-29 10:03:18 -0500276 gic_version = 4
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100277 gicd_base_address = "0x30000000"
Usama Arif2c636ff2021-04-01 11:09:25 +0100278 gicr_base_address = "0x30080000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000279 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700280 heap_pages = 180
Arunachalam Ganapathy51e81572021-01-20 14:57:41 +0000281 max_cpus = 8
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100282 max_vms = 16
Davidson K9e0329f2024-06-25 12:21:42 +0530283 branch_protection = "standard"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100284 toolchain_args = {
Karl Meakin51e484e2024-11-28 13:38:16 +0000285 ffa_role = "//src/ffa:spmc"
Olivier Deprezcf039902021-01-25 15:32:39 +0100286 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
Olivier Deprezcc0eb842021-04-07 14:03:59 +0200287 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100288 secure_world = "1"
annsai01c194b3a2023-02-21 14:09:29 +0000289 pl011_base_address = "0x2A410000"
Maksims Svecovsc3cda252021-09-30 12:20:11 +0100290 enable_mte = "1"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100291 plat_log_level = "LOG_LEVEL_INFO"
Madhukar Pappireddyffbe2e22023-02-02 17:45:30 -0600292 plat_num_virtual_interrupts_ids = 1024
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100293 }
294}