[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC 1/1] mkimage: revert "Align efi sections on 4k boundary"
From: |
Heinrich Schuchardt |
Subject: |
[RFC 1/1] mkimage: revert "Align efi sections on 4k boundary" |
Date: |
Wed, 17 Apr 2019 07:50:09 +0200 |
Since this commit a51f953f4ee8 ("mkimage: Align efi sections on 4k
boundary") grubarm.efi crashes. Let's revert it.
a51f953f4ee8 ("mkimage: Align efi sections on 4k boundary")
Signed-off-by: Heinrich Schuchardt <address@hidden>
---
As Alexander Graf pointed out in a private mail without his patch
Qcom ARM notebooks did not work. So I am sending this as an RFC.
---
include/grub/efi/pe32.h | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h
index 0ed8781f0..d1359eb66 100644
--- a/include/grub/efi/pe32.h
+++ b/include/grub/efi/pe32.h
@@ -20,7 +20,6 @@
#define GRUB_EFI_PE32_HEADER 1
#include <grub/types.h>
-#include <grub/efi/memory.h>
/* The MSDOS compatibility stub. This was copied from the output of
objcopy, and it is not necessary to care about what this means. */
@@ -51,14 +50,8 @@
/* According to the spec, the minimal alignment is 512 bytes...
But some examples (such as EFI drivers in the Intel
Sample Implementation) use 32 bytes (0x20) instead, and it seems
- to be working.
-
- However, there is firmware showing up in the field now with
- page alignment constraints to guarantee that page protection
- bits take effect. Because currently existing GRUB code can not
- properly distinguish between in-memory and in-file layout, let's
- bump all alignment to GRUB_EFI_PAGE_SIZE. */
-#define GRUB_PE32_SECTION_ALIGNMENT GRUB_EFI_PAGE_SIZE
+ to be working. For now, GRUB uses 512 bytes for safety. */
+#define GRUB_PE32_SECTION_ALIGNMENT 0x200
#define GRUB_PE32_FILE_ALIGNMENT GRUB_PE32_SECTION_ALIGNMENT
struct grub_pe32_coff_header
--
2.20.1
- [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary",
Heinrich Schuchardt <=
- Re: [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary", Colin Watson, 2019/04/17
- Re: [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary", Daniel Kiper, 2019/04/18
- Re: [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary", Heinrich Schuchardt, 2019/04/18
- Re: [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary", Julien ROBIN, 2019/04/18
- Re: [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary", Heinrich Schuchardt, 2019/04/18
- Re: [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary", Julien ROBIN, 2019/04/19
- Re: [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary", Jesús Diéguez Fernández, 2019/04/19
- Re: [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary", John Paul Adrian Glaubitz, 2019/04/19
- Re: [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary", Daniel Kiper, 2019/04/23
- Re: [RFC 1/1] mkimage: revert "Align efi sections on 4k boundary", Daniel Kiper, 2019/04/19