From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ld8vM-00044g-52 for qemu-devel@nongnu.org; Fri, 27 Feb 2009 15:03:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ld8vK-00043U-Hb for qemu-devel@nongnu.org; Fri, 27 Feb 2009 15:03:06 -0500 Received: from [199.232.76.173] (port=37627 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ld8vK-00043M-Ab for qemu-devel@nongnu.org; Fri, 27 Feb 2009 15:03:06 -0500 Received: from mail-fx0-f175.google.com ([209.85.220.175]:57046) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ld8vJ-0007OX-OE for qemu-devel@nongnu.org; Fri, 27 Feb 2009 15:03:05 -0500 Received: by fxm23 with SMTP id 23so1123890fxm.34 for ; Fri, 27 Feb 2009 12:03:01 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 27 Feb 2009 22:03:01 +0200 Message-ID: Subject: Re: [Qemu-devel] [PATCH] Enable support for PPC64 on qemu target v2 From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: openbios@openbios.org, Laurent Vivier On 2/27/09, Alexander Graf wrote: > This patch enables OpenBIOS to initialize on PPC64, enabling support for > -cpu 970fx. > It gets up to the boot prompt and works rather good so far, though I haven't > been able to run a kernel yet. > > For more recent PowerPC CPUs the PTE layout has changed, so we need to take > that into account and create PTEs according to the new layout and at the new > physical positions. > > v2 takes Laurent's comments into account > > Signed-off-by: Alexander Graf Great work. Just a minor nit: + vsid = (ea>>28) + SEGR_BASE; Please add spaces around ">>". I wonder if is_ppc64() is correct for all known CPUs. Alternatively the CPU init function could set a global is_ppc64 flag, or call the MMU initialize function. In dsi_exception the mask could be initialized just once and in other cases a static value could be used for speed. The speed of OpenBIOS is of course not very critical.