From patchwork Sun Jul 13 16:17:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 369417 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 3A8EC140170 for ; Mon, 14 Jul 2014 02:18:31 +1000 (EST) Received: from localhost ([::1]:52889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6MTt-0006hl-Ba for incoming@patchwork.ozlabs.org; Sun, 13 Jul 2014 12:18:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6MTB-0005Xy-GF for qemu-devel@nongnu.org; Sun, 13 Jul 2014 12:17:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6MT3-0006Mu-7b for qemu-devel@nongnu.org; Sun, 13 Jul 2014 12:17:45 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57833 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6MT3-0006L3-0G; Sun, 13 Jul 2014 12:17:37 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 67F19AC7A; Sun, 13 Jul 2014 16:17:34 +0000 (UTC) From: Alexander Graf To: qemu-ppc@nongnu.org Date: Sun, 13 Jul 2014 18:17:28 +0200 Message-Id: <1405268253-33465-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.8.1.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 Cc: programmingkidx@gmail.com, mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 0/5] PPC: Mac99 emulation fixes 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 trying to get Mac OS X booting with our -M mac99 emulation I stumbled over a few issues that prevented it from doing so. With these patches applied I still can't properly boot Mac OS X with -M mac99, but I get a lot further than before. The biggest issue that's left now is to properly fake Mac OS X into believing our timebase frequency. If I hack up the cuda timer I can successfully boot Mac OS X on mac99: =========== Please bear in mind that this patch set depends on an OpenBIOS update. Alexander Graf (5): PPC: mac99: Fix core99 timer frequency PPC: mac_nvram: Remove unused functions PPC: mac_nvram: Allow 2 and 4 byte accesses PPC: mac_nvram: Split NVRAM into OF and OSX parts PPC: mac99: Expose NVRAM linearly hw/misc/macio/macio.c | 9 ++++- hw/nvram/mac_nvram.c | 109 +++++++++++++++++++++++++++++++++----------------- hw/ppc/mac.h | 2 - hw/ppc/mac_newworld.c | 7 ++-- include/hw/ppc/ppc.h | 1 + 5 files changed, 84 insertions(+), 44 deletions(-) =========== diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index ff6051d..3d40534 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cuda.c @@ -102,7 +102,7 @@ #define CUDA_TIMER_TICKLE 0x24 #define CUDA_COMBINED_FORMAT_IIC 0x25 -#define CUDA_TIMER_FREQ (4700000 / 6) +#define CUDA_TIMER_FREQ ((4700000 / 6) / 64) #define CUDA_ADB_POLL_FREQ 50 /* CUDA returns time_t's offset from Jan 1, 1904, not 1970 */