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 = [ |
| 12 | "//src:hafnium(:aem_v8a_fvp_clang)", |
David Brazdil | c702a03 | 2020-01-31 15:44:11 +0000 | [diff] [blame] | 13 | "//src:hafnium(:android_aarch64_clang)", |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 14 | "//src:hafnium(:qemu_aarch64_clang)", |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 15 | "//src:hafnium(:rpi4_clang)", |
Jose Marinho | 69cd27d | 2019-10-17 15:51:31 +0100 | [diff] [blame^] | 16 | "//src:hafnium(:secure_aem_v8a_fvp_clang)", |
Andrew Walbran | 92627a8 | 2020-01-17 10:52:44 +0000 | [diff] [blame] | 17 | "//src/arch/aarch64/qemuloader:bl(:qemu_aarch64_clang)", |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 18 | ] |
| 19 | } |
| 20 | |
| 21 | group("test_root") { |
| 22 | testonly = true |
| 23 | |
| 24 | deps = [ |
| 25 | "//src:unit_tests(:host_fake_clang)", |
Andrew Walbran | fd37939 | 2019-03-14 17:45:04 +0000 | [diff] [blame] | 26 | "//test/arch(:aem_v8a_fvp_clang)", |
Andrew Scull | 75da2d1 | 2018-12-09 21:25:45 +0000 | [diff] [blame] | 27 | "//test/arch(:qemu_aarch64_clang)", |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 28 | "//test/arch(:rpi4_clang)", |
Jose Marinho | 69cd27d | 2019-10-17 15:51:31 +0100 | [diff] [blame^] | 29 | "//test/arch(:secure_aem_v8a_fvp_clang)", |
Andrew Walbran | b145760 | 2019-05-13 16:43:57 +0100 | [diff] [blame] | 30 | "//test/linux(:aem_v8a_fvp_vm_clang)", |
| 31 | "//test/linux(:qemu_aarch64_vm_clang)", |
Andrew Walbran | 3eeaa40 | 2019-11-01 14:48:29 +0000 | [diff] [blame] | 32 | "//test/linux(:rpi4_vm_clang)", |
Jose Marinho | 69cd27d | 2019-10-17 15:51:31 +0100 | [diff] [blame^] | 33 | "//test/linux(:secure_aem_v8a_fvp_vm_clang)", |
Andrew Walbran | b145760 | 2019-05-13 16:43:57 +0100 | [diff] [blame] | 34 | "//test/vmapi(:aem_v8a_fvp_vm_clang)", |
| 35 | "//test/vmapi(:qemu_aarch64_vm_clang)", |
Andrew Walbran | 3eeaa40 | 2019-11-01 14:48:29 +0000 | [diff] [blame] | 36 | "//test/vmapi(:rpi4_vm_clang)", |
Jose Marinho | 69cd27d | 2019-10-17 15:51:31 +0100 | [diff] [blame^] | 37 | "//test/vmapi(:secure_aem_v8a_fvp_vm_clang)", |
Andrew Scull | 3fe2408 | 2019-09-30 15:27:23 +0100 | [diff] [blame] | 38 | "//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 Marinho | 69cd27d | 2019-10-17 15:51:31 +0100 | [diff] [blame^] | 40 | "//test/vmapi/arch/aarch64/gicv3:gicv3_test(:secure_aem_v8a_fvp_vm_clang)", |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 41 | ] |
| 42 | } |
| 43 | |
| 44 | # Describe each of the platforms used in this project. |
| 45 | |
| 46 | host_toolchain("host_fake") { |
| 47 | use_platform = true |
Andrew Walbran | bc737c4 | 2018-12-07 14:24:16 +0000 | [diff] [blame] | 48 | heap_pages = 60 |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 49 | max_cpus = 4 |
| 50 | max_vms = 6 |
| 51 | } |
| 52 | |
Jose Marinho | 69cd27d | 2019-10-17 15:51:31 +0100 | [diff] [blame^] | 53 | aarch64_toolchains("secure_aem_v8a_fvp") { |
| 54 | cpu = "cortex-a57" |
| 55 | origin_address = "0x06000000" |
| 56 | boot_flow = "//src/boot_flow:linux" |
| 57 | console = "//src/arch/aarch64/pl011" |
| 58 | iommu = "//src/iommu:absent" |
| 59 | gic_version = 3 |
| 60 | gicd_base_address = "0x2f000000" |
| 61 | gicr_base_address = "0x2f100000" |
| 62 | heap_pages = 60 |
| 63 | max_cpus = 8 |
| 64 | max_vms = 16 |
| 65 | toolchain_args = { |
| 66 | secure_world = "1" |
| 67 | pl011_base_address = "0x1c090000" |
| 68 | } |
| 69 | } |
| 70 | |
Andrew Walbran | b145760 | 2019-05-13 16:43:57 +0100 | [diff] [blame] | 71 | aarch64_toolchains("aem_v8a_fvp") { |
| 72 | cpu = "cortex-a57" |
Andrew Walbran | 6582198 | 2019-04-16 14:34:03 +0100 | [diff] [blame] | 73 | origin_address = "0x80000000" |
David Brazdil | 653261a | 2019-09-09 18:04:33 +0100 | [diff] [blame] | 74 | boot_flow = "//src/boot_flow:linux" |
Andrew Walbran | 808531e | 2019-05-20 14:52:45 +0100 | [diff] [blame] | 75 | console = "//src/arch/aarch64/pl011" |
Andrew Scull | e2a525d | 2019-12-02 12:56:06 +0000 | [diff] [blame] | 76 | iommu = "//src/iommu:absent" |
Andrew Walbran | f1aa19e | 2018-12-10 13:42:40 +0000 | [diff] [blame] | 77 | gic_version = 3 |
| 78 | gicd_base_address = "0x2f000000" |
| 79 | gicr_base_address = "0x2f100000" |
Andrew Walbran | bc737c4 | 2018-12-07 14:24:16 +0000 | [diff] [blame] | 80 | heap_pages = 60 |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 81 | max_cpus = 8 |
| 82 | max_vms = 16 |
Andrew Walbran | 808531e | 2019-05-20 14:52:45 +0100 | [diff] [blame] | 83 | toolchain_args = { |
| 84 | pl011_base_address = "0x1c090000" |
| 85 | } |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 86 | } |
| 87 | |
Andrew Walbran | b145760 | 2019-05-13 16:43:57 +0100 | [diff] [blame] | 88 | aarch64_toolchains("qemu_aarch64") { |
| 89 | cpu = "cortex-a57" |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 90 | origin_address = "0x40001000" |
David Brazdil | 653261a | 2019-09-09 18:04:33 +0100 | [diff] [blame] | 91 | boot_flow = "//src/boot_flow:linux" |
Andrew Walbran | 808531e | 2019-05-20 14:52:45 +0100 | [diff] [blame] | 92 | console = "//src/arch/aarch64/pl011" |
Andrew Scull | e2a525d | 2019-12-02 12:56:06 +0000 | [diff] [blame] | 93 | iommu = "//src/iommu:absent" |
Andrew Walbran | f1aa19e | 2018-12-10 13:42:40 +0000 | [diff] [blame] | 94 | gic_version = 3 |
| 95 | gicd_base_address = "0x08000000" |
| 96 | gicr_base_address = "0x080A0000" |
Andrew Walbran | bc737c4 | 2018-12-07 14:24:16 +0000 | [diff] [blame] | 97 | heap_pages = 60 |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 98 | max_cpus = 8 |
| 99 | max_vms = 16 |
Andrew Walbran | 808531e | 2019-05-20 14:52:45 +0100 | [diff] [blame] | 100 | toolchain_args = { |
| 101 | pl011_base_address = "0x09000000" |
| 102 | } |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 103 | } |
| 104 | |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 105 | aarch64_toolchains("rpi4") { |
| 106 | cpu = "cortex-a72" |
| 107 | origin_address = "0x80000" |
| 108 | boot_flow = "//src/boot_flow:linux" |
| 109 | console = "//project/reference/rpi:mini_uart" |
Andrew Scull | e2a525d | 2019-12-02 12:56:06 +0000 | [diff] [blame] | 110 | iommu = "//src/iommu:absent" |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 111 | gic_version = 2 |
| 112 | heap_pages = 60 |
| 113 | max_cpus = 4 |
| 114 | max_vms = 16 |
| 115 | toolchain_args = { |
| 116 | gpio_base_address = "0xfe200000" |
| 117 | aux_base_address = "0xfe215000" |
| 118 | core_freq_mhz = 500 |
David Brazdil | b38816f | 2020-01-31 16:31:10 +0000 | [diff] [blame] | 119 | hftest_ctrl = "//test/hftest:ctrl_uart" |
David Brazdil | 3d7b88b | 2019-07-22 17:19:35 +0100 | [diff] [blame] | 120 | } |
| 121 | } |
David Brazdil | c702a03 | 2020-01-31 15:44:11 +0000 | [diff] [blame] | 122 | |
| 123 | # Generic target which uses the Android boot flow. It is not intended to run on |
| 124 | # any Android platform. It exists only to test building Android-specific code. |
| 125 | aarch64_toolchains("android_aarch64") { |
| 126 | cpu = "cortex-a57" |
| 127 | origin_address = "0x0" |
| 128 | boot_flow = "//src/boot_flow:android" |
| 129 | console = "//src/arch/aarch64/pl011" |
| 130 | iommu = "//src/iommu:absent" |
| 131 | gic_version = 2 |
| 132 | heap_pages = 60 |
| 133 | max_cpus = 8 |
| 134 | max_vms = 16 |
| 135 | toolchain_args = { |
| 136 | pl011_base_address = "0x09000000" |
| 137 | } |
| 138 | } |