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