Skip to contentSkip to conversation

arm64/xen: Consider alignment calling grub_arch_efi_linux_boot_image

PATCH New Frediano Ziglio via Grub-devel 1 participant 1 message Jul 7, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm64/xen: Consider alignment calling grub_arch_efi_linux_boot_image

The Xen image is loaded alignment, not always at "start".

---
Changes since v1:
- indentation changes

---
 grub-core/loader/arm64/xen_boot.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
grub-core/loader/arm64/xen_boot.c +5 -3
index 8db1d9db0..0d53bc7fe 100644
@@ -247,13 +247,15 @@ fail:
 static grub_err_t
 xen_boot (void)
 {
+  grub_addr_t start;
+
   grub_err_t err = finalize_params_xen_boot ();
   if (err)
     return err;
 
-  return grub_arch_efi_linux_boot_image (xen_hypervisor->start,
-					  xen_hypervisor->size,
-					  xen_hypervisor->cmdline);
+  start = xen_boot_address_align (xen_hypervisor->start, xen_hypervisor->align);
+  return grub_arch_efi_linux_boot_image (start, xen_hypervisor->size,
+					 xen_hypervisor->cmdline);
 }
 
 static void
Signature · 7 lines
2.43.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel