Il 18/03/2012 22:47, fellaw@gmx.net ha scritto:
Hi,
I'm a new subscriber to seabios.org. Not much exp. with mailing lists nor C++, so feel free to straighten me out as necessary. I found out an issue: Booting from CD-ROM doesn't work anymore, though related make options have been set. I tried to debug it a little bit. To me it looks that order changes related to media sensing/capacity request broke it up.
In 1.6.3, cdb_read_capacity(line 204 in src/cdrom.c) takes place before cdb_get_sense(line 209) resulting in a break.
In current revision, this has been changed, has it? cdrom_boot(src/cdrom.cline 188) calls scsi_is_ready(line 197), which looks similar to atapi_is_ready from 1.6.3/src/cdrom.c.
However: scsi_is_ready is missing
struct cdbres_read_capacity info; ret = cdb_read_capacity(op, &info); if (!ret) // Success break;
contrary to 1.6.3. In line cdb_get_sense returns 0xC with a medium in the drive, but this seems to result into an endless loop due to continue;
For me, I added above snippet to blockcmd.c right before ret = cdb_get_sense(..) and it worked. Later CD-ROM boots using boot managers(e.g. grub4dos or PloP) work fine without changes, though.
Debugging was done in Qemu 1.0.1. Since I'm on Windows, I used this build: http://lassauge.free.fr/qemu/release/Qemu-1.0.1-windows.zip
Please confirm or advise.
This works for me, but only after a time out on test_unit_ready which more or less confirms your bug. I'll reply to this message with a patch that fixes it for me. Can you please test it?
Paolo