fix(gpt): fix GPT library fill_l1_tbl() function

GPT library function fill_l1_tbl() gets 'first' and
'last' parameters which are the start addresses of
the 1st and the last granules in the range to fill
L1 GPT table. When RME_GPT_MAX_BLOCK build option
is not 0, condition for 'while' loop should be
changed from 'first < last' to 'first <= last' in
the case of 'first' = 'last' when a single granule
is passed.

Change-Id: I9b49a78b5a2f7a01f51dbce43bd3f3cfbb458fa2
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
This commit is contained in:
AlexeiFedorov 2024-06-20 10:29:58 +01:00
parent ef5181975e
commit d024cce376

View file

@ -847,7 +847,7 @@ static void fill_l1_tbl(uint64_t *l1, uintptr_t first, uintptr_t last,
assert(GPT_L0_IDX(first) == GPT_L0_IDX(last));
#if (RME_GPT_MAX_BLOCK != 0)
while (first < last) {
while (first <= last) {
/* Region length */
size_t length = last - first + GPT_PGS_ACTUAL_SIZE(gpt_config.p);