blob: 5aee6a903143f784fe79e72257bc31344bfb89cd [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"
Jose Marinho69cd27d2019-10-17 15:51:31 +010072 secure_world = "1"
73 pl011_base_address = "0x1c090000"
74 }
75}
76
Andrew Walbranb1457602019-05-13 16:43:57 +010077aarch64_toolchains("aem_v8a_fvp") {
78 cpu = "cortex-a57"
Andrew Walbran65821982019-04-16 14:34:03 +010079 origin_address = "0x80000000"
David Brazdil653261a2019-09-09 18:04:33 +010080 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010081 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +000082 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000083 gic_version = 3
84 gicd_base_address = "0x2f000000"
85 gicr_base_address = "0x2f100000"
Andrew Walbranbc737c42018-12-07 14:24:16 +000086 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000087 max_cpus = 8
88 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +010089 toolchain_args = {
90 pl011_base_address = "0x1c090000"
91 }
Andrew Scull2d527c22018-11-27 14:21:08 +000092}
93
Andrew Walbranb1457602019-05-13 16:43:57 +010094aarch64_toolchains("qemu_aarch64") {
95 cpu = "cortex-a57"
Andrew Scull2d527c22018-11-27 14:21:08 +000096 origin_address = "0x40001000"
David Brazdil653261a2019-09-09 18:04:33 +010097 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010098 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +000099 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +0000100 gic_version = 3
101 gicd_base_address = "0x08000000"
102 gicr_base_address = "0x080A0000"
Andrew Walbranbc737c42018-12-07 14:24:16 +0000103 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +0000104 max_cpus = 8
105 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +0100106 toolchain_args = {
107 pl011_base_address = "0x09000000"
108 }
Andrew Scull2d527c22018-11-27 14:21:08 +0000109}
110
David Brazdil3d7b88b2019-07-22 17:19:35 +0100111aarch64_toolchains("rpi4") {
112 cpu = "cortex-a72"
113 origin_address = "0x80000"
114 boot_flow = "//src/boot_flow:linux"
115 console = "//project/reference/rpi:mini_uart"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000116 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100117 gic_version = 2
118 heap_pages = 60
119 max_cpus = 4
120 max_vms = 16
121 toolchain_args = {
122 gpio_base_address = "0xfe200000"
123 aux_base_address = "0xfe215000"
124 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000125 hftest_ctrl = "//test/hftest:ctrl_uart"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100126 }
127}
David Brazdilc702a032020-01-31 15:44:11 +0000128
129# Generic target which uses the Android boot flow. It is not intended to run on
130# any Android platform. It exists only to test building Android-specific code.
131aarch64_toolchains("android_aarch64") {
132 cpu = "cortex-a57"
133 origin_address = "0x0"
134 boot_flow = "//src/boot_flow:android"
135 console = "//src/arch/aarch64/pl011"
136 iommu = "//src/iommu:absent"
137 gic_version = 2
138 heap_pages = 60
139 max_cpus = 8
140 max_vms = 16
141 toolchain_args = {
142 pl011_base_address = "0x09000000"
143 }
144}
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100145
146# The Total Compute platform provides an envelope for all of Arm's latest IP.
147# TC0 is a reference open source software stack for the first version of the
148# Total Compute Fixed Virtual Platform (FVP). More info at:
149# https://community.arm.com/developer/tools-software/oss-platforms/w/docs/606/total-compute
150# https://git.linaro.org/landing-teams/working/arm/arm-reference-platforms.git/about/docs/tc0/user-guide.rst
151#
152# Secure hafnium build for tc0 platform. This builds reference Secure Partition
153# Manager (SPM) for tc0 with Armv8.4-A Secure-EL2 extension.
154aarch64_toolchains("secure_tc0") {
155 cpu = "cortex-a57"
156 origin_address = "0xfd000000"
Olivier Deprez59e35f72020-11-10 17:15:18 +0100157 boot_flow = "//src/boot_flow:spmc"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100158 console = "//src/arch/aarch64/pl011"
159 iommu = "//src/iommu:absent"
160 gic_version = 3
161 gicd_base_address = "0x30000000"
162 gicr_base_address = "0x30140000"
163 heap_pages = 60
164 max_cpus = 4
165 max_vms = 16
166 toolchain_args = {
Olivier Deprezcf039902021-01-25 15:32:39 +0100167 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100168 secure_world = "1"
169 pl011_base_address = "0x7ff80000"
170 }
171}