Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
a3a34899
Commit
a3a34899
authored
9 years ago
by
danh-arm
Browse files
Options
Download
Plain Diff
Merge pull request #405 from vwadekar/tlkd-resume-fid-v3
TLKD: pass results with TLK_RESUME_FID function ID
parents
3679240a
ca15d9bc
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
v2.1
v2.1-rc1
v2.1-rc0
v2.0
v2.0-rc0
v1.6
v1.6-rc1
v1.6-rc0
v1.5
v1.5-rc3
v1.5-rc2
v1.5-rc1
v1.5-rc0
v1.4
v1.4-rc0
v1.3
v1.3_rc2
v1.3_rc1
v1.3-rc0
v1.2
v1.2-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/spd/tlkd/tlkd_main.c
+14
-38
services/spd/tlkd/tlkd_main.c
with
14 additions
and
38 deletions
+14
-38
services/spd/tlkd/tlkd_main.c
View file @
a3a34899
...
...
@@ -198,41 +198,6 @@ uint64_t tlkd_smc_handler(uint32_t smc_fid,
SMC_RET1
(
ns_cpu_context
,
x1
);
/*
* Request from non secure world to resume the preempted
* Standard SMC call.
*/
case
TLK_RESUME_FID
:
/* RESUME should be invoked only by normal world */
if
(
!
ns
)
SMC_RET1
(
handle
,
SMC_UNK
);
/*
* This is a resume request from the non-secure client.
* save the non-secure state and send the request to
* the secure payload.
*/
assert
(
handle
==
cm_get_context
(
NON_SECURE
));
/* Check if we are already preempted before resume */
if
(
!
get_std_smc_active_flag
(
tlk_ctx
.
state
))
SMC_RET1
(
handle
,
SMC_UNK
);
cm_el1_sysregs_context_save
(
NON_SECURE
);
/*
* We are done stashing the non-secure context. Ask the
* secure payload to do the work now.
*/
/* We just need to return to the preempted point in
* SP and the execution will resume as normal.
*/
cm_el1_sysregs_context_restore
(
SECURE
);
cm_set_next_eret_context
(
SECURE
);
SMC_RET0
(
handle
);
/*
* This is a request from the non-secure context to:
*
...
...
@@ -243,6 +208,7 @@ uint64_t tlkd_smc_handler(uint32_t smc_fid,
* Applications.
* c. open/close sessions
* d. issue commands to the Trusted Apps
* e. resume the preempted standard SMC call.
*/
case
TLK_REGISTER_LOGBUF
:
case
TLK_REGISTER_REQBUF
:
...
...
@@ -250,6 +216,7 @@ uint64_t tlkd_smc_handler(uint32_t smc_fid,
case
TLK_CLOSE_TA_SESSION
:
case
TLK_TA_LAUNCH_OP
:
case
TLK_TA_SEND_EVENT
:
case
TLK_RESUME_FID
:
if
(
!
ns
)
SMC_RET1
(
handle
,
SMC_UNK
);
...
...
@@ -262,9 +229,18 @@ uint64_t tlkd_smc_handler(uint32_t smc_fid,
*/
assert
(
handle
==
cm_get_context
(
NON_SECURE
));
/* Check if we are already preempted */
if
(
get_std_smc_active_flag
(
tlk_ctx
.
state
))
SMC_RET1
(
handle
,
SMC_UNK
);
/*
* Check if we are already processing a standard SMC
* call. Of all the supported fids, only the "resume"
* fid expects the flag to be set.
*/
if
(
smc_fid
==
TLK_RESUME_FID
)
{
if
(
!
get_std_smc_active_flag
(
tlk_ctx
.
state
))
SMC_RET1
(
handle
,
SMC_UNK
);
}
else
{
if
(
get_std_smc_active_flag
(
tlk_ctx
.
state
))
SMC_RET1
(
handle
,
SMC_UNK
);
}
cm_el1_sysregs_context_save
(
NON_SECURE
);
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help