Hi,
On Fri, Apr 06, 2007 at 10:51:00AM -0400, Ward Vandewege wrote:
Fresh LB buildtarget and make after rebuilding FILO still uses the old payload file.. How can that be?
I don't think that was the case - perhaps the patch just didn't fix the problem?
Of course you are right. Sorry about doubting that.
After having processed the read command, it seems the hard disk reports "not busy" before "there is data" but that's the wrong order according to the ATA-3 working draft that I'm using for reference. (From 1997 but it's the latest I've found available at no cost. T13 d2008r7b)
The print_status function read the status register again, and by then the DRQ ("data request") bit was set, causing my confusion.
I've added a wait for DRQ and the timeout should not be too long because the same code is used to detect that no disk is attached. I've used 50ms.
The attached patch should apply over the last full patch.
The FIXME I've added is also from reviewing the PIO protocol in the same draft. It seems the real thing to wait for is not 50ms but rather BSY=0&RDY=1 after having written the device register. This could make a big difference also for ATAPI and filesystems doing single sector reads, but I don't want to change it until multi sector reads are working.
Ok, I've added a little more debugging output and this patch also contains full error checking.
Output attached; I assume you wanted me to patch this onto a fresh filo checkout.
Yes, thanks.
Seems like we regressed to the original problem.
It's still the same problem, but now the error is reported rather than an attempt made to start an incomplete kernel.
Another thing that needs to be investigated is why FILO reads 4096+1380 bytes from the disk _one byte at a time_ before the menu timeou, but that's also for later.
//Peter