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

libsel4vmmplatsupport: use vm->entry for zImage also #94

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

Conversation

axel-h
Copy link
Member

@axel-h axel-h commented Mar 21, 2023

This is a follow-up from the change introduced by #81

  • Remove hard coded fall-back address for zImage also.
  • inline zImage_get_load_address(), so things get a bit simpler .
  • Add comment about zImage usage in Linux. Seems it's 32-bit only anyway.

@axel-h axel-h force-pushed the patch-axel-26a branch 2 times, most recently from 37d9a5b to e587fd8 Compare March 21, 2023 02:06
@axel-h
Copy link
Member Author

axel-h commented Mar 30, 2023

To me, the vm->entry usage seems quite strange. Loading behavior of the kernel depends on the image type:

  • for a binary, the parameter load_base_addr is ignores and the blob is loaded vm->entry. That seem the only way how things work in AARCH64
  • a zImage (which practically exists for AARCH32 only), load_base_addr is also ignored and the address from the header is used. Or, if this is zero, it falls back to vm->entry with this PR (before it was indeed load_base_addr + offset then.),

So it seems vm->entry is slightly misused in what we have currently? Looks like there should be a vm->kernel_addr also that must be given in case the kernel is a raw binary.

@axel-h axel-h marked this pull request as draft April 20, 2023 19:51
@axel-h axel-h marked this pull request as ready for review April 20, 2023 22:39
@axel-h
Copy link
Member Author

axel-h commented Apr 20, 2023

With the changes of this PR it seems we don't really need 'vm.entry' that 58dc282 recently added (#81). We should instead pass the value in load_base_addr, as this parameter has been practically unused. That would nicely simplify things then.

Axel Heider added 2 commits May 30, 2023 13:34
This make it easier to understand what is really happening.

Signed-off-by: Axel Heider <[email protected]>
- Remove hard coded address here also.
- Add comment about zImage usage in Linux

Signed-off-by: Axel Heider <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant