qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix parallel port software emulation
@ 2008-02-06 11:09 Hervé Poussineau
  0 siblings, 0 replies; only message in thread
From: Hervé Poussineau @ 2008-02-06 11:09 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

Hi,

Parallel port control register should always have the 0xc0 bits enabled 
(like this is already done in Qemu parallel port hardware emulation).

Status register should also start with EPP timeout bit set, like on real 
hardware.

Attached patch fixes both issues.

Hervé

[-- Attachment #2: parallel-sw.patch --]
[-- Type: text/plain, Size: 823 bytes --]

Index: parallel.c
===================================================================
RCS file: /sources/qemu/qemu/hw/parallel.c,v
retrieving revision 1.12
diff -u -r1.12 parallel.c
--- parallel.c	18 Nov 2007 01:44:37 -0000	1.12
+++ parallel.c	6 Feb 2008 11:08:01 -0000
@@ -101,6 +101,7 @@
         parallel_update_irq(s);
         break;
     case PARA_REG_CTR:
+        val |= 0xc0;
         if ((val & PARA_CTR_INIT) == 0 ) {
             s->status = PARA_STS_BUSY;
             s->status |= PARA_STS_ACK;
@@ -414,8 +415,10 @@
     s->status |= PARA_STS_ACK;
     s->status |= PARA_STS_ONLINE;
     s->status |= PARA_STS_ERROR;
+    s->status |= PARA_STS_TMOUT;
     s->control = PARA_CTR_SELECT;
     s->control |= PARA_CTR_INIT;
+    s->control |= 0xc0;
     s->irq = irq;
     s->irq_pending = 0;
     s->chr = chr;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-06 11:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-06 11:09 [Qemu-devel] [PATCH] Fix parallel port software emulation Hervé Poussineau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).