From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSEMO-0006wV-TM for qemu-devel@nongnu.org; Sun, 20 Nov 2011 15:51:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSEMN-0000W5-Sx for qemu-devel@nongnu.org; Sun, 20 Nov 2011 15:51:32 -0500 Received: from mout.web.de ([212.227.15.4]:49383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSEMN-0000Vz-Eo for qemu-devel@nongnu.org; Sun, 20 Nov 2011 15:51:31 -0500 Message-ID: <4EC96838.9000907@web.de> Date: Sun, 20 Nov 2011 21:51:04 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Status of the SH4 / ARM7 emulators List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Renato Utsch , qemu-devel@nongnu.org Am 19.11.2011 22:53, schrieb Peter Maydell: > We also don't support having multiple CPUs with different architectures > in one emulator: you can have an ARM emulator, or an SH4 emulator, > but not an emulation of a system with both an ARM and an SH4 core. Although I have recently been investigating exactly that combo. * Part of the problem is that common CPUState fields are not at the start of the struct. I have therefore been playing with a CPU_COMMON_PREFIX at the start of the struct and using a macro for clearing on reset, which preserves part of the common prefix fields. * Given a CPUState*, we need a way to differentiate different CPU types. I used an enum CPUType cpu_type as first field in CPU_COMMON_PREFIX. * cpu_mmu_index() is static inline, we should #define it to a non-static function in helper.c. * How to get declarations for such target-specific functions when #include "target-xyz/cpu.h" would overwrite cpu_init, TARGET_PAGE_SIZE and other defines? I hope this'll get easier with QOM. Andreas