Skip to content

Commit

Permalink
os/tools: fix condition for checking max l2 pages needed for binary
Browse files Browse the repository at this point in the history
we need only 4 l2 pages at maximum for each app. 2 pages for the start
and end of read only region, and two pages for the start and end of
write-read region. Hence, maximum number is 4.

Signed-off-by: Abhishek Akkabathula <[email protected]>
  • Loading branch information
abhishek-samsung authored and sunghan-chang committed Feb 26, 2025
1 parent b2942f8 commit c7dfbda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion os/tools/mkverifyappsize.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
if util.check_config_existence(cfg_path, 'CONFIG_XIP_ELF') == True :
l2_text = math.ceil(float(textsize) / (1024*1024))
l2_other = math.ceil(float(datasize + bsssize + dynamic_ram_size) / (1024*1024))
l2_pg_need = int(l2_text + l2_other)
# for each app, we will need at max of 4 l2 pagetables, 2 for ro and 2 for rw
l2_pg_need = min(4, int(l2_text + l2_other))
else :
l2_pg_need = int(math.ceil(float(textsize + datasize + bsssize + dynamic_ram_size) / (1024*1024)))
if l2_pg_per_app < l2_pg_need :
Expand Down

0 comments on commit c7dfbda

Please sign in to comment.