mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-23 13:36:05 +00:00
fix(handoff): fix register convention in opteed
The commit with Change-Id:Ie417e054a7a4c192024a2679419e99efeded1705 updated the register convention r1/x1 values but missing necessary changes in BL31. As a result, a system panic observed during setup for BL32 when TRANSFER_LIST is enabled due to unexpected arguments. This patch is to fix this issue for optee. Change-Id: I13e116e7cb5a7d89fafc11d20295cffbf24793ab Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
This commit is contained in:
parent
9244331f35
commit
c0688c55bb
1 changed files with 14 additions and 10 deletions
|
@ -190,24 +190,28 @@ static int32_t opteed_setup(void)
|
|||
if (!optee_ep_info->pc)
|
||||
return 1;
|
||||
|
||||
if (TRANSFER_LIST &&
|
||||
optee_ep_info->args.arg1 == (TRANSFER_LIST_SIGNATURE |
|
||||
REGISTER_CONVENTION_VERSION_MASK)) {
|
||||
tl = (void *)optee_ep_info->args.arg3;
|
||||
if (transfer_list_check_header(tl) == TL_OPS_NON) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
opteed_rw = GET_RW(optee_ep_info->spsr);
|
||||
if (TRANSFER_LIST && transfer_list_check_header(tl)) {
|
||||
te = transfer_list_find(tl, TL_TAG_FDT);
|
||||
dt = transfer_list_entry_data(te);
|
||||
|
||||
opteed_rw = GET_RW(optee_ep_info->spsr);
|
||||
if (opteed_rw == OPTEE_AARCH64) {
|
||||
if (optee_ep_info->args.arg1 !=
|
||||
TRANSFER_LIST_HANDOFF_X1_VALUE(
|
||||
REGISTER_CONVENTION_VERSION))
|
||||
return 1;
|
||||
|
||||
arg0 = (uint64_t)dt;
|
||||
arg2 = 0;
|
||||
} else {
|
||||
arg2 = (uint64_t)dt;
|
||||
if (optee_ep_info->args.arg1 !=
|
||||
TRANSFER_LIST_HANDOFF_R1_VALUE(
|
||||
REGISTER_CONVENTION_VERSION))
|
||||
return 1;
|
||||
|
||||
arg0 = 0;
|
||||
arg2 = (uint64_t)dt;
|
||||
}
|
||||
|
||||
arg1 = optee_ep_info->args.arg1;
|
||||
|
|
Loading…
Add table
Reference in a new issue