Scott Duplichan wrote:
]1) When booting a DOS drive, a disk read error occurs at some point ]after autoexec executes.
The revised patch (attached) overcomes this problem. It turns out in the latter stage of booting, DOS makes a couple of INT13 read requests with a buffer that is not word aligned. AHCI only supports word aligned buffers. This was causing the data to be shifted by one byte for these reads. The patch adds unaligned support for reads only, which is good enough for the DOS boot problem. The method of this patch actually writes one byte beyond the end of the caller's buffer. But the only OS seen to do this is DOS, so it may be good enough this way.
Still it's not nice to write outside the callers buffer. Another OS might call same function and SeaBIOS would end up corrupting some variable. Ungood. I guess memmove() is the only choice?