blob: 3f8d096f17eb3f19290dad5de3eabb43e772149d [file] [log] [blame]
Andrew Walbrandc8ad202019-03-07 15:49:28 +00001# Copyright 2018 The Hafnium Authors.
Andrew Scull2d527c22018-11-27 14:21:08 +00002#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("//build/toolchain/embedded.gni")
16import("//build/toolchain/host.gni")
17
Andrew Scull2d527c22018-11-27 14:21:08 +000018group("root") {
19 deps = [
20 "//src:hafnium(:aem_v8a_fvp_clang)",
David Brazdilc702a032020-01-31 15:44:11 +000021 "//src:hafnium(:android_aarch64_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000022 "//src:hafnium(:qemu_aarch64_clang)",
David Brazdil3d7b88b2019-07-22 17:19:35 +010023 "//src:hafnium(:rpi4_clang)",
Andrew Walbran92627a82020-01-17 10:52:44 +000024 "//src/arch/aarch64/qemuloader:bl(:qemu_aarch64_clang)",
Jose Marinhod36a8042019-10-17 15:51:31 +010025 "//src:hafnium(:secure_aem_v8a_fvp_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000026 ]
27}
28
29group("test_root") {
30 testonly = true
31
32 deps = [
33 "//src:unit_tests(:host_fake_clang)",
Andrew Walbranfd379392019-03-14 17:45:04 +000034 "//test/arch(:aem_v8a_fvp_clang)",
Andrew Scull75da2d12018-12-09 21:25:45 +000035 "//test/arch(:qemu_aarch64_clang)",
David Brazdil3d7b88b2019-07-22 17:19:35 +010036 "//test/arch(:rpi4_clang)",
Jose Marinhod36a8042019-10-17 15:51:31 +010037 "//test/arch(:secure_aem_v8a_fvp_clang)",
Andrew Walbranb1457602019-05-13 16:43:57 +010038 "//test/linux(:aem_v8a_fvp_vm_clang)",
39 "//test/linux(:qemu_aarch64_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000040 "//test/linux(:rpi4_vm_clang)",
Jose Marinhod36a8042019-10-17 15:51:31 +010041 "//test/linux(:secure_aem_v8a_fvp_vm_clang)",
Andrew Walbranb1457602019-05-13 16:43:57 +010042 "//test/vmapi(:aem_v8a_fvp_vm_clang)",
43 "//test/vmapi(:qemu_aarch64_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000044 "//test/vmapi(:rpi4_vm_clang)",
Jose Marinhod36a8042019-10-17 15:51:31 +010045 "//test/vmapi(:secure_aem_v8a_fvp_vm_clang)",
Andrew Scull3fe24082019-09-30 15:27:23 +010046 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:aem_v8a_fvp_vm_clang)",
47 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:qemu_aarch64_vm_clang)",
Jose Marinhod36a8042019-10-17 15:51:31 +010048 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:secure_aem_v8a_fvp_vm_clang)",
49 "//test/secure_world_baremetal(:secure_aem_v8a_fvp_vm_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000050 ]
51}
52
53# Describe each of the platforms used in this project.
54
55host_toolchain("host_fake") {
56 use_platform = true
Andrew Walbranbc737c42018-12-07 14:24:16 +000057 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000058 max_cpus = 4
59 max_vms = 6
60}
61
Jose Marinhod36a8042019-10-17 15:51:31 +010062aarch64_toolchains("secure_aem_v8a_fvp") {
63 cpu = "cortex-a57"
64 origin_address = "0x06000000"
65 boot_flow = "//src/boot_flow:linux"
66 console = "//src/arch/aarch64/pl011"
67 iommu = "//src/iommu:absent"
68 gic_version = 3
69 gicd_base_address = "0x2f000000"
70 gicr_base_address = "0x2f100000"
71 heap_pages = 60
72 max_cpus = 8
73 max_vms = 16
74 toolchain_args = {
75 secure_world = "1"
76 pl011_base_address = "0x1c090000"
77 }
78}
79
Andrew Walbranb1457602019-05-13 16:43:57 +010080aarch64_toolchains("aem_v8a_fvp") {
81 cpu = "cortex-a57"
Jose Marinhod36a8042019-10-17 15:51:31 +010082 origin_address = "0x88000000"
David Brazdil653261a2019-09-09 18:04:33 +010083 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010084 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +000085 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000086 gic_version = 3
87 gicd_base_address = "0x2f000000"
88 gicr_base_address = "0x2f100000"
Andrew Walbranbc737c42018-12-07 14:24:16 +000089 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000090 max_cpus = 8
91 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +010092 toolchain_args = {
93 pl011_base_address = "0x1c090000"
94 }
Andrew Scull2d527c22018-11-27 14:21:08 +000095}
96
Andrew Walbranb1457602019-05-13 16:43:57 +010097aarch64_toolchains("qemu_aarch64") {
98 cpu = "cortex-a57"
Andrew Scull2d527c22018-11-27 14:21:08 +000099 origin_address = "0x40001000"
David Brazdil653261a2019-09-09 18:04:33 +0100100 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +0100101 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000102 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +0000103 gic_version = 3
104 gicd_base_address = "0x08000000"
105 gicr_base_address = "0x080A0000"
Andrew Walbranbc737c42018-12-07 14:24:16 +0000106 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +0000107 max_cpus = 8
108 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +0100109 toolchain_args = {
Jose Marinhod36a8042019-10-17 15:51:31 +0100110 secure_world = "0"
Andrew Walbran808531e2019-05-20 14:52:45 +0100111 pl011_base_address = "0x09000000"
112 }
Andrew Scull2d527c22018-11-27 14:21:08 +0000113}
114
David Brazdil3d7b88b2019-07-22 17:19:35 +0100115aarch64_toolchains("rpi4") {
116 cpu = "cortex-a72"
117 origin_address = "0x80000"
118 boot_flow = "//src/boot_flow:linux"
119 console = "//project/reference/rpi:mini_uart"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000120 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100121 gic_version = 2
122 heap_pages = 60
123 max_cpus = 4
124 max_vms = 16
125 toolchain_args = {
Jose Marinhod36a8042019-10-17 15:51:31 +0100126 secure_world = "0"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100127 gpio_base_address = "0xfe200000"
128 aux_base_address = "0xfe215000"
129 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000130 hftest_ctrl = "//test/hftest:ctrl_uart"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100131 }
132}
David Brazdilc702a032020-01-31 15:44:11 +0000133
134# Generic target which uses the Android boot flow. It is not intended to run on
135# any Android platform. It exists only to test building Android-specific code.
136aarch64_toolchains("android_aarch64") {
137 cpu = "cortex-a57"
138 origin_address = "0x0"
139 boot_flow = "//src/boot_flow:android"
140 console = "//src/arch/aarch64/pl011"
141 iommu = "//src/iommu:absent"
142 gic_version = 2
143 heap_pages = 60
144 max_cpus = 8
145 max_vms = 16
146 toolchain_args = {
Jose Marinhod36a8042019-10-17 15:51:31 +0100147 secure_world = "0"
David Brazdilc702a032020-01-31 15:44:11 +0000148 pl011_base_address = "0x09000000"
149 }
150}