From patchwork Tue Oct 30 17:20:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: e1000: pre-initialize RAH/RAL registers Date: Tue, 30 Oct 2012 07:20:40 -0000 From: Gabriel L. Somlo X-Patchwork-Id: 195565 Message-Id: <20121030172039.GN29280@hedwig.ini.cmu.edu> To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, rene@exactcode.com, somlo@cmu.edu, agraf@suse.de 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 --- 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