From patchwork Thu Apr 17 17:04:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: BALATON Zoltan X-Patchwork-Id: 339987 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C2E1C1400B8 for ; Fri, 18 Apr 2014 03:26:10 +1000 (EST) Received: from localhost ([::1]:33874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Waq4e-00055g-Iy for incoming@patchwork.ozlabs.org; Thu, 17 Apr 2014 13:26:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Waq4D-0004KG-90 for qemu-devel@nongnu.org; Thu, 17 Apr 2014 13:25:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Waq46-00036u-Jt for qemu-devel@nongnu.org; Thu, 17 Apr 2014 13:25:41 -0400 Received: from mono.eik.bme.hu ([152.66.115.2]:60034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Waq46-00036j-CN for qemu-devel@nongnu.org; Thu, 17 Apr 2014 13:25:34 -0400 Received: from mono.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id C9DD22F41F; Thu, 17 Apr 2014 19:25:25 +0200 (CEST) Received: by mono.eik.bme.hu (Postfix, from userid 432) id A610F2F437; Thu, 17 Apr 2014 19:25:25 +0200 (CEST) From: BALATON Zoltan Date: Thu, 17 Apr 2014 19:04:44 +0200 To: qemu-devel@nongnu.org Message-Id: <20140417172525.A610F2F437@mono.eik.bme.hu> X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 152.66.115.2 Cc: qemu-ppc@nongnu.org, Alexander Graf Subject: [Qemu-devel] [PATCH] mac99: Added FW_CFG_PPC_BUSFREQ to match CPUFREQ and TBFREQ already there 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 While there, also moved the hard coded value for CPUFREQ to a #define. Signed-off-by: BALATON Zoltan --- hw/ppc/mac_newworld.c | 5 ++++- include/hw/ppc/ppc.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index a533ec7..c937ff1 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -72,6 +72,8 @@ #define MAX_IDE_BUS 2 #define CFG_ADDR 0xf0000510 #define TBFREQ (100UL * 1000UL * 1000UL) +#define CLOCKFREQ (266UL * 1000UL * 1000UL) +#define BUSFREQ (100UL * 1000UL * 1000UL) /* debug UniNorth */ //#define DEBUG_UNIN @@ -469,7 +471,8 @@ static void ppc_core99_init(QEMUMachineInitArgs *args) fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_TBFREQ, TBFREQ); } /* Mac OS X requires a "known good" clock-frequency value; pass it one. */ - fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_CLOCKFREQ, 266000000); + fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_CLOCKFREQ, CLOCKFREQ); + fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_BUSFREQ, BUSFREQ); qemu_register_boot_set(fw_cfg_boot_set, fw_cfg); } diff --git a/include/hw/ppc/ppc.h b/include/hw/ppc/ppc.h index d71bd07..7e16e2e 100644 --- a/include/hw/ppc/ppc.h +++ b/include/hw/ppc/ppc.h @@ -92,6 +92,8 @@ enum { #define FW_CFG_PPC_IS_KVM (FW_CFG_ARCH_LOCAL + 0x05) #define FW_CFG_PPC_KVM_HC (FW_CFG_ARCH_LOCAL + 0x06) #define FW_CFG_PPC_KVM_PID (FW_CFG_ARCH_LOCAL + 0x07) +/* OpenBIOS has FW_CFG_PPC_NVRAM_ADDR as +0x08 */ +#define FW_CFG_PPC_BUSFREQ (FW_CFG_ARCH_LOCAL + 0x09) #define PPC_SERIAL_MM_BAUDBASE 399193