mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-15 00:54:22 +00:00
Merge changes from topic "xlnx_fix_plat_extn_decl_link" into integration
* changes: fix(versal2): variable conflicting with external linkage fix(versal-net): variable conflicting with external linkage fix(versal): variable conflicting with external linkage fix(zynqmp): variable conflicting with external linkage fix(versal2): add external declaration fix(versal): add external declaration fix(zynqmp): add external declaration
This commit is contained in:
commit
a9fdd198fd
15 changed files with 50 additions and 32 deletions
|
@ -72,11 +72,11 @@ const char *board_name_decode(void)
|
|||
|
||||
void board_detection(void)
|
||||
{
|
||||
uint32_t version;
|
||||
uint32_t version_type;
|
||||
|
||||
version = mmio_read_32(PMC_TAP_VERSION);
|
||||
platform_id = FIELD_GET(PLATFORM_MASK, version);
|
||||
platform_version = FIELD_GET(PLATFORM_VERSION_MASK, version);
|
||||
version_type = mmio_read_32(PMC_TAP_VERSION);
|
||||
platform_id = FIELD_GET(PLATFORM_MASK, version_type);
|
||||
platform_version = FIELD_GET(PLATFORM_VERSION_MASK, version_type);
|
||||
|
||||
if (platform_id == QEMU_COSIM) {
|
||||
platform_id = QEMU;
|
||||
|
|
|
@ -14,6 +14,14 @@
|
|||
|
||||
void init_scmi_server(void);
|
||||
|
||||
size_t plat_scmi_pd_count(unsigned int agent_id);
|
||||
const char *plat_scmi_pd_get_name(unsigned int agent_id, unsigned int pd_id);
|
||||
unsigned int plat_scmi_pd_statistics(unsigned int agent_id, unsigned long *pd_id);
|
||||
unsigned int plat_scmi_pd_get_attributes(unsigned int agent_id, unsigned int pd_id);
|
||||
unsigned int plat_scmi_pd_get_state(unsigned int agent_id, unsigned int pd_id);
|
||||
int32_t plat_scmi_pd_set_state(unsigned int agent_id, unsigned int flags, unsigned int pd_id,
|
||||
unsigned int state);
|
||||
|
||||
#define SCMI_VENDOR "AMD"
|
||||
#define SCMI_PRODUCT "Versal Gen 2"
|
||||
|
||||
|
|
|
@ -222,11 +222,11 @@ static uint64_t no_pm_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64
|
|||
}
|
||||
case PM_GET_CHIPID:
|
||||
{
|
||||
uint32_t idcode, version;
|
||||
uint32_t idcode, version_type;
|
||||
|
||||
idcode = mmio_read_32(PMC_TAP);
|
||||
version = mmio_read_32(PMC_TAP_VERSION);
|
||||
SMC_RET2(handle, ((uint64_t)idcode << 32), version);
|
||||
version_type = mmio_read_32(PMC_TAP_VERSION);
|
||||
SMC_RET2(handle, ((uint64_t)idcode << 32), version_type);
|
||||
}
|
||||
default:
|
||||
WARN("Unimplemented PM Service Call: 0x%x\n", smc_fid);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <plat/common/platform.h>
|
||||
|
||||
#include <platform_def.h>
|
||||
#include <plat_clkfunc.h>
|
||||
#include <plat_private.h>
|
||||
|
||||
uint32_t plat_get_syscnt_freq2(void)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <common/debug.h>
|
||||
#include <lib/mmio.h>
|
||||
#include <lib/smccc.h>
|
||||
#include <plat/common/platform.h>
|
||||
#include <services/arm_arch_svc.h>
|
||||
|
||||
#include <plat_private.h>
|
||||
|
|
|
@ -34,6 +34,8 @@ void plat_versal_gic_cpuif_disable(void);
|
|||
void plat_versal_gic_pcpu_init(void);
|
||||
void plat_versal_gic_save(void);
|
||||
void plat_versal_gic_resume(void);
|
||||
void plat_versal_gic_redistif_on(void);
|
||||
void plat_versal_gic_redistif_off(void);
|
||||
|
||||
uint32_t versal_calc_core_pos(u_register_t mpidr);
|
||||
/*
|
||||
|
|
|
@ -126,7 +126,7 @@ static void versal_pwr_domain_suspend_finish(
|
|||
plat_versal_gic_cpuif_enable();
|
||||
}
|
||||
|
||||
void versal_pwr_domain_on_finish(const psci_power_state_t *target_state)
|
||||
static void versal_pwr_domain_on_finish(const psci_power_state_t *target_state)
|
||||
{
|
||||
/* Enable the gic cpu interface */
|
||||
plat_versal_gic_pcpu_init();
|
||||
|
@ -197,7 +197,7 @@ static void __dead2 versal_system_reset(void)
|
|||
*/
|
||||
static void versal_pwr_domain_off(const psci_power_state_t *target_state)
|
||||
{
|
||||
uint32_t ret, fw_api_version, version[RET_PAYLOAD_ARG_CNT] = {0U};
|
||||
uint32_t ret, fw_api_version, version_type[RET_PAYLOAD_ARG_CNT] = {0U};
|
||||
uint32_t cpu_id = plat_my_core_pos();
|
||||
const struct pm_proc *proc = pm_get_proc(cpu_id);
|
||||
|
||||
|
@ -221,9 +221,9 @@ static void versal_pwr_domain_off(const psci_power_state_t *target_state)
|
|||
* invoking CPU_on function, during which resume address will
|
||||
* be set.
|
||||
*/
|
||||
ret = pm_feature_check((uint32_t)PM_SELF_SUSPEND, &version[0], SECURE_FLAG);
|
||||
ret = pm_feature_check((uint32_t)PM_SELF_SUSPEND, &version_type[0], SECURE_FLAG);
|
||||
if (ret == PM_RET_SUCCESS) {
|
||||
fw_api_version = version[0] & 0xFFFFU;
|
||||
fw_api_version = version_type[0] & 0xFFFFU;
|
||||
if (fw_api_version >= 3U) {
|
||||
(void)pm_self_suspend(proc->node_id, MAX_LATENCY, PM_STATE_CPU_OFF, 0,
|
||||
SECURE_FLAG);
|
||||
|
|
|
@ -68,14 +68,14 @@ static int32_t sip_svc_setup(void)
|
|||
*
|
||||
* Return: Unused.
|
||||
*/
|
||||
uintptr_t sip_svc_smc_handler(uint32_t smc_fid,
|
||||
u_register_t x1,
|
||||
u_register_t x2,
|
||||
u_register_t x3,
|
||||
u_register_t x4,
|
||||
void *cookie,
|
||||
void *handle,
|
||||
u_register_t flags)
|
||||
static uintptr_t sip_svc_smc_handler(uint32_t smc_fid,
|
||||
u_register_t x1,
|
||||
u_register_t x2,
|
||||
u_register_t x3,
|
||||
u_register_t x4,
|
||||
void *cookie,
|
||||
void *handle,
|
||||
u_register_t flags)
|
||||
{
|
||||
VERBOSE("SMCID: 0x%08x, x1: 0x%016" PRIx64 ", x2: 0x%016" PRIx64 ", x3: 0x%016" PRIx64 ", x4: 0x%016" PRIx64 "\n",
|
||||
smc_fid, x1, x2, x3, x4);
|
||||
|
|
|
@ -60,11 +60,11 @@ char *board_name_decode(void)
|
|||
|
||||
void board_detection(void)
|
||||
{
|
||||
uint32_t version;
|
||||
uint32_t version_type;
|
||||
|
||||
version = mmio_read_32(PMC_TAP_VERSION);
|
||||
platform_id = FIELD_GET(PLATFORM_MASK, version);
|
||||
platform_version = FIELD_GET(PLATFORM_VERSION_MASK, version);
|
||||
version_type = mmio_read_32(PMC_TAP_VERSION);
|
||||
platform_id = FIELD_GET(PLATFORM_MASK, version_type);
|
||||
platform_version = FIELD_GET(PLATFORM_VERSION_MASK, version_type);
|
||||
|
||||
if (platform_id == VERSAL_NET_QEMU_COSIM) {
|
||||
platform_id = VERSAL_NET_QEMU;
|
||||
|
|
|
@ -59,7 +59,7 @@ static int32_t versal_net_pwr_domain_on(u_register_t mpidr)
|
|||
*/
|
||||
static void versal_net_pwr_domain_off(const psci_power_state_t *target_state)
|
||||
{
|
||||
uint32_t ret, fw_api_version, version[RET_PAYLOAD_ARG_CNT] = {0U};
|
||||
uint32_t ret, fw_api_version, version_type[RET_PAYLOAD_ARG_CNT] = {0U};
|
||||
uint32_t cpu_id = plat_my_core_pos();
|
||||
const struct pm_proc *proc = pm_get_proc(cpu_id);
|
||||
|
||||
|
@ -83,9 +83,9 @@ static void versal_net_pwr_domain_off(const psci_power_state_t *target_state)
|
|||
* invoking CPU_on function, during which resume address will
|
||||
* be set.
|
||||
*/
|
||||
ret = pm_feature_check((uint32_t)PM_SELF_SUSPEND, &version[0], SECURE_FLAG);
|
||||
ret = pm_feature_check((uint32_t)PM_SELF_SUSPEND, &version_type[0], SECURE_FLAG);
|
||||
if (ret == PM_RET_SUCCESS) {
|
||||
fw_api_version = version[0] & 0xFFFFU;
|
||||
fw_api_version = version_type[0] & 0xFFFFU;
|
||||
if (fw_api_version >= 3U) {
|
||||
(void)pm_self_suspend(proc->node_id, MAX_LATENCY, PM_STATE_CPU_OFF, 0,
|
||||
SECURE_FLAG);
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <lib/smccc.h>
|
||||
#include <lib/xlat_tables/xlat_tables_v2.h>
|
||||
#include <plat/common/platform.h>
|
||||
#include <plat_arm.h>
|
||||
#include <services/arm_arch_svc.h>
|
||||
|
||||
#include <plat_ipi.h>
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include <common/debug.h>
|
||||
#include <smccc_helpers.h>
|
||||
|
||||
#include <custom_svc.h>
|
||||
|
||||
uint64_t custom_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2,
|
||||
uint64_t x3, uint64_t x4, void *cookie,
|
||||
void *handle, uint64_t flags)
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
*/
|
||||
#include <stdint.h>
|
||||
|
||||
#include <plat/common/platform.h>
|
||||
|
||||
static const uint8_t plat_power_domain_tree_desc[] = {1, 4};
|
||||
|
||||
const uint8_t *plat_get_power_domain_tree_desc(void)
|
||||
|
|
|
@ -769,7 +769,7 @@ static enum pm_ret_status fw_api_version(uint32_t id, uint32_t *version,
|
|||
enum pm_ret_status check_api_dependency(uint8_t id)
|
||||
{
|
||||
uint8_t i;
|
||||
uint32_t version;
|
||||
uint32_t version_type;
|
||||
int ret;
|
||||
|
||||
for (i = 0U; i < ARRAY_SIZE(api_dep_table); i++) {
|
||||
|
@ -779,13 +779,13 @@ enum pm_ret_status check_api_dependency(uint8_t id)
|
|||
}
|
||||
|
||||
ret = fw_api_version(api_dep_table[i].api_id,
|
||||
&version, 1);
|
||||
&version_type, 1);
|
||||
if (ret != PM_RET_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Check if fw version matches TF-A expected version */
|
||||
if (version != tfa_expected_ver_id[api_dep_table[i].api_id]) {
|
||||
if (version_type != tfa_expected_ver_id[api_dep_table[i].api_id]) {
|
||||
return PM_RET_ERROR_NOTSUPPORTED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <plat_private.h>
|
||||
#include "pm_client.h"
|
||||
#include "pm_ipi.h"
|
||||
#include "pm_svc_main.h"
|
||||
#include "zynqmp_pm_api_sys.h"
|
||||
#include "zynqmp_pm_defs.h"
|
||||
|
||||
|
@ -555,12 +556,12 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
|
|||
|
||||
case PM_FEATURE_CHECK:
|
||||
{
|
||||
uint32_t version = 0;
|
||||
uint32_t version_type = 0;
|
||||
uint32_t bit_mask[2] = {0};
|
||||
|
||||
ret = pm_feature_check(pm_arg[0], &version, bit_mask,
|
||||
ret = pm_feature_check(pm_arg[0], &version_type, bit_mask,
|
||||
ARRAY_SIZE(bit_mask));
|
||||
SMC_RET2(handle, ((uint64_t)ret | ((uint64_t)version << 32U)),
|
||||
SMC_RET2(handle, ((uint64_t)ret | ((uint64_t)version_type << 32U)),
|
||||
((uint64_t)bit_mask[0] | ((uint64_t)bit_mask[1] << 32U)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue