From patchwork Fri Jul 10 00:04:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Alcantara X-Patchwork-Id: 493599 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 807171402A7 for ; Fri, 10 Jul 2015 10:04:35 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=pn8JqDVg; dkim-atps=neutral Received: from localhost ([::1]:42362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDLns-0004LZ-P1 for incoming@patchwork.ozlabs.org; Thu, 09 Jul 2015 20:04:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDLnd-000458-PO for qemu-devel@nongnu.org; Thu, 09 Jul 2015 20:04:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDLnZ-0006II-Bw for qemu-devel@nongnu.org; Thu, 09 Jul 2015 20:04:17 -0400 Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]:34546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDLnZ-0006Gd-5l for qemu-devel@nongnu.org; Thu, 09 Jul 2015 20:04:13 -0400 Received: by qkcl188 with SMTP id l188so13726191qkc.1 for ; Thu, 09 Jul 2015 17:04:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ViQwuSlyOEiWmXynfSST65I5rZn0hDi2jyYAFkZQ6Wo=; b=pn8JqDVgnlhuMv1h5g/qvJGetlFZD6Ky/VKWMdCBbEn8kJpcM7qZ/RvF17WA9p8Ylq D5Sl+2kqo6KB299PF7TCjvOOhnux88mv5lyILuBBjqG1v8ifSkKtpUBANNw+LnfEcw0M i4DSHj8zKtVnNFzCqpDZKpa0WdjtDMMwVCil+qfAWHWieuheiRmT1gjttv2l0fYRcSnc Xu9RvcyiRNVdWlXrpgaMdI7ei24msTrphOAVnpzej8EIhEPiXg4GjO0qbh/L3ZRkMoXd Xrshwwl9o3xBXHQTSZp1uKpmr9puS2wm2ThNpYlZEY8JokdMs3myfmvhKezAlU5XopPP +EMg== X-Received: by 10.140.29.55 with SMTP id a52mr27902559qga.25.1436486651666; Thu, 09 Jul 2015 17:04:11 -0700 (PDT) Received: from localhost.localdomain.localdomain (187-78-71-115.user.veloxzone.com.br. [187.78.71.115]) by smtp.gmail.com with ESMTPSA id p52sm4638789qge.25.2015.07.09.17.04.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 17:04:10 -0700 (PDT) From: Paulo Alcantara X-Google-Original-From: Paulo Alcantara To: seabios@seabios.org Date: Thu, 9 Jul 2015 21:04:01 -0300 Message-Id: <1436486641-11808-1-git-send-email-pcacjr@zytor.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1432686530-14777-1-git-send-email-pcacjr@zytor.com> References: <1432686530-14777-1-git-send-email-pcacjr@zytor.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c09::22d Cc: Paolo Bonzini , Kevin O'Connor , Paulo Alcantara , qemu-devel@nongnu.org, Gerd Hofmann Subject: [Qemu-devel] [PATCH v2] ich9: initialise RCBA register through LPC interface 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 This patch initialises root complex register block BAR in order to support TCO watchdog emulation features on QEMU. Cc: Kevin O'Connor Cc: Gerd Hofmann Cc: Paolo Bonzini Signed-off-by: Paulo Alcantara --- v1 -> v2: - reserve RCBA address via e820 map --- src/fw/dev-q35.h | 3 +++ src/fw/pciinit.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/fw/dev-q35.h b/src/fw/dev-q35.h index c6f8bd9..201825d 100644 --- a/src/fw/dev-q35.h +++ b/src/fw/dev-q35.h @@ -27,6 +27,9 @@ #define ICH9_LPC_GEN_PMCON_1_SMI_LOCK (1 << 4) #define ICH9_LPC_PORT_ELCR1 0x4d0 #define ICH9_LPC_PORT_ELCR2 0x4d1 +#define ICH9_LPC_RCBA 0xf0 +#define ICH9_LPC_RCBA_ADDR 0xfed1c000 +#define ICH9_LPC_RCBA_EN 0x1 #define PCI_DEVICE_ID_INTEL_ICH9_SMBUS 0x2930 #define ICH9_SMB_SMB_BASE 0x20 #define ICH9_SMB_HOSTC 0x40 diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index 45870f2..3ad84ba 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -183,6 +183,11 @@ static void mch_isa_bridge_setup(struct pci_device *dev, void *arg) /* acpi enable, SCI: IRQ9 000b = irq9*/ pci_config_writeb(bdf, ICH9_LPC_ACPI_CTRL, ICH9_LPC_ACPI_CTRL_ACPI_EN); + /* set root complex register block BAR */ + pci_config_writel(bdf, ICH9_LPC_RCBA, + ICH9_LPC_RCBA_ADDR | ICH9_LPC_RCBA_EN); + add_e820(ICH9_LPC_RCBA_ADDR, 16*1024, E820_RESERVED); + acpi_pm1a_cnt = acpi_pm_base + 0x04; pmtimer_setup(acpi_pm_base + 0x08); }