mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-07 04:08:51 +00:00
plat/arm: fvp: Implement methods to retrieve soc-id information
Implemented platform functions to retrieve the soc-id information for FVP platform. Change-Id: Id3df02ab290a210310e8d34ec9d706a59d817517 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
This commit is contained in:
parent
7f03d80d40
commit
ed9653ffa9
2 changed files with 48 additions and 4 deletions
plat/arm/board/fvp
|
@ -13,16 +13,18 @@
|
||||||
#include <drivers/arm/sp804_delay_timer.h>
|
#include <drivers/arm/sp804_delay_timer.h>
|
||||||
#include <drivers/generic_delay_timer.h>
|
#include <drivers/generic_delay_timer.h>
|
||||||
#include <lib/mmio.h>
|
#include <lib/mmio.h>
|
||||||
|
#include <lib/smccc.h>
|
||||||
#include <lib/xlat_tables/xlat_tables_compat.h>
|
#include <lib/xlat_tables/xlat_tables_compat.h>
|
||||||
#include <plat/arm/common/arm_config.h>
|
|
||||||
#include <plat/arm/common/plat_arm.h>
|
|
||||||
#include <plat/common/platform.h>
|
|
||||||
#include <platform_def.h>
|
#include <platform_def.h>
|
||||||
|
#include <services/arm_arch_svc.h>
|
||||||
#if SPM_MM
|
#if SPM_MM
|
||||||
#include <services/spm_mm_partition.h>
|
#include <services/spm_mm_partition.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <plat/arm/common/arm_config.h>
|
||||||
|
#include <plat/arm/common/plat_arm.h>
|
||||||
|
#include <plat/common/platform.h>
|
||||||
|
|
||||||
#include "fvp_private.h"
|
#include "fvp_private.h"
|
||||||
|
|
||||||
/* Defines for GIC Driver build time selection */
|
/* Defines for GIC Driver build time selection */
|
||||||
|
@ -437,3 +439,40 @@ void fvp_timer_init(void)
|
||||||
CNTCR_FCREQ(0U) | CNTCR_EN);
|
CNTCR_FCREQ(0U) | CNTCR_EN);
|
||||||
#endif /* USE_SP804_TIMER */
|
#endif /* USE_SP804_TIMER */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* plat_is_smccc_feature_available() - This function checks whether SMCCC
|
||||||
|
* feature is availabile for platform.
|
||||||
|
* @fid: SMCCC function id
|
||||||
|
*
|
||||||
|
* Return SMC_ARCH_CALL_SUCCESS if SMCCC feature is available and
|
||||||
|
* SMC_ARCH_CALL_NOT_SUPPORTED otherwise.
|
||||||
|
*****************************************************************************/
|
||||||
|
int32_t plat_is_smccc_feature_available(u_register_t fid)
|
||||||
|
{
|
||||||
|
switch (fid) {
|
||||||
|
case SMCCC_ARCH_SOC_ID:
|
||||||
|
return SMC_ARCH_CALL_SUCCESS;
|
||||||
|
default:
|
||||||
|
return SMC_ARCH_CALL_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get SOC version */
|
||||||
|
int32_t plat_get_soc_version(void)
|
||||||
|
{
|
||||||
|
return (int32_t)
|
||||||
|
((ARM_SOC_IDENTIFICATION_CODE << ARM_SOC_IDENTIFICATION_SHIFT)
|
||||||
|
| (ARM_SOC_CONTINUATION_CODE << ARM_SOC_CONTINUATION_SHIFT)
|
||||||
|
| FVP_SOC_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get SOC revision */
|
||||||
|
int32_t plat_get_soc_revision(void)
|
||||||
|
{
|
||||||
|
unsigned int sys_id;
|
||||||
|
|
||||||
|
sys_id = mmio_read_32(V2M_SYSREGS_BASE + V2M_SYS_ID);
|
||||||
|
return (int32_t)((sys_id >> V2M_SYS_ID_REV_SHIFT) &
|
||||||
|
V2M_SYS_ID_REV_MASK);
|
||||||
|
}
|
||||||
|
|
|
@ -27,6 +27,11 @@
|
||||||
#define FVP_CCI 1
|
#define FVP_CCI 1
|
||||||
#define FVP_CCN 2
|
#define FVP_CCN 2
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* Definition of platform soc id
|
||||||
|
*****************************************************************************/
|
||||||
|
#define FVP_SOC_ID 0
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* FVP memory map related constants
|
* FVP memory map related constants
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
Loading…
Add table
Reference in a new issue