Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
6e9fa386
Commit
6e9fa386
authored
Oct 07, 2015
by
danh-arm
Browse files
Merge pull request #402 from soby-mathew/sm/psci_cpu_off
PSCI: Update state only if CPU_OFF is not denied by SPD
parents
41099f4e
16e05cdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
services/std_svc/psci/psci_off.c
View file @
6e9fa386
...
...
@@ -62,7 +62,7 @@ static void psci_set_power_off_state(psci_power_state_t *state_info)
******************************************************************************/
int
psci_do_cpu_off
(
unsigned
int
end_pwrlvl
)
{
int
rc
,
idx
=
plat_my_core_pos
();
int
rc
=
PSCI_E_SUCCESS
,
idx
=
plat_my_core_pos
();
psci_power_state_t
state_info
;
/*
...
...
@@ -120,23 +120,27 @@ exit:
psci_release_pwr_domain_locks
(
end_pwrlvl
,
idx
);
/*
* Set the affinity info state to OFF. This writes directly to main
* memory as caches are disabled, so cache maintenance is required
* to ensure that later cached reads of aff_info_state return
* AFF_STATE_OFF.
*/
flush_cpu_data
(
psci_svc_cpu_data
.
aff_info_state
);
psci_set_aff_info_state
(
AFF_STATE_OFF
);
inv_cpu_data
(
psci_svc_cpu_data
.
aff_info_state
);
/*
* Check if all actions needed to safely power down this cpu have
* successfully completed. Enter a wfi loop which will allow the
* power controller to physically power down this cpu.
* successfully completed.
*/
if
(
rc
==
PSCI_E_SUCCESS
)
if
(
rc
==
PSCI_E_SUCCESS
)
{
/*
* Set the affinity info state to OFF. This writes directly to
* main memory as caches are disabled, so cache maintenance is
* required to ensure that later cached reads of aff_info_state
* return AFF_STATE_OFF.
*/
flush_cpu_data
(
psci_svc_cpu_data
.
aff_info_state
);
psci_set_aff_info_state
(
AFF_STATE_OFF
);
inv_cpu_data
(
psci_svc_cpu_data
.
aff_info_state
);
/*
* Enter a wfi loop which will allow the power controller to
* physically power down this cpu.
*/
psci_power_down_wfi
();
}
return
rc
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment