blob: 2da4aff42f7938fd949c39cb5e86ee7acc5aa9cc [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 = [
12 "//src:hafnium(:aem_v8a_fvp_clang)",
David Brazdilc702a032020-01-31 15:44:11 +000013 "//src:hafnium(:android_aarch64_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000014 "//src:hafnium(:qemu_aarch64_clang)",
David Brazdil3d7b88b2019-07-22 17:19:35 +010015 "//src:hafnium(:rpi4_clang)",
Jose Marinho69cd27d2019-10-17 15:51:31 +010016 "//src:hafnium(:secure_aem_v8a_fvp_clang)",
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +010017 "//src:hafnium(:secure_tc0_clang)",
Andrew Walbran92627a82020-01-17 10:52:44 +000018 "//src/arch/aarch64/qemuloader:bl(:qemu_aarch64_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)",
Andrew Walbranfd379392019-03-14 17:45:04 +000027 "//test/arch(:aem_v8a_fvp_clang)",
Andrew Scull75da2d12018-12-09 21:25:45 +000028 "//test/arch(:qemu_aarch64_clang)",
David Brazdil3d7b88b2019-07-22 17:19:35 +010029 "//test/arch(:rpi4_clang)",
Jose Marinho69cd27d2019-10-17 15:51:31 +010030 "//test/arch(:secure_aem_v8a_fvp_clang)",
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +010031 "//test/arch(:secure_tc0_clang)",
Andrew Walbranb1457602019-05-13 16:43:57 +010032 "//test/linux(:aem_v8a_fvp_vm_clang)",
33 "//test/linux(:qemu_aarch64_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000034 "//test/linux(:rpi4_vm_clang)",
Jose Marinho69cd27d2019-10-17 15:51:31 +010035 "//test/linux(:secure_aem_v8a_fvp_vm_clang)",
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +010036 "//test/linux(:secure_tc0_vm_clang)",
Andrew Walbranb1457602019-05-13 16:43:57 +010037 "//test/vmapi(:aem_v8a_fvp_vm_clang)",
38 "//test/vmapi(:qemu_aarch64_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000039 "//test/vmapi(:rpi4_vm_clang)",
Jose Marinho69cd27d2019-10-17 15:51:31 +010040 "//test/vmapi(:secure_aem_v8a_fvp_vm_clang)",
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +010041 "//test/vmapi(:secure_tc0_vm_clang)",
Andrew Scull3fe24082019-09-30 15:27:23 +010042 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:aem_v8a_fvp_vm_clang)",
43 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:qemu_aarch64_vm_clang)",
Jose Marinho69cd27d2019-10-17 15:51:31 +010044 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:secure_aem_v8a_fvp_vm_clang)",
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +010045 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:secure_tc0_vm_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000046 ]
47}
48
49# Describe each of the platforms used in this project.
50
51host_toolchain("host_fake") {
52 use_platform = true
Andrew Walbranbc737c42018-12-07 14:24:16 +000053 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000054 max_cpus = 4
55 max_vms = 6
56}
57
Jose Marinho69cd27d2019-10-17 15:51:31 +010058aarch64_toolchains("secure_aem_v8a_fvp") {
59 cpu = "cortex-a57"
60 origin_address = "0x06000000"
Olivier Deprez59e35f72020-11-10 17:15:18 +010061 boot_flow = "//src/boot_flow:spmc"
Jose Marinho69cd27d2019-10-17 15:51:31 +010062 console = "//src/arch/aarch64/pl011"
Madhukar Pappireddyf2a1e5c2020-11-16 13:06:33 -060063 iommu = "//src/arch/aarch64/arm_smmuv3"
Jose Marinho69cd27d2019-10-17 15:51:31 +010064 gic_version = 3
65 gicd_base_address = "0x2f000000"
66 gicr_base_address = "0x2f100000"
67 heap_pages = 60
68 max_cpus = 8
69 max_vms = 16
Olivier Deprez16fc50e2021-02-16 08:59:07 +010070 branch_protection = "standard"
Jose Marinho69cd27d2019-10-17 15:51:31 +010071 toolchain_args = {
Olivier Deprezcf039902021-01-25 15:32:39 +010072 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
Olivier Deprezcc0eb842021-04-07 14:03:59 +020073 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Olivier Deprez16fc50e2021-02-16 08:59:07 +010074 plat_prng = "//src/arch/aarch64/plat/prng:prng"
Jose Marinho69cd27d2019-10-17 15:51:31 +010075 secure_world = "1"
76 pl011_base_address = "0x1c090000"
J-Alves2aee94f2020-12-14 12:04:14 +000077 hftest_ctrl = "//test/hftest:ctrl_uart"
Madhukar Pappireddyf2a1e5c2020-11-16 13:06:33 -060078 smmu_base_address = "0x2b400000"
79 smmu_memory_size = "0x100000"
Jose Marinho69cd27d2019-10-17 15:51:31 +010080 }
81}
82
Andrew Walbranb1457602019-05-13 16:43:57 +010083aarch64_toolchains("aem_v8a_fvp") {
84 cpu = "cortex-a57"
Andrew Walbran65821982019-04-16 14:34:03 +010085 origin_address = "0x80000000"
David Brazdil653261a2019-09-09 18:04:33 +010086 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010087 console = "//src/arch/aarch64/pl011"
Madhukar Pappireddyf2a1e5c2020-11-16 13:06:33 -060088 iommu = "//src/arch/aarch64/arm_smmuv3"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000089 gic_version = 3
90 gicd_base_address = "0x2f000000"
91 gicr_base_address = "0x2f100000"
Andrew Walbranbc737c42018-12-07 14:24:16 +000092 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000093 max_cpus = 8
94 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +010095 toolchain_args = {
96 pl011_base_address = "0x1c090000"
Madhukar Pappireddyf2a1e5c2020-11-16 13:06:33 -060097 smmu_base_address = "0x2b400000"
98 smmu_memory_size = "0x100000"
Andrew Walbran808531e2019-05-20 14:52:45 +010099 }
Andrew Scull2d527c22018-11-27 14:21:08 +0000100}
101
Andrew Walbranb1457602019-05-13 16:43:57 +0100102aarch64_toolchains("qemu_aarch64") {
103 cpu = "cortex-a57"
Andrew Scull2d527c22018-11-27 14:21:08 +0000104 origin_address = "0x40001000"
David Brazdil653261a2019-09-09 18:04:33 +0100105 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +0100106 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000107 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +0000108 gic_version = 3
109 gicd_base_address = "0x08000000"
110 gicr_base_address = "0x080A0000"
Andrew Walbranbc737c42018-12-07 14:24:16 +0000111 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +0000112 max_cpus = 8
113 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +0100114 toolchain_args = {
115 pl011_base_address = "0x09000000"
116 }
Andrew Scull2d527c22018-11-27 14:21:08 +0000117}
118
David Brazdil3d7b88b2019-07-22 17:19:35 +0100119aarch64_toolchains("rpi4") {
120 cpu = "cortex-a72"
121 origin_address = "0x80000"
122 boot_flow = "//src/boot_flow:linux"
123 console = "//project/reference/rpi:mini_uart"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000124 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100125 gic_version = 2
126 heap_pages = 60
127 max_cpus = 4
128 max_vms = 16
129 toolchain_args = {
130 gpio_base_address = "0xfe200000"
131 aux_base_address = "0xfe215000"
132 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000133 hftest_ctrl = "//test/hftest:ctrl_uart"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100134 }
135}
David Brazdilc702a032020-01-31 15:44:11 +0000136
137# Generic target which uses the Android boot flow. It is not intended to run on
138# any Android platform. It exists only to test building Android-specific code.
139aarch64_toolchains("android_aarch64") {
140 cpu = "cortex-a57"
141 origin_address = "0x0"
142 boot_flow = "//src/boot_flow:android"
143 console = "//src/arch/aarch64/pl011"
144 iommu = "//src/iommu:absent"
145 gic_version = 2
146 heap_pages = 60
147 max_cpus = 8
148 max_vms = 16
149 toolchain_args = {
150 pl011_base_address = "0x09000000"
151 }
152}
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100153
154# The Total Compute platform provides an envelope for all of Arm's latest IP.
155# TC0 is a reference open source software stack for the first version of the
156# Total Compute Fixed Virtual Platform (FVP). More info at:
157# https://community.arm.com/developer/tools-software/oss-platforms/w/docs/606/total-compute
Usama Arif50a4b892021-04-15 10:48:30 +0100158# 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 +0100159#
160# Secure hafnium build for tc0 platform. This builds reference Secure Partition
161# Manager (SPM) for tc0 with Armv8.4-A Secure-EL2 extension.
162aarch64_toolchains("secure_tc0") {
163 cpu = "cortex-a57"
164 origin_address = "0xfd000000"
Olivier Deprez59e35f72020-11-10 17:15:18 +0100165 boot_flow = "//src/boot_flow:spmc"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100166 console = "//src/arch/aarch64/pl011"
167 iommu = "//src/iommu:absent"
168 gic_version = 3
169 gicd_base_address = "0x30000000"
Usama Arif2c636ff2021-04-01 11:09:25 +0100170 gicr_base_address = "0x30080000"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100171 heap_pages = 60
Arunachalam Ganapathy51e81572021-01-20 14:57:41 +0000172 max_cpus = 8
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100173 max_vms = 16
Olivier Deprez16fc50e2021-02-16 08:59:07 +0100174 branch_protection = "standard"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100175 toolchain_args = {
Olivier Deprezcf039902021-01-25 15:32:39 +0100176 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
Olivier Deprezcc0eb842021-04-07 14:03:59 +0200177 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Olivier Deprez16fc50e2021-02-16 08:59:07 +0100178 plat_prng = "//src/arch/aarch64/plat/prng:prng"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100179 secure_world = "1"
180 pl011_base_address = "0x7ff80000"
181 }
182}