Andy - thanx for the updated source and ISO. I recompiled the whole system with debug info ( g) but without optimization (-O0). Wow, the synced source and ISO sure make a big difference when single stepping through the code! It all lines up better now.
Anyway, when running Visopsys on the Debian/Qemu emulator, an issue still exists with version 0.76. On the first "step through" It executed up thru the following lines, but thereafter could not find files, and displayed a series of kernel debug messages until giving up with a panic:
Code: Select all
// Just kickstart the device
kernelDebug(debug_io, "IDE disk %02x kickstart ATAPI device", diskNum);
status = sendAtapiPacket(diskNum, 0, ATAPI_PACKET_START);
if (status < 0)
{
// Oops, didn't work -- try a full startup
status = atapiStartStop(diskNum, 1);
if (status < 0)
return (status);
}
(the "inside" status returns < 0)
On a second run, Visopsys executed fine through the entire setup, mounting the filesystem OK, and then loading the splash bitmap (kernelImageLoad(splash)), busy.bmp, and a bunch of other graphic files. It subsequently executed kernelWindowInitialize(), windowStart(), setupWindowVariables(), and then loaded some font files with kernelFontLoad(). Unfortunately, it died when executing:
Code: Select all
kernelFindFile("/programs/imgboot") (which returned a status indicating that the file could not be found).
It seems that there is a an intermittent problem accessing the drive, but only on particular versions of the Qemu emulator. Weird. Very weird. If I put a breakpoint at startStopAtapi(), and single step through the function, it'll work every time. When there is no breakpoint at startStopAtapi(), it'll error - sometimes. The same thing seems to happen with sendAtapiPacket(). To me it seems like a timing or interrupt thing. It's very hard to chase this bug (which could be a Qemu thing) - because everything works OK when I single step through it. I guess we have a dancing bug.
-Ron