mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00
fix(drtm): return proper values for DRTM get and set error SMCs
The DRTM get and set error previously returned SMC_UNK when these SMCs were issued. This has been corrected to return an appropriate error code on failure, and success otherwise. Also,align the error code values with the specification. Change-Id: I8f11f94f1ab097245003dbde97365fa54e0097ba Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
This commit is contained in:
parent
ccbfd01d95
commit
5e1fa57459
2 changed files with 5 additions and 5 deletions
|
@ -808,12 +808,12 @@ uint64_t drtm_smc_handler(uint32_t smc_fid,
|
|||
|
||||
case ARM_DRTM_SVC_GET_ERROR:
|
||||
INFO("DRTM service handler: get error\n");
|
||||
drtm_get_error(handle);
|
||||
return drtm_get_error(handle);
|
||||
break; /* not reached */
|
||||
|
||||
case ARM_DRTM_SVC_SET_ERROR:
|
||||
INFO("DRTM service handler: set error\n");
|
||||
drtm_set_error(x1, handle);
|
||||
return drtm_set_error(x1, handle);
|
||||
break; /* not reached */
|
||||
|
||||
case ARM_DRTM_SVC_SET_TCB_HASH:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Arm Limited. All rights reserved.
|
||||
* Copyright (c) 2022-2024 Arm Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
|
@ -21,7 +21,7 @@ uint64_t drtm_set_error(uint64_t x1, void *ctx)
|
|||
rc = plat_set_drtm_error(x1);
|
||||
|
||||
if (rc != 0) {
|
||||
SMC_RET1(ctx, INTERNAL_ERROR);
|
||||
SMC_RET1(ctx, NOT_FOUND);
|
||||
}
|
||||
|
||||
SMC_RET1(ctx, SUCCESS);
|
||||
|
@ -35,7 +35,7 @@ uint64_t drtm_get_error(void *ctx)
|
|||
rc = plat_get_drtm_error(&error_code);
|
||||
|
||||
if (rc != 0) {
|
||||
SMC_RET1(ctx, INTERNAL_ERROR);
|
||||
SMC_RET1(ctx, NOT_FOUND);
|
||||
}
|
||||
|
||||
SMC_RET2(ctx, SUCCESS, error_code);
|
||||
|
|
Loading…
Add table
Reference in a new issue