diff options
Diffstat (limited to 'services/spd/tlkd/tlkd_main.c')
-rw-r--r-- | services/spd/tlkd/tlkd_main.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/services/spd/tlkd/tlkd_main.c b/services/spd/tlkd/tlkd_main.c index 8d2d437e..eb6b89de 100644 --- a/services/spd/tlkd/tlkd_main.c +++ b/services/spd/tlkd/tlkd_main.c @@ -188,6 +188,7 @@ uint64_t tlkd_smc_handler(uint32_t smc_fid, { cpu_context_t *ns_cpu_context; uint32_t ns; + uint64_t vaddr, type, par; /* Passing a NULL context is a critical programming error */ assert(handle); @@ -247,6 +248,24 @@ uint64_t tlkd_smc_handler(uint32_t smc_fid, SMC_RET0(&tlk_ctx.cpu_ctx); /* + * Translate NS/EL1-S virtual addresses + */ + case TLK_VA_TRANSLATE: + if (ns || !tlk_args_results_buf) + SMC_RET1(handle, SMC_UNK); + + /* virtual address and type: ns/s */ + vaddr = tlk_args_results_buf->args[0]; + type = tlk_args_results_buf->args[1]; + + par = tlkd_va_translate(vaddr, type); + + /* Save PA for use by the SP on return */ + store_tlk_args_results(par, 0, 0, 0); + + SMC_RET0(handle); + + /* * This is a request from the SP to mark completion of * a standard function ID. */ |