From patchwork Thu Mar 14 22:12:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Herv=C3=A9_Poussineau?= X-Patchwork-Id: 227822 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3F2192C00D7 for ; Fri, 15 Mar 2013 09:14:35 +1100 (EST) Received: from localhost ([::1]:55138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGGPx-0005Wo-DP for incoming@patchwork.ozlabs.org; Thu, 14 Mar 2013 18:14:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGGMw-0001Jd-0X for qemu-devel@nongnu.org; Thu, 14 Mar 2013 18:11:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGGMu-0004oh-Rw for qemu-devel@nongnu.org; Thu, 14 Mar 2013 18:11:25 -0400 Received: from smtp1-g21.free.fr ([2a01:e0c:1:1599::10]:38858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGGMu-0004oU-7m for qemu-devel@nongnu.org; Thu, 14 Mar 2013 18:11:24 -0400 Received: from localhost.localdomain (unknown [82.227.227.196]) by smtp1-g21.free.fr (Postfix) with ESMTP id 884279400CE; Thu, 14 Mar 2013 23:11:19 +0100 (CET) From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= To: qemu-devel@nongnu.org Date: Thu, 14 Mar 2013 23:12:06 +0100 Message-Id: <1363299128-8494-6-git-send-email-hpoussin@reactos.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363299128-8494-1-git-send-email-hpoussin@reactos.org> References: <1363299128-8494-1-git-send-email-hpoussin@reactos.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:e0c:1:1599::10 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [Qemu-devel] [RFC 5/6] m48t59: hack(?) to make it work on IBM 43p X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Document it for the IBM 43p emulation. --- docs/ibm_43p.cfg | 6 ++++++ hw/m48t59.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/docs/ibm_43p.cfg b/docs/ibm_43p.cfg index 92c9e8f..55329e3 100644 --- a/docs/ibm_43p.cfg +++ b/docs/ibm_43p.cfg @@ -11,6 +11,12 @@ # them all. [device] + driver = "m48t59_isa" + io_base = "0x74" + model = "59" + size = "0x1000" + +[device] driver = "i8042" [device] diff --git a/hw/m48t59.c b/hw/m48t59.c index 1093716..c71ba7b 100644 --- a/hw/m48t59.c +++ b/hw/m48t59.c @@ -491,6 +491,7 @@ static void NVRAM_writeb(void *opaque, hwaddr addr, uint64_t val, NVRAM->addr &= ~0xFF00; NVRAM->addr |= val << 8; break; + case 2: case 3: m48t59_write(NVRAM, NVRAM->addr, val); NVRAM->addr = 0x0000; @@ -506,6 +507,7 @@ static uint64_t NVRAM_readb(void *opaque, hwaddr addr, unsigned size) uint32_t retval; switch (addr) { + case 2: case 3: retval = m48t59_read(NVRAM, NVRAM->addr); break;