Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 188312 - sys-boot/grub-0.97 doesn't find the right memorysize
Summary: sys-boot/grub-0.97 doesn't find the right memorysize
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-10 09:48 UTC by Dominik Zajac
Modified: 2008-03-25 06:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Zajac 2007-08-10 09:48:58 UTC
Grub don't get the right size of memory on some sytems. So if you are using XEN you are not able to address the real physical memory size.

BUGREPORT from Robert A. Klahn:

Description of problem:

Sometimes, grub does not recognize the entire e820 memory map, when the map is
not provided by the BIOS in the multiboot information data structure.
Ultimately, this appears to be an over-optimization by the compiler when
building grub, in combination with buggy BIOS.

The result is that some downstream kernels (in my particular case, the Xen
kernel) does not recognize all the memory available on a system.

Version-Release number of selected component (if applicable):

grub-0.97-13

How reproducible:

From the lack of discussion on the Fedora and Xen mailing lists, I presume this
problem is rare in the real world, and may be hard to reproduce.

The machine this happens on for me is has two Dual-Core AMD Opteron 2210 w/16GB
of memory, using an American Megatrends BIOS. Upon boot on an unpatched grub,
Xen only recognizes slightly less than 4GB. The Multiboot information data
structure has flag for the mem_lower/mem_upper fields set (and Xen memory
detection matches the values in these fields), and does not have the flag for
memory map set. 

Patch to fix problem:

--- grub-0.97/stage2/common.c.e820      2007-07-30 11:36:19.000000000 -0800    
                            
+++ grub-0.97/stage2/common.c           2007-07-30 11:36:55.000000000 -0800    
                            
@@ -142,6 +142,7 @@
 init_bios_info (void)                                                         
                            
 {                                                                             
                            
 #ifndef STAGE1_5                                                              
                            
-  unsigned long cont, memtmp, addr;                                           
                            
+  unsigned long memtmp, addr;                                                 
                            
+  volatile unsigned long cont;                                                
                            
   int drive;                                                                  
                            
 #endif

Reproducible: Always




It is importan for XEN to work
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-08-10 10:51:02 UTC
Looks like Bug 99897
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-03-25 06:21:51 UTC
In -r5, please test it from package.mask.