Skip to content

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

Open
axel-h wants to merge 2 commits intoseL4:masterfrom
Hensoldt-Cyber:patch-axel-26a
Open

libsel4vmmplatsupport: use vm->entry for zImage also#94
axel-h wants to merge 2 commits intoseL4:masterfrom
Hensoldt-Cyber:patch-axel-26a

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 requested a review from chrisguikema March 21, 2023 01:38
@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 <axel.heider@hensoldt.net>
- Remove hard coded address here also.
- Add comment about zImage usage in Linux

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
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

Comments