Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: arm: psci: pass nsec ctx to system_suspend #1916

Merged
merged 1 commit into from
Nov 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/arch/arm/include/sm/psci.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ void psci_system_off(void);
void psci_system_reset(void);
int psci_features(uint32_t psci_fid);
int psci_node_hw_state(uint32_t cpu_id, uint32_t power_level);
int psci_system_suspend(uintptr_t entry, uint32_t context_id);
int psci_system_suspend(uintptr_t entry, uint32_t context_id,
struct sm_nsec_ctx *nsec);
int psci_stat_residency(uint32_t cpu_id, uint32_t power_state);
int psci_stat_count(uint32_t cpu_id, uint32_t power_state);
void tee_psci_handler(struct thread_smc_args *args, struct sm_nsec_ctx *nsec);
Expand Down
3 changes: 2 additions & 1 deletion core/arch/arm/plat-rockchip/psci_rk322x.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ void psci_system_reset(void)
}

int psci_system_suspend(uintptr_t entry __unused,
uint32_t context_id __unused)
uint32_t context_id __unused,
struct sm_nsec_ctx *nsec __unused)
{
DMSG("system suspend");

Expand Down
5 changes: 3 additions & 2 deletions core/arch/arm/sm/psci.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ __weak int psci_node_hw_state(uint32_t cpu_id __unused,
}

__weak int psci_system_suspend(uintptr_t entry __unused,
uint32_t context_id __unused)
uint32_t context_id __unused,
struct sm_nsec_ctx *nsec __unused)
{
return PSCI_RET_NOT_SUPPORTED;
}
Expand Down Expand Up @@ -167,7 +168,7 @@ void tee_psci_handler(struct thread_smc_args *args, struct sm_nsec_ctx *nsec)
args->a0 = psci_node_hw_state(a1, a2);
break;
case PSCI_SYSTEM_SUSPEND:
args->a0 = psci_system_suspend(a1, a2);
args->a0 = psci_system_suspend(a1, a2, nsec);
break;
default:
args->a0 = OPTEE_SMC_RETURN_UNKNOWN_FUNCTION;
Expand Down