Received: from eggs.gnu.org ([2001:4830:134:3::10]:39867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1c7k-000280-Hr for qemu-devel@nongnu.org; Sun, 07 Jun 2015 11:04:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1c7g-0000E6-Ha for qemu-devel@nongnu.org; Sun, 07 Jun 2015 11:04:32 -0400 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]:34511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1c7g-0000Dv-D3 for qemu-devel@nongnu.org; Sun, 07 Jun 2015 11:04:28 -0400 Received: by qkoo18 with SMTP id o18so66252548qko.1 for ; Sun, 07 Jun 2015 08:04:28 -0700 (PDT) From: Paulo Alcantara Date: Sun, 7 Jun 2015 12:03:42 -0300 Message-Id: <1433689422-27808-1-git-send-email-pcacjr@zytor.com> In-Reply-To: <1433617803-18892-1-git-send-email-pcacjr@zytor.com> References: <1433617803-18892-1-git-send-email-pcacjr@zytor.com> Subject: [Qemu-devel] [PATCH v2] OvmfPkg/PlatformPei: Initialise RCBA (B0:D31:F0 0xf0) register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: edk2-devel@lists.sourceforge.net Cc: Paulo Alcantara , pbonzini@redhat.com, lersek@redhat.com, qemu-devel@nongnu.org, mst@redhat.com This patch initialises root complex register block BAR in order to support TCO watchdog emulation features (e.g. reboot upon NO_REBOOT bit not set) on QEMU. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paulo Alcantara --- OvmfPkg/Include/IndustryStandard/Q35MchIch9.h | 7 +++++++ OvmfPkg/PlatformPei/Platform.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/OvmfPkg/Include/IndustryStandard/Q35MchIch9.h b/OvmfPkg/Include/IndustryStandard/Q35MchIch9.h index 4f59a7c..b02de1b 100644 --- a/OvmfPkg/Include/IndustryStandard/Q35MchIch9.h +++ b/OvmfPkg/Include/IndustryStandard/Q35MchIch9.h @@ -90,4 +90,11 @@ #define ICH9_SMI_EN_APMC_EN BIT5 #define ICH9_SMI_EN_GBL_SMI_EN BIT0 +// +// Root Complex Base Address register +// +#define ICH9_RCBA 0xf0 +#define ICH9_ROOT_COMPLEX_BASE 0xfed1c000 +#define ICH9_RCBA_EN BIT0 + #endif diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index 1126c65..d69be8b 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -261,6 +261,13 @@ MiscInitialization ( Pmba = POWER_MGMT_REGISTER_Q35 (ICH9_PMBASE); AcpiCtlReg = POWER_MGMT_REGISTER_Q35 (ICH9_ACPI_CNTL); AcpiEnBit = ICH9_ACPI_CNTL_ACPI_EN; + + // + // Set Root Complex Register Block BAR + // + PciWrite32 (POWER_MGMT_REGISTER_Q35 (ICH9_RCBA), + ICH9_ROOT_COMPLEX_BASE | ICH9_RCBA_EN + ); break; default: DEBUG ((EFI_D_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", -- 2.1.0