bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62925] Out of memory error initializing graphics on some Apple M1


From: Hector Martin
Subject: [bug #62925] Out of memory error initializing graphics on some Apple M1 systems
Date: Sat, 20 Aug 2022 07:32:44 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?62925>

                 Summary: Out of memory error initializing graphics on some
Apple M1 systems
                 Project: GNU GRUB
               Submitter: marcan
               Submitted: Sat 20 Aug 2022 11:32:41 AM UTC
                Category: Booting
                Severity: Major
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: Git master
                 Release: 
         Discussion Lock: Any
         Reproducibility: Every Time
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sat 20 Aug 2022 11:32:41 AM UTC By: Hector Martin <marcan>
As of grub-2:2.06.r297.g0c6c1aff2-1-aarch64 as packaged by Arch Linux ARM
(which is vanilla grub as of that git revision, other than grub.d patches and
trivial packaging-related changes), initializing graphics fails on Apple M1
Pro MacBook 14" systems, and probably others, with an out of memory error.
This leads to a degraded text console with broken menu graphic characters.
This didn't happen with the previous package (grub-2.06.r261.g2f4430cc0-1).

The open source boot stack on these systems uses U-Boot as an EFI services
provider. It seems GRUB is simply running out of heap as of recent changes.
This trivial patch fixes it:


diff -urN grub-core/kern/efi/mm.c grub-core/kern/efi/mm.c
--- grub-core/kern/efi/mm.c     2022-08-20 20:17:23.975902981 +0900
+++ grub-core/kern/efi/mm.c     2022-08-20 20:17:16.268139945 +0900
@@ -39,7 +39,7 @@
 #define MEMORY_MAP_SIZE        0x3000
 
 /* The default heap size for GRUB itself in bytes.  */
-#define DEFAULT_HEAP_SIZE      0x100000
+#define DEFAULT_HEAP_SIZE      0x200000
 
 static void *finish_mmap_buf = 0;
 static grub_efi_uintn_t finish_mmap_size = 0;









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62925>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]