blob: c215a5a0bd8cd4bde7ba5488d944b4ba5703679b [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)",
Andrew Scull2d527c22018-11-27 14:21:08 +000025 ]
26}
27
28group("test_root") {
29 testonly = true
30
31 deps = [
32 "//src:unit_tests(:host_fake_clang)",
Andrew Walbranfd379392019-03-14 17:45:04 +000033 "//test/arch(:aem_v8a_fvp_clang)",
Andrew Scull75da2d12018-12-09 21:25:45 +000034 "//test/arch(:qemu_aarch64_clang)",
David Brazdil3d7b88b2019-07-22 17:19:35 +010035 "//test/arch(:rpi4_clang)",
Andrew Walbranb1457602019-05-13 16:43:57 +010036 "//test/linux(:aem_v8a_fvp_vm_clang)",
37 "//test/linux(:qemu_aarch64_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000038 "//test/linux(:rpi4_vm_clang)",
Andrew Walbranb1457602019-05-13 16:43:57 +010039 "//test/vmapi(:aem_v8a_fvp_vm_clang)",
40 "//test/vmapi(:qemu_aarch64_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000041 "//test/vmapi(:rpi4_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)",
Andrew Scull2d527c22018-11-27 14:21:08 +000044 ]
45}
46
47# Describe each of the platforms used in this project.
48
49host_toolchain("host_fake") {
50 use_platform = true
Andrew Walbranbc737c42018-12-07 14:24:16 +000051 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000052 max_cpus = 4
53 max_vms = 6
54}
55
Andrew Walbranb1457602019-05-13 16:43:57 +010056aarch64_toolchains("aem_v8a_fvp") {
57 cpu = "cortex-a57"
Andrew Walbran65821982019-04-16 14:34:03 +010058 origin_address = "0x80000000"
David Brazdil653261a2019-09-09 18:04:33 +010059 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010060 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +000061 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000062 gic_version = 3
63 gicd_base_address = "0x2f000000"
64 gicr_base_address = "0x2f100000"
Andrew Walbranbc737c42018-12-07 14:24:16 +000065 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000066 max_cpus = 8
67 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +010068 toolchain_args = {
69 pl011_base_address = "0x1c090000"
70 }
Andrew Scull2d527c22018-11-27 14:21:08 +000071}
72
Andrew Walbranb1457602019-05-13 16:43:57 +010073aarch64_toolchains("qemu_aarch64") {
74 cpu = "cortex-a57"
Andrew Scull2d527c22018-11-27 14:21:08 +000075 origin_address = "0x40001000"
David Brazdil653261a2019-09-09 18:04:33 +010076 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010077 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +000078 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000079 gic_version = 3
80 gicd_base_address = "0x08000000"
81 gicr_base_address = "0x080A0000"
Andrew Walbranbc737c42018-12-07 14:24:16 +000082 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000083 max_cpus = 8
84 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +010085 toolchain_args = {
86 pl011_base_address = "0x09000000"
87 }
Andrew Scull2d527c22018-11-27 14:21:08 +000088}
89
David Brazdil3d7b88b2019-07-22 17:19:35 +010090aarch64_toolchains("rpi4") {
91 cpu = "cortex-a72"
92 origin_address = "0x80000"
93 boot_flow = "//src/boot_flow:linux"
94 console = "//project/reference/rpi:mini_uart"
Andrew Sculle2a525d2019-12-02 12:56:06 +000095 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +010096 gic_version = 2
97 heap_pages = 60
98 max_cpus = 4
99 max_vms = 16
100 toolchain_args = {
101 gpio_base_address = "0xfe200000"
102 aux_base_address = "0xfe215000"
103 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000104 hftest_ctrl = "//test/hftest:ctrl_uart"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100105 }
106}
David Brazdilc702a032020-01-31 15:44:11 +0000107
108# Generic target which uses the Android boot flow. It is not intended to run on
109# any Android platform. It exists only to test building Android-specific code.
110aarch64_toolchains("android_aarch64") {
111 cpu = "cortex-a57"
112 origin_address = "0x0"
113 boot_flow = "//src/boot_flow:android"
114 console = "//src/arch/aarch64/pl011"
115 iommu = "//src/iommu:absent"
116 gic_version = 2
117 heap_pages = 60
118 max_cpus = 8
119 max_vms = 16
120 toolchain_args = {
121 pl011_base_address = "0x09000000"
122 }
123}