Andrew Walbran | dc8ad20 | 2019-03-07 15:49:28 +0000 | [diff] [blame] | 1 | # Copyright 2018 The Hafnium Authors. |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 2 | # |
Andrew Walbran | 23417d8 | 2020-06-17 14:44:22 +0100 | [diff] [blame] | 3 | # 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 Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 6 | |
| 7 | import("//build/toolchain/embedded.gni") |
| 8 | import("//build/toolchain/host.gni") |
| 9 | |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 10 | group("root") { |
| 11 | deps = [ |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 12 | "//src:hafnium(:aem_v8a_fvp_vhe_clang)", |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 13 | "//src:hafnium(:qemu_aarch64_vhe_clang)", |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 14 | "//src:hafnium(:rpi4_clang)", |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 15 | "//src:hafnium(:secure_aem_v8a_fvp_vhe_clang)", |
Olivier Deprez | f17c61e | 2023-01-30 13:50:25 +0100 | [diff] [blame] | 16 | "//src:hafnium(:secure_qemu_aarch64_clang)", |
Usama Arif | f0996a5 | 2021-08-09 14:28:30 +0100 | [diff] [blame] | 17 | "//src:hafnium(:secure_tc_clang)", |
Raghu Krishnamurthy | e0ede85 | 2021-12-04 14:29:57 -0800 | [diff] [blame] | 18 | "//src/arch/aarch64/qemuloader:bl(:qemu_aarch64_vhe_clang)", |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 19 | ] |
| 20 | } |
| 21 | |
| 22 | group("test_root") { |
| 23 | testonly = true |
| 24 | |
| 25 | deps = [ |
| 26 | "//src:unit_tests(:host_fake_clang)", |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 27 | "//test/arch(:aem_v8a_fvp_vhe_clang)", |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 28 | "//test/arch(:qemu_aarch64_vhe_clang)", |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 29 | "//test/arch(:rpi4_clang)", |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 30 | "//test/linux(:aem_v8a_fvp_vhe_vm_clang)", |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 31 | "//test/linux(:qemu_aarch64_vhe_vm_clang)", |
Andrew Walbran | 3eeaa40 | 2019-11-01 14:48:29 +0000 | [diff] [blame] | 32 | "//test/linux(:rpi4_vm_clang)", |
Olivier Deprez | acd0a4e | 2022-02-23 09:31:21 +0100 | [diff] [blame] | 33 | "//test/vmapi:partitions(:secure_aem_v8a_fvp_vhe_vm_clang)", |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 34 | "//test/vmapi(:aem_v8a_fvp_vhe_vm_clang)", |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 35 | "//test/vmapi(:qemu_aarch64_vhe_vm_clang)", |
Andrew Walbran | 3eeaa40 | 2019-11-01 14:48:29 +0000 | [diff] [blame] | 36 | "//test/vmapi(:rpi4_vm_clang)", |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 37 | "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:aem_v8a_fvp_vhe_vm_clang)", |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 38 | "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:qemu_aarch64_vhe_vm_clang)", |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 39 | ] |
| 40 | } |
| 41 | |
| 42 | # Describe each of the platforms used in this project. |
| 43 | |
| 44 | host_toolchain("host_fake") { |
| 45 | use_platform = true |
Andrew Walbran | bc737c4 | 2018-12-07 14:24:16 +0000 | [diff] [blame] | 46 | heap_pages = 60 |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 47 | max_cpus = 4 |
| 48 | max_vms = 6 |
| 49 | } |
| 50 | |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 51 | aarch64_toolchains("secure_aem_v8a_fvp_vhe") { |
| 52 | cpu = "cortex-a57" |
| 53 | origin_address = "0x06000000" |
| 54 | boot_flow = "//src/boot_flow:spmc" |
| 55 | console = "//src/arch/aarch64/pl011" |
| 56 | iommu = "//src/arch/aarch64/arm_smmuv3" |
| 57 | gic_version = 3 |
| 58 | gicd_base_address = "0x2f000000" |
| 59 | gicr_base_address = "0x2f100000" |
Varun Wadekar | fa4b3ac | 2022-02-14 17:19:18 +0000 | [diff] [blame] | 60 | gicr_frames = 8 |
Raghu Krishnamurthy | f895639 | 2022-09-20 09:51:05 -0700 | [diff] [blame] | 61 | heap_pages = 180 |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 62 | max_cpus = 8 |
| 63 | max_vms = 16 |
Raghu Krishnamurthy | 510aa3e | 2021-11-28 07:20:45 -0800 | [diff] [blame] | 64 | branch_protection = "standard" |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 65 | toolchain_args = { |
| 66 | plat_ffa = "//src/arch/aarch64/plat/ffa:spmc" |
| 67 | plat_psci = "//src/arch/aarch64/plat/psci:spmc" |
| 68 | plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3" |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 69 | secure_world = "1" |
| 70 | pl011_base_address = "0x1c090000" |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 71 | smmu_base_address = "0x2b400000" |
| 72 | smmu_memory_size = "0x100000" |
Maksims Svecovs | c3cda25 | 2021-09-30 12:20:11 +0100 | [diff] [blame] | 73 | enable_mte = "1" |
Varun Wadekar | 4cba5e4 | 2022-09-29 17:39:14 +0100 | [diff] [blame] | 74 | plat_log_level = "LOG_LEVEL_INFO" |
Madhukar Pappireddy | ffbe2e2 | 2023-02-02 17:45:30 -0600 | [diff] [blame^] | 75 | plat_num_virtual_interrupts_ids = 1024 |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 76 | } |
| 77 | } |
| 78 | |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 79 | aarch64_toolchains("aem_v8a_fvp_vhe") { |
| 80 | cpu = "cortex-a57" |
| 81 | origin_address = "0x80000000" |
| 82 | boot_flow = "//src/boot_flow:linux" |
| 83 | console = "//src/arch/aarch64/pl011" |
| 84 | iommu = "//src/arch/aarch64/arm_smmuv3" |
| 85 | gic_version = 3 |
| 86 | gicd_base_address = "0x2f000000" |
| 87 | gicr_base_address = "0x2f100000" |
Varun Wadekar | fa4b3ac | 2022-02-14 17:19:18 +0000 | [diff] [blame] | 88 | gicr_frames = 8 |
Raghu Krishnamurthy | f895639 | 2022-09-20 09:51:05 -0700 | [diff] [blame] | 89 | heap_pages = 180 |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 90 | max_cpus = 8 |
| 91 | max_vms = 16 |
Raghu Krishnamurthy | 510aa3e | 2021-11-28 07:20:45 -0800 | [diff] [blame] | 92 | branch_protection = "standard" |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 93 | toolchain_args = { |
| 94 | plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor" |
| 95 | pl011_base_address = "0x1c090000" |
| 96 | smmu_base_address = "0x2b400000" |
| 97 | smmu_memory_size = "0x100000" |
Varun Wadekar | 4cba5e4 | 2022-09-29 17:39:14 +0100 | [diff] [blame] | 98 | plat_log_level = "LOG_LEVEL_INFO" |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 99 | } |
| 100 | } |
| 101 | |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 102 | aarch64_toolchains("qemu_aarch64_vhe") { |
| 103 | cpu = "cortex-a57" |
| 104 | origin_address = "0x40001000" |
| 105 | boot_flow = "//src/boot_flow:linux" |
| 106 | console = "//src/arch/aarch64/pl011" |
| 107 | iommu = "//src/iommu:absent" |
| 108 | gic_version = 3 |
| 109 | gicd_base_address = "0x08000000" |
| 110 | gicr_base_address = "0x080A0000" |
Varun Wadekar | fa4b3ac | 2022-02-14 17:19:18 +0000 | [diff] [blame] | 111 | gicr_frames = 8 |
Raghu Krishnamurthy | f895639 | 2022-09-20 09:51:05 -0700 | [diff] [blame] | 112 | heap_pages = 180 |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 113 | max_cpus = 8 |
| 114 | max_vms = 16 |
| 115 | toolchain_args = { |
Olivier Deprez | d82b5e0 | 2021-07-05 11:16:16 +0200 | [diff] [blame] | 116 | plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor" |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 117 | pl011_base_address = "0x09000000" |
Varun Wadekar | 4cba5e4 | 2022-09-29 17:39:14 +0100 | [diff] [blame] | 118 | plat_log_level = "LOG_LEVEL_INFO" |
Raghu Krishnamurthy | 8e68099 | 2021-06-15 20:19:47 -0700 | [diff] [blame] | 119 | } |
| 120 | } |
| 121 | |
Olivier Deprez | f17c61e | 2023-01-30 13:50:25 +0100 | [diff] [blame] | 122 | aarch64_toolchains("secure_qemu_aarch64") { |
| 123 | cpu = "cortex-a57" |
| 124 | origin_address = "0xe100000" |
| 125 | boot_flow = "//src/boot_flow:spmc" |
| 126 | console = "//src/arch/aarch64/pl011" |
| 127 | iommu = "//src/iommu:absent" |
| 128 | gic_version = 3 |
| 129 | gicd_base_address = "0x08000000" |
| 130 | gicr_base_address = "0x080A0000" |
| 131 | gicr_frames = 8 |
| 132 | heap_pages = 180 |
| 133 | max_cpus = 8 |
| 134 | max_vms = 16 |
| 135 | branch_protection = "standard" |
| 136 | toolchain_args = { |
| 137 | plat_ffa = "//src/arch/aarch64/plat/ffa:spmc" |
| 138 | plat_psci = "//src/arch/aarch64/plat/psci:spmc" |
| 139 | plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3" |
| 140 | secure_world = "1" |
| 141 | pl011_base_address = "0x09000000" |
| 142 | hftest_ctrl = "//test/hftest:ctrl_uart" |
Olivier Deprez | f17c61e | 2023-01-30 13:50:25 +0100 | [diff] [blame] | 143 | enable_mte = "1" |
| 144 | plat_log_level = "LOG_LEVEL_INFO" |
Madhukar Pappireddy | ffbe2e2 | 2023-02-02 17:45:30 -0600 | [diff] [blame^] | 145 | plat_num_virtual_interrupts_ids = 1024 |
Olivier Deprez | f17c61e | 2023-01-30 13:50:25 +0100 | [diff] [blame] | 146 | } |
| 147 | } |
| 148 | |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 149 | aarch64_toolchains("rpi4") { |
| 150 | cpu = "cortex-a72" |
| 151 | origin_address = "0x80000" |
| 152 | boot_flow = "//src/boot_flow:linux" |
| 153 | console = "//project/reference/rpi:mini_uart" |
Andrew Scull | e2a525d | 2019-12-02 12:56:06 +0000 | [diff] [blame] | 154 | iommu = "//src/iommu:absent" |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 155 | gic_version = 2 |
Raghu Krishnamurthy | f895639 | 2022-09-20 09:51:05 -0700 | [diff] [blame] | 156 | heap_pages = 180 |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 157 | max_cpus = 4 |
| 158 | max_vms = 16 |
| 159 | toolchain_args = { |
Daniel Boulby | 0029f48 | 2021-03-25 14:19:21 +0000 | [diff] [blame] | 160 | plat_ffa = "//src/arch/aarch64/plat/ffa:hypervisor" |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 161 | gpio_base_address = "0xfe200000" |
| 162 | aux_base_address = "0xfe215000" |
| 163 | core_freq_mhz = 500 |
David Brazdil | b38816f | 2020-01-31 16:31:10 +0000 | [diff] [blame] | 164 | hftest_ctrl = "//test/hftest:ctrl_uart" |
Varun Wadekar | 4cba5e4 | 2022-09-29 17:39:14 +0100 | [diff] [blame] | 165 | plat_log_level = "LOG_LEVEL_INFO" |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 166 | } |
| 167 | } |
David Brazdil | c702a03 | 2020-01-31 15:44:11 +0000 | [diff] [blame] | 168 | |
Arunachalam Ganapathy | f20727f | 2020-04-28 20:23:13 +0100 | [diff] [blame] | 169 | # The Total Compute platform provides an envelope for all of Arm's latest IP. |
Usama Arif | f0996a5 | 2021-08-09 14:28:30 +0100 | [diff] [blame] | 170 | # TC0 and TC1 are reference open source software stack for the |
Arunachalam Ganapathy | f20727f | 2020-04-28 20:23:13 +0100 | [diff] [blame] | 171 | # Total Compute Fixed Virtual Platform (FVP). More info at: |
| 172 | # https://community.arm.com/developer/tools-software/oss-platforms/w/docs/606/total-compute |
Usama Arif | 50a4b89 | 2021-04-15 10:48:30 +0100 | [diff] [blame] | 173 | # https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/totalcompute/tc0/user-guide.rst |
Arunachalam Ganapathy | f20727f | 2020-04-28 20:23:13 +0100 | [diff] [blame] | 174 | # |
Usama Arif | f0996a5 | 2021-08-09 14:28:30 +0100 | [diff] [blame] | 175 | # Secure hafnium build for tc0 and tc1 platforms. This builds reference Secure Partition |
| 176 | # Manager (SPM) for tc0 and tc1 with Armv8.4-A Secure-EL2 extension. |
| 177 | aarch64_toolchains("secure_tc") { |
Arunachalam Ganapathy | f20727f | 2020-04-28 20:23:13 +0100 | [diff] [blame] | 178 | cpu = "cortex-a57" |
| 179 | origin_address = "0xfd000000" |
Olivier Deprez | 59e35f7 | 2020-11-10 17:15:18 +0100 | [diff] [blame] | 180 | boot_flow = "//src/boot_flow:spmc" |
Arunachalam Ganapathy | f20727f | 2020-04-28 20:23:13 +0100 | [diff] [blame] | 181 | console = "//src/arch/aarch64/pl011" |
| 182 | iommu = "//src/iommu:absent" |
Madhukar Pappireddy | 89ee8cc | 2021-10-29 10:03:18 -0500 | [diff] [blame] | 183 | gic_version = 4 |
Arunachalam Ganapathy | f20727f | 2020-04-28 20:23:13 +0100 | [diff] [blame] | 184 | gicd_base_address = "0x30000000" |
Usama Arif | 2c636ff | 2021-04-01 11:09:25 +0100 | [diff] [blame] | 185 | gicr_base_address = "0x30080000" |
Varun Wadekar | fa4b3ac | 2022-02-14 17:19:18 +0000 | [diff] [blame] | 186 | gicr_frames = 8 |
Raghu Krishnamurthy | f895639 | 2022-09-20 09:51:05 -0700 | [diff] [blame] | 187 | heap_pages = 180 |
Arunachalam Ganapathy | 51e8157 | 2021-01-20 14:57:41 +0000 | [diff] [blame] | 188 | max_cpus = 8 |
Arunachalam Ganapathy | f20727f | 2020-04-28 20:23:13 +0100 | [diff] [blame] | 189 | max_vms = 16 |
| 190 | toolchain_args = { |
Daniel Boulby | 0029f48 | 2021-03-25 14:19:21 +0000 | [diff] [blame] | 191 | plat_ffa = "//src/arch/aarch64/plat/ffa:spmc" |
Olivier Deprez | cf03990 | 2021-01-25 15:32:39 +0100 | [diff] [blame] | 192 | plat_psci = "//src/arch/aarch64/plat/psci:spmc" |
Olivier Deprez | cc0eb84 | 2021-04-07 14:03:59 +0200 | [diff] [blame] | 193 | plat_interrupts = "//src/arch/aarch64/plat/interrupts:gicv3" |
Arunachalam Ganapathy | f20727f | 2020-04-28 20:23:13 +0100 | [diff] [blame] | 194 | secure_world = "1" |
| 195 | pl011_base_address = "0x7ff80000" |
Maksims Svecovs | c3cda25 | 2021-09-30 12:20:11 +0100 | [diff] [blame] | 196 | enable_mte = "1" |
Varun Wadekar | 4cba5e4 | 2022-09-29 17:39:14 +0100 | [diff] [blame] | 197 | plat_log_level = "LOG_LEVEL_INFO" |
Madhukar Pappireddy | ffbe2e2 | 2023-02-02 17:45:30 -0600 | [diff] [blame^] | 198 | plat_num_virtual_interrupts_ids = 1024 |
Arunachalam Ganapathy | f20727f | 2020-04-28 20:23:13 +0100 | [diff] [blame] | 199 | } |
| 200 | } |