blob: beb47b86b34e1e6e0b4ec955becfca2cdfd3f32e [file] [log] [blame]
Marc Bonnicid6a274d2020-09-29 15:36:31 +01001# Copyright 2020 The Hafnium Authors.
Andrew Scull2d527c22018-11-27 14:21:08 +00002#
Marc Bonnicid6a274d2020-09-29 15:36:31 +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)",
Andrew Walbran92627a82020-01-17 10:52:44 +000016 "//src/arch/aarch64/qemuloader:bl(:qemu_aarch64_clang)",
Jose Marinhod36a8042019-10-17 15:51:31 +010017 "//src:hafnium(:secure_aem_v8a_fvp_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000018 ]
19}
20
21group("test_root") {
22 testonly = true
23
24 deps = [
25 "//src:unit_tests(:host_fake_clang)",
Andrew Walbranfd379392019-03-14 17:45:04 +000026 "//test/arch(:aem_v8a_fvp_clang)",
Andrew Scull75da2d12018-12-09 21:25:45 +000027 "//test/arch(:qemu_aarch64_clang)",
David Brazdil3d7b88b2019-07-22 17:19:35 +010028 "//test/arch(:rpi4_clang)",
Jose Marinhod36a8042019-10-17 15:51:31 +010029 "//test/arch(:secure_aem_v8a_fvp_clang)",
Andrew Walbranb1457602019-05-13 16:43:57 +010030 "//test/linux(:aem_v8a_fvp_vm_clang)",
31 "//test/linux(:qemu_aarch64_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000032 "//test/linux(:rpi4_vm_clang)",
Jose Marinhod36a8042019-10-17 15:51:31 +010033 "//test/linux(:secure_aem_v8a_fvp_vm_clang)",
Andrew Walbranb1457602019-05-13 16:43:57 +010034 "//test/vmapi(:aem_v8a_fvp_vm_clang)",
35 "//test/vmapi(:qemu_aarch64_vm_clang)",
Andrew Walbran3eeaa402019-11-01 14:48:29 +000036 "//test/vmapi(:rpi4_vm_clang)",
Jose Marinhod36a8042019-10-17 15:51:31 +010037 "//test/vmapi(:secure_aem_v8a_fvp_vm_clang)",
Andrew Scull3fe24082019-09-30 15:27:23 +010038 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:aem_v8a_fvp_vm_clang)",
39 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:qemu_aarch64_vm_clang)",
Jose Marinhod36a8042019-10-17 15:51:31 +010040 "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:secure_aem_v8a_fvp_vm_clang)",
41 "//test/secure_world_baremetal(:secure_aem_v8a_fvp_vm_clang)",
Andrew Scull2d527c22018-11-27 14:21:08 +000042 ]
43}
44
45# Describe each of the platforms used in this project.
46
47host_toolchain("host_fake") {
48 use_platform = true
Andrew Walbranbc737c42018-12-07 14:24:16 +000049 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000050 max_cpus = 4
51 max_vms = 6
52}
53
Jose Marinhod36a8042019-10-17 15:51:31 +010054aarch64_toolchains("secure_aem_v8a_fvp") {
55 cpu = "cortex-a57"
56 origin_address = "0x06000000"
57 boot_flow = "//src/boot_flow:linux"
58 console = "//src/arch/aarch64/pl011"
59 iommu = "//src/iommu:absent"
60 gic_version = 3
61 gicd_base_address = "0x2f000000"
62 gicr_base_address = "0x2f100000"
63 heap_pages = 60
64 max_cpus = 8
65 max_vms = 16
66 toolchain_args = {
67 secure_world = "1"
68 pl011_base_address = "0x1c090000"
69 }
70}
71
Andrew Walbranb1457602019-05-13 16:43:57 +010072aarch64_toolchains("aem_v8a_fvp") {
73 cpu = "cortex-a57"
Jose Marinhod36a8042019-10-17 15:51:31 +010074 origin_address = "0x88000000"
David Brazdil653261a2019-09-09 18:04:33 +010075 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010076 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +000077 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000078 gic_version = 3
79 gicd_base_address = "0x2f000000"
80 gicr_base_address = "0x2f100000"
Andrew Walbranbc737c42018-12-07 14:24:16 +000081 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000082 max_cpus = 8
83 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +010084 toolchain_args = {
85 pl011_base_address = "0x1c090000"
86 }
Andrew Scull2d527c22018-11-27 14:21:08 +000087}
88
Andrew Walbranb1457602019-05-13 16:43:57 +010089aarch64_toolchains("qemu_aarch64") {
90 cpu = "cortex-a57"
Andrew Scull2d527c22018-11-27 14:21:08 +000091 origin_address = "0x40001000"
David Brazdil653261a2019-09-09 18:04:33 +010092 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010093 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +000094 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000095 gic_version = 3
96 gicd_base_address = "0x08000000"
97 gicr_base_address = "0x080A0000"
Andrew Walbranbc737c42018-12-07 14:24:16 +000098 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000099 max_cpus = 8
100 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +0100101 toolchain_args = {
Jose Marinhod36a8042019-10-17 15:51:31 +0100102 secure_world = "0"
Andrew Walbran808531e2019-05-20 14:52:45 +0100103 pl011_base_address = "0x09000000"
104 }
Andrew Scull2d527c22018-11-27 14:21:08 +0000105}
106
David Brazdil3d7b88b2019-07-22 17:19:35 +0100107aarch64_toolchains("rpi4") {
108 cpu = "cortex-a72"
109 origin_address = "0x80000"
110 boot_flow = "//src/boot_flow:linux"
111 console = "//project/reference/rpi:mini_uart"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000112 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100113 gic_version = 2
114 heap_pages = 60
115 max_cpus = 4
116 max_vms = 16
117 toolchain_args = {
Jose Marinhod36a8042019-10-17 15:51:31 +0100118 secure_world = "0"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100119 gpio_base_address = "0xfe200000"
120 aux_base_address = "0xfe215000"
121 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000122 hftest_ctrl = "//test/hftest:ctrl_uart"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100123 }
124}
David Brazdilc702a032020-01-31 15:44:11 +0000125
126# Generic target which uses the Android boot flow. It is not intended to run on
127# any Android platform. It exists only to test building Android-specific code.
128aarch64_toolchains("android_aarch64") {
129 cpu = "cortex-a57"
130 origin_address = "0x0"
131 boot_flow = "//src/boot_flow:android"
132 console = "//src/arch/aarch64/pl011"
133 iommu = "//src/iommu:absent"
134 gic_version = 2
135 heap_pages = 60
136 max_cpus = 8
137 max_vms = 16
138 toolchain_args = {
Jose Marinhod36a8042019-10-17 15:51:31 +0100139 secure_world = "0"
David Brazdilc702a032020-01-31 15:44:11 +0000140 pl011_base_address = "0x09000000"
141 }
142}