Commit 96b0596e authored by Yann Gautier's avatar Yann Gautier
Browse files

feat(smccc): add bit definition for SMCCC_ARCH_SOC_ID

The definitions of SMCCC_ARCH_SOC_ID SoC version return bits are defined
in SMC Calling Convention [1]. Add the masks and shifts for JEP-106 bank
index, JEP-106 identification code, and Implementation defined SoC ID.
Add a macro to easily set JEP-106 fields.

 [1] https://developer.arm.com/documentation/den0028/latest/

Signed-off-by: default avatarYann Gautier <yann.gautier@foss.st.com>
Change-Id: Iecbd09f6de6728de89dc746d2d1981a5a97a8ab7
parent e55d12b7
/*
* Copyright (c) 2016-2020, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2016-2021, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
......@@ -50,6 +50,23 @@
#define GET_SMC_OEN(id) (((id) >> FUNCID_OEN_SHIFT) & \
FUNCID_OEN_MASK)
/*******************************************************************************
* SMCCC_ARCH_SOC_ID SoC version & revision bit definition
******************************************************************************/
#define SOC_ID_JEP_106_BANK_IDX_MASK GENMASK_32(30, 24)
#define SOC_ID_JEP_106_BANK_IDX_SHIFT U(24)
#define SOC_ID_JEP_106_ID_CODE_MASK GENMASK_32(23, 16)
#define SOC_ID_JEP_106_ID_CODE_SHIFT U(16)
#define SOC_ID_IMPL_DEF_MASK GENMASK_32(15, 0)
#define SOC_ID_IMPL_DEF_SHIFT U(0)
#define SOC_ID_SET_JEP_106(bkid, mfid) ((((bkid) << SOC_ID_JEP_106_BANK_IDX_SHIFT) & \
SOC_ID_JEP_106_BANK_IDX_MASK) | \
(((mfid) << SOC_ID_JEP_106_ID_CODE_SHIFT) & \
SOC_ID_JEP_106_ID_CODE_MASK))
#define SOC_ID_REV_MASK GENMASK_32(30, 0)
#define SOC_ID_REV_SHIFT U(0)
/*******************************************************************************
* Owning entity number definitions inside the function id as per the SMC
* calling convention
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment