blob: d462c385c3aff8a7f211ba8b7d2c10abf995a67b [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
Andrew Scull2d527c22018-11-27 14:21:08 +000010group("root") {
11 deps = [
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070012 "//src:hafnium(:aem_v8a_fvp_vhe_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070013 "//src:hafnium(:qemu_aarch64_vhe_clang)",
David Brazdil3d7b88b2019-07-22 17:19:35 +010014 "//src:hafnium(:rpi4_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070015 "//src:hafnium(:secure_aem_v8a_fvp_vhe_clang)",
Olivier Deprezf17c61e2023-01-30 13:50:25 +010016 "//src:hafnium(:secure_qemu_aarch64_clang)",
Nishant Sharma74e645a2023-08-10 18:37:51 +010017 "//src:hafnium(:secure_rd_fremont_clang)",
Usama Ariff0996a52021-08-09 14:28:30 +010018 "//src:hafnium(:secure_tc_clang)",
Raghu Krishnamurthye0ede852021-12-04 14:29:57 -080019 "//src/arch/aarch64/qemuloader:bl(:qemu_aarch64_vhe_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000020 ]
21}
22
23group("test_root") {
24 testonly = true
25
26 deps = [
27 "//src:unit_tests(:host_fake_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070028 "//test/arch(:aem_v8a_fvp_vhe_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070029 "//test/arch(:qemu_aarch64_vhe_clang)",
David Brazdil3d7b88b2019-07-22 17:19:35 +010030 "//test/arch(:rpi4_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070031 "//test/linux(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070032 "//test/linux(:qemu_aarch64_vhe_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000033 "//test/linux(:rpi4_vm_clang)",
Olivier Deprezacd0a4e2022-02-23 09:31:21 +010034 "//test/vmapi:partitions(:secure_aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070035 "//test/vmapi(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070036 "//test/vmapi(:qemu_aarch64_vhe_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000037 "//test/vmapi(:rpi4_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070038 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070039 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:qemu_aarch64_vhe_vm_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000040 ]
41}
42
43# Describe each of the platforms used in this project.
44
45host_toolchain("host_fake") {
46 use_platform = true
Andrew Walbranbc737c42018-12-07 14:24:16 +000047 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000048 max_cpus = 4
49 max_vms = 6
50}
51
Nishant Sharma74e645a2023-08-10 18:37:51 +010052# RD (Reference Design) is a collection of resources to provide a representative
53# view of typical compute subsystems that can be designed and implemented using
54# specific generations of Arm IP. RD-Fremont is the first RD platform with Realm
55# Management Extension (RME) support.
56# For more information please refer:
57# https://neoverse-reference-design.docs.arm.com/en/latest/platforms/rdfremont/readme.html
58aarch64_toolchains("secure_rd_fremont") {
59 cpu = "cortex-a57"
60 origin_address = "0xF9000000"
61 boot_flow = "//src/boot_flow:spmc"
62 console = "//src/arch/aarch64/pl011"
63 iommu = "//src/iommu:absent"
64 gic_version = 4
65 gicd_base_address = "0x30000000"
66 gicr_base_address = "0x301C0000"
67 gicr_frames = 16
68 heap_pages = 180
69 max_cpus = 16
70 max_vms = 16
71 toolchain_args = {
72 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
73 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
74 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
75 secure_world = "1"
76 pl011_base_address = "0x2A410000"
77 enable_mte = "1"
78 plat_log_level = "LOG_LEVEL_INFO"
79 plat_num_virtual_interrupts_ids = 1024
80 }
81}
82
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070083aarch64_toolchains("secure_aem_v8a_fvp_vhe") {
84 cpu = "cortex-a57"
85 origin_address = "0x06000000"
86 boot_flow = "//src/boot_flow:spmc"
87 console = "//src/arch/aarch64/pl011"
88 iommu = "//src/arch/aarch64/arm_smmuv3"
89 gic_version = 3
Madhukar Pappireddy48050f52023-08-29 13:52:33 -050090 gic_enable_espi = 1
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070091 gicd_base_address = "0x2f000000"
92 gicr_base_address = "0x2f100000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +000093 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -070094 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070095 max_cpus = 8
96 max_vms = 16
Raghu Krishnamurthy510aa3e2021-11-28 07:20:45 -080097 branch_protection = "standard"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070098 toolchain_args = {
99 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
100 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
101 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700102 secure_world = "1"
103 pl011_base_address = "0x1c090000"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700104 smmu_base_address = "0x2b400000"
105 smmu_memory_size = "0x100000"
Maksims Svecovsc3cda252021-09-30 12:20:11 +0100106 enable_mte = "1"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100107 plat_log_level = "LOG_LEVEL_INFO"
Madhukar Pappireddy48050f52023-08-29 13:52:33 -0500108 plat_num_virtual_interrupts_ids = 5120
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700109 }
110}
111
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700112aarch64_toolchains("aem_v8a_fvp_vhe") {
113 cpu = "cortex-a57"
114 origin_address = "0x80000000"
115 boot_flow = "//src/boot_flow:linux"
116 console = "//src/arch/aarch64/pl011"
117 iommu = "//src/arch/aarch64/arm_smmuv3"
118 gic_version = 3
119 gicd_base_address = "0x2f000000"
120 gicr_base_address = "0x2f100000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000121 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700122 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700123 max_cpus = 8
124 max_vms = 16
Raghu Krishnamurthy510aa3e2021-11-28 07:20:45 -0800125 branch_protection = "standard"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700126 toolchain_args = {
127 plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor"
128 pl011_base_address = "0x1c090000"
129 smmu_base_address = "0x2b400000"
130 smmu_memory_size = "0x100000"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100131 plat_log_level = "LOG_LEVEL_INFO"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700132 }
133}
134
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700135aarch64_toolchains("qemu_aarch64_vhe") {
136 cpu = "cortex-a57"
137 origin_address = "0x40001000"
138 boot_flow = "//src/boot_flow:linux"
139 console = "//src/arch/aarch64/pl011"
140 iommu = "//src/iommu:absent"
141 gic_version = 3
142 gicd_base_address = "0x08000000"
143 gicr_base_address = "0x080A0000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000144 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700145 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700146 max_cpus = 8
147 max_vms = 16
148 toolchain_args = {
Olivier Deprezd82b5e02021-07-05 11:16:16 +0200149 plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700150 pl011_base_address = "0x09000000"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100151 plat_log_level = "LOG_LEVEL_INFO"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700152 }
153}
154
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100155aarch64_toolchains("secure_qemu_aarch64") {
156 cpu = "cortex-a57"
157 origin_address = "0xe100000"
158 boot_flow = "//src/boot_flow:spmc"
159 console = "//src/arch/aarch64/pl011"
160 iommu = "//src/iommu:absent"
161 gic_version = 3
162 gicd_base_address = "0x08000000"
163 gicr_base_address = "0x080A0000"
164 gicr_frames = 8
165 heap_pages = 180
166 max_cpus = 8
167 max_vms = 16
168 branch_protection = "standard"
169 toolchain_args = {
170 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
171 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
172 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
173 secure_world = "1"
174 pl011_base_address = "0x09000000"
175 hftest_ctrl = "//test/hftest:ctrl_uart"
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100176 enable_mte = "1"
177 plat_log_level = "LOG_LEVEL_INFO"
Madhukar Pappireddyffbe2e22023-02-02 17:45:30 -0600178 plat_num_virtual_interrupts_ids = 1024
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100179 }
180}
181
David Brazdil3d7b88b2019-07-22 17:19:35 +0100182aarch64_toolchains("rpi4") {
183 cpu = "cortex-a72"
184 origin_address = "0x80000"
185 boot_flow = "//src/boot_flow:linux"
186 console = "//project/reference/rpi:mini_uart"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000187 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100188 gic_version = 2
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700189 heap_pages = 180
David Brazdil3d7b88b2019-07-22 17:19:35 +0100190 max_cpus = 4
191 max_vms = 16
192 toolchain_args = {
Daniel Boulby0029f482021-03-25 14:19:21 +0000193 plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100194 gpio_base_address = "0xfe200000"
195 aux_base_address = "0xfe215000"
196 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000197 hftest_ctrl = "//test/hftest:ctrl_uart"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100198 plat_log_level = "LOG_LEVEL_INFO"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100199 }
200}
David Brazdilc702a032020-01-31 15:44:11 +0000201
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100202# The Total Compute platform provides an envelope for all of Arm's latest IP.
Usama Ariff0996a52021-08-09 14:28:30 +0100203# TC0 and TC1 are reference open source software stack for the
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100204# Total Compute Fixed Virtual Platform (FVP). More info at:
205# https://community.arm.com/developer/tools-software/oss-platforms/w/docs/606/total-compute
Usama Arif50a4b892021-04-15 10:48:30 +0100206# https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/totalcompute/tc0/user-guide.rst
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100207#
Usama Ariff0996a52021-08-09 14:28:30 +0100208# Secure hafnium build for tc0 and tc1 platforms. This builds reference Secure Partition
209# Manager (SPM) for tc0 and tc1 with Armv8.4-A Secure-EL2 extension.
210aarch64_toolchains("secure_tc") {
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100211 cpu = "cortex-a57"
212 origin_address = "0xfd000000"
Olivier Deprez59e35f72020-11-10 17:15:18 +0100213 boot_flow = "//src/boot_flow:spmc"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100214 console = "//src/arch/aarch64/pl011"
215 iommu = "//src/iommu:absent"
Madhukar Pappireddy89ee8cc2021-10-29 10:03:18 -0500216 gic_version = 4
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100217 gicd_base_address = "0x30000000"
Usama Arif2c636ff2021-04-01 11:09:25 +0100218 gicr_base_address = "0x30080000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000219 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700220 heap_pages = 180
Arunachalam Ganapathy51e81572021-01-20 14:57:41 +0000221 max_cpus = 8
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100222 max_vms = 16
223 toolchain_args = {
Daniel Boulby0029f482021-03-25 14:19:21 +0000224 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
Olivier Deprezcf039902021-01-25 15:32:39 +0100225 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
Olivier Deprezcc0eb842021-04-07 14:03:59 +0200226 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100227 secure_world = "1"
228 pl011_base_address = "0x7ff80000"
Maksims Svecovsc3cda252021-09-30 12:20:11 +0100229 enable_mte = "1"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100230 plat_log_level = "LOG_LEVEL_INFO"
Madhukar Pappireddyffbe2e22023-02-02 17:45:30 -0600231 plat_num_virtual_interrupts_ids = 1024
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100232 }
233}