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