[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D3E29A8.7030209@google.com>
Date: Mon, 24 Jan 2011 17:38:48 -0800
From: Mike Waychison <mikew@...gle.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
CC: Greg KH <greg@...ah.com>, torvalds@...ux-foundation.org,
San Mehat <san@...gle.com>, Aaron Durbin <adurbin@...gle.com>,
Duncan Laurie <dlaurie@...gle.com>,
linux-kernel@...r.kernel.org, Tim Hockin <thockin@...gle.com>
Subject: Re: [PATCH v1 4/6] driver: Google Bootlog
On 01/24/11 16:49, Alan Cox wrote:
>> +/*
>> + * Search for the BLOG pointer.
>> + */
>> +static struct bootlog_ptr * __init bootlog_find_pointer(void)
>> +{
>> + unsigned long address, length, cur;
>> + struct bootlog_ptr *bp;
>> +
>> + /* EBDA pointer contains segment the extended BIOS data area */
>> + address = *(uint16_t *)phys_to_virt(BLOG_EBDA_POINTER);
>> + address<<= 4; /* convert segment to physical address */
>> +
>> + /* EBDA length is byte 0 of the EBDA (stored in kB) */
>> + length = *(uint8_t *)phys_to_virt(address);
>> + length<<= 10; /* convert to bytes */
>
> Ok this is wrong on two counts
>
> 1. If the EBDA pointer is zero then no EBDA is present (older
> boxes sometimes did this up to about the Athlon era).
>
> 2. EBDA isn't an X86 property it's a PC property. asm/bios_ebda
> provides one helper and perhaps it all belongs in there (along with 'is
> it a PC' sanity check)
It's not obvious to me how one would make that sort of check (is a PC)
at runtime. Suggestions?
>
> 3. And its probably a good idea given the standard of BIOS code to
> also check the EBDA end if given is actually within the 640K limit ...
>
>
>
> Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists