qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] e1000: pre-initialize RAH/RAL registers
@ 2012-10-30 17:20 Gabriel L. Somlo
  2012-10-31  8:03 ` Stefan Hajnoczi
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel L. Somlo @ 2012-10-30 17:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, rene, somlo, agraf

Some guest operating systems' drivers (Mac OS X in particular) fail to
properly initialize the Receive Address registers (probably expecting
them to be pre-initialized by an earlier component, such as a proprietary
BIOS). This patch pre-initializes the RA registers, allowing OS X
networking to function properly. Other guest operating systems are not
affected, and free to (re)initialize these registers during boot.

Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---
 hw/e1000.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hw/e1000.c b/hw/e1000.c
index e4f1ffe..6478ff3 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -278,6 +278,10 @@ static void e1000_reset(void *opaque)
     if (d->nic->nc.link_down) {
         e1000_link_down(d);
     }
+
+  /* Some guests expect pre-initialized RAH/RAL (AddrValid flag + MACaddr) */
+  d->mac_reg[RA+1] = E1000_RAH_AV;
+  memmove(&d->mac_reg[RA], &d->conf.macaddr, sizeof(struct MACAddr));
 }
 
 static void
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-01 12:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-30 17:20 [Qemu-devel] [PATCH] e1000: pre-initialize RAH/RAL registers Gabriel L. Somlo
2012-10-31  8:03 ` Stefan Hajnoczi
2012-10-31 18:15   ` [Qemu-devel] [PATCH v2] " Gabriel L. Somlo
2012-11-01 12:28     ` Stefan Hajnoczi

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).