Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxLUs-00019o-9z for qemu-devel@nongnu.org; Tue, 04 Nov 2008 07:59:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxLUq-00017D-MS for qemu-devel@nongnu.org; Tue, 04 Nov 2008 07:59:02 -0500 Received: from [199.232.76.173] (port=38787 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxLUq-00016w-Gv for qemu-devel@nongnu.org; Tue, 04 Nov 2008 07:59:00 -0500 Received: from web51101.mail.re2.yahoo.com ([206.190.38.143]:33337) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KxLUp-0002sd-TT for qemu-devel@nongnu.org; Tue, 04 Nov 2008 07:59:00 -0500 Date: Tue, 4 Nov 2008 04:58:57 -0800 (PST) From: Justin Chevrier Subject: Re: [Qemu-devel] LSI53C895A, IDE HDD detection under SCO OpenServer 5.0.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <689056.97882.qm@web51101.mail.re2.yahoo.com> Reply-To: theburner1@yahoo.com, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hmmmm, I'm kind of confused. The patch I posted has the latency fix that you included in your patch. It also has reading of 0x46 implemented and writing to 0x1a as well. The slha driver I used is from this URL: http://www.lsi.com/DistributionSystem/AssetDocument/files/support/ssp/sdms/Sco/scounix.zip I then used the following command line to boot (using the SCO Openserver 5.0.5 install CD): i386-softmmu/qemu -L pc-bios -m 256 -no-fd-bootchk -fda sco.dd -boot d -drive file=hd.img,if=scsi -cdrom /dev/sr0 The boot string I used was the following (at the 'boot:' prompt): defbootstr link=slha btld=fd(61) I also had success with a boot/root floppy combo that I believe I created at one point from a working Openserver installation. I can pass the command lines for those as well if they would be of use. Thanks for taking a look Craig. Here is my patch again inline (in case something got lost in the original post): --- lsi53c895a.c.orig 2008-10-29 14:18:52.000000000 -0400 +++ lsi53c895a.c 2008-11-03 22:12:24.000000000 -0500 @@ -209,6 +209,7 @@ uint8_t mbox0; uint8_t mbox1; uint8_t dfifo; + uint8_t ctest2; uint8_t ctest3; uint8_t ctest4; uint8_t ctest5; @@ -280,6 +281,7 @@ s->mbox0 = 0; s->mbox1 = 0; s->dfifo = 0; + s->ctest2 = 0; s->ctest3 = 0; s->ctest4 = 0; s->ctest5 = 0; @@ -890,6 +892,7 @@ break; case PHASE_DI: s->waiting = 2; + s->current_dma_len = s->dbc; lsi_do_dma(s, 0); if (s->waiting) s->waiting = 3; @@ -1279,7 +1282,7 @@ case 0x19: /* CTEST1 */ return 0; case 0x1a: /* CTEST2 */ - tmp = LSI_CTEST2_DACK | LSI_CTEST2_CM; + tmp = s->ctest2 | LSI_CTEST2_DACK | LSI_CTEST2_CM; if (s->istat0 & LSI_ISTAT0_SIGP) { s->istat0 &= ~LSI_ISTAT0_SIGP; tmp |= LSI_CTEST2_SIGP; @@ -1327,6 +1330,8 @@ s->sist1 = 0; lsi_update_irq(s); return tmp; + case 0x46: /* MACNTL */ + return 0x0f; case 0x47: /* GPCNTL0 */ return 0x0f; case 0x48: /* STIME0 */ @@ -1440,6 +1445,9 @@ SCRIPTS register move instructions are. */ s->sfbr = val; break; + case 0x0a: case 0x0b: + /* Openserver writes to these readonly registers on startup */ + return; case 0x0c: case 0x0d: case 0x0e: case 0x0f: /* Linux writes to these readonly registers on startup. */ return; @@ -1469,6 +1477,9 @@ case 0x17: /* MBOX1 */ s->mbox1 = val; break; + case 0x1a: /* CTEST2 */ + s->ctest2 = val & LSI_CTEST2_PCICIE; + break; case 0x1b: /* CTEST3 */ s->ctest3 = val & 0x0f; break; @@ -1869,12 +1880,21 @@ return NULL; } + /* PCI Vendor ID (word) */ s->pci_dev.config[0x00] = 0x00; s->pci_dev.config[0x01] = 0x10; + /* PCI device ID (word) */ s->pci_dev.config[0x02] = 0x12; s->pci_dev.config[0x03] = 0x00; + /* PCI base class code */ s->pci_dev.config[0x0b] = 0x01; - s->pci_dev.config[0x3d] = 0x01; /* interrupt pin 1 */ + /* PCI subsystem ID */ + s->pci_dev.config[0x2e] = 0x00; + s->pci_dev.config[0x2f] = 0x10; + /* PCI latency timer = 255 */ + s->pci_dev.config[0x0d] = 0xff; + /* Interrupt pin 1 */ + s->pci_dev.config[0x3d] = 0x01; s->mmio_io_addr = cpu_register_io_memory(0, lsi_mmio_readfn, lsi_mmio_writefn, s);