Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove fudge factor from shoehorn #158

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kent-mcleod
Copy link
Member

Correct the calculated memory needed to load an elf image. Using only
the p_memsz value ignores gaps between segments; instead calculate the
first+last addresses using p_vaddr & p_memsz.

As get_memory_usage in elf_sift.py now can calculate correct memory
usage from a list of ELF segments, a more accurate upper bound on
memory usage for the loaded apps is possible and the old fudge
factor is no longer needed.

Thanks to @sleffler for the patch.

sleffler and others added 2 commits March 13, 2023 13:47
Correct the calculated memory needed to load an elf image. Using only
the p_memsz value ignores gaps between segments; instead calculate the
first+last addresses using p_vaddr & p_memsz.
As get_memory_usage in elf_sift.py now can calculate correct memory
usage from a list of ELF segments, a more accurate upper bound on
memory usage for the loaded apps is possible and the old fudge
factor is no longer needed.
@kent-mcleod kent-mcleod added hw-build enable all sel4test hardware builds hw-test enable sel4test hardware builds + runs labels Mar 13, 2023
@kent-mcleod
Copy link
Member Author

There are some errors that I'll try and track down. The Elfloader is reporting that the loaded regions are all exclusive, however there appears to be consistent hanging before executing the kernel in some cases.

  ELF-loader started on CPU: ARM Ltd. Cortex-A53 r0p4
    paddr=[64b000..b5d117]
  No DTB passed in from boot loader.
  Looking for DTB in CPIO archive...found at 7c9528.
  Loaded DTB from 7c9528.
     paddr=[250000..254fff]
  ELF-loading image 'kernel' to 0
    paddr=[0..24ffff]
    vaddr=[ffffff8000000000..ffffff800024ffff]
    virt_entry=ffffff8000000000
  ELF-loading image 'sel4test-driver' to 255000
    paddr=[255000..64afff]
    vaddr=[400000..7f5fff]
    virt_entry=40e548
  Boot cpu id = 0x0, index=0
  
  [[Timeout]]
  None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hw-build enable all sel4test hardware builds hw-test enable sel4test hardware builds + runs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants