FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 06-12-2010, 09:45 PM
Josh Triplett
 
Default Bug#584846: Detects only 64MB and fails to boot on Intel Green City board if e820 hooked by GRUB2

On Sat, Jun 12, 2010 at 01:41:38PM -0700, H. Peter Anvin wrote:
> On 06/12/2010 11:55 AM, Josh Triplett wrote:
> >>
> >> It's kind of hard to know what is involved, since clearly it relates to
> >> Grub2, which -- how do I say this politely -- seems to excel at doing
> >> things in the most inferior way possible. This is a great example of that.
> >>
> >> The most likely reason it fails is because Grub2 uses ACPI 3-style reads
> >> of the board memory map, gets wrong results for the same reasons the
> >> kernel do, and then pass then downstream to the kernel. As such, there
> >> is absolutely nothing the kernel can do about it.
> >
> > grub2 doesn't do ACPI 3 reads; it always asks for 20 bytes, not 24.
> >
> > Also, note that it works with older Linux kernels (before the commit in
> > question) and fails with newer ones. That doesn't rule out the
> > possibility of a grub bug instead of a Linux bug, but since older Linux
> > somehow coped with the situation, it seems like a regression that newer
> > Linux cannot cope.
> >
>
> It's a regression of sorts, sure; but the new Linux code also boots on
> real hardware which it didn't boot before. Since this requires Grub2
> plus specific hardware, it is hard for me to track down what the problem
> might be, but a good step on the way might be to use the Grub2 boot
> procedure (with the drive remapping) to chainboot Syslinux, and run
> meminfo.c32 which is a memory report debugging tool; it might be able to
> give some answers at least.

Will do.

- Josh Triplett



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100612214522.GA4994@feather">http://lists.debian.org/20100612214522.GA4994@feather
 
Old 06-12-2010, 11:01 PM
"H. Peter Anvin"
 
Default Bug#584846: Detects only 64MB and fails to boot on Intel Green City board if e820 hooked by GRUB2

On 06/12/2010 03:26 PM, Josh Triplett wrote:
>
> Done. I've attached the output of meminfo with the e820 hook as
> meminfo-grub-hooked.jpg, and without the e820 hook as
> meminfo-unhooked.jpg.
>
> 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.
>

The new reserved area that Grub hooks is located inside a FBM ("DOS
RAM") reserved area, so Grub is somehow using memory that someone else
has already reserved! The normal thing is to reserve something in FBM
and not in INT 15h if it is to be reserved only until the protected-mode
operating system starts, but in this case Grub puts something in there
which is a real-mode hook. It *will* have overwritten something at this
point, the question is just what (and I have no idea how to find that out.)

Note that the unmodified entry conditions (unhooked) has FBM quite a bit
lower than the reserved area. Something else that really confuses me is
that although the memory map has changed, the INT 15h vector itself is
still the same, so I'm really confused about how the actual hooking
happens in the first place...

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.




--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4C1411BD.5070308@zytor.com">http://lists.debian.org/4C1411BD.5070308@zytor.com
 
Old 06-12-2010, 11:02 PM
"H. Peter Anvin"
 
Default Bug#584846: Detects only 64MB and fails to boot on Intel Green City board if e820 hooked by GRUB2

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...

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.




--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4C141214.5050601@zytor.com">http://lists.debian.org/4C141214.5050601@zytor.com
 
Old 06-13-2010, 12:07 AM
Josh Triplett
 
Default Bug#584846: Detects only 64MB and fails to boot on Intel Green City board if e820 hooked by GRUB2

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



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100613000742.GA3469@feather">http://lists.debian.org/20100613000742.GA3469@feather
 
Old 06-13-2010, 12:16 AM
"H. Peter Anvin"
 
Default Bug#584846: Detects only 64MB and fails to boot on Intel Green City board if e820 hooked by GRUB2

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.

-hpa


--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.




--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4C14235B.7030605@zytor.com">http://lists.debian.org/4C14235B.7030605@zytor.com
 

Thread Tools




All times are GMT. The time now is 04:28 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org