Ok, thanks for this reset tip! I'll send up another patch with the
ATA_CMD_DEVICE_RESET command used instead, which should make it about 3
lines of changes max, instead of re-formatting existing code.

On 1/16/25 4:15 AM, Gerd Hoffmann wrote:
On Tue, Jan 14, 2025 at 11:10:26AM -0500, Christopher Lentocha wrote:

For whatever reason, when you compile SeaBIOS in Csm16 mode, and use it
under EDK2's OvmfPkg, the ATA_CMD_IDENTIFY_PACKET_DEVICE command
doesn't work properly,

Probably the device is in a different state due to the edk2 driver
having talked to the device before.

Maybe add a controller reset to the initialization path?  Currently
the driver code only resets the ports.

In order to fix this bug, I decided to move the "detected as a disk"
function to be a goto, so code isn't sloppy, by being copied and
pasted 1:1 (though this can be changed back later if needed), and in
the detected as CDROM function, when it fails at its point, assume its
a harddisk, make sure it is with the ATA_CMD_IDENTIFY_DEVICE (which
works fine in my testing) command, and continue from there.

That is more a workaround than a solution ...

take care,
   Gerd

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to