Browse Source

fix(xilinx): resolve integer handling issue

OEN Number 48 to 63 is for Trusted App and OS.
GET_SMC_OEN limits the return value of OEN number to 63 by bitwise AND
operation with 0x3F. Thus the upper limit check for OEN value returned
by GET_SMC_OEN is not required.
Removing the upper limit check for the OEN value returned by GET_SMC_OEN
resolves integer handling issue CONSTANT_EXPRESSION_RESULT

Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
Change-Id: Ie04a4e2fb7cc85ec6055a5662736a805a89f7085
pull/1992/head
Akshay Belsare 2 years ago
committed by Akshay Belsare
parent
commit
4e46db40fc
  1. 8
      plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c

8
plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c

@ -74,8 +74,12 @@ uint64_t ipi_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2,
ipi_local_id = x1 & UNSIGNED32_MASK;
ipi_remote_id = x2 & UNSIGNED32_MASK;
if ((GET_SMC_OEN(smc_fid) >= OEN_TAP_START) &&
(GET_SMC_OEN(smc_fid) <= OEN_TOS_END)) {
/* OEN Number 48 to 63 is for Trusted App and OS
* GET_SMC_OEN limits the return value of OEN number to 63 by bitwise
* AND operation with 0x3F.
* Upper limit check for OEN value is not required.
*/
if (GET_SMC_OEN(smc_fid) >= OEN_TAP_START) {
is_secure = 1;
} else {
is_secure = 0;

Loading…
Cancel
Save