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

From: H. Peter Anvin
Date: Thu Jun 24 2010 - 16:58:51 EST


On 06/24/2010 12:01 PM, Josh Triplett wrote:
> On Thu, Jun 24, 2010 at 07:18:34AM -0700, H. Peter Anvin wrote:
>> On 06/24/2010 12:27 AM, Josh Triplett wrote:
>>> The following patch fixes GRUB; with this patch, I can reserve memory
>>> (such as with drivemap), boot 2.6.35-rc3 successfully, and it detects
>>> all of my RAM.
>>
>> Congratulations! You have just committed the single most common BIOS
>> implementation bug. (Sorry for the sarcasm, but this seems to be a bug
>> that almost everyone who tries to implement BIOS makes at one point or
>> another... even the original IBM BIOS had it in at least one place.)
>
> And a rather large number of sample interrupt code found on the web,
> including the e820 hook from the version of gPXE/Etherboot that I used
> as an example. :) Given that I just tested against Linux, which very
> carefully works around that particular BIOS bug, I didn't run into any
> issue.
>
> So, how high does GRUB's bug ("stc ; iret"/"clc ; iret") rank on the
> list of common BIOS implementation bugs?
>

Less common, since that one is apparently more obvious to people (you
only have to think one step ahead instead of two steps ahead.)

There is a reason Linux works around this and similar bugs... it truly
is extremely common (and does cause real problems in real code.)

-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/