Bug#994172: patch, did't work

Alexey Kuznetsov kuznetsov.alexey at gmail.com
Thu Sep 16 07:57:40 BST 2021


My guess was to limit the memory map returned by e820 by size of 20M
manually. So, I did patch grub source code with following:


diff --git a/grub-core/kern/i386/pc/mmap.old b/grub-core/kern/i386/pc/mmap.c
index c0c3c35..0eb76d9 100644
--- a/grub-core/kern/i386/pc/mmap.old
+++ b/grub-core/kern/i386/pc/mmap.c
@@ -134,6 +134,10 @@ grub_get_mmap_entry (struct grub_machine_mmap_entry
*entry,
   else
     entry->size = regs.ecx;

+  if (entry->addr == 0x0000000000100000) {
+    entry->len -= 0x1340000;
+  }
+
   /* return the continuation value */
   return regs.ebx;
 }


But that did not succeed. Grub still works slowly. Does anyone know why
kernel with 'mem=2020M' argument works fast, and the same memory map does
not fix grub 'slow down' issue?

-- AK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grub-devel/attachments/20210916/7dd562b0/attachment.htm>


More information about the Pkg-grub-devel mailing list