qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix parallel port software emulation
Date: Wed, 06 Feb 2008 12:09:32 +0100	[thread overview]
Message-ID: <47A9956C.90506@reactos.org> (raw)

[-- 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;


                 reply	other threads:[~2008-02-06 11:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47A9956C.90506@reactos.org \
    --to=hpoussin@reactos.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).