lib: sbi: Replace args with trap registers in ecall handler
authorAnup Patel <anup.patel@wdc.com>
Mon, 28 Dec 2020 12:55:18 +0000 (18:25 +0530)
committerAnup Patel <anup@brainfault.org>
Thu, 7 Jan 2021 04:23:14 +0000 (09:53 +0530)
commit80bc5065bb67f9d118b83f64cbe96f2e3e1bc0c6
tree034b077172404c2a0b991bb63158af916f9cfea7
parent7dcb1e1753e9c5daec0580779ea8c31778bff152
lib: sbi: Replace args with trap registers in ecall handler

We had added args pointer in ecall handler to ensure that ecall
handler only implements functionality and does not deal with
SBI calling convention. This also helped us to keep SBI calling
convention related code in one place at sbi_ecall_handler().

The Keystone Enclavce project needs access to the trap regsiters
in their ecall handler so that they can context switch enclaves
in custom SBI calls. To help the Keystone Enclave project, we
replace the args pointer in ecall handler parameter with a const
pointer to trap registers.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
include/sbi/sbi_ecall.h
include/sbi/sbi_platform.h
lib/sbi/sbi_ecall.c
lib/sbi/sbi_ecall_base.c
lib/sbi/sbi_ecall_hsm.c
lib/sbi/sbi_ecall_legacy.c
lib/sbi/sbi_ecall_replace.c
lib/sbi/sbi_ecall_vendor.c
platform/andes/ae350/platform.c