Re: [Xen-devel] [PATCH V3] xen/arm: arm64: Update the Image header

2016-09-16 Thread Julien Grall

Hello Peng,

On 12/09/2016 11:43, Peng Fan wrote:

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


Please explain in the commit message why those values and, for instance, 
not 0 for Bit3.




Signed-off-by: Peng Fan 
Cc: Julien Grall 
Cc: Stefano Stabellini 
---

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(-)

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 91e2817..2cd3699 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -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.


+   .quad   0xa  /* Informative flags(Physical placement 1, 
4KB, LE), little-endian */
 .quad   0/* reserved */
 .quad   0/* reserved */
 .quad   0/* reserved */



Regards,

--
Julien Grall

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH V3] xen/arm: arm64: Update the Image header

2016-09-12 Thread Peng Fan
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

Signed-off-by: Peng Fan 
Cc: Julien Grall 
Cc: Stefano Stabellini 
---

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(-)

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 91e2817..2cd3699 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -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 */
-- 
2.6.6


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel