mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-18 02:24:18 +00:00

If FEAT_PMUv3 is implemented and PMEVTYPER<n>(_EL0).MT bit is implemented as well, it is possible to control whether PMU counters take into account events happening on other threads. If FEAT_MTPMU is implemented, EL3 (or EL2) can override the MT bit leaving it to effective state of 0 regardless of any write to it. This patch introduces the DISABLE_MTPMU flag, which allows to diable multithread event count from EL3 (or EL2). The flag is disabled by default so the behavior is consistent with those architectures that do not implement FEAT_MTPMU. Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com> Change-Id: Iee3a8470ae8ba13316af1bd40c8d4aa86e0cb85e
113 lines
2.9 KiB
Makefile
113 lines
2.9 KiB
Makefile
#
|
|
# Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
|
|
################################################################################
|
|
# Include Makefile for the SPM-MM implementation
|
|
################################################################################
|
|
ifeq (${SUPPORT_UNKNOWN_MPID},1)
|
|
ifeq (${DEBUG},0)
|
|
$(warning WARNING: SUPPORT_UNKNOWN_MPID enabled)
|
|
endif
|
|
endif
|
|
|
|
ifeq (${SPM_MM},1)
|
|
ifeq (${EL3_EXCEPTION_HANDLING},0)
|
|
$(error EL3_EXCEPTION_HANDLING must be 1 for SPM-MM support)
|
|
else
|
|
$(info Including SPM Management Mode (MM) makefile)
|
|
include services/std_svc/spm_mm/spm_mm.mk
|
|
endif
|
|
endif
|
|
|
|
include lib/psci/psci_lib.mk
|
|
|
|
BL31_SOURCES += bl31/bl31_main.c \
|
|
bl31/interrupt_mgmt.c \
|
|
bl31/aarch64/bl31_entrypoint.S \
|
|
bl31/aarch64/crash_reporting.S \
|
|
bl31/aarch64/ea_delegate.S \
|
|
bl31/aarch64/runtime_exceptions.S \
|
|
bl31/bl31_context_mgmt.c \
|
|
common/runtime_svc.c \
|
|
lib/cpus/aarch64/dsu_helpers.S \
|
|
plat/common/aarch64/platform_mp_stack.S \
|
|
services/arm_arch_svc/arm_arch_svc_setup.c \
|
|
services/std_svc/std_svc_setup.c \
|
|
${PSCI_LIB_SOURCES} \
|
|
${SPMD_SOURCES} \
|
|
${SPM_SOURCES}
|
|
|
|
ifeq (${DISABLE_MTPMU},1)
|
|
BL31_SOURCES += lib/extensions/mtpmu/aarch64/mtpmu.S
|
|
endif
|
|
|
|
ifeq (${ENABLE_PMF}, 1)
|
|
BL31_SOURCES += lib/pmf/pmf_main.c
|
|
endif
|
|
|
|
include lib/debugfs/debugfs.mk
|
|
ifeq (${USE_DEBUGFS},1)
|
|
BL31_SOURCES += $(DEBUGFS_SRCS)
|
|
endif
|
|
|
|
ifeq (${EL3_EXCEPTION_HANDLING},1)
|
|
BL31_SOURCES += bl31/ehf.c
|
|
endif
|
|
|
|
ifeq (${SDEI_SUPPORT},1)
|
|
ifeq (${EL3_EXCEPTION_HANDLING},0)
|
|
$(error EL3_EXCEPTION_HANDLING must be 1 for SDEI support)
|
|
endif
|
|
BL31_SOURCES += services/std_svc/sdei/sdei_dispatch.S \
|
|
services/std_svc/sdei/sdei_event.c \
|
|
services/std_svc/sdei/sdei_intr_mgmt.c \
|
|
services/std_svc/sdei/sdei_main.c \
|
|
services/std_svc/sdei/sdei_state.c
|
|
endif
|
|
|
|
ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1)
|
|
BL31_SOURCES += lib/extensions/spe/spe.c
|
|
endif
|
|
|
|
ifeq (${ENABLE_AMU},1)
|
|
BL31_SOURCES += lib/extensions/amu/aarch64/amu.c \
|
|
lib/extensions/amu/aarch64/amu_helpers.S
|
|
endif
|
|
|
|
ifeq (${ENABLE_SVE_FOR_NS},1)
|
|
BL31_SOURCES += lib/extensions/sve/sve.c
|
|
endif
|
|
|
|
ifeq (${ENABLE_MPAM_FOR_LOWER_ELS},1)
|
|
BL31_SOURCES += lib/extensions/mpam/mpam.c
|
|
endif
|
|
|
|
ifeq (${WORKAROUND_CVE_2017_5715},1)
|
|
BL31_SOURCES += lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S \
|
|
lib/cpus/aarch64/wa_cve_2017_5715_mmu.S
|
|
endif
|
|
|
|
BL31_LINKERFILE := bl31/bl31.ld.S
|
|
|
|
# Flag used to indicate if Crash reporting via console should be included
|
|
# in BL31. This defaults to being present in DEBUG builds only
|
|
ifndef CRASH_REPORTING
|
|
CRASH_REPORTING := $(DEBUG)
|
|
endif
|
|
|
|
$(eval $(call assert_booleans,\
|
|
$(sort \
|
|
CRASH_REPORTING \
|
|
EL3_EXCEPTION_HANDLING \
|
|
SDEI_SUPPORT \
|
|
)))
|
|
|
|
$(eval $(call add_defines,\
|
|
$(sort \
|
|
CRASH_REPORTING \
|
|
EL3_EXCEPTION_HANDLING \
|
|
SDEI_SUPPORT \
|
|
)))
|