0136-util-mkimage-Always-use-grub_host_to_target32-to-ini.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From ae8936f9c375e1a38129e85a1b5d573fb451f288 Mon Sep 17 00:00:00 2001
  2. From: Peter Jones <pjones@redhat.com>
  3. Date: Mon, 15 Feb 2021 14:14:24 +0100
  4. Subject: [PATCH] util/mkimage: Always use grub_host_to_target32() to
  5. initialize PE stack and heap stuff
  6. This change does not impact final result of initialization itself.
  7. However, it eases PE code unification in subsequent patches.
  8. Signed-off-by: Peter Jones <pjones@redhat.com>
  9. Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
  10. Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
  11. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
  12. ---
  13. util/mkimage.c | 8 ++++----
  14. 1 file changed, 4 insertions(+), 4 deletions(-)
  15. diff --git a/util/mkimage.c b/util/mkimage.c
  16. index 02944f2..b94bfb7 100644
  17. --- a/util/mkimage.c
  18. +++ b/util/mkimage.c
  19. @@ -1351,10 +1351,10 @@ grub_install_generate_image (const char *dir, const char *prefix,
  20. o->subsystem = grub_host_to_target16 (GRUB_PE32_SUBSYSTEM_EFI_APPLICATION);
  21. /* Do these really matter? */
  22. - o->stack_reserve_size = grub_host_to_target64 (0x10000);
  23. - o->stack_commit_size = grub_host_to_target64 (0x10000);
  24. - o->heap_reserve_size = grub_host_to_target64 (0x10000);
  25. - o->heap_commit_size = grub_host_to_target64 (0x10000);
  26. + o->stack_reserve_size = grub_host_to_target32 (0x10000);
  27. + o->stack_commit_size = grub_host_to_target32 (0x10000);
  28. + o->heap_reserve_size = grub_host_to_target32 (0x10000);
  29. + o->heap_commit_size = grub_host_to_target32 (0x10000);
  30. o->num_data_directories
  31. = grub_host_to_target32 (GRUB_PE32_NUM_DATA_DIRECTORIES);
  32. --
  33. 2.14.2