forked from xen-project/xen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xen/arm: Probe the load/entry point address of an uImage correctly
Currently, kernel_uimage_probe() does not read the load/entry point address set in the uImge header. Thus, info->zimage.start is 0 (default value). This causes, kernel_zimage_place() to treat the binary (contained within uImage) as position independent executable. Thus, it loads it at an incorrect address. The correct approach would be to read "uimage.load" and set info->zimage.start. This will ensure that the binary is loaded at the correct address. Also, read "uimage.ep" and set info->entry (ie kernel entry address). If user provides load address (ie "uimage.load") as 0x0, then the image is treated as position independent executable. Xen can load such an image at any address it considers appropriate. A position independent executable cannot have a fixed entry point address. This behavior is applicable for both arm32 and arm64 platforms. Earlier for arm32 and arm64 platforms, Xen was ignoring the load and entry point address set in the uImage header. With this commit, Xen will use them. This makes the behavior of Xen consistent with uboot for uimage headers. Users who want to use Xen with statically partitioned domains, can provide non zero load address and entry address for the dom0/domU kernel. It is required that the load and entry address provided must be within the memory region allocated by Xen. A deviation from uboot behaviour is that we consider load address == 0x0, to denote that the image supports position independent execution. This is to make the behavior consistent across uImage and zImage. Signed-off-by: Ayan Kumar Halder <[email protected]> [stefano: minor doc improvement] Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Stefano Stabellini <[email protected]>
- Loading branch information
1 parent
10b80ee
commit 78e93e6
Showing
3 changed files
with
90 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters