Boot loader
- mathematician
- Member
- Posts: 437
- Joined: Fri Dec 15, 2006 5:26 pm
- Location: Church Stretton Uk
- mathematician
- Member
- Posts: 437
- Joined: Fri Dec 15, 2006 5:26 pm
- Location: Church Stretton Uk
Re: Boot loader
HI!
I've got a question: if I am in unreal mode then can int 13h read file which size is more than 64kb? I heard that I can load files more than 64kb in size,but need the code has some changes? (I mean file reading function)?
Thanks!
I've got a question: if I am in unreal mode then can int 13h read file which size is more than 64kb? I heard that I can load files more than 64kb in size,but need the code has some changes? (I mean file reading function)?
Thanks!
Don't think a ****, but in ukrainian schools English is TOO BAD!
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Boot loader
The bios will still use real-mode-safe code, and not use any of the advantages of unreal mode. That includes wrapping around a 64k limit.
Also, the bios doesn't know what a file is: You tell it to read sectors. If you read only one sector at a time you can easily load several MB of data because you read less than 64k for each individual call.
Also, the bios doesn't know what a file is: You tell it to read sectors. If you read only one sector at a time you can easily load several MB of data because you read less than 64k for each individual call.
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: Boot loader
One option is the EDD hard disk extensions, which can write to a 64-bit (or 32-bit) address and read more than 128 sectors in one shot.
Re: Boot loader
Sorry, no. The EDD spec limits you to reading/writing 127 sectors, as does the implementation in many BIOSes, specifically ones by Phoenix. You're best off just using blocks of no more than 32K at a shot.JohnnyTheDon wrote:One option is the EDD hard disk extensions, which can write to a 64-bit (or 32-bit) address and read more than 128 sectors in one shot.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Boot loader
The point is that while only 127 sectors (and note that there are 4096-byte sectors - just check) may be read at once, the extended read function provided by the fixed disk subset of EDD can be used to load stuff above the first MiB of RAM (64-bit flat addresses, anyone?). So it's just a matter of using the function more than once for big files.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: Boot loader
Not in EDD 3. There is an extended version of the DAP (Length > 16h) that accepts larger lengths than 127. I'm looking for the spec now, its been a while since I was messing with the BIOS.Sorry, no. The EDD spec limits you to reading/writing 127 sectors
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Boot loader
Device address packet, EDD 3.0 wrote: Number of blocks to transfer. This field has a maximum value of 127 (7Fh). A block count of 0 means no data is transferred. If a value greater than 127 is supplied, the request is rejected with CF=1 and AH=01.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: Boot loader
Yeah, you beat me to it. That can be found on page 4 of the EDD 3.0 Rev 0.8 document, which equates to section 4.2, table 1. I've seen a rev 0.9 but I don't think it changes anything with regards to the device address packet. There's also supposedly work going on with EDD 4.0, but the draft of it that I've seen only changes int 13h func 48h, and not in ways that I remember.Love4Boobies wrote:Device address packet, EDD 3.0 wrote: Number of blocks to transfer. This field has a maximum value of 127 (7Fh). A block count of 0 means no data is transferred. If a value greater than 127 is supplied, the request is rejected with CF=1 and AH=01.
Additionally, from section 4.2, table 1:
and specifically the extra bytes are at the bottom of the packet:Packet size in bytes. Shall be 16 (10h) or greater. If the packet size is less than 16
the request is rejected with CF=1h and AH=01h. Packet sizes greater than 16 are
not rejected, the additional bytes beyond 16 shall be ignored.
10h | Quad word | 64 bit flat address of the transfer buffer. The is the buffer which Read/Write
operations will use to transfer the data if the data at offset 4 is invalid.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Boot loader
I saw that draft too, on T13's website. However, it hasn't been accepted as a standard (yet?) so whatever the differences are, they're not implemented in any firmware.quok wrote:There's also supposedly work going on with EDD 4.0, but the draft of it that I've seen only changes int 13h func 48h, and not in ways that I remember.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: Boot loader
Just in case anyone's now looking for the EDD 3.0 Rev 0.8 spec, it's available at:
http://www.phoenix.com/en/OEM-ODM/Custo ... ations.htm
There's also a lot of other BIOS related specs there, all free of charge from your friends at Phoenix.
And this link in general may be interesting for anyone that wants more white papers:
http://www.phoenix.com/en/OEM-ODM/Custo ... efault.htm
http://www.phoenix.com/en/OEM-ODM/Custo ... ations.htm
There's also a lot of other BIOS related specs there, all free of charge from your friends at Phoenix.
And this link in general may be interesting for anyone that wants more white papers:
http://www.phoenix.com/en/OEM-ODM/Custo ... efault.htm
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: Boot loader
You're right, I read an EDD 4.0 draft when I found the DAP length > 10h stuff. Sorry.