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 { 139d87b0ce3SDevanshi Chauhan Alpeshbhai /* 140d87b0ce3SDevanshi Chauhan Alpeshbhai * Typecasting to void to intentionally retain the variable and avoid 141d87b0ce3SDevanshi Chauhan Alpeshbhai * MISRA violation for unused parameters. This may be used in the 142d87b0ce3SDevanshi Chauhan Alpeshbhai * future if specific action is required based on CPU power state. 143d87b0ce3SDevanshi Chauhan Alpeshbhai */ 144d87b0ce3SDevanshi Chauhan Alpeshbhai (void)target_state; 145d87b0ce3SDevanshi Chauhan Alpeshbhai 146f91c3cb1SSiva Durga Prasad Paladugu /* Enable the gic cpu interface */ 147f91c3cb1SSiva Durga Prasad Paladugu plat_versal_gic_pcpu_init(); 148f91c3cb1SSiva Durga Prasad Paladugu 149f91c3cb1SSiva Durga Prasad Paladugu /* Program the gic per-cpu distributor or re-distributor interface */ 150f91c3cb1SSiva Durga Prasad Paladugu plat_versal_gic_cpuif_enable(); 151f91c3cb1SSiva Durga Prasad Paladugu } 152f91c3cb1SSiva Durga Prasad Paladugu 1535a8ffeabSTejas Patel /** 154de7ed953SPrasad Kummari * versal_system_off() - This function sends the system off request to firmware. 155de7ed953SPrasad Kummari * This function does not return. 156de7ed953SPrasad Kummari * 1570abf4bbaSSaeed Nowshadi */ 1580abf4bbaSSaeed Nowshadi static void __dead2 versal_system_off(void) 1590abf4bbaSSaeed Nowshadi { 1600abf4bbaSSaeed Nowshadi /* Send the power down request to the PMC */ 161526a1fd1SAbhyuday Godhasara (void)pm_system_shutdown(XPM_SHUTDOWN_TYPE_SHUTDOWN, 1624697164aSTejas Patel pm_get_shutdown_scope(), SECURE_FLAG); 1630abf4bbaSSaeed Nowshadi 16412475663SMaheedhar Bollapalli while (true) { 1650abf4bbaSSaeed Nowshadi wfi(); 1660abf4bbaSSaeed Nowshadi } 167b9fa2d9fSAbhyuday Godhasara } 1680abf4bbaSSaeed Nowshadi 1690abf4bbaSSaeed Nowshadi /** 170de7ed953SPrasad Kummari * versal_system_reset() - This function sends the reset request to firmware 171de7ed953SPrasad Kummari * for the system to reset. This function does not 172de7ed953SPrasad Kummari * return. 173de7ed953SPrasad Kummari * 1740abf4bbaSSaeed Nowshadi */ 1750abf4bbaSSaeed Nowshadi static void __dead2 versal_system_reset(void) 1760abf4bbaSSaeed Nowshadi { 17788ee0816SJay Buddhabhatti uint32_t ret, timeout = 10000U; 17888ee0816SJay Buddhabhatti 17988ee0816SJay Buddhabhatti request_cpu_pwrdwn(); 18088ee0816SJay Buddhabhatti 18188ee0816SJay Buddhabhatti /* 18288ee0816SJay Buddhabhatti * Send the system reset request to the firmware if power down request 18388ee0816SJay Buddhabhatti * is not received from firmware. 18488ee0816SJay Buddhabhatti */ 185*c0719d21SDevanshi Chauhan if (!pm_pwrdwn_req_status()) { 186526a1fd1SAbhyuday Godhasara (void)pm_system_shutdown(XPM_SHUTDOWN_TYPE_RESET, 1874697164aSTejas Patel pm_get_shutdown_scope(), SECURE_FLAG); 1880abf4bbaSSaeed Nowshadi 18988ee0816SJay Buddhabhatti /* 19088ee0816SJay Buddhabhatti * Wait for system shutdown request completed and idle callback 19188ee0816SJay Buddhabhatti * not received. 19288ee0816SJay Buddhabhatti */ 19388ee0816SJay Buddhabhatti do { 194bdba3c84SDevanshi Chauhan Alpeshbhai ret = ipi_mb_enquire_status(primary_proc->ipi->local_ipi_id, 19588ee0816SJay Buddhabhatti primary_proc->ipi->remote_ipi_id); 19688ee0816SJay Buddhabhatti udelay(100); 19788ee0816SJay Buddhabhatti timeout--; 19888ee0816SJay Buddhabhatti } while ((ret != IPI_MB_STATUS_RECV_PENDING) && (timeout > 0U)); 19988ee0816SJay Buddhabhatti } 20088ee0816SJay Buddhabhatti 20188ee0816SJay Buddhabhatti (void)psci_cpu_off(); 20288ee0816SJay Buddhabhatti 20312475663SMaheedhar Bollapalli while (true) { 2040abf4bbaSSaeed Nowshadi wfi(); 2050abf4bbaSSaeed Nowshadi } 206b9fa2d9fSAbhyuday Godhasara } 2070abf4bbaSSaeed Nowshadi 208435bc14aSMaheedhar Bollapalli static int32_t versal_validate_ns_entrypoint(uint64_t ns_entrypoint) 209435bc14aSMaheedhar Bollapalli { 210435bc14aSMaheedhar Bollapalli int32_t ret = PSCI_E_SUCCESS; 211435bc14aSMaheedhar Bollapalli 212435bc14aSMaheedhar Bollapalli if (((ns_entrypoint >= PLAT_DDR_LOWMEM_MAX) && (ns_entrypoint <= PLAT_DDR_HIGHMEM_MAX)) || 213435bc14aSMaheedhar Bollapalli ((ns_entrypoint >= BL31_BASE) && (ns_entrypoint <= BL31_LIMIT))) { 214435bc14aSMaheedhar Bollapalli ret = PSCI_E_INVALID_ADDRESS; 215435bc14aSMaheedhar Bollapalli } 216435bc14aSMaheedhar Bollapalli 217435bc14aSMaheedhar Bollapalli return ret; 218435bc14aSMaheedhar Bollapalli } 219435bc14aSMaheedhar Bollapalli 2200abf4bbaSSaeed Nowshadi /** 221de7ed953SPrasad Kummari * versal_pwr_domain_off() - This function performs actions to turn off core. 222de7ed953SPrasad Kummari * @target_state: Targated state. 2235a8ffeabSTejas Patel * 2245a8ffeabSTejas Patel */ 2255a8ffeabSTejas Patel static void versal_pwr_domain_off(const psci_power_state_t *target_state) 2265a8ffeabSTejas Patel { 227e452826aSMaheedhar Bollapalli uint32_t ret, fw_api_version, version_type[RET_PAYLOAD_ARG_CNT] = {0U}; 228912b7a6fSVenkatesh Yadav Abbarapu uint32_t cpu_id = plat_my_core_pos(); 2295a8ffeabSTejas Patel const struct pm_proc *proc = pm_get_proc(cpu_id); 2305a8ffeabSTejas Patel 231655e62aaSRonak Jain if (proc == NULL) { 232652c1ab1SMichal Simek return; 233652c1ab1SMichal Simek } 234652c1ab1SMichal Simek 2350623dceaSAbhyuday Godhasara for (size_t i = 0U; i <= PLAT_MAX_PWR_LVL; i++) { 2365a8ffeabSTejas Patel VERBOSE("%s: target_state->pwr_domain_state[%lu]=%x\n", 2375a8ffeabSTejas Patel __func__, i, target_state->pwr_domain_state[i]); 238b9fa2d9fSAbhyuday Godhasara } 2395a8ffeabSTejas Patel 2405a8ffeabSTejas Patel /* Prevent interrupts from spuriously waking up this cpu */ 2415a8ffeabSTejas Patel plat_versal_gic_cpuif_disable(); 2425a8ffeabSTejas Patel 2435a8ffeabSTejas Patel /* 2445a8ffeabSTejas Patel * Send request to PMC to power down the appropriate APU CPU 2455a8ffeabSTejas Patel * core. 2465a8ffeabSTejas Patel * According to PSCI specification, CPU_off function does not 2475a8ffeabSTejas Patel * have resume address and CPU core can only be woken up 2485a8ffeabSTejas Patel * invoking CPU_on function, during which resume address will 2495a8ffeabSTejas Patel * be set. 2505a8ffeabSTejas Patel */ 25172eb16b7SDevanshi Chauhan Alpeshbhai ret = (uint32_t)pm_feature_check((uint32_t)PM_SELF_SUSPEND, 25272eb16b7SDevanshi Chauhan Alpeshbhai &version_type[0], SECURE_FLAG); 253b802b278SMaheedhar Bollapalli if (ret == (uint32_t)PM_RET_SUCCESS) { 254e452826aSMaheedhar Bollapalli fw_api_version = version_type[0] & 0xFFFFU; 25559497016SJay Buddhabhatti if (fw_api_version >= 3U) { 25659497016SJay Buddhabhatti (void)pm_self_suspend(proc->node_id, MAX_LATENCY, PM_STATE_CPU_OFF, 0, 25759497016SJay Buddhabhatti SECURE_FLAG); 25859497016SJay Buddhabhatti } else { 259526a1fd1SAbhyuday Godhasara (void)pm_self_suspend(proc->node_id, MAX_LATENCY, PM_STATE_CPU_IDLE, 0, 2604697164aSTejas Patel SECURE_FLAG); 2615a8ffeabSTejas Patel } 26259497016SJay Buddhabhatti } 26359497016SJay Buddhabhatti } 2645a8ffeabSTejas Patel 2655a8ffeabSTejas Patel /** 2665a8ffeabSTejas Patel * versal_validate_power_state() - This function ensures that the power state 2675a8ffeabSTejas Patel * parameter in request is valid. 268de7ed953SPrasad Kummari * @power_state: Power state of core. 269de7ed953SPrasad Kummari * @req_state: Requested state. 2705a8ffeabSTejas Patel * 271de7ed953SPrasad Kummari * Return: Returns status, either success or reason. 2725a8ffeabSTejas Patel * 2735a8ffeabSTejas Patel */ 274912b7a6fSVenkatesh Yadav Abbarapu static int32_t versal_validate_power_state(uint32_t power_state, 2755a8ffeabSTejas Patel psci_power_state_t *req_state) 2765a8ffeabSTejas Patel { 277890781d1SMaheedhar Bollapalli int32_t ret = PSCI_E_SUCCESS; 2785a8ffeabSTejas Patel VERBOSE("%s: power_state: 0x%x\n", __func__, power_state); 2795a8ffeabSTejas Patel 280912b7a6fSVenkatesh Yadav Abbarapu uint32_t pstate = psci_get_pstate_type(power_state); 2815a8ffeabSTejas Patel 282b39c82e9SMaheedhar Bollapalli assert(req_state != NULL); 2835a8ffeabSTejas Patel 2845a8ffeabSTejas Patel /* Sanity check the requested state */ 285b9fa2d9fSAbhyuday Godhasara if (pstate == PSTATE_TYPE_STANDBY) { 2865a8ffeabSTejas Patel req_state->pwr_domain_state[MPIDR_AFFLVL0] = PLAT_MAX_RET_STATE; 287b9fa2d9fSAbhyuday Godhasara } else { 2885a8ffeabSTejas Patel req_state->pwr_domain_state[MPIDR_AFFLVL0] = PLAT_MAX_OFF_STATE; 289b9fa2d9fSAbhyuday Godhasara } 2905a8ffeabSTejas Patel 2915a8ffeabSTejas Patel /* We expect the 'state id' to be zero */ 292a62c40d4SAbhyuday Godhasara if (psci_get_pstate_id(power_state) != 0U) { 293890781d1SMaheedhar Bollapalli ret = PSCI_E_INVALID_PARAMS; 294b9fa2d9fSAbhyuday Godhasara } 2955a8ffeabSTejas Patel 296890781d1SMaheedhar Bollapalli return ret; 2975a8ffeabSTejas Patel } 2985a8ffeabSTejas Patel 2995a8ffeabSTejas Patel /** 300de7ed953SPrasad Kummari * versal_get_sys_suspend_power_state() - Get power state for system suspend. 301de7ed953SPrasad Kummari * @req_state: Requested state. 3025a8ffeabSTejas Patel * 3035a8ffeabSTejas Patel */ 3045a8ffeabSTejas Patel static void versal_get_sys_suspend_power_state(psci_power_state_t *req_state) 3055a8ffeabSTejas Patel { 3065a8ffeabSTejas Patel req_state->pwr_domain_state[PSCI_CPU_PWR_LVL] = PLAT_MAX_OFF_STATE; 3075a8ffeabSTejas Patel req_state->pwr_domain_state[1] = PLAT_MAX_OFF_STATE; 3085a8ffeabSTejas Patel } 3095a8ffeabSTejas Patel 310f91c3cb1SSiva Durga Prasad Paladugu static const struct plat_psci_ops versal_nopmc_psci_ops = { 311394a65aaSTejas Patel .pwr_domain_on = versal_pwr_domain_on, 3125a8ffeabSTejas Patel .pwr_domain_off = versal_pwr_domain_off, 313f91c3cb1SSiva Durga Prasad Paladugu .pwr_domain_on_finish = versal_pwr_domain_on_finish, 3145a8ffeabSTejas Patel .pwr_domain_suspend = versal_pwr_domain_suspend, 3155a8ffeabSTejas Patel .pwr_domain_suspend_finish = versal_pwr_domain_suspend_finish, 3160abf4bbaSSaeed Nowshadi .system_off = versal_system_off, 3170abf4bbaSSaeed Nowshadi .system_reset = versal_system_reset, 318435bc14aSMaheedhar Bollapalli .validate_ns_entrypoint = versal_validate_ns_entrypoint, 3195a8ffeabSTejas Patel .validate_power_state = versal_validate_power_state, 3205a8ffeabSTejas Patel .get_sys_suspend_power_state = versal_get_sys_suspend_power_state, 321f91c3cb1SSiva Durga Prasad Paladugu }; 322f91c3cb1SSiva Durga Prasad Paladugu 323f91c3cb1SSiva Durga Prasad Paladugu /******************************************************************************* 324f91c3cb1SSiva Durga Prasad Paladugu * Export the platform specific power ops. 325f91c3cb1SSiva Durga Prasad Paladugu ******************************************************************************/ 3263df32f85SDevanshi Chauhan Alpeshbhai int plat_setup_psci_ops(uintptr_t sec_entrypoint, 327f91c3cb1SSiva Durga Prasad Paladugu const struct plat_psci_ops **psci_ops) 328f91c3cb1SSiva Durga Prasad Paladugu { 329f91c3cb1SSiva Durga Prasad Paladugu versal_sec_entry = sec_entrypoint; 330f91c3cb1SSiva Durga Prasad Paladugu 331f91c3cb1SSiva Durga Prasad Paladugu *psci_ops = &versal_nopmc_psci_ops; 332f91c3cb1SSiva Durga Prasad Paladugu 333f91c3cb1SSiva Durga Prasad Paladugu return 0; 334f91c3cb1SSiva Durga Prasad Paladugu } 335