From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Kilgour Subject: [PATCH] qemu-kvm: pcnet APROMWE bit location Date: Sat, 13 Feb 2010 23:30:37 -0800 Message-ID: <4B77A69D.9000307@whiterocker.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mx6-3.i-mecca.net ([65.39.179.42]:48696 "EHLO mx6-3.i-mecca.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752977Ab0BNHjM (ORCPT ); Sun, 14 Feb 2010 02:39:12 -0500 Received: from ns6.i-mecca.net (ns6 [127.0.0.1]) by ns6.i-mecca.net (Postfix) with ESMTP id D15387BD3CB for ; Sun, 14 Feb 2010 02:30:37 -0500 (EST) Received: from kilgour.homelinux.com (unknown [97.107.180.199]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ns6.i-mecca.net (Postfix) with ESMTPSA id 7FFC07BD3CB for ; Sun, 14 Feb 2010 02:30:37 -0500 (EST) Sender: kvm-owner@vger.kernel.org List-ID: I don't subscribe to the list, so please excuse any breach of etiquette. According to AMD document 21485D pp.141, APROMWE is bit 8 of BCR2. Signed-off-by: Christopher Kilgour whiterocker.com> --- diff --git a/hw/pcnet.c b/hw/pcnet.c index 44b5b31..f889898 100644 --- a/hw/pcnet.c +++ b/hw/pcnet.c @@ -1601,7 +1601,7 @@ static void pcnet_aprom_writeb(void *opaque, uint32_t addr printf("pcnet_aprom_writeb addr=0x%08x val=0x%02x\n", addr, val); #endif /* Check APROMWE bit to enable write access */ - if (pcnet_bcr_readw(s,2) & 0x80) + if (pcnet_bcr_readw(s,2) & 0x100) s->prom[addr & 15] = val; }