summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichal Orzel <michal.orzel@amd.com>2023-02-02 09:49:05 +0100
committerJulien Grall <jgrall@amazon.com>2023-02-08 13:57:57 +0000
commit6d317b10f8e4cbc8092c00ce462d79f13e3ca4f6 (patch)
treea00def48b96bea779d90b877d4461f79f59d0353 /docs
parent3da5c20cd9223ae122611270bdf25cb29fd9c42a (diff)
downloadxen-6d317b10f8e4cbc8092c00ce462d79f13e3ca4f6.tar.gz
xen/arm: Add support for booting gzip compressed uImages
At the moment, Xen does not support booting gzip compressed uImages. This is because we are trying to decompress the kernel before probing the u-boot header. This leads to a failure as the header always appears at the top of the image (and therefore obscuring the gzip header). Move the call to kernel_uimage_probe before kernel_decompress and make the function self-containing by taking the following actions: - take a pointer to struct bootmodule as a parameter, - check the comp field of a u-boot header to determine compression type, - in case of compressed image, call kernel_decompress passing uImage header size as an offset to gzip header, - set up zimage.{kernel_addr,len} accordingly, - return -ENOENT in case of a u-boot header not found to distinguish it amongst other return values and make it the only case for falling through to try to probe other image types. Modify kernel_decompress to take an additional parameter being an offset to a gzip header from start address. This is needed so that a function can first operate on a region containing actually compressed kernel (in case of compressed uImage, size of u-boot header is an offset to a gzip header) and then at the end pass the entire region (as it was before taking an offset into account) to fw_unreserved_regions for freeing. This approach avoids splitting the uImage probing into 2 stages (executed before and after decompression) which otherwise would be necessary to properly parse header, update boot module start and size before decompression and update zimage.{kernel_addr,len} afterwards. Remove the limitation from the booting.txt documentation. Signed-off-by: Michal Orzel <michal.orzel@amd.com> Reviewwed-by: Julien Grall <jgrall@amazon.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/misc/arm/booting.txt3
1 files changed, 0 insertions, 3 deletions
diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt
index bd7bfe7f28..02f7bb65ec 100644
--- a/docs/misc/arm/booting.txt
+++ b/docs/misc/arm/booting.txt
@@ -50,9 +50,6 @@ Also, it is to be noted that if user provides the legacy image header on
top of zImage or Image header, then Xen uses the attributes of legacy
image header to determine the load address, entry point, etc.
-Known limitation: compressed kernels with a uboot headers are not
-working.
-
Firmware/bootloader requirements
--------------------------------