qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Brian Wheeler <bdwheele@indiana.edu>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] PATCH: Longword read/write to eepro100's eeprom
Date: Thu, 02 Apr 2009 08:52:26 -0400	[thread overview]
Message-ID: <1238676746.18745.2.camel@nibbler.dlib.indiana.edu> (raw)

It looks like the alpha-softmmu target tries to read/write the eeprom
using longword addressing.  This patch catches that case and redirects
the reads/writes to the eeprom.

Signed-off-by: Brian Wheeler <bdwheele@indiana.edu>


--- qemu/hw/eepro100.c	2009-03-25 15:00:23.000000000 -0400
+++ qemu-alpha-20090330/hw/eepro100.c	2009-04-02 08:49:07.000000000 -0400
@@ -1209,6 +1205,10 @@
     case SCBCtrlMDI:
         val = eepro100_read_mdi(s);
         break;
+    case SCBflash:
+        val = eepro100_read_eeprom(s);
+	logout("reading word from eeprom via longword: %04x\n", val);
+	break;
     default:
         logout("addr=%s val=0x%08x\n", regname(addr), val);
         missing("unknown longword read");
@@ -1299,6 +1299,11 @@
     case SCBCtrlMDI:
         eepro100_write_mdi(s, val);
         break;
+    case SCBflash:
+	logout("writing word %04x to eeprom via longword.\n", val);
+	val = val >> 16;
+	eepro100_write_eeprom(s->eeprom, val);
+	break;
     default:
         logout("addr=%s val=0x%08x\n", regname(addr), val);
         missing("unknown longword write");

                 reply	other threads:[~2009-04-02 12:52 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=1238676746.18745.2.camel@nibbler.dlib.indiana.edu \
    --to=bdwheele@indiana.edu \
    --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).