mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 04:24:19 +00:00
feat(tc): enable MCN non-secure access to pmu counters on TC4
MCN PMU counters are by default non-accesible from non-secure world, so enable the non-secure access to those PMU counters so that linux perf driver can read them. Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com> Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com> Change-Id: I1cf1f88f97e9062592fd5603a78fd36f15a15f89
This commit is contained in:
parent
8f61c20457
commit
d1062c472a
1 changed files with 6 additions and 2 deletions
|
@ -72,7 +72,7 @@ static scmi_channel_plat_info_t tc_scmi_plat_info = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TARGET_PLATFORM == 3
|
#if (TARGET_PLATFORM == 3) || (TARGET_PLATFORM == 4)
|
||||||
static void enable_ns_mcn_pmu(void)
|
static void enable_ns_mcn_pmu(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -84,7 +84,9 @@ static void enable_ns_mcn_pmu(void)
|
||||||
mmio_setbits_32(mcn_scr, 1 << MCN_SCR_PMU_BIT);
|
mmio_setbits_32(mcn_scr, 1 << MCN_SCR_PMU_BIT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* (TARGET_PLATFORM == 3) || (TARGET_PLATFORM == 4) */
|
||||||
|
|
||||||
|
#if TARGET_PLATFORM == 3
|
||||||
static void set_mcn_slc_alloc_mode(void)
|
static void set_mcn_slc_alloc_mode(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -113,8 +115,10 @@ static void set_mcn_slc_alloc_mode(void)
|
||||||
void bl31_platform_setup(void)
|
void bl31_platform_setup(void)
|
||||||
{
|
{
|
||||||
tc_bl31_common_platform_setup();
|
tc_bl31_common_platform_setup();
|
||||||
#if TARGET_PLATFORM == 3
|
#if (TARGET_PLATFORM == 3) || (TARGET_PLATFORM == 4)
|
||||||
enable_ns_mcn_pmu();
|
enable_ns_mcn_pmu();
|
||||||
|
#endif /* (TARGET_PLATFORM == 3) || (TARGET_PLATFORM == 4) */
|
||||||
|
#if TARGET_PLATFORM == 3
|
||||||
set_mcn_slc_alloc_mode();
|
set_mcn_slc_alloc_mode();
|
||||||
plat_arm_ni_setup(NCI_BASE_ADDR);
|
plat_arm_ni_setup(NCI_BASE_ADDR);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue