scripts: gen_mmu: Rectified MMU page table generation.
The script failed on certain corner cases. Whenever the memory region was falling on the PDE boundary, the glitch was causing incorrect PTE to be generated. JIRA: ZEP-2328 Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit is contained in:
parent
70e54f9ef7
commit
5ffffb86bf
1 changed files with 28 additions and 27 deletions
|
@ -132,7 +132,7 @@ def read_mmu_list_marshal_param():
|
|||
# in case where it overflows the currenty PDE's range then limit the
|
||||
# PTE to 1024 and so make the mem_size reflect the actual size taken up
|
||||
# in the current PDE
|
||||
if (region[1] + (pte_valid_addr_start * 4096) ) > (1024*4096):
|
||||
if (region[1] + (pte_valid_addr_start * 4096) ) >= (1024*4096):
|
||||
pte_valid_addr_end = 1024
|
||||
mem_size = ( (pte_valid_addr_end - pte_valid_addr_start)*4096)
|
||||
|
||||
|
@ -157,6 +157,7 @@ def read_mmu_list_marshal_param():
|
|||
# create all the extra PDEs needed to fit the requested size
|
||||
# this loop starts from the current pde till the last pde that is needed
|
||||
# the last pde is calcualted as the (start_addr + size) >> 22
|
||||
if overflow_size !=0:
|
||||
for extra_pde in range(pde_index+1, get_pde_number(
|
||||
region[0] + region[1])+1):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue