[SeaBIOS] [PATCH] EDD fixes
Sebastian Herbszt
herbszt at gmx.de
Sat Jul 31 21:02:24 CEST 2010
Kevin O'Connor wrote:
> On Sat, Jul 31, 2010 at 05:26:09PM +0200, Sebastian Herbszt wrote:
>> Fix data returned in the int13dpt structure.
> [...]
>> - if (size < 66) {
>> + if (size < 74) {
>> disk_ret(regs, DISK_RET_SUCCESS);
>> return;
>> }
>
> This is not correct - the EDD v3.0 spec has a 66 byte structure.
You mean the Phoenix spec (BIOS Enhanced Disk Drive Specification,
Version 3.0, Rev 0.8, March 12, 1998).
What about the T13 Working Draft, D1572, Information Technology - BIOS
Enhanced Disk Drive Services - 3 (EDD-3), Revision 3, November 5, 2004?
> The
> link in the bochs bug is for a proposed EDD v4 spec - but that hasn't
> been ratified - see:
>
> http://www.t13.org/Standards/Default.aspx?DocumentType=3
It is in this list as "INCITS 407-2005 (1572D): BIOS Enhanced Disk Drive
Services - 3".
> Should EDD v4 be ratified and we add support for it, we'd need to
> support both v3 and v4 calls.
>
> You should be able to find the current spec by googling for
> "specsedd30.pdf".
The structure in the Phoenix spec has 66 bytes and padding is not mentioned.
In the T13 documents the structure has 74 bytes and some fields are space padded.
> To be honest though, in my tests, I didn't find any OSs that use
> anything beyond the basic EDD v1 calls.
I think Linux supplies a buffer which can hold 74 bytes [1].
> Indeed, if you look at the
> Bochs code you'll see that it has an incorrect checksum calculation
> for EDD v2 and EDD v3. (It uses "checksum = ~checksum" where it
> should do "checksum = -checksum").
>
> -Kevin
[1] http://lxr.linux.no/#linux+v2.6.34.1/include/linux/edd.h
Sebastian
More information about the SeaBIOS
mailing list