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