On Tue, Apr 26, 2011 at 09:15:04PM -0500, Scott Duplichan wrote:
Kevin O'Connor wrote: ]Out of curiosity, can you see what happens if you return ]DISK_RET_EBOUNDARY in the unaligned case?
DOS tries the same request 10 times then ignores the error and continues.
Thanks for testing.
]It's not currently possible to dynamically allocate memory during ]runtime. However, it is possible to allocate a buffer at init and ]keep it around for later. How big of a buffer would you need?
I think a single aligned 512 byte buffer would do. The code could read a sector at a time and memcpy from the seabios aligned buffer into the caller's unaligned buffer.
Yeah. One can call malloc_low() during the init phase to allocate this buffer. Ideally, though, there would be some way to share buffer space with the other users (eg, cdemu, ide dma, usb).