Skip to contentSkip to conversation

arm64: head: Fill image size

PATCH In review Peng Fan 2 participants 3 messages Aug 16, 2016 – Aug 19, 2016

lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/1 arm64: head: Fill image size

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.

Cc Stefano Stabellini <[email protected]>
Cc Julien Grall <[email protected]>
---
 xen/arch/arm/arm64/head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/arm64/head.S +1 -1
index 91e2817..9fade07 100644
@@ -115,7 +115,7 @@ 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   _end - start         /* Effective size of Image, little-endian */
         .quad   0                    /* reserved */
         .quad   0                    /* reserved */
         .quad   0                    /* reserved */
Signature · 7 lines
2.6.2


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw

Hello Peng,

Quoted 4 lines · Peng Fan

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 patch looks good to me, however I would prefer if you update all the header rather than updating only the field you care.

You can give a look to commit a2c1d73b94ed49f5fac12e95052d7b140783f800 "arm64: Update the Image header" in Linux for more details.

Regards,

Quoted 22 lines
Cc Stefano Stabellini <[email protected]>
Cc Julien Grall <[email protected]>
---
 xen/arch/arm/arm64/head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/arm64/head.S +1 -1
index 91e2817..9fade07 100644
@@ -115,7 +115,7 @@ 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   _end - start         /* Effective size of Image, little-endian */
         .quad   0                    /* reserved */
         .quad   0                    /* reserved */
         .quad   0                    /* reserved */
Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#2 lore raw

Hi Julien,

Quoted 8 lines · Julien Grall

Hello Peng,

Quoted 4 lines · Peng Fan

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 5 lines

The patch looks good to me, however I would prefer if you update all the header rather than updating only the field you care.

You can give a look to commit a2c1d73b94ed49f5fac12e95052d7b140783f800 "arm64: Update the Image header" in Linux for more details.

Thanks for comments. Will do this in V2.

Thanks,
Peng.

Quoted 11 lines

Regards,

Quoted 8 lines
Cc Stefano Stabellini <[email protected]>
Cc Julien Grall <[email protected]>

---
xen/arch/arm/arm64/head.S | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 17 lines
Quoted 14 lines
xen/arch/arm/arm64/head.S +1 -1
index 91e2817..9fade07 100644
@@ -115,7 +115,7 @@ 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   _end - start         /* Effective size of Image, little-endian */
        .quad   0                    /* reserved */
        .quad   0                    /* reserved */
        .quad   0                    /* reserved */
Signature · 1 line
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel