xref: /rk3399_ARM-atf/plat/xilinx/versal/plat_psci.c (revision 3df32f852400be6d4c1f3199c89d9f36169ede71)
1f91c3cb1SSiva Durga Prasad Paladugu /*
2619bc13eSMichal Simek  * Copyright (c) 2018-2021, Arm Limited and Contributors. All rights reserved.
372eb16b7SDevanshi Chauhan Alpeshbhai  * Copyright (c) 2022-2025, Advanced Micro Devices, Inc. All rights reserved.
4f91c3cb1SSiva Durga Prasad Paladugu  *
5f91c3cb1SSiva Durga Prasad Paladugu  * SPDX-License-Identifier: BSD-3-Clause
6f91c3cb1SSiva Durga Prasad Paladugu  */
7f91c3cb1SSiva Durga Prasad Paladugu 
85a8ffeabSTejas Patel #include <assert.h>
901a326abSPrasad Kummari 
1009d40e0eSAntonio Nino Diaz #include <common/debug.h>
1109d40e0eSAntonio Nino Diaz #include <lib/mmio.h>
1209d40e0eSAntonio Nino Diaz #include <lib/psci/psci.h>
130abf4bbaSSaeed Nowshadi #include <plat/arm/common/plat_arm.h>
1401a326abSPrasad Kummari #include <plat/common/platform.h>
1501a326abSPrasad Kummari #include <plat_arm.h>
1609d40e0eSAntonio Nino Diaz 
1788ee0816SJay Buddhabhatti #include "drivers/delay_timer.h"
1801a326abSPrasad Kummari #include <plat_private.h>
19394a65aaSTejas Patel #include "pm_api_sys.h"
20394a65aaSTejas Patel #include "pm_client.h"
2101a326abSPrasad Kummari #include <pm_common.h>
2288ee0816SJay Buddhabhatti #include "pm_ipi.h"
2388ee0816SJay Buddhabhatti #include "pm_svc_main.h"
24394a65aaSTejas Patel 
2572eb16b7SDevanshi Chauhan Alpeshbhai #define SEC_ENTRY_ADDRESS_MASK		0xFFFFFFFFUL
2672eb16b7SDevanshi Chauhan Alpeshbhai #define RESUME_ADDR_SET			0x1UL
2772eb16b7SDevanshi Chauhan Alpeshbhai 
28f91c3cb1SSiva Durga Prasad Paladugu static uintptr_t versal_sec_entry;
29f91c3cb1SSiva Durga Prasad Paladugu 
30912b7a6fSVenkatesh Yadav Abbarapu static int32_t versal_pwr_domain_on(u_register_t mpidr)
31f91c3cb1SSiva Durga Prasad Paladugu {
32912b7a6fSVenkatesh Yadav Abbarapu 	int32_t cpu_id = plat_core_pos_by_mpidr(mpidr);
33394a65aaSTejas Patel 	const struct pm_proc *proc;
34890781d1SMaheedhar Bollapalli 	int32_t ret = PSCI_E_INTERN_FAIL;
35f91c3cb1SSiva Durga Prasad Paladugu 
36f91c3cb1SSiva Durga Prasad Paladugu 	VERBOSE("%s: mpidr: 0x%lx\n", __func__, mpidr);
37f91c3cb1SSiva Durga Prasad Paladugu 
38b9fa2d9fSAbhyuday Godhasara 	if (cpu_id == -1) {
39890781d1SMaheedhar Bollapalli 		goto exit_label;
40b9fa2d9fSAbhyuday Godhasara 	}
41f91c3cb1SSiva Durga Prasad Paladugu 
42912b7a6fSVenkatesh Yadav Abbarapu 	proc = pm_get_proc((uint32_t)cpu_id);
43655e62aaSRonak Jain 	if (proc == NULL) {
44890781d1SMaheedhar Bollapalli 		goto exit_label;
45652c1ab1SMichal Simek 	}
46f91c3cb1SSiva Durga Prasad Paladugu 
47394a65aaSTejas Patel 	/* Send request to PMC to wake up selected ACPU core */
4872eb16b7SDevanshi Chauhan Alpeshbhai 	(void)pm_req_wakeup(proc->node_id,
4972eb16b7SDevanshi Chauhan Alpeshbhai 			    (uint32_t)((versal_sec_entry & SEC_ENTRY_ADDRESS_MASK) |
5072eb16b7SDevanshi Chauhan Alpeshbhai 			    RESUME_ADDR_SET), versal_sec_entry >> 32, 0, SECURE_FLAG);
51f91c3cb1SSiva Durga Prasad Paladugu 
52394a65aaSTejas Patel 	/* Clear power down request */
53394a65aaSTejas Patel 	pm_client_wakeup(proc);
54f91c3cb1SSiva Durga Prasad Paladugu 
55890781d1SMaheedhar Bollapalli 	ret = PSCI_E_SUCCESS;
56890781d1SMaheedhar Bollapalli 
57890781d1SMaheedhar Bollapalli exit_label:
58890781d1SMaheedhar Bollapalli 	return ret;
59f91c3cb1SSiva Durga Prasad Paladugu }
60f91c3cb1SSiva Durga Prasad Paladugu 
615a8ffeabSTejas Patel /**
625a8ffeabSTejas Patel  * versal_pwr_domain_suspend() - This function sends request to PMC to suspend
635a8ffeabSTejas Patel  *                               core.
64de7ed953SPrasad Kummari  * @target_state: Targated state.
655a8ffeabSTejas Patel  *
665a8ffeabSTejas Patel  */
675a8ffeabSTejas Patel static void versal_pwr_domain_suspend(const psci_power_state_t *target_state)
685a8ffeabSTejas Patel {
69912b7a6fSVenkatesh Yadav Abbarapu 	uint32_t state;
70912b7a6fSVenkatesh Yadav Abbarapu 	uint32_t cpu_id = plat_my_core_pos();
715a8ffeabSTejas Patel 	const struct pm_proc *proc = pm_get_proc(cpu_id);
725a8ffeabSTejas Patel 
73655e62aaSRonak Jain 	if (proc == NULL) {
74652c1ab1SMichal Simek 		return;
75652c1ab1SMichal Simek 	}
76652c1ab1SMichal Simek 
770623dceaSAbhyuday Godhasara 	for (size_t i = 0U; i <= PLAT_MAX_PWR_LVL; i++) {
785a8ffeabSTejas Patel 		VERBOSE("%s: target_state->pwr_domain_state[%lu]=%x\n",
795a8ffeabSTejas Patel 			__func__, i, target_state->pwr_domain_state[i]);
80b9fa2d9fSAbhyuday Godhasara 	}
815a8ffeabSTejas Patel 
825a8ffeabSTejas Patel 	plat_versal_gic_cpuif_disable();
835a8ffeabSTejas Patel 
84d4c7b550SRavi Patel 	if (target_state->pwr_domain_state[1] > PLAT_MAX_RET_STATE) {
855a8ffeabSTejas Patel 		plat_versal_gic_save();
86d4c7b550SRavi Patel 	}
875a8ffeabSTejas Patel 
880ed8b4bfSMaheedhar Bollapalli 	state = (target_state->pwr_domain_state[1] > PLAT_MAX_RET_STATE) ?
895a8ffeabSTejas Patel 		PM_STATE_SUSPEND_TO_RAM : PM_STATE_CPU_IDLE;
905a8ffeabSTejas Patel 
915a8ffeabSTejas Patel 	/* Send request to PMC to suspend this core */
92526a1fd1SAbhyuday Godhasara 	(void)pm_self_suspend(proc->node_id, MAX_LATENCY, state, versal_sec_entry,
934697164aSTejas Patel 			      SECURE_FLAG);
945a8ffeabSTejas Patel 
955a8ffeabSTejas Patel 	/* APU is to be turned off */
965a8ffeabSTejas Patel 	if (target_state->pwr_domain_state[1] > PLAT_MAX_RET_STATE) {
975a8ffeabSTejas Patel 		/* disable coherency */
985a8ffeabSTejas Patel 		plat_arm_interconnect_exit_coherency();
995a8ffeabSTejas Patel 	}
1005a8ffeabSTejas Patel }
1015a8ffeabSTejas Patel 
1025a8ffeabSTejas Patel /**
1035a8ffeabSTejas Patel  * versal_pwr_domain_suspend_finish() - This function performs actions to finish
1045a8ffeabSTejas Patel  *                                      suspend procedure.
105de7ed953SPrasad Kummari  * @target_state: Targated state.
1065a8ffeabSTejas Patel  *
1075a8ffeabSTejas Patel  */
1085a8ffeabSTejas Patel static void versal_pwr_domain_suspend_finish(
1095a8ffeabSTejas Patel 					const psci_power_state_t *target_state)
1105a8ffeabSTejas Patel {
111912b7a6fSVenkatesh Yadav Abbarapu 	uint32_t cpu_id = plat_my_core_pos();
1125a8ffeabSTejas Patel 	const struct pm_proc *proc = pm_get_proc(cpu_id);
1135a8ffeabSTejas Patel 
114655e62aaSRonak Jain 	if (proc == NULL) {
115652c1ab1SMichal Simek 		return;
116652c1ab1SMichal Simek 	}
117652c1ab1SMichal Simek 
1180623dceaSAbhyuday Godhasara 	for (size_t i = 0U; i <= PLAT_MAX_PWR_LVL; i++) {
1195a8ffeabSTejas Patel 		VERBOSE("%s: target_state->pwr_domain_state[%lu]=%x\n",
1205a8ffeabSTejas Patel 			__func__, i, target_state->pwr_domain_state[i]);
121b9fa2d9fSAbhyuday Godhasara 	}
1225a8ffeabSTejas Patel 
1235a8ffeabSTejas Patel 	/* Clear the APU power control register for this cpu */
1245a8ffeabSTejas Patel 	pm_client_wakeup(proc);
1255a8ffeabSTejas Patel 
1265a8ffeabSTejas Patel 	/* enable coherency */
1275a8ffeabSTejas Patel 	plat_arm_interconnect_enter_coherency();
1285a8ffeabSTejas Patel 
1295a8ffeabSTejas Patel 	/* APU was turned off, so restore GIC context */
1305a8ffeabSTejas Patel 	if (target_state->pwr_domain_state[1] > PLAT_MAX_RET_STATE) {
1315a8ffeabSTejas Patel 		plat_versal_gic_resume();
1325a8ffeabSTejas Patel 	}
133d4c7b550SRavi Patel 
134d4c7b550SRavi Patel 	plat_versal_gic_cpuif_enable();
1355a8ffeabSTejas Patel }
1365a8ffeabSTejas Patel 
13716c611f8SMaheedhar Bollapalli static void versal_pwr_domain_on_finish(const psci_power_state_t *target_state)
138f91c3cb1SSiva Durga Prasad Paladugu {
139f91c3cb1SSiva Durga Prasad Paladugu 	/* Enable the gic cpu interface */
140f91c3cb1SSiva Durga Prasad Paladugu 	plat_versal_gic_pcpu_init();
141f91c3cb1SSiva Durga Prasad Paladugu 
142f91c3cb1SSiva Durga Prasad Paladugu 	/* Program the gic per-cpu distributor or re-distributor interface */
143f91c3cb1SSiva Durga Prasad Paladugu 	plat_versal_gic_cpuif_enable();
144f91c3cb1SSiva Durga Prasad Paladugu }
145f91c3cb1SSiva Durga Prasad Paladugu 
1465a8ffeabSTejas Patel /**
147de7ed953SPrasad Kummari  * versal_system_off() - This function sends the system off request to firmware.
148de7ed953SPrasad Kummari  *                       This function does not return.
149de7ed953SPrasad Kummari  *
1500abf4bbaSSaeed Nowshadi  */
1510abf4bbaSSaeed Nowshadi static void __dead2 versal_system_off(void)
1520abf4bbaSSaeed Nowshadi {
1530abf4bbaSSaeed Nowshadi 	/* Send the power down request to the PMC */
154526a1fd1SAbhyuday Godhasara 	(void)pm_system_shutdown(XPM_SHUTDOWN_TYPE_SHUTDOWN,
1554697164aSTejas Patel 				 pm_get_shutdown_scope(), SECURE_FLAG);
1560abf4bbaSSaeed Nowshadi 
15712475663SMaheedhar Bollapalli 	while (true) {
1580abf4bbaSSaeed Nowshadi 		wfi();
1590abf4bbaSSaeed Nowshadi 	}
160b9fa2d9fSAbhyuday Godhasara }
1610abf4bbaSSaeed Nowshadi 
1620abf4bbaSSaeed Nowshadi /**
163de7ed953SPrasad Kummari  * versal_system_reset() - This function sends the reset request to firmware
164de7ed953SPrasad Kummari  *                         for the system to reset.  This function does not
165de7ed953SPrasad Kummari  *			   return.
166de7ed953SPrasad Kummari  *
1670abf4bbaSSaeed Nowshadi  */
1680abf4bbaSSaeed Nowshadi static void __dead2 versal_system_reset(void)
1690abf4bbaSSaeed Nowshadi {
17088ee0816SJay Buddhabhatti 	uint32_t ret, timeout = 10000U;
17188ee0816SJay Buddhabhatti 
17288ee0816SJay Buddhabhatti 	request_cpu_pwrdwn();
17388ee0816SJay Buddhabhatti 
17488ee0816SJay Buddhabhatti 	/*
17588ee0816SJay Buddhabhatti 	 * Send the system reset request to the firmware if power down request
17688ee0816SJay Buddhabhatti 	 * is not received from firmware.
17788ee0816SJay Buddhabhatti 	 */
17888ee0816SJay Buddhabhatti 	if (!pwrdwn_req_received) {
179526a1fd1SAbhyuday Godhasara 		(void)pm_system_shutdown(XPM_SHUTDOWN_TYPE_RESET,
1804697164aSTejas Patel 					 pm_get_shutdown_scope(), SECURE_FLAG);
1810abf4bbaSSaeed Nowshadi 
18288ee0816SJay Buddhabhatti 		/*
18388ee0816SJay Buddhabhatti 		 * Wait for system shutdown request completed and idle callback
18488ee0816SJay Buddhabhatti 		 * not received.
18588ee0816SJay Buddhabhatti 		 */
18688ee0816SJay Buddhabhatti 		do {
187bdba3c84SDevanshi Chauhan Alpeshbhai 			ret = ipi_mb_enquire_status(primary_proc->ipi->local_ipi_id,
18888ee0816SJay Buddhabhatti 						    primary_proc->ipi->remote_ipi_id);
18988ee0816SJay Buddhabhatti 			udelay(100);
19088ee0816SJay Buddhabhatti 			timeout--;
19188ee0816SJay Buddhabhatti 		} while ((ret != IPI_MB_STATUS_RECV_PENDING) && (timeout > 0U));
19288ee0816SJay Buddhabhatti 	}
19388ee0816SJay Buddhabhatti 
19488ee0816SJay Buddhabhatti 	(void)psci_cpu_off();
19588ee0816SJay Buddhabhatti 
19612475663SMaheedhar Bollapalli 	while (true) {
1970abf4bbaSSaeed Nowshadi 		wfi();
1980abf4bbaSSaeed Nowshadi 	}
199b9fa2d9fSAbhyuday Godhasara }
2000abf4bbaSSaeed Nowshadi 
201435bc14aSMaheedhar Bollapalli static int32_t versal_validate_ns_entrypoint(uint64_t ns_entrypoint)
202435bc14aSMaheedhar Bollapalli {
203435bc14aSMaheedhar Bollapalli 	int32_t ret = PSCI_E_SUCCESS;
204435bc14aSMaheedhar Bollapalli 
205435bc14aSMaheedhar Bollapalli 	if (((ns_entrypoint >= PLAT_DDR_LOWMEM_MAX) && (ns_entrypoint <= PLAT_DDR_HIGHMEM_MAX)) ||
206435bc14aSMaheedhar Bollapalli 		((ns_entrypoint >= BL31_BASE) && (ns_entrypoint <= BL31_LIMIT))) {
207435bc14aSMaheedhar Bollapalli 		ret = PSCI_E_INVALID_ADDRESS;
208435bc14aSMaheedhar Bollapalli 	}
209435bc14aSMaheedhar Bollapalli 
210435bc14aSMaheedhar Bollapalli 	return ret;
211435bc14aSMaheedhar Bollapalli }
212435bc14aSMaheedhar Bollapalli 
2130abf4bbaSSaeed Nowshadi /**
214de7ed953SPrasad Kummari  * versal_pwr_domain_off() - This function performs actions to turn off core.
215de7ed953SPrasad Kummari  * @target_state: Targated state.
2165a8ffeabSTejas Patel  *
2175a8ffeabSTejas Patel  */
2185a8ffeabSTejas Patel static void versal_pwr_domain_off(const psci_power_state_t *target_state)
2195a8ffeabSTejas Patel {
220e452826aSMaheedhar Bollapalli 	uint32_t ret, fw_api_version, version_type[RET_PAYLOAD_ARG_CNT] = {0U};
221912b7a6fSVenkatesh Yadav Abbarapu 	uint32_t cpu_id = plat_my_core_pos();
2225a8ffeabSTejas Patel 	const struct pm_proc *proc = pm_get_proc(cpu_id);
2235a8ffeabSTejas Patel 
224655e62aaSRonak Jain 	if (proc == NULL) {
225652c1ab1SMichal Simek 		return;
226652c1ab1SMichal Simek 	}
227652c1ab1SMichal Simek 
2280623dceaSAbhyuday Godhasara 	for (size_t i = 0U; i <= PLAT_MAX_PWR_LVL; i++) {
2295a8ffeabSTejas Patel 		VERBOSE("%s: target_state->pwr_domain_state[%lu]=%x\n",
2305a8ffeabSTejas Patel 			__func__, i, target_state->pwr_domain_state[i]);
231b9fa2d9fSAbhyuday Godhasara 	}
2325a8ffeabSTejas Patel 
2335a8ffeabSTejas Patel 	/* Prevent interrupts from spuriously waking up this cpu */
2345a8ffeabSTejas Patel 	plat_versal_gic_cpuif_disable();
2355a8ffeabSTejas Patel 
2365a8ffeabSTejas Patel 	/*
2375a8ffeabSTejas Patel 	 * Send request to PMC to power down the appropriate APU CPU
2385a8ffeabSTejas Patel 	 * core.
2395a8ffeabSTejas Patel 	 * According to PSCI specification, CPU_off function does not
2405a8ffeabSTejas Patel 	 * have resume address and CPU core can only be woken up
2415a8ffeabSTejas Patel 	 * invoking CPU_on function, during which resume address will
2425a8ffeabSTejas Patel 	 * be set.
2435a8ffeabSTejas Patel 	 */
24472eb16b7SDevanshi Chauhan Alpeshbhai 	ret = (uint32_t)pm_feature_check((uint32_t)PM_SELF_SUSPEND,
24572eb16b7SDevanshi Chauhan Alpeshbhai 					 &version_type[0], SECURE_FLAG);
246b802b278SMaheedhar Bollapalli 	if (ret == (uint32_t)PM_RET_SUCCESS) {
247e452826aSMaheedhar Bollapalli 		fw_api_version = version_type[0] & 0xFFFFU;
24859497016SJay Buddhabhatti 		if (fw_api_version >= 3U) {
24959497016SJay Buddhabhatti 			(void)pm_self_suspend(proc->node_id, MAX_LATENCY, PM_STATE_CPU_OFF, 0,
25059497016SJay Buddhabhatti 					      SECURE_FLAG);
25159497016SJay Buddhabhatti 		} else {
252526a1fd1SAbhyuday Godhasara 			(void)pm_self_suspend(proc->node_id, MAX_LATENCY, PM_STATE_CPU_IDLE, 0,
2534697164aSTejas Patel 					      SECURE_FLAG);
2545a8ffeabSTejas Patel 		}
25559497016SJay Buddhabhatti 	}
25659497016SJay Buddhabhatti }
2575a8ffeabSTejas Patel 
2585a8ffeabSTejas Patel /**
2595a8ffeabSTejas Patel  * versal_validate_power_state() - This function ensures that the power state
2605a8ffeabSTejas Patel  *                                 parameter in request is valid.
261de7ed953SPrasad Kummari  * @power_state: Power state of core.
262de7ed953SPrasad Kummari  * @req_state: Requested state.
2635a8ffeabSTejas Patel  *
264de7ed953SPrasad Kummari  * Return: Returns status, either success or reason.
2655a8ffeabSTejas Patel  *
2665a8ffeabSTejas Patel  */
267912b7a6fSVenkatesh Yadav Abbarapu static int32_t versal_validate_power_state(uint32_t power_state,
2685a8ffeabSTejas Patel 				       psci_power_state_t *req_state)
2695a8ffeabSTejas Patel {
270890781d1SMaheedhar Bollapalli 	int32_t ret = PSCI_E_SUCCESS;
2715a8ffeabSTejas Patel 	VERBOSE("%s: power_state: 0x%x\n", __func__, power_state);
2725a8ffeabSTejas Patel 
273912b7a6fSVenkatesh Yadav Abbarapu 	uint32_t pstate = psci_get_pstate_type(power_state);
2745a8ffeabSTejas Patel 
275b39c82e9SMaheedhar Bollapalli 	assert(req_state != NULL);
2765a8ffeabSTejas Patel 
2775a8ffeabSTejas Patel 	/* Sanity check the requested state */
278b9fa2d9fSAbhyuday Godhasara 	if (pstate == PSTATE_TYPE_STANDBY) {
2795a8ffeabSTejas Patel 		req_state->pwr_domain_state[MPIDR_AFFLVL0] = PLAT_MAX_RET_STATE;
280b9fa2d9fSAbhyuday Godhasara 	} else {
2815a8ffeabSTejas Patel 		req_state->pwr_domain_state[MPIDR_AFFLVL0] = PLAT_MAX_OFF_STATE;
282b9fa2d9fSAbhyuday Godhasara 	}
2835a8ffeabSTejas Patel 
2845a8ffeabSTejas Patel 	/* We expect the 'state id' to be zero */
285a62c40d4SAbhyuday Godhasara 	if (psci_get_pstate_id(power_state) != 0U) {
286890781d1SMaheedhar Bollapalli 		ret = PSCI_E_INVALID_PARAMS;
287b9fa2d9fSAbhyuday Godhasara 	}
2885a8ffeabSTejas Patel 
289890781d1SMaheedhar Bollapalli 	return ret;
2905a8ffeabSTejas Patel }
2915a8ffeabSTejas Patel 
2925a8ffeabSTejas Patel /**
293de7ed953SPrasad Kummari  * versal_get_sys_suspend_power_state() - Get power state for system suspend.
294de7ed953SPrasad Kummari  * @req_state: Requested state.
2955a8ffeabSTejas Patel  *
2965a8ffeabSTejas Patel  */
2975a8ffeabSTejas Patel static void versal_get_sys_suspend_power_state(psci_power_state_t *req_state)
2985a8ffeabSTejas Patel {
2995a8ffeabSTejas Patel 	req_state->pwr_domain_state[PSCI_CPU_PWR_LVL] = PLAT_MAX_OFF_STATE;
3005a8ffeabSTejas Patel 	req_state->pwr_domain_state[1] = PLAT_MAX_OFF_STATE;
3015a8ffeabSTejas Patel }
3025a8ffeabSTejas Patel 
303f91c3cb1SSiva Durga Prasad Paladugu static const struct plat_psci_ops versal_nopmc_psci_ops = {
304394a65aaSTejas Patel 	.pwr_domain_on			= versal_pwr_domain_on,
3055a8ffeabSTejas Patel 	.pwr_domain_off			= versal_pwr_domain_off,
306f91c3cb1SSiva Durga Prasad Paladugu 	.pwr_domain_on_finish		= versal_pwr_domain_on_finish,
3075a8ffeabSTejas Patel 	.pwr_domain_suspend		= versal_pwr_domain_suspend,
3085a8ffeabSTejas Patel 	.pwr_domain_suspend_finish	= versal_pwr_domain_suspend_finish,
3090abf4bbaSSaeed Nowshadi 	.system_off			= versal_system_off,
3100abf4bbaSSaeed Nowshadi 	.system_reset			= versal_system_reset,
311435bc14aSMaheedhar Bollapalli 	.validate_ns_entrypoint		= versal_validate_ns_entrypoint,
3125a8ffeabSTejas Patel 	.validate_power_state		= versal_validate_power_state,
3135a8ffeabSTejas Patel 	.get_sys_suspend_power_state	= versal_get_sys_suspend_power_state,
314f91c3cb1SSiva Durga Prasad Paladugu };
315f91c3cb1SSiva Durga Prasad Paladugu 
316f91c3cb1SSiva Durga Prasad Paladugu /*******************************************************************************
317f91c3cb1SSiva Durga Prasad Paladugu  * Export the platform specific power ops.
318f91c3cb1SSiva Durga Prasad Paladugu  ******************************************************************************/
319*3df32f85SDevanshi Chauhan Alpeshbhai int plat_setup_psci_ops(uintptr_t sec_entrypoint,
320f91c3cb1SSiva Durga Prasad Paladugu 			const struct plat_psci_ops **psci_ops)
321f91c3cb1SSiva Durga Prasad Paladugu {
322f91c3cb1SSiva Durga Prasad Paladugu 	versal_sec_entry = sec_entrypoint;
323f91c3cb1SSiva Durga Prasad Paladugu 
324f91c3cb1SSiva Durga Prasad Paladugu 	*psci_ops = &versal_nopmc_psci_ops;
325f91c3cb1SSiva Durga Prasad Paladugu 
326f91c3cb1SSiva Durga Prasad Paladugu 	return 0;
327f91c3cb1SSiva Durga Prasad Paladugu }
328