Browse Source

Merge changes from topic "fix_psci_osi" into integration

* changes:
  fix(psci): fix parent_idx in psci_validate_state_coordination
  fix(psci): mask the Last in Level nibble in StateId
pull/2000/merge
Manish Pandey 6 months ago
committed by TrustedFirmware Code Review
parent
commit
dd03806122
  1. 3
      include/plat/arm/common/plat_arm.h
  2. 2
      lib/psci/psci_common.c
  3. 6
      plat/arm/common/arm_pm.c

3
include/plat/arm/common/plat_arm.h

@ -153,11 +153,10 @@ void arm_setup_romlib(void);
#define ARM_LOCAL_PSTATE_WIDTH 4
#define ARM_LOCAL_PSTATE_MASK ((1 << ARM_LOCAL_PSTATE_WIDTH) - 1)
#if PSCI_OS_INIT_MODE
/* Last in Level for the OS-initiated */
#define ARM_LAST_AT_PLVL_MASK (ARM_LOCAL_PSTATE_MASK << \
(ARM_LOCAL_PSTATE_WIDTH * \
(PLAT_MAX_PWR_LVL + 1)))
#endif /* __PSCI_OS_INIT_MODE__ */
/* Macros to construct the composite power state */

2
lib/psci/psci_common.c

@ -665,6 +665,8 @@ int psci_validate_state_coordination(unsigned int end_pwrlvl,
}
goto exit;
}
parent_idx = psci_non_cpu_pd_nodes[parent_idx].parent_node;
}
/*

6
plat/arm/common/arm_pm.c

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -79,12 +79,8 @@ int arm_validate_power_state(unsigned int power_state,
* search if the number of entries justify the additional complexity.
*/
for (i = 0; !!arm_pm_idle_states[i]; i++) {
#if PSCI_OS_INIT_MODE
if ((power_state & ~ARM_LAST_AT_PLVL_MASK) ==
arm_pm_idle_states[i])
#else
if (power_state == arm_pm_idle_states[i])
#endif /* __PSCI_OS_INIT_MODE__ */
break;
}

Loading…
Cancel
Save