mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
Export is_mem_free() function
The is_mem_free() function used to be local to bl_common.c. This patch exports it so that it can be used outside of bl_common.c. Change-Id: I01dcb4229f3a36f56a4724b567c5e6c416dc5e98 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
This commit is contained in:
parent
19d2595d41
commit
99c5ebafbe
2 changed files with 5 additions and 2 deletions
|
@ -53,14 +53,13 @@ uintptr_t page_align(uintptr_t value, unsigned dir)
|
|||
return value;
|
||||
}
|
||||
|
||||
#if !LOAD_IMAGE_V2
|
||||
/******************************************************************************
|
||||
* Determine whether the memory region delimited by 'addr' and 'size' is free,
|
||||
* given the extents of free memory.
|
||||
* Return 1 if it is free, 0 if it is not free or if the input values are
|
||||
* invalid.
|
||||
*****************************************************************************/
|
||||
static int is_mem_free(uintptr_t free_base, size_t free_size,
|
||||
int is_mem_free(uintptr_t free_base, size_t free_size,
|
||||
uintptr_t addr, size_t size)
|
||||
{
|
||||
uintptr_t free_end, requested_end;
|
||||
|
@ -97,6 +96,7 @@ static int is_mem_free(uintptr_t free_base, size_t free_size,
|
|||
return (addr >= free_base) && (requested_end <= free_end);
|
||||
}
|
||||
|
||||
#if !LOAD_IMAGE_V2
|
||||
/******************************************************************************
|
||||
* Inside a given memory region, determine whether a sub-region of memory is
|
||||
* closer from the top or the bottom of the encompassing region. Return the
|
||||
|
|
|
@ -361,6 +361,9 @@ CASSERT(sizeof(uintptr_t) ==
|
|||
******************************************************************************/
|
||||
size_t image_size(unsigned int image_id);
|
||||
|
||||
int is_mem_free(uintptr_t free_base, size_t free_size,
|
||||
uintptr_t addr, size_t size);
|
||||
|
||||
#if LOAD_IMAGE_V2
|
||||
|
||||
int load_image(unsigned int image_id, image_info_t *image_data);
|
||||
|
|
Loading…
Add table
Reference in a new issue