xen/arm: arm64: Update the Image header
PATCH v3 1/1 xen/arm: arm64: Update the Image header
According to Linux Kernel, Documentation/arm64/booting.txt "
When image_size is zero, a bootloader should attempt to keep as much memory as possible free for use by the kernel immediately after the end of the kernel image. The amount of space required will vary depending on selected features, and is effectively unbound. "
This will consumes some memory and time, for example, When booting xen from U-Boot, U-Boot will use the image size info. Because this information is lacked in XEN image,U-Boot assume the image size is 16MB to memmove, which will cost lots time on simulation platform.
The flags field is also filled with value 0xA,
Bit3(physical placement): 1 Bit2-1(Page size): 1 Bit0(endianness): 0
---
V3:
Drop the image.h macros.h from Linux, included in V2. Only update image size and flags entry. offset was kept 0 as before. Only little endian supported.
V2:
According to Linux Kernel, a2c1d73b94ed49 "arm64: Update the Image header", included unneccessary stuff.
xen/arch/arm/arm64/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/arm/arm64/head.S +2 -2
@@ -115,8 +115,8 @@ efi_head: add x13, x18, #0x16 b real_start /* branch to kernel start */ .quad 0 /* Image load offset from start of RAM */ - .quad 0 /* reserved */ - .quad 0 /* reserved */ + .quad _end - start /* Effective size of kernel image, little-endian */ + .quad 0xa /* Informative flags(Physical placement 1, 4KB, LE), little-endian */ .quad 0 /* reserved */ .quad 0 /* reserved */ .quad 0 /* reserved */
Signature · 7 lines
2.6.6 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Hello Peng,
Quoted 13 lines · Peng Fan
According to Linux Kernel,
Documentation/arm64/booting.txt"
Whenimage_sizeis zero, a bootloader should attempt to keep as much memory as possible free for use by the kernel immediately after the end of the kernel image. The amount of space required will vary depending on selected features, and is effectively unbound. "
This will consumes some memory and time, for example, When booting xen from U-Boot, U-Boot will use the image size info. Because this information is lacked in XEN image,U-Boot assume the image size is 16MB to memmove, which will cost lots time on simulation platform.
Quoted 4 lines
The flags field is also filled with value
0xA,Bit3(physical placement): 1 Bit2-1(Page size): 1 Bit0(endianness): 0
Please explain in the commit message why those values and, for instance, not 0 for Bit3.
Quoted 23 lines
Signed-off-by Peng Fan <[email protected]>Cc Julien Grall <[email protected]>Cc Stefano Stabellini <[email protected]>---
V3:
Drop theimage.hmacros.hfrom Linux, included in V2. Only update image size and flags entry. offset was kept 0 as before. Only little endian supported.V2:
According to Linux Kernel,a2c1d73b94ed49"arm64: Update the Image header", included unneccessary stuff.xen/arch/arm/arm64/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)xen/arch/arm/arm64/head.S +0
-0
xen/arch/arm/arm64/head.S efi_head: · line 118
Quoted 6 lines
xen/arch/arm/arm64/head.S +1
-2@@ -115,8 +115,8 @@ efi_head: add x13, x18, #0x16 b real_start /* branch to kernel start */ .quad 0 /* Image load offset from start of RAM */ - .quad 0 /* reserved */ - .quad 0 /* reserved */ + .quad _end - start /* Effective size of kernel image, little-endian */
NIT: Please use _start here.
xen/arch/arm/arm64/head.S efi_head: · line 122
Quoted 5 lines
xen/arch/arm/arm64/head.S +1
-0+ .quad 0xa /* Informative flags(Physical placement 1, 4KB, LE), little-endian */ .quad 0 /* reserved */ .quad 0 /* reserved */ .quad 0 /* reserved */
Regards,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel