blob: bacd7e72e900be564bfe4e0d6c8a88e63d4fbe52 [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"
Madhukar Pappireddyf2a1e5c2020-11-16 13:06:33 -060063 iommu = "//src/arch/aarch64/arm_smmuv3"
Jose Marinho69cd27d2019-10-17 15:51:31 +010064 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"
Olivier Deprezcc0eb842021-04-07 14:03:59 +020072 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Jose Marinho69cd27d2019-10-17 15:51:31 +010073 secure_world = "1"
74 pl011_base_address = "0x1c090000"
J-Alves2aee94f2020-12-14 12:04:14 +000075 hftest_ctrl = "//test/hftest:ctrl_uart"
Madhukar Pappireddyf2a1e5c2020-11-16 13:06:33 -060076 smmu_base_address = "0x2b400000"
77 smmu_memory_size = "0x100000"
Jose Marinho69cd27d2019-10-17 15:51:31 +010078 }
79}
80
Andrew Walbranb1457602019-05-13 16:43:57 +010081aarch64_toolchains("aem_v8a_fvp") {
82 cpu = "cortex-a57"
Andrew Walbran65821982019-04-16 14:34:03 +010083 origin_address = "0x80000000"
David Brazdil653261a2019-09-09 18:04:33 +010084 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +010085 console = "//src/arch/aarch64/pl011"
Madhukar Pappireddyf2a1e5c2020-11-16 13:06:33 -060086 iommu = "//src/arch/aarch64/arm_smmuv3"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +000087 gic_version = 3
88 gicd_base_address = "0x2f000000"
89 gicr_base_address = "0x2f100000"
Andrew Walbranbc737c42018-12-07 14:24:16 +000090 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +000091 max_cpus = 8
92 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +010093 toolchain_args = {
94 pl011_base_address = "0x1c090000"
Madhukar Pappireddyf2a1e5c2020-11-16 13:06:33 -060095 smmu_base_address = "0x2b400000"
96 smmu_memory_size = "0x100000"
Andrew Walbran808531e2019-05-20 14:52:45 +010097 }
Andrew Scull2d527c22018-11-27 14:21:08 +000098}
99
Andrew Walbranb1457602019-05-13 16:43:57 +0100100aarch64_toolchains("qemu_aarch64") {
101 cpu = "cortex-a57"
Andrew Scull2d527c22018-11-27 14:21:08 +0000102 origin_address = "0x40001000"
David Brazdil653261a2019-09-09 18:04:33 +0100103 boot_flow = "//src/boot_flow:linux"
Andrew Walbran808531e2019-05-20 14:52:45 +0100104 console = "//src/arch/aarch64/pl011"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000105 iommu = "//src/iommu:absent"
Andrew Walbranf1aa19e2018-12-10 13:42:40 +0000106 gic_version = 3
107 gicd_base_address = "0x08000000"
108 gicr_base_address = "0x080A0000"
Andrew Walbranbc737c42018-12-07 14:24:16 +0000109 heap_pages = 60
Andrew Scull2d527c22018-11-27 14:21:08 +0000110 max_cpus = 8
111 max_vms = 16
Andrew Walbran808531e2019-05-20 14:52:45 +0100112 toolchain_args = {
113 pl011_base_address = "0x09000000"
114 }
Andrew Scull2d527c22018-11-27 14:21:08 +0000115}
116
David Brazdil3d7b88b2019-07-22 17:19:35 +0100117aarch64_toolchains("rpi4") {
118 cpu = "cortex-a72"
119 origin_address = "0x80000"
120 boot_flow = "//src/boot_flow:linux"
121 console = "//project/reference/rpi:mini_uart"
Andrew Sculle2a525d2019-12-02 12:56:06 +0000122 iommu = "//src/iommu:absent"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100123 gic_version = 2
124 heap_pages = 60
125 max_cpus = 4
126 max_vms = 16
127 toolchain_args = {
128 gpio_base_address = "0xfe200000"
129 aux_base_address = "0xfe215000"
130 core_freq_mhz = 500
David Brazdilb38816f2020-01-31 16:31:10 +0000131 hftest_ctrl = "//test/hftest:ctrl_uart"
David Brazdil3d7b88b2019-07-22 17:19:35 +0100132 }
133}
David Brazdilc702a032020-01-31 15:44:11 +0000134
135# Generic target which uses the Android boot flow. It is not intended to run on
136# any Android platform. It exists only to test building Android-specific code.
137aarch64_toolchains("android_aarch64") {
138 cpu = "cortex-a57"
139 origin_address = "0x0"
140 boot_flow = "//src/boot_flow:android"
141 console = "//src/arch/aarch64/pl011"
142 iommu = "//src/iommu:absent"
143 gic_version = 2
144 heap_pages = 60
145 max_cpus = 8
146 max_vms = 16
147 toolchain_args = {
148 pl011_base_address = "0x09000000"
149 }
150}
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100151
152# The Total Compute platform provides an envelope for all of Arm's latest IP.
153# TC0 is a reference open source software stack for the first version of the
154# Total Compute Fixed Virtual Platform (FVP). More info at:
155# https://community.arm.com/developer/tools-software/oss-platforms/w/docs/606/total-compute
Usama Arif50a4b892021-04-15 10:48:30 +0100156# https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/totalcompute/tc0/user-guide.rst
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100157#
158# Secure hafnium build for tc0 platform. This builds reference Secure Partition
159# Manager (SPM) for tc0 with Armv8.4-A Secure-EL2 extension.
160aarch64_toolchains("secure_tc0") {
161 cpu = "cortex-a57"
162 origin_address = "0xfd000000"
Olivier Deprez59e35f72020-11-10 17:15:18 +0100163 boot_flow = "//src/boot_flow:spmc"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100164 console = "//src/arch/aarch64/pl011"
165 iommu = "//src/iommu:absent"
166 gic_version = 3
167 gicd_base_address = "0x30000000"
Usama Arif2c636ff2021-04-01 11:09:25 +0100168 gicr_base_address = "0x30080000"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100169 heap_pages = 60
Arunachalam Ganapathy51e81572021-01-20 14:57:41 +0000170 max_cpus = 8
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100171 max_vms = 16
172 toolchain_args = {
Olivier Deprezcf039902021-01-25 15:32:39 +0100173 plat_psci = "//src/arch/aarch64/plat/psci:spmc"
Olivier Deprezcc0eb842021-04-07 14:03:59 +0200174 plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3"
Arunachalam Ganapathyf20727f2020-04-28 20:23:13 +0100175 secure_world = "1"
176 pl011_base_address = "0x7ff80000"
177 }
178}