Bug#584846: Detects only 64MB and fails to boot on Intel Green City board if e820 hooked by GRUB2

Josh Triplett josh at joshtriplett.org
Tue Jun 22 05:22:47 UTC 2010


On Sat, Jun 12, 2010 at 05:16:27PM -0700, H. Peter Anvin wrote:
> On 06/12/2010 05:07 PM, Josh Triplett wrote:
> > On Sat, Jun 12, 2010 at 04:02:44PM -0700, H. Peter Anvin wrote:
> >> On 06/12/2010 03:26 PM, Josh Triplett wrote:
> >>>
> >>> Everything looks identical except for the region GRUB hooked right below
> >>> the first reserved region; the unhooked version has available memory
> >>> from 0-0x9cbf0, and the hooked version has available memory from
> >>> 0-0x9cba0, then reserved from 0x9cba0-0x9cbec, then 4 bytes of available
> >>> memory, and then the same reserved region as before.
> >>
> >> Actually... are both these done by chainloading Grub (with and without
> >> mapping), or is the unhooked done without chainloading Grub at all?
> >>
> >> To me it looks like something is chaining INT 15h even in the
> >> "unchained" case...
> > 
> > The "unhooked" case still chainloaded from GRUB, just without calling
> > drivemap and thus without hooking anything.  I can test without
> > chainloading from GRUB, though to the best of my knowledge GRUB doesn't
> > hook int 15 unless it needs to intercept e820 (and e801 and 88).
> > 
> > - Josh Triplett
> 
> Well *something* is... and it might not be Grub but one of the expansion
> ROMs.  If so, the problem is probably Grub stepping on the expansion ROM
> by not honoring FBM.

Actually, it turns out that I didn't have GRUB configured the way I
thought I did.  The version I used for the "unhooked" screenshot I sent
actually had some commands in its grub.cfg that triggered some memory
reservation and an e820 hook.

I've re-checked this time and used a clean GRUB with no configuration
file, and grabbed three meminfo screenshots: booting syslinux directly,
booting GRUB and chainloading syslinux without using drivemap, and
booting GRUB and chainloading syslinux after using drivemap.

The first two look identical, with INT15's address looking somewhat
saner this time.  The third shows GRUB's additional reserved memory,
with INT15 pointing into that area.  So, that hopefully rules out crazy
expansion ROMs and similar, though I appreciate you trying to come up
with a consistent theory from my previous inconsistent data. :)

Which leaves me with the original problem: if GRUB hooks e820, Linux
from commit c549e71d073a6e9a4847497344db28a784061455 onward, up to and
including current v2.6.35-rc3, will detect only 64MB of memory, because
it refuses to use e820 or e801 and only uses 88.

How might I diagnose this further?  What might cause Linux to refuse to
use the e820 and e801 results provided by GRUB, but accept the ones
provided by the BIOS?

Thanks,
Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: meminfo-no-grub.jpg
Type: image/jpeg
Size: 1207542 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20100621/f9c9a070/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: meminfo-grub-chainloaded-no-hook.jpg
Type: image/jpeg
Size: 1157538 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20100621/f9c9a070/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: meminfo-grub-drivemap-e820-hook.jpg
Type: image/jpeg
Size: 1083570 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20100621/f9c9a070/attachment-0005.jpg>


More information about the Pkg-grub-devel mailing list