From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTgmo-00006W-US for qemu-devel@nongnu.org; Thu, 24 Nov 2011 16:24:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTgmm-0004IE-GU for qemu-devel@nongnu.org; Thu, 24 Nov 2011 16:24:50 -0500 Received: from mout.web.de ([212.227.15.4]:49506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTgmm-0004I4-3c for qemu-devel@nongnu.org; Thu, 24 Nov 2011 16:24:48 -0500 Message-ID: <4ECEB5FD.6010404@web.de> Date: Thu, 24 Nov 2011 22:24:13 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <4ECD88EF.2030200@web.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] Initializing PC from memory on reset? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel Developers Am 24.11.2011 08:47, schrieb Peter Maydell: > On 23 November 2011 23:59, Andreas Färber wrote: >> Unlike PowerPC, an architecture that I'm trying to emulate does not >> store branch instructions in the reset vector but a memory address. I'm >> therefore trying to read physical address 0x00000 and store its value >> into my env->pc. > > Have you looked at how M profile ARM does it? That has a similar > "read memory for initial PC value". (There are some interesting > wrinkles, not all of which we get quite right, regarding how this > should interact with initial ELF image load and the user fiddling > with PC and RAM in an attached debugger.) Thanks. I thought I had seen something like that but apparently grep'ed for the wrong keywords. Can anyone enlighten me why rom_ptr()+lduw_p() works at this point in time and lduw_phys() doesn't but later does? The MemoryRegion is initialized as a ram area. Is this a legacy issue (pre-Memory API)? Andreas