Bug 465784 - grub doesn't recognize memory past 3.2GB
grub doesn't recognize memory past 3.2GB
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: grub (Show other bugs)
5.2
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Václav Pavlín
Release Test Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-06 08:38 EDT by Dave Cabot
Modified: 2013-03-21 09:34 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-21 09:34:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dave Cabot 2008-10-06 08:38:02 EDT
Description of problem:  Installed 4.0GB of memory, but the x86_64 OS isn't seeing more than 3.2GB.  Noted that the problem is in grub.


Version-Release number of selected component (if applicable):
0.97-13, although I also tried a modified version of 0.97-14 and 0.97-27.  No luck.


How reproducible:  Using an Intel D945GCNL motherboard install 4.0GB of memory or more and install RH or CentOS 5.2.  Stop grub on the selection page, go to command line and type in displaymem.  Only 3.2GB will report.


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:  Many others have seen this and considered it a problem in the kernel.  It's not, although it seems that the problem does not exist within kernal-PAE.  Since I'm running x86_64, that's not an option.
Comment 1 Vadym Chepkov 2011-09-18 21:29:08 EDT
It has been open for 3 years and it is still issue in 5.7. Any hope it will be fixed?
Comment 2 Vladimir Serbinenko 2012-08-01 15:29:49 EDT
Sounds like a known BIOS bug: you need to zero-out the buffer before calling e820:
=== modified file 'stage2/builtins.c'
--- stage2/builtins.c	2009-12-07 12:39:54 +0000
+++ stage2/builtins.c	2012-08-01 19:28:56 +0000
@@ -901,6 +901,7 @@
 {
   if (get_eisamemsize () != -1)
     grub_printf (" EISA Memory BIOS Interface is present\n");
+  grub_memset ((char *) SCRATCHADDR, 0, 40);
   if (get_mmap_entry ((void *) SCRATCHADDR, 0) != 0
       || *((int *) SCRATCHADDR) != 0)
     grub_printf (" Address Map BIOS Interface is present\n");

=== modified file 'stage2/common.c'
--- stage2/common.c	2004-03-27 17:02:54 +0000
+++ stage2/common.c	2012-08-01 19:28:44 +0000
@@ -180,6 +180,7 @@
 
   do
     {
+      grub_memset ((char *) addr, 0, 40);
       cont = get_mmap_entry ((void *) addr, cont);
 
       /* If the returned buffer's length is zero, quit. */
Comment 3 Vadym Chepkov 2012-08-04 19:50:24 EDT
Applied the fix, installed rpm, ran grub-install

Issue still present:

# grep MemTotal /proc/meminfo 
MemTotal:      3112880 kB

(1M is taken by video-adapter)

Redhat 5.8
Comment 4 Václav Pavlín 2013-03-21 09:34:59 EDT
This bug would probably need quite extensive changes in code, which are not desired in this late phase of RHEl-5 release cycle. Closing wontfix.

Note You need to log in before you can comment on or make changes to this bug.