blob: 5596009f14c25e8f0e99f2fd59ea3abc8e946b4b [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 = {
71 secure_world = "1"
72 pl011_base_address = "0x1c090000"
73 }
74}
75
Andrew Walbranb1457602019-05-13 16:43:57 +010076aarch64_toolchains("aem_v8a_fvp") {
77 cpu = "cortex-a57"
Andrew Walbran65821982019-04-16 14:34:03 +010078 origin_address = "0x80000000"
David Brazdil653261a2019-09-09 18:04:33 +010079 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010080 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +000081 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000082 gic_version = 3
83 gicd_base_address = "0x2f000000"
84 gicr_base_address = "0x2f100000"
Andrew Walbranbc737c42018-12-07 14:24:16 +000085 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000086 max_cpus = 8
87 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +010088 toolchain_args = {
89 pl011_base_address = "0x1c090000"
90 }
Andrew Scull2d527c22018-11-27 14:21:08 +000091}
92
Andrew Walbranb1457602019-05-13 16:43:57 +010093aarch64_toolchains("qemu_aarch64") {
94 cpu = "cortex-a57"
Andrew Scull2d527c22018-11-27 14:21:08 +000095 origin_address = "0x40001000"
David Brazdil653261a2019-09-09 18:04:33 +010096 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010097 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +000098 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000099 gic_version = 3
100 gicd_base_address = "0x08000000"
101 gicr_base_address = "0x080A0000"
Andrew Walbranbc737c42018-12-07 14:24:16 +0000102 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +0000103 max_cpus = 8
104 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +0100105 toolchain_args = {
106 pl011_base_address = "0x09000000"
107 }
Andrew Scull2d527c22018-11-27 14:21:08 +0000108}
109
David Brazdil3d7b88b2019-07-22 17:19:35 +0100110aarch64_toolchains("rpi4") {
111 cpu = "cortex-a72"
112 origin_address = "0x80000"
113 boot_flow = "//src/boot_flow:linux"
114 console = "//project/reference/rpi:mini_uart"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000115 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100116 gic_version = 2
117 heap_pages = 60
118 max_cpus = 4
119 max_vms = 16
120 toolchain_args = {
121 gpio_base_address = "0xfe200000"
122 aux_base_address = "0xfe215000"
123 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000124 hftest_ctrl = "//test/hftest:ctrl_uart"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100125 }
126}
David Brazdilc702a032020-01-31 15:44:11 +0000127
128# Generic target which uses the Android boot flow. It is not intended to run on
129# any Android platform. It exists only to test building Android-specific code.
130aarch64_toolchains("android_aarch64") {
131 cpu = "cortex-a57"
132 origin_address = "0x0"
133 boot_flow = "//src/boot_flow:android"
134 console = "//src/arch/aarch64/pl011"
135 iommu = "//src/iommu:absent"
136 gic_version = 2
137 heap_pages = 60
138 max_cpus = 8
139 max_vms = 16
140 toolchain_args = {
141 pl011_base_address = "0x09000000"
142 }
143}
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100144
145# The Total Compute platform provides an envelope for all of Arm's latest IP.
146# TC0 is a reference open source software stack for the first version of the
147# Total Compute Fixed Virtual Platform (FVP). More info at:
148# https://community.arm.com/developer/tools-software/oss-platforms/w/docs/606/total-compute
149# https://git.linaro.org/landing-teams/working/arm/arm-reference-platforms.git/about/docs/tc0/user-guide.rst
150#
151# Secure hafnium build for tc0 platform. This builds reference Secure Partition
152# Manager (SPM) for tc0 with Armv8.4-A Secure-EL2 extension.
153aarch64_toolchains("secure_tc0") {
154 cpu = "cortex-a57"
155 origin_address = "0xfd000000"
Olivier Deprez59e35f72020-11-10 17:15:18 +0100156 boot_flow = "//src/boot_flow:spmc"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100157 console = "//src/arch/aarch64/pl011"
158 iommu = "//src/iommu:absent"
159 gic_version = 3
160 gicd_base_address = "0x30000000"
161 gicr_base_address = "0x30140000"
162 heap_pages = 60
163 max_cpus = 4
164 max_vms = 16
165 toolchain_args = {
166 secure_world = "1"
167 pl011_base_address = "0x7ff80000"
168 }
169}