#define SMCCC_SOC_ID_JEP106_BANK_IDX_MASK GENMASK(30, 24) /* * As per the SMC Calling Convention specification v1.2 (ARM DEN 0028C) * Section 7.4 SMCCC_ARCH_SOC_ID bits[23:16] are JEP-106 identification * code with parity bit for the SiP. We can drop the parity bit.
*/ #define SMCCC_SOC_ID_JEP106_ID_CODE_MASK GENMASK(22, 16) #define SMCCC_SOC_ID_IMP_DEF_SOC_ID_MASK GENMASK(15, 0)
/* * Issue Number 1.6 of the Arm SMC Calling Convention * specification introduces an optional "name" string * to the ARM_SMCCC_ARCH_SOC_ID function. Fetch it if * available.
*/
args.a0 = ARM_SMCCC_ARCH_SOC_ID;
args.a1 = 2; /* SOC_ID name */
arm_smccc_1_2_invoke(&args, &res);
if ((u32)res.a0 == 0) { /* * Copy res.a1..res.a17 to the smccc_soc_id_name string * 8 bytes at a time. As per Issue 1.6 of the Arm SMC * Calling Convention, the string will be NUL terminated * and padded, from the end of the string to the end of the * 136 byte buffer, with NULs.
*/
str_fragment_from_reg(smccc_soc_id_name + 8 * 0, res.a1);
str_fragment_from_reg(smccc_soc_id_name + 8 * 1, res.a2);
str_fragment_from_reg(smccc_soc_id_name + 8 * 2, res.a3);
str_fragment_from_reg(smccc_soc_id_name + 8 * 3, res.a4);
str_fragment_from_reg(smccc_soc_id_name + 8 * 4, res.a5);
str_fragment_from_reg(smccc_soc_id_name + 8 * 5, res.a6);
str_fragment_from_reg(smccc_soc_id_name + 8 * 6, res.a7);
str_fragment_from_reg(smccc_soc_id_name + 8 * 7, res.a8);
str_fragment_from_reg(smccc_soc_id_name + 8 * 8, res.a9);
str_fragment_from_reg(smccc_soc_id_name + 8 * 9, res.a10);
str_fragment_from_reg(smccc_soc_id_name + 8 * 10, res.a11);
str_fragment_from_reg(smccc_soc_id_name + 8 * 11, res.a12);
str_fragment_from_reg(smccc_soc_id_name + 8 * 12, res.a13);
str_fragment_from_reg(smccc_soc_id_name + 8 * 13, res.a14);
str_fragment_from_reg(smccc_soc_id_name + 8 * 14, res.a15);
str_fragment_from_reg(smccc_soc_id_name + 8 * 15, res.a16);
str_fragment_from_reg(smccc_soc_id_name + 8 * 16, res.a17);
len = strnlen(smccc_soc_id_name, sizeof(smccc_soc_id_name)); if (len) { if (len == sizeof(smccc_soc_id_name))
pr_warn(FW_BUG "Ignoring improperly formatted name\n"); else return smccc_soc_id_name;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.