#994175 grub2 cutmem not working propertly

Package:
grub2
Source:
grub2
Description:
GRand Unified Bootloader, version 2 (dummy package)
Submitter:
Date:
2021-09-13 19:57:04 UTC
Severity:
normal
#994175#5
Date:
2021-09-13 08:06:29 UTC
From:
To:
Dear Maintainer,

Hello!

My old notebook has memory issues and requires to cut last 20M memory region to work propertly (no matter how much installed 1G or 2G I had to cut last 20M)

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 0x7f73ffff'

grub2 reports no change in 'lsmmap' output, which is not correct! I tested 'cutmem' on my second notebook with efi loader, and cutmem affects 'lsmmap' output with 'BADRAM regions' printed out.

fast logs:

https://linux-hardware.org/?probe=59b41381ed

slow logs:

https://linux-hardware.org/?probe=28a5b48a05

'grub-legacy' works fine, no slow downs!

I report it on grub2 bug tracker with no response:

https://savannah.gnu.org/bugs/index.php?61148

#994175#10
Date:
2021-09-13 12:50:20 UTC
From:
To:
I've tested my second laptop with grub in bios and efi modes.

Grub2 with bios boot also fails to use 'cutmem' command with 'overflow
detected'.

Same region under efi boot more works fine!

It is possible here is a cutmem bug under bios boot mode.

#994175#15
Date:
2021-09-13 19:52:13 UTC
From:
To:
duplicate of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994172