Chris Kay | 03be39d | 2021-05-05 13:38:30 +0100 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2021, Arm Limited. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | include lib/extensions/amu/amu.mk |
| 8 | include lib/fconf/fconf.mk |
| 9 | |
| 10 | ifneq (${ENABLE_MPMM},0) |
| 11 | ifneq ($(ARCH),aarch64) |
| 12 | $(error MPMM support (`ENABLE_MPMM`) can only be enabled in AArch64 images (`ARCH`)) |
| 13 | endif |
| 14 | |
| 15 | ifeq (${ENABLE_AMU_AUXILIARY_COUNTERS},0) # For MPMM gear AMU counters |
| 16 | $(error MPMM support (`ENABLE_MPM`) requires auxiliary AMU counter support (`ENABLE_AMU_AUXILIARY_COUNTERS`)) |
| 17 | endif |
| 18 | endif |
| 19 | |
| 20 | MPMM_SOURCES := lib/mpmm/mpmm.c |
| 21 | MPMM_SOURCES += ${AMU_SOURCES} |
| 22 | |
| 23 | ifneq (${ENABLE_MPMM_FCONF},0) |
| 24 | ifeq (${ENABLE_MPMM},0) |
| 25 | $(error MPMM FCONF support (`ENABLE_MPMM_FCONF`) requires MPMM support (`ENABLE_MPMM`)) |
| 26 | endif |
| 27 | |
| 28 | MPMM_SOURCES += ${FCONF_MPMM_SOURCES} |
| 29 | endif |