bugGNU GRUB - Bugs: bug #61148, cutmem not wokring on old machines

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #61148: cutmem not wokring on old machines

Submitter:  Alexey Kuznetsov <axet>
Submitted:  Sun 12 Sep 2021 09:34:02 AM UTC
   
 
Category:  None Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release:  2.00
Release:  Reproducibility:  None
Planned Release:  None

Wed 03 Nov 2021 11:40:59 AM UTC, comment #4: 

GRUB_TERMINAL=console

makes gurb2 works fast!

Alexey Kuznetsov <axet>
Thu 16 Sep 2021 06:55:55 AM UTC, comment #3: 

My guess was limit 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 same memory map does not fix grub 'slow down' issue?

Alexey Kuznetsov <axet>
Sun 12 Sep 2021 09:46:03 AM UTC, comment #2: 

I forget to mention 'grub-legacy' works fine, not slowdowns!

Alexey Kuznetsov <axet>
Sun 12 Sep 2021 09:40:57 AM UTC, comment #1: 
Alexey Kuznetsov <axet>
Sun 12 Sep 2021 09:34:02 AM UTC, original submission:  

Hello!

My old notebook has memory issues and requires to cut memory region to work propertly.

From kernel perspective it looks like this:

[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000007f73ffff] usable
[    0.000000] BIOS-e820: [mem 0x000000007f740000-0x000000007f74ffff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000007f750000-0x000000007f7fffff] ACPI NVS
[    0.000000] e820: remove [mem 0x7e400000-0xfffffffffffffffe] usable
[    0.000000] Notice: NX (Execute Disable) protection missing in CPU!
[    0.000000] user-defined physical RAM map:
[    0.000000] user: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] user: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] user: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] user: [mem 0x0000000000100000-0x000000007e3fffff] usable
[    0.000000] user: [mem 0x000000007f740000-0x000000007f74ffff] ACPI data
[    0.000000] user: [mem 0x000000007f750000-0x000000007f7fffff] ACPI NVS

If this region is not removed my notebook works SUPER slow and every click takes few seconds to process. Same affects grub2. If region in use grub2 takes 2 minutes to boot into kernel. I recorded youtube video:

https://youtu.be/BlTii6QL5oY

I know grub2 has a 'cutmem' command which is not working propertly. When I issue a:

'cutmem 0x7e40000 0x7f74ffff'

grub2 reports no changes is 'lsmmap' which is not correct. I tested 'cutmem' on my second notebook with efi loader, and cutmem affects 'lsmmap' output.

Here a few screenshots of grub2 boot process attached.

Alexey Kuznetsov <axet>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #51901:  2021-09-13@11.41.13.jpg added by axet (1MiB - image/jpeg - corrent 'cutmem 0x7e400000 0x7f73ffff)
file #51896:  2021-09-12@12.20.38.jpg added by axet (1MiB - image/jpeg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by axet (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-09-13 axet Attached File- Added 2021-09-13@11.41.13.jpg, #51901
    2021-09-12 axet Attached File- Added 2021-09-12@12.20.38.jpg, #51896

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code