aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-01-01 14:09:26 +0100
committerHelge Deller <deller@gmx.de>2024-01-04 18:48:50 +0100
commit1307a05301e45f18abb1678c692f1122cd043b37 (patch)
tree52ff4cf91e79c5044a4a91a58e9d2f6c98d2a2d4
parent11fa245a186a495f6cda3332482239f111cb37c8 (diff)
downloadseabios-hppa-1307a05301e45f18abb1678c692f1122cd043b37.zip
seabios-hppa-1307a05301e45f18abb1678c692f1122cd043b37.tar.gz
seabios-hppa-1307a05301e45f18abb1678c692f1122cd043b37.tar.bz2
esp-scsi: terminate DMA transfer when ESP data transfer completes
When the ESP data transfer completes indicated by the STAT_TC flag being set, terminate the DMA transfer by issuing a DMA IDLE command. Otherwise in the case where the guest sends a reset followed by an ESP command, the DMA signal remains enabled and so the next SeaBIOS DMA transfer begins immediately when the next ESP command is received rather than waiting until the data is ready and the DMA command is issued. With this fix it is possible to boot a Windows XP ISO to the installer and complete a full installation within QEMU directly using SeaBIOS. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r--src/hw/esp-scsi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hw/esp-scsi.c b/src/hw/esp-scsi.c
index ab161de..9f018d7 100644
--- a/src/hw/esp-scsi.c
+++ b/src/hw/esp-scsi.c
@@ -147,6 +147,8 @@ esp_scsi_process_op(struct disk_op_s *op)
/* At end of DMA TC is set again -> complete command. */
if (state == 1 && (stat & ESP_STAT_TC)) {
state++;
+ /* Terminate esp_scsi_dma() command */
+ outb(0, iobase + ESP_DMA_CMD);
continue;
}