blob: 3080ec78d1a78de5c94d9bc530354f4e950ac833 [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)",
Usama Ariff0996a52021-08-09 14:28:30 +010017 "//src:hafnium(:secure_tc_clang)",
Raghu Krishnamurthye0ede852021-12-04 14:29:57 -080018 "//src/arch/aarch64/qemuloader:bl(:qemu_aarch64_vhe_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000019 ]
20}
21
22group("test_root") {
23 testonly = true
24
25 deps = [
26 "//src:unit_tests(:host_fake_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070027 "//test/arch(:aem_v8a_fvp_vhe_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070028 "//test/arch(:qemu_aarch64_vhe_clang)",
David Brazdil3d7b88b2019-07-22 17:19:35 +010029 "//test/arch(:rpi4_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070030 "//test/linux(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070031 "//test/linux(:qemu_aarch64_vhe_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000032 "//test/linux(:rpi4_vm_clang)",
Olivier Deprezacd0a4e2022-02-23 09:31:21 +010033 "//test/vmapi:partitions(:secure_aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070034 "//test/vmapi(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070035 "//test/vmapi(:qemu_aarch64_vhe_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000036 "//test/vmapi(:rpi4_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070037 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:aem_v8a_fvp_vhe_vm_clang)",
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070038 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:qemu_aarch64_vhe_vm_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000039 ]
40}
41
42# Describe each of the platforms used in this project.
43
44host_toolchain("host_fake") {
45 use_platform = true
Andrew Walbranbc737c42018-12-07 14:24:16 +000046 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000047 max_cpus = 4
48 max_vms = 6
49}
50
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070051aarch64_toolchains("secure_aem_v8a_fvp_vhe") {
52 cpu = "cortex-a57"
53 origin_address = "0x06000000"
54 boot_flow = "//src/boot_flow:spmc"
55 console = "//src/arch/aarch64/pl011"
56 iommu = "//src/arch/aarch64/arm_smmuv3"
57 gic_version = 3
58 gicd_base_address = "0x2f000000"
59 gicr_base_address = "0x2f100000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +000060 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -070061 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070062 max_cpus = 8
63 max_vms = 16
Raghu Krishnamurthy510aa3e2021-11-28 07:20:45 -080064 branch_protection = "standard"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070065 toolchain_args = {
66 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
67 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
68 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070069 secure_world = "1"
70 pl011_base_address = "0x1c090000"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070071 smmu_base_address = "0x2b400000"
72 smmu_memory_size = "0x100000"
73 enable_vhe = "1"
Maksims Svecovsc3cda252021-09-30 12:20:11 +010074 enable_mte = "1"
Varun Wadekar4cba5e42022-09-29 17:39:14 +010075 plat_log_level = "LOG_LEVEL_INFO"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070076 }
77}
78
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070079aarch64_toolchains("aem_v8a_fvp_vhe") {
80 cpu = "cortex-a57"
81 origin_address = "0x80000000"
82 boot_flow = "//src/boot_flow:linux"
83 console = "//src/arch/aarch64/pl011"
84 iommu = "//src/arch/aarch64/arm_smmuv3"
85 gic_version = 3
86 gicd_base_address = "0x2f000000"
87 gicr_base_address = "0x2f100000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +000088 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -070089 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070090 max_cpus = 8
91 max_vms = 16
Raghu Krishnamurthy510aa3e2021-11-28 07:20:45 -080092 branch_protection = "standard"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -070093 toolchain_args = {
94 plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor"
95 pl011_base_address = "0x1c090000"
96 smmu_base_address = "0x2b400000"
97 smmu_memory_size = "0x100000"
98 enable_vhe = "1"
Varun Wadekar4cba5e42022-09-29 17:39:14 +010099 plat_log_level = "LOG_LEVEL_INFO"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700100 }
101}
102
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700103aarch64_toolchains("qemu_aarch64_vhe") {
104 cpu = "cortex-a57"
105 origin_address = "0x40001000"
106 boot_flow = "//src/boot_flow:linux"
107 console = "//src/arch/aarch64/pl011"
108 iommu = "//src/iommu:absent"
109 gic_version = 3
110 gicd_base_address = "0x08000000"
111 gicr_base_address = "0x080A0000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000112 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700113 heap_pages = 180
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700114 max_cpus = 8
115 max_vms = 16
116 toolchain_args = {
Olivier Deprezd82b5e02021-07-05 11:16:16 +0200117 plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700118 pl011_base_address = "0x09000000"
119 enable_vhe = "1"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100120 plat_log_level = "LOG_LEVEL_INFO"
Raghu Krishnamurthy8e680992021-06-15 20:19:47 -0700121 }
122}
123
Olivier Deprezf17c61e2023-01-30 13:50:25 +0100124aarch64_toolchains("secure_qemu_aarch64") {
125 cpu = "cortex-a57"
126 origin_address = "0xe100000"
127 boot_flow = "//src/boot_flow:spmc"
128 console = "//src/arch/aarch64/pl011"
129 iommu = "//src/iommu:absent"
130 gic_version = 3
131 gicd_base_address = "0x08000000"
132 gicr_base_address = "0x080A0000"
133 gicr_frames = 8
134 heap_pages = 180
135 max_cpus = 8
136 max_vms = 16
137 branch_protection = "standard"
138 toolchain_args = {
139 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
140 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
141 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
142 secure_world = "1"
143 pl011_base_address = "0x09000000"
144 hftest_ctrl = "//test/hftest:ctrl_uart"
145 enable_vhe = "1"
146 enable_mte = "1"
147 plat_log_level = "LOG_LEVEL_INFO"
148 }
149}
150
David Brazdil3d7b88b2019-07-22 17:19:35 +0100151aarch64_toolchains("rpi4") {
152 cpu = "cortex-a72"
153 origin_address = "0x80000"
154 boot_flow = "//src/boot_flow:linux"
155 console = "//project/reference/rpi:mini_uart"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000156 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100157 gic_version = 2
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700158 heap_pages = 180
David Brazdil3d7b88b2019-07-22 17:19:35 +0100159 max_cpus = 4
160 max_vms = 16
161 toolchain_args = {
Daniel Boulby0029f482021-03-25 14:19:21 +0000162 plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100163 gpio_base_address = "0xfe200000"
164 aux_base_address = "0xfe215000"
165 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000166 hftest_ctrl = "//test/hftest:ctrl_uart"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100167 plat_log_level = "LOG_LEVEL_INFO"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100168 }
169}
David Brazdilc702a032020-01-31 15:44:11 +0000170
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100171# The Total Compute platform provides an envelope for all of Arm's latest IP.
Usama Ariff0996a52021-08-09 14:28:30 +0100172# TC0 and TC1 are reference open source software stack for the
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100173# Total Compute Fixed Virtual Platform (FVP). More info at:
174# https://community.arm.com/developer/tools-software/oss-platforms/w/docs/606/total-compute
Usama Arif50a4b892021-04-15 10:48:30 +0100175# 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 +0100176#
Usama Ariff0996a52021-08-09 14:28:30 +0100177# Secure hafnium build for tc0 and tc1 platforms. This builds reference Secure Partition
178# Manager (SPM) for tc0 and tc1 with Armv8.4-A Secure-EL2 extension.
179aarch64_toolchains("secure_tc") {
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100180 cpu = "cortex-a57"
181 origin_address = "0xfd000000"
Olivier Deprez59e35f72020-11-10 17:15:18 +0100182 boot_flow = "//src/boot_flow:spmc"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100183 console = "//src/arch/aarch64/pl011"
184 iommu = "//src/iommu:absent"
Madhukar Pappireddy89ee8cc2021-10-29 10:03:18 -0500185 gic_version = 4
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100186 gicd_base_address = "0x30000000"
Usama Arif2c636ff2021-04-01 11:09:25 +0100187 gicr_base_address = "0x30080000"
Varun Wadekarfa4b3ac2022-02-14 17:19:18 +0000188 gicr_frames = 8
Raghu Krishnamurthyf8956392022-09-20 09:51:05 -0700189 heap_pages = 180
Arunachalam Ganapathy51e81572021-01-20 14:57:41 +0000190 max_cpus = 8
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100191 max_vms = 16
192 toolchain_args = {
Daniel Boulby0029f482021-03-25 14:19:21 +0000193 plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
Olivier Deprezcf039902021-01-25 15:32:39 +0100194 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
Olivier Deprezcc0eb842021-04-07 14:03:59 +0200195 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100196 secure_world = "1"
197 pl011_base_address = "0x7ff80000"
Maksims Svecovsc3cda252021-09-30 12:20:11 +0100198 enable_mte = "1"
Davidson Kbf790182022-09-08 10:47:10 +0530199 enable_vhe = "1"
Varun Wadekar4cba5e42022-09-29 17:39:14 +0100200 plat_log_level = "LOG_LEVEL_INFO"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100201 }
202}