From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTMjh-0006Yo-CV for qemu-devel@nongnu.org; Wed, 23 Nov 2011 19:00:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTMjg-0002V0-Dg for qemu-devel@nongnu.org; Wed, 23 Nov 2011 19:00:17 -0500 Received: from mout.web.de ([212.227.15.4]:57563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTMjg-0002Un-2Y for qemu-devel@nongnu.org; Wed, 23 Nov 2011 19:00:16 -0500 Message-ID: <4ECD88EF.2030200@web.de> Date: Thu, 24 Nov 2011 00:59:43 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Initializing PC from memory on reset? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Developers Hi, 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. I've verified by running with -S that xp /xh 0x00000 shows the expected value. When doing lduw_phys(0x00000) or cpu_read_physical_memory() in the CPU reset function though, I just seem to read from uninitialized memory (0xbaba). I've taken care to reorder CPU initialization to after the BIOS file is loaded in the machine initialization function. What am I doing wrong? Thanks, Andreas