Merge "chore(xilinx): replace ATF with TFA" into integration

This commit is contained in:
Manish Pandey 2023-06-07 17:49:58 +02:00 committed by TrustedFirmware Code Review
commit f1a32f4978
10 changed files with 75 additions and 74 deletions

View file

@ -26,18 +26,18 @@ struct xfsbl_partition {
uint64_t flags; uint64_t flags;
}; };
/* Structure for handoff parameters to ARM Trusted Firmware (ATF) */ /* Structure for handoff parameters to TrustedFirmware-A (TF-A) */
struct xfsbl_atf_handoff_params { struct xfsbl_tfa_handoff_params {
uint8_t magic[4]; uint8_t magic[4];
uint32_t num_entries; uint32_t num_entries;
struct xfsbl_partition partition[FSBL_MAX_PARTITIONS]; struct xfsbl_partition partition[FSBL_MAX_PARTITIONS];
}; };
#define ATF_HANDOFF_PARAMS_MAX_SIZE sizeof(struct xfsbl_atf_handoff_params) #define TFA_HANDOFF_PARAMS_MAX_SIZE sizeof(struct xfsbl_tfa_handoff_params)
enum fsbl_handoff fsbl_atf_handover(entry_point_info_t *bl32, enum fsbl_handoff fsbl_tfa_handover(entry_point_info_t *bl32,
entry_point_info_t *bl33, entry_point_info_t *bl33,
uint64_t atf_handoff_addr); uint64_t tfa_handoff_addr);
/* JEDEC Standard Manufacturer's Identification Code and Bank ID JEP106 */ /* JEDEC Standard Manufacturer's Identification Code and Bank ID JEP106 */
#define JEDEC_XILINX_MFID U(0x49) #define JEDEC_XILINX_MFID U(0x49)

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2014-2020, Arm Limited and Contributors. All rights reserved. * Copyright (c) 2014-2020, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -14,7 +15,7 @@
/* /*
* ATFHandoffParams * TFAHandoffParams
* Parameter bitfield encoding * Parameter bitfield encoding
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
* Exec State 0 0 -> Aarch64, 1-> Aarch32 * Exec State 0 0 -> Aarch64, 1-> Aarch32
@ -133,7 +134,7 @@ static int32_t get_fsbl_estate(const struct xfsbl_partition *partition)
* Populates the bl32 and bl33 image info structures * Populates the bl32 and bl33 image info structures
* @bl32: BL32 image info structure * @bl32: BL32 image info structure
* @bl33: BL33 image info structure * @bl33: BL33 image info structure
* atf_handoff_addr: ATF handoff address * tfa_handoff_addr: TF-A handoff address
* *
* Process the handoff parameters from the FSBL and populate the BL32 and BL33 * Process the handoff parameters from the FSBL and populate the BL32 and BL33
* image info structures accordingly. * image info structures accordingly.
@ -141,31 +142,31 @@ static int32_t get_fsbl_estate(const struct xfsbl_partition *partition)
* Return: Return the status of the handoff. The value will be from the * Return: Return the status of the handoff. The value will be from the
* fsbl_handoff enum. * fsbl_handoff enum.
*/ */
enum fsbl_handoff fsbl_atf_handover(entry_point_info_t *bl32, enum fsbl_handoff fsbl_tfa_handover(entry_point_info_t *bl32,
entry_point_info_t *bl33, entry_point_info_t *bl33,
uint64_t atf_handoff_addr) uint64_t tfa_handoff_addr)
{ {
const struct xfsbl_atf_handoff_params *ATFHandoffParams; const struct xfsbl_tfa_handoff_params *TFAHandoffParams;
if (!atf_handoff_addr) { if (!tfa_handoff_addr) {
WARN("BL31: No ATF handoff structure passed\n"); WARN("BL31: No TFA handoff structure passed\n");
return FSBL_HANDOFF_NO_STRUCT; return FSBL_HANDOFF_NO_STRUCT;
} }
ATFHandoffParams = (struct xfsbl_atf_handoff_params *)atf_handoff_addr; TFAHandoffParams = (struct xfsbl_tfa_handoff_params *)tfa_handoff_addr;
if ((ATFHandoffParams->magic[0] != 'X') || if ((TFAHandoffParams->magic[0] != 'X') ||
(ATFHandoffParams->magic[1] != 'L') || (TFAHandoffParams->magic[1] != 'L') ||
(ATFHandoffParams->magic[2] != 'N') || (TFAHandoffParams->magic[2] != 'N') ||
(ATFHandoffParams->magic[3] != 'X')) { (TFAHandoffParams->magic[3] != 'X')) {
ERROR("BL31: invalid ATF handoff structure at %" PRIx64 "\n", ERROR("BL31: invalid TF-A handoff structure at %" PRIx64 "\n",
atf_handoff_addr); tfa_handoff_addr);
return FSBL_HANDOFF_INVAL_STRUCT; return FSBL_HANDOFF_INVAL_STRUCT;
} }
VERBOSE("BL31: ATF handoff params at:0x%" PRIx64 ", entries:%u\n", VERBOSE("BL31: TF-A handoff params at:0x%" PRIx64 ", entries:%u\n",
atf_handoff_addr, ATFHandoffParams->num_entries); tfa_handoff_addr, TFAHandoffParams->num_entries);
if (ATFHandoffParams->num_entries > FSBL_MAX_PARTITIONS) { if (TFAHandoffParams->num_entries > FSBL_MAX_PARTITIONS) {
ERROR("BL31: ATF handoff params: too many partitions (%u/%u)\n", ERROR("BL31: TF-A handoff params: too many partitions (%u/%u)\n",
ATFHandoffParams->num_entries, FSBL_MAX_PARTITIONS); TFAHandoffParams->num_entries, FSBL_MAX_PARTITIONS);
return FSBL_HANDOFF_TOO_MANY_PARTS; return FSBL_HANDOFF_TOO_MANY_PARTS;
} }
@ -174,29 +175,29 @@ enum fsbl_handoff fsbl_atf_handover(entry_point_info_t *bl32,
* (bl32, bl33). I.e. the last applicable images in the handoff * (bl32, bl33). I.e. the last applicable images in the handoff
* structure will be used for the hand off * structure will be used for the hand off
*/ */
for (size_t i = 0; i < ATFHandoffParams->num_entries; i++) { for (size_t i = 0; i < TFAHandoffParams->num_entries; i++) {
entry_point_info_t *image; entry_point_info_t *image;
int32_t target_estate, target_secure, target_cpu; int32_t target_estate, target_secure, target_cpu;
uint32_t target_endianness, target_el; uint32_t target_endianness, target_el;
VERBOSE("BL31: %zd: entry:0x%" PRIx64 ", flags:0x%" PRIx64 "\n", i, VERBOSE("BL31: %zd: entry:0x%" PRIx64 ", flags:0x%" PRIx64 "\n", i,
ATFHandoffParams->partition[i].entry_point, TFAHandoffParams->partition[i].entry_point,
ATFHandoffParams->partition[i].flags); TFAHandoffParams->partition[i].flags);
target_cpu = get_fsbl_cpu(&ATFHandoffParams->partition[i]); target_cpu = get_fsbl_cpu(&TFAHandoffParams->partition[i]);
if (target_cpu != FSBL_FLAGS_A53_0) { if (target_cpu != FSBL_FLAGS_A53_0) {
WARN("BL31: invalid target CPU (%i)\n", target_cpu); WARN("BL31: invalid target CPU (%i)\n", target_cpu);
continue; continue;
} }
target_el = get_fsbl_el(&ATFHandoffParams->partition[i]); target_el = get_fsbl_el(&TFAHandoffParams->partition[i]);
if ((target_el == FSBL_FLAGS_EL3) || if ((target_el == FSBL_FLAGS_EL3) ||
(target_el == FSBL_FLAGS_EL0)) { (target_el == FSBL_FLAGS_EL0)) {
WARN("BL31: invalid exception level (%i)\n", target_el); WARN("BL31: invalid exception level (%i)\n", target_el);
continue; continue;
} }
target_secure = get_fsbl_ss(&ATFHandoffParams->partition[i]); target_secure = get_fsbl_ss(&TFAHandoffParams->partition[i]);
if (target_secure == FSBL_FLAGS_SECURE && if (target_secure == FSBL_FLAGS_SECURE &&
target_el == FSBL_FLAGS_EL2) { target_el == FSBL_FLAGS_EL2) {
WARN("BL31: invalid security state (%i) for exception level (%i)\n", WARN("BL31: invalid security state (%i) for exception level (%i)\n",
@ -204,8 +205,8 @@ enum fsbl_handoff fsbl_atf_handover(entry_point_info_t *bl32,
continue; continue;
} }
target_estate = get_fsbl_estate(&ATFHandoffParams->partition[i]); target_estate = get_fsbl_estate(&TFAHandoffParams->partition[i]);
target_endianness = get_fsbl_endian(&ATFHandoffParams->partition[i]); target_endianness = get_fsbl_endian(&TFAHandoffParams->partition[i]);
if (target_secure == FSBL_FLAGS_SECURE) { if (target_secure == FSBL_FLAGS_SECURE) {
image = bl32; image = bl32;
@ -245,9 +246,9 @@ enum fsbl_handoff fsbl_atf_handover(entry_point_info_t *bl32,
VERBOSE("Setting up %s entry point to:%" PRIx64 ", el:%x\n", VERBOSE("Setting up %s entry point to:%" PRIx64 ", el:%x\n",
target_secure == FSBL_FLAGS_SECURE ? "BL32" : "BL33", target_secure == FSBL_FLAGS_SECURE ? "BL32" : "BL33",
ATFHandoffParams->partition[i].entry_point, TFAHandoffParams->partition[i].entry_point,
target_el); target_el);
image->pc = ATFHandoffParams->partition[i].entry_point; image->pc = TFAHandoffParams->partition[i].entry_point;
if (target_endianness == SPSR_E_BIG) { if (target_endianness == SPSR_E_BIG) {
EP_SET_EE(image->h.attr, EP_EE_BIG); EP_SET_EE(image->h.attr, EP_EE_BIG);

View file

@ -572,7 +572,7 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, uint32_t *ret_payload,
uint32_t payload[PAYLOAD_ARG_CNT]; uint32_t payload[PAYLOAD_ARG_CNT];
uint32_t module_id; uint32_t module_id;
/* Return version of API which are implemented in ATF only */ /* Return version of API which are implemented in TF-A only */
switch (api_id) { switch (api_id) {
case PM_GET_CALLBACK_DATA: case PM_GET_CALLBACK_DATA:
case PM_GET_TRUSTZONE_VERSION: case PM_GET_TRUSTZONE_VERSION:

View file

@ -67,10 +67,10 @@ static inline void bl31_set_default_config(void)
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3) u_register_t arg2, u_register_t arg3)
{ {
uint64_t atf_handoff_addr; uint64_t tfa_handoff_addr;
uint32_t payload[PAYLOAD_ARG_CNT], max_size = ATF_HANDOFF_PARAMS_MAX_SIZE; uint32_t payload[PAYLOAD_ARG_CNT], max_size = TFA_HANDOFF_PARAMS_MAX_SIZE;
enum pm_ret_status ret_status; enum pm_ret_status ret_status;
uint64_t addr[ATF_HANDOFF_PARAMS_MAX_SIZE]; uint64_t addr[TFA_HANDOFF_PARAMS_MAX_SIZE];
if (VERSAL_CONSOLE_IS(pl011) || (VERSAL_CONSOLE_IS(pl011_1))) { if (VERSAL_CONSOLE_IS(pl011) || (VERSAL_CONSOLE_IS(pl011_1))) {
static console_t versal_runtime_console; static console_t versal_runtime_console;
@ -119,15 +119,15 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
ret_status = pm_ipi_send_sync(primary_proc, payload, NULL, 0); ret_status = pm_ipi_send_sync(primary_proc, payload, NULL, 0);
if (ret_status == PM_RET_SUCCESS) { if (ret_status == PM_RET_SUCCESS) {
INFO("BL31: GET_HANDOFF_PARAMS call success=%d\n", ret_status); INFO("BL31: GET_HANDOFF_PARAMS call success=%d\n", ret_status);
atf_handoff_addr = (uintptr_t)&addr; tfa_handoff_addr = (uintptr_t)&addr;
} else { } else {
ERROR("BL31: GET_HANDOFF_PARAMS Failed, read atf_handoff_addr from reg\n"); ERROR("BL31: GET_HANDOFF_PARAMS Failed, read tfa_handoff_addr from reg\n");
atf_handoff_addr = mmio_read_32(PMC_GLOBAL_GLOB_GEN_STORAGE4); tfa_handoff_addr = mmio_read_32(PMC_GLOBAL_GLOB_GEN_STORAGE4);
} }
enum fsbl_handoff ret = fsbl_atf_handover(&bl32_image_ep_info, enum fsbl_handoff ret = fsbl_tfa_handover(&bl32_image_ep_info,
&bl33_image_ep_info, &bl33_image_ep_info,
atf_handoff_addr); tfa_handoff_addr);
if (ret == FSBL_HANDOFF_NO_STRUCT || ret == FSBL_HANDOFF_INVAL_STRUCT) { if (ret == FSBL_HANDOFF_NO_STRUCT || ret == FSBL_HANDOFF_INVAL_STRUCT) {
bl31_set_default_config(); bl31_set_default_config();
} else if (ret == FSBL_HANDOFF_TOO_MANY_PARTS) { } else if (ret == FSBL_HANDOFF_TOO_MANY_PARTS) {

View file

@ -71,7 +71,7 @@ static inline void bl31_set_default_config(void)
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3) u_register_t arg2, u_register_t arg3)
{ {
uint64_t atf_handoff_addr; uint64_t tfa_handoff_addr;
if (ZYNQMP_CONSOLE_IS(cadence) || (ZYNQMP_CONSOLE_IS(cadence1))) { if (ZYNQMP_CONSOLE_IS(cadence) || (ZYNQMP_CONSOLE_IS(cadence1))) {
/* Register the console to provide early debug support */ /* Register the console to provide early debug support */
@ -107,15 +107,15 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
SET_PARAM_HEAD(&bl33_image_ep_info, PARAM_EP, VERSION_1, 0); SET_PARAM_HEAD(&bl33_image_ep_info, PARAM_EP, VERSION_1, 0);
SET_SECURITY_STATE(bl33_image_ep_info.h.attr, NON_SECURE); SET_SECURITY_STATE(bl33_image_ep_info.h.attr, NON_SECURE);
atf_handoff_addr = mmio_read_32(PMU_GLOBAL_GEN_STORAGE6); tfa_handoff_addr = mmio_read_32(PMU_GLOBAL_GEN_STORAGE6);
if (zynqmp_get_bootmode() == ZYNQMP_BOOTMODE_JTAG) { if (zynqmp_get_bootmode() == ZYNQMP_BOOTMODE_JTAG) {
bl31_set_default_config(); bl31_set_default_config();
} else { } else {
/* use parameters from FSBL */ /* use parameters from FSBL */
enum fsbl_handoff ret = fsbl_atf_handover(&bl32_image_ep_info, enum fsbl_handoff ret = fsbl_tfa_handover(&bl32_image_ep_info,
&bl33_image_ep_info, &bl33_image_ep_info,
atf_handoff_addr); tfa_handoff_addr);
if (ret != FSBL_HANDOFF_SUCCESS) { if (ret != FSBL_HANDOFF_SUCCESS) {
panic(); panic();
} }

View file

@ -727,7 +727,7 @@ enum pm_ret_status pm_api_ioctl(enum pm_node_id nid,
* pm_update_ioctl_bitmask() - API to get supported IOCTL ID mask * pm_update_ioctl_bitmask() - API to get supported IOCTL ID mask
* @bit_mask Returned bit mask of supported IOCTL IDs * @bit_mask Returned bit mask of supported IOCTL IDs
*/ */
enum pm_ret_status atf_ioctl_bitmask(uint32_t *bit_mask) enum pm_ret_status tfa_ioctl_bitmask(uint32_t *bit_mask)
{ {
uint8_t supported_ids[] = { uint8_t supported_ids[] = {
IOCTL_GET_RPU_OPER_MODE, IOCTL_GET_RPU_OPER_MODE,

View file

@ -55,5 +55,5 @@ enum pm_ret_status pm_api_ioctl(enum pm_node_id nid,
uint32_t arg1, uint32_t arg1,
uint32_t arg2, uint32_t arg2,
uint32_t *value); uint32_t *value);
enum pm_ret_status atf_ioctl_bitmask(uint32_t *bit_mask); enum pm_ret_status tfa_ioctl_bitmask(uint32_t *bit_mask);
#endif /* PM_API_IOCTL_H */ #endif /* PM_API_IOCTL_H */

View file

@ -38,7 +38,7 @@
/** /**
* struct eemi_api_dependency - Dependent EEMI APIs which are implemented * struct eemi_api_dependency - Dependent EEMI APIs which are implemented
* on both the ATF and firmware * on both the TF-A and firmware
* *
* @id: EEMI API id or IOCTL id to be checked * @id: EEMI API id or IOCTL id to be checked
* @api_id: Dependent EEMI API * @api_id: Dependent EEMI API
@ -48,7 +48,7 @@ typedef struct __attribute__((packed)) {
uint8_t api_id; uint8_t api_id;
} eemi_api_dependency; } eemi_api_dependency;
/* Dependent APIs for ATF to check their version from firmware */ /* Dependent APIs for TF-A to check their version from firmware */
static const eemi_api_dependency api_dep_table[] = { static const eemi_api_dependency api_dep_table[] = {
{ {
.id = PM_SELF_SUSPEND, .id = PM_SELF_SUSPEND,
@ -216,8 +216,8 @@ static const eemi_api_dependency api_dep_table[] = {
}, },
}; };
/* Expected firmware API version to ATF */ /* Expected firmware API version to TF-A */
static const uint8_t atf_expected_ver_id[] = { static const uint8_t tfa_expected_ver_id[] = {
[PM_SELF_SUSPEND] = FW_API_BASE_VERSION, [PM_SELF_SUSPEND] = FW_API_BASE_VERSION,
[PM_REQ_WAKEUP] = FW_API_BASE_VERSION, [PM_REQ_WAKEUP] = FW_API_BASE_VERSION,
[PM_ABORT_SUSPEND] = FW_API_BASE_VERSION, [PM_ABORT_SUSPEND] = FW_API_BASE_VERSION,
@ -764,8 +764,8 @@ enum pm_ret_status check_api_dependency(uint8_t id)
return ret; return ret;
} }
/* Check if fw version matches ATF expected version */ /* Check if fw version matches TF-A expected version */
if (version != atf_expected_ver_id[api_dep_table[i].api_id]) { if (version != tfa_expected_ver_id[api_dep_table[i].api_id]) {
return PM_RET_ERROR_NOTSUPPORTED; return PM_RET_ERROR_NOTSUPPORTED;
} }
} }
@ -775,13 +775,13 @@ enum pm_ret_status check_api_dependency(uint8_t id)
} }
/** /**
* feature_check_atf() - These are API's completely implemented in ATF * feature_check_tfa() - These are API's completely implemented in TF-A
* @api_id API ID to check * @api_id API ID to check
* @version Returned supported API version * @version Returned supported API version
* *
* @return Returns status, either success or error+reason * @return Returns status, either success or error+reason
*/ */
static enum pm_ret_status feature_check_atf(uint32_t api_id, uint32_t *version, static enum pm_ret_status feature_check_tfa(uint32_t api_id, uint32_t *version,
uint32_t *bit_mask) uint32_t *bit_mask)
{ {
switch (api_id) { switch (api_id) {
@ -793,7 +793,7 @@ static enum pm_ret_status feature_check_atf(uint32_t api_id, uint32_t *version,
case PM_GET_CALLBACK_DATA: case PM_GET_CALLBACK_DATA:
case PM_GET_TRUSTZONE_VERSION: case PM_GET_TRUSTZONE_VERSION:
case PM_SET_SUSPEND_MODE: case PM_SET_SUSPEND_MODE:
*version = ATF_API_BASE_VERSION; *version = TFA_API_BASE_VERSION;
return PM_RET_SUCCESS; return PM_RET_SUCCESS;
default: default:
return PM_RET_ERROR_NO_FEATURE; return PM_RET_ERROR_NO_FEATURE;
@ -801,14 +801,14 @@ static enum pm_ret_status feature_check_atf(uint32_t api_id, uint32_t *version,
} }
/** /**
* get_atf_version_for_partial_apis() - Return ATF version for partially * get_tfa_version_for_partial_apis() - Return TF-A version for partially
* implemented APIs * implemented APIs
* @api_id API ID to check * @api_id API ID to check
* @version Returned supported API version * @version Returned supported API version
* *
* @return Returns status, either success or error+reason * @return Returns status, either success or error+reason
*/ */
static enum pm_ret_status get_atf_version_for_partial_apis(uint32_t api_id, static enum pm_ret_status get_tfa_version_for_partial_apis(uint32_t api_id,
uint32_t *version) uint32_t *version)
{ {
switch (api_id) { switch (api_id) {
@ -830,7 +830,7 @@ static enum pm_ret_status get_atf_version_for_partial_apis(uint32_t api_id,
case PM_PLL_SET_MODE: case PM_PLL_SET_MODE:
case PM_PLL_GET_MODE: case PM_PLL_GET_MODE:
case PM_REGISTER_ACCESS: case PM_REGISTER_ACCESS:
*version = ATF_API_BASE_VERSION; *version = TFA_API_BASE_VERSION;
return PM_RET_SUCCESS; return PM_RET_SUCCESS;
case PM_FEATURE_CHECK: case PM_FEATURE_CHECK:
*version = FW_API_VERSION_2; *version = FW_API_VERSION_2;
@ -842,7 +842,7 @@ static enum pm_ret_status get_atf_version_for_partial_apis(uint32_t api_id,
/** /**
* feature_check_partial() - These are API's partially implemented in * feature_check_partial() - These are API's partially implemented in
* ATF and firmware both * TF-A and firmware both
* @api_id API ID to check * @api_id API ID to check
* @version Returned supported API version * @version Returned supported API version
* *
@ -877,7 +877,7 @@ static enum pm_ret_status feature_check_partial(uint32_t api_id,
if (status != PM_RET_SUCCESS) { if (status != PM_RET_SUCCESS) {
return status; return status;
} }
return get_atf_version_for_partial_apis(api_id, version); return get_tfa_version_for_partial_apis(api_id, version);
default: default:
return PM_RET_ERROR_NO_FEATURE; return PM_RET_ERROR_NO_FEATURE;
} }
@ -898,13 +898,13 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, uint32_t *version,
uint32_t ret_payload[PAYLOAD_ARG_CNT] = {0U}; uint32_t ret_payload[PAYLOAD_ARG_CNT] = {0U};
uint32_t status; uint32_t status;
/* Get API version implemented in ATF */ /* Get API version implemented in TF-A */
status = feature_check_atf(api_id, version, bit_mask); status = feature_check_tfa(api_id, version, bit_mask);
if (status != PM_RET_ERROR_NO_FEATURE) { if (status != PM_RET_ERROR_NO_FEATURE) {
return status; return status;
} }
/* Get API version implemented by firmware and ATF both */ /* Get API version implemented by firmware and TF-A both */
status = feature_check_partial(api_id, version); status = feature_check_partial(api_id, version);
if (status != PM_RET_ERROR_NO_FEATURE) { if (status != PM_RET_ERROR_NO_FEATURE) {
return status; return status;
@ -913,7 +913,7 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, uint32_t *version,
/* Get API version implemented by firmware */ /* Get API version implemented by firmware */
status = fw_api_version(api_id, ret_payload, 3); status = fw_api_version(api_id, ret_payload, 3);
/* IOCTL call may return failure whose ID is not implemented in /* IOCTL call may return failure whose ID is not implemented in
* firmware but implemented in ATF * firmware but implemented in TF-A
*/ */
if ((api_id != PM_IOCTL) && (status != PM_RET_SUCCESS)) { if ((api_id != PM_IOCTL) && (status != PM_RET_SUCCESS)) {
return status; return status;
@ -921,7 +921,7 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, uint32_t *version,
*version = ret_payload[0]; *version = ret_payload[0];
/* Update IOCTL bit mask which are implemented in ATF */ /* Update IOCTL bit mask which are implemented in TF-A */
if ((api_id == PM_IOCTL) || (api_id == PM_GET_OP_CHARACTERISTIC)) { if ((api_id == PM_IOCTL) || (api_id == PM_GET_OP_CHARACTERISTIC)) {
if (len < 2) { if (len < 2) {
return PM_RET_ERROR_ARGS; return PM_RET_ERROR_ARGS;
@ -929,8 +929,8 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, uint32_t *version,
bit_mask[0] = ret_payload[1]; bit_mask[0] = ret_payload[1];
bit_mask[1] = ret_payload[2]; bit_mask[1] = ret_payload[2];
if (api_id == PM_IOCTL) { if (api_id == PM_IOCTL) {
/* Get IOCTL's implemented by ATF */ /* Get IOCTL's implemented by TF-A */
status = atf_ioctl_bitmask(bit_mask); status = tfa_ioctl_bitmask(bit_mask);
} }
} else { } else {
/* Requires for MISRA */ /* Requires for MISRA */

View file

@ -30,8 +30,8 @@
#define FW_API_BASE_VERSION (1U) #define FW_API_BASE_VERSION (1U)
/* Expected version of firmware API for feature check */ /* Expected version of firmware API for feature check */
#define FW_API_VERSION_2 (2U) #define FW_API_VERSION_2 (2U)
/* Version of APIs implemented in ATF */ /* Version of APIs implemented in TF-A */
#define ATF_API_BASE_VERSION (1U) #define TFA_API_BASE_VERSION (1U)
/* Updating the QUERY_DATA API versioning as the bitmask functionality /* Updating the QUERY_DATA API versioning as the bitmask functionality
* support is added in the v2.*/ * support is added in the v2.*/
#define TFA_API_QUERY_DATA_VERSION (2U) #define TFA_API_QUERY_DATA_VERSION (2U)

View file

@ -95,7 +95,7 @@ static void trigger_wdt_restart(void)
* *
* When WDT event is received in PMU, PMU needs to notify master to do cleanup * When WDT event is received in PMU, PMU needs to notify master to do cleanup
* if required. PMU sets up timer and starts timer to overflow in zero time upon * if required. PMU sets up timer and starts timer to overflow in zero time upon
* WDT event. ATF handles this timer event and takes necessary action required * WDT event. TF-A handles this timer event and takes necessary action required
* for warm restart. * for warm restart.
* *
* In presence of non-secure software layers (EL1/2) sets the interrupt * In presence of non-secure software layers (EL1/2) sets the interrupt
@ -131,7 +131,7 @@ static uint64_t ttc_fiq_handler(uint32_t id, uint32_t flags, void *handle,
* *
* Function registered as INTR_TYPE_EL3 interrupt handler * Function registered as INTR_TYPE_EL3 interrupt handler
* *
* On receiving WDT event from PMU, ATF generates SGI7 to all running CPUs. * On receiving WDT event from PMU, TF-A generates SGI7 to all running CPUs.
* In response to SGI7 interrupt, each CPUs do clean up if required and last * In response to SGI7 interrupt, each CPUs do clean up if required and last
* running CPU calls system restart. * running CPU calls system restart.
*/ */