fix(intel): fix ddr address range checker
This patch fix address range checker to make sure that it does not errors out on NULL address with size 0. Non-secure software will send this NULL address if the SMC call doesn't need to pass any address buffer. Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com> Change-Id: I7e492c562a311ba989570c4ed465f845333ec865
This commit is contained in:
parent
e564137dbd
commit
12d71ac662
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2020, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2019-2022, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -234,6 +234,9 @@ static bool is_fpga_config_buffer_full(void)
|
|||
|
||||
bool is_address_in_ddr_range(uint64_t addr, uint64_t size)
|
||||
{
|
||||
if (!addr && !size) {
|
||||
return true;
|
||||
}
|
||||
if (size > (UINT64_MAX - addr))
|
||||
return false;
|
||||
if (addr < BL31_LIMIT)
|
||||
|
|
Loading…
Reference in New Issue