blob: 293da928b2a5c87d1fb0c882cc315e8013d7da02 [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"
63 iommu = "//src/iommu:absent"
64 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
70 toolchain_args = {
Olivier Deprezcf039902021-01-25 15:32:39 +010071 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
Olivier Deprezcc0eb842021-04-07 14:03:59 +020072 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Jose Marinho69cd27d2019-10-17 15:51:31 +010073 secure_world = "1"
74 pl011_base_address = "0x1c090000"
J-Alves2aee94f2020-12-14 12:04:14 +000075 hftest_ctrl = "//test/hftest:ctrl_uart"
Jose Marinho69cd27d2019-10-17 15:51:31 +010076 }
77}
78
Andrew Walbranb1457602019-05-13 16:43:57 +010079aarch64_toolchains("aem_v8a_fvp") {
80 cpu = "cortex-a57"
Andrew Walbran65821982019-04-16 14:34:03 +010081 origin_address = "0x80000000"
David Brazdil653261a2019-09-09 18:04:33 +010082 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010083 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +000084 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000085 gic_version = 3
86 gicd_base_address = "0x2f000000"
87 gicr_base_address = "0x2f100000"
Andrew Walbranbc737c42018-12-07 14:24:16 +000088 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000089 max_cpus = 8
90 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +010091 toolchain_args = {
92 pl011_base_address = "0x1c090000"
93 }
Andrew Scull2d527c22018-11-27 14:21:08 +000094}
95
Andrew Walbranb1457602019-05-13 16:43:57 +010096aarch64_toolchains("qemu_aarch64") {
97 cpu = "cortex-a57"
Andrew Scull2d527c22018-11-27 14:21:08 +000098 origin_address = "0x40001000"
David Brazdil653261a2019-09-09 18:04:33 +010099 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +0100100 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000101 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +0000102 gic_version = 3
103 gicd_base_address = "0x08000000"
104 gicr_base_address = "0x080A0000"
Andrew Walbranbc737c42018-12-07 14:24:16 +0000105 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +0000106 max_cpus = 8
107 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +0100108 toolchain_args = {
109 pl011_base_address = "0x09000000"
110 }
Andrew Scull2d527c22018-11-27 14:21:08 +0000111}
112
David Brazdil3d7b88b2019-07-22 17:19:35 +0100113aarch64_toolchains("rpi4") {
114 cpu = "cortex-a72"
115 origin_address = "0x80000"
116 boot_flow = "//src/boot_flow:linux"
117 console = "//project/reference/rpi:mini_uart"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000118 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100119 gic_version = 2
120 heap_pages = 60
121 max_cpus = 4
122 max_vms = 16
123 toolchain_args = {
124 gpio_base_address = "0xfe200000"
125 aux_base_address = "0xfe215000"
126 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000127 hftest_ctrl = "//test/hftest:ctrl_uart"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100128 }
129}
David Brazdilc702a032020-01-31 15:44:11 +0000130
131# Generic target which uses the Android boot flow. It is not intended to run on
132# any Android platform. It exists only to test building Android-specific code.
133aarch64_toolchains("android_aarch64") {
134 cpu = "cortex-a57"
135 origin_address = "0x0"
136 boot_flow = "//src/boot_flow:android"
137 console = "//src/arch/aarch64/pl011"
138 iommu = "//src/iommu:absent"
139 gic_version = 2
140 heap_pages = 60
141 max_cpus = 8
142 max_vms = 16
143 toolchain_args = {
144 pl011_base_address = "0x09000000"
145 }
146}
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100147
148# The Total Compute platform provides an envelope for all of Arm's latest IP.
149# TC0 is a reference open source software stack for the first version of the
150# Total Compute Fixed Virtual Platform (FVP). More info at:
151# https://community.arm.com/developer/tools-software/oss-platforms/w/docs/606/total-compute
152# https://git.linaro.org/landing-teams/working/arm/arm-reference-platforms.git/about/docs/tc0/user-guide.rst
153#
154# Secure hafnium build for tc0 platform. This builds reference Secure Partition
155# Manager (SPM) for tc0 with Armv8.4-A Secure-EL2 extension.
156aarch64_toolchains("secure_tc0") {
157 cpu = "cortex-a57"
158 origin_address = "0xfd000000"
Olivier Deprez59e35f72020-11-10 17:15:18 +0100159 boot_flow = "//src/boot_flow:spmc"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100160 console = "//src/arch/aarch64/pl011"
161 iommu = "//src/iommu:absent"
162 gic_version = 3
163 gicd_base_address = "0x30000000"
Usama Arif2c636ff2021-04-01 11:09:25 +0100164 gicr_base_address = "0x30080000"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100165 heap_pages = 60
Arunachalam Ganapathy51e81572021-01-20 14:57:41 +0000166 max_cpus = 8
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100167 max_vms = 16
168 toolchain_args = {
Olivier Deprezcf039902021-01-25 15:32:39 +0100169 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
Olivier Deprezcc0eb842021-04-07 14:03:59 +0200170 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100171 secure_world = "1"
172 pl011_base_address = "0x7ff80000"
173 }
174}