From patchwork Sat Oct 15 13:51:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 119973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9048FB70F5 for ; Sun, 16 Oct 2011 00:51:41 +1100 (EST) Received: from localhost ([::1]:59450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RF4eI-00072R-Hg for incoming@patchwork.ozlabs.org; Sat, 15 Oct 2011 09:51:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RF4eC-00072M-U4 for qemu-devel@nongnu.org; Sat, 15 Oct 2011 09:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RF4eB-000860-PQ for qemu-devel@nongnu.org; Sat, 15 Oct 2011 09:51:32 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:59106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RF4eB-00084G-Lf for qemu-devel@nongnu.org; Sat, 15 Oct 2011 09:51:31 -0400 Received: by mail-gy0-f173.google.com with SMTP id 10so2297773gyg.4 for ; Sat, 15 Oct 2011 06:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=9A87XxZ+Voz/0H55Ey9PEbYV8DQfA4miCpj3FhrArYc=; b=CkrQlfdmuSGufQHLTXiuI2Cgdc51hrUIlt1+vVe6gv4rFOebOixiFkiiw2CibfgVmY 9Yqc5yhySwZkkXZXT7rYDVM9rdu522XsQI4M/bikpXrqo1IyPXrm0uGkzOFlB23B0tbQ ZZ8HRHMdSdyPLtRk146RoOW+4x60DiyjxB3sE= Received: by 10.182.8.10 with SMTP id n10mr7266892oba.36.1318686691127; Sat, 15 Oct 2011 06:51:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.121.8 with HTTP; Sat, 15 Oct 2011 06:51:11 -0700 (PDT) From: Blue Swirl Date: Sat, 15 Oct 2011 13:51:11 +0000 Message-ID: To: qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.160.173 Subject: [Qemu-devel] [PATCH 2/2] m48t59: fix write access 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 Fix incorrect order of arguments, letting writes to NVRAM succeed. It looks like guests never write to the device, only read from it, since the bug originates back to 819385c58b319d9f80d676cefaed0610118f03ac. Signed-off-by: Blue Swirl --- hw/m48t59.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) default: diff --git a/hw/m48t59.c b/hw/m48t59.c index dba5796..a77937e 100644 --- a/hw/m48t59.c +++ b/hw/m48t59.c @@ -491,7 +491,7 @@ static void NVRAM_writeb (void *opaque, uint32_t addr, uint32_t val) NVRAM->addr |= val << 8; break; case 3: - m48t59_write(NVRAM, val, NVRAM->addr); + m48t59_write(NVRAM, NVRAM->addr, val); NVRAM->addr = 0x0000; break;