From patchwork Thu Dec 10 18:10:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 40857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7115BB7093 for ; Fri, 11 Dec 2009 05:28:33 +1100 (EST) Received: from localhost ([127.0.0.1]:49681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInkb-0005Go-NM for incoming@patchwork.ozlabs.org; Thu, 10 Dec 2009 13:28:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NInWI-0004o5-Fp for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NInWD-0004h2-Pv for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:42 -0500 Received: from [199.232.76.173] (port=41841 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInWD-0004gf-HL for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45893) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NInWE-0003fp-0J for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:38 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBAIDZBV025290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Dec 2009 13:13:35 -0500 Received: from redhat.com (vpn-6-118.tlv.redhat.com [10.35.6.118]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id nBAIDX6v009352; Thu, 10 Dec 2009 13:13:34 -0500 Date: Thu, 10 Dec 2009 20:10:51 +0200 From: "Michael S. Tsirkin" To: Anthony Liguori , qemu-devel@nongnu.org Message-ID: <20091210181051.GH25707@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH 07/17] piix: symbolic constants X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org No functional changes. I verified that the generated binary does not change. Signed-off-by: Michael S. Tsirkin --- hw/ide/piix.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index ec93f29..b1f66a5 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -106,10 +106,13 @@ static void piix3_reset(void *opaque) ide_dma_reset(&d->bmdma[i]); } - pci_conf[0x04] = 0x00; - pci_conf[0x05] = 0x00; - pci_conf[0x06] = 0x80; /* FBC */ - pci_conf[0x07] = 0x02; // PCI_status_devsel_medium + /* TODO: this is the default. do not override. */ + pci_conf[PCI_COMMAND] = 0x00; + /* TODO: this is the default. do not override. */ + pci_conf[PCI_COMMAND + 1] = 0x00; + /* TODO: use pci_set_word */ + pci_conf[PCI_STATUS] = PCI_STATUS_FAST_BACK; + pci_conf[PCI_STATUS + 1] = PCI_STATUS_DEVSEL_MEDIUM >> 8; pci_conf[0x20] = 0x01; /* BMIBA: 20-23h */ } @@ -117,7 +120,7 @@ static int pci_piix_ide_initfn(PCIIDEState *d) { uint8_t *pci_conf = d->dev.config; - pci_conf[0x09] = 0x80; // legacy ATA mode + pci_conf[PCI_CLASS_PROG] = 0x80; // legacy ATA mode pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_IDE); pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; // header_type