Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
elfloader: fixup load from stack on aarch64
It seems that the 'ldp x0, x1, [sp, #-16]!' syntax used to load the registers stored to the stack before calling the fixup_image_base function does not in fact load the registers as expected (at least on my Raspberry Pi 3B). This causes the dtb address supplied by the bootloader to be lost when elfloader loads the dtb image which is an issue if a dtb is not built into the kernel binary image. In the example usage from arm (https://developer.arm.com/documentation/ 102374/0101/Loads-and-stores---load-pair-and-store-pair) the 'ldp x0, x1, [sp], #16' is used for poping the stack. This also seems to also work as expected on my Raspberry Pi 3B resulting in the dtb address to be loaded as expected in sys_boot.c. Signed-off-by: Viktor Sannum <[email protected]>
- Loading branch information