PPC: Fix bamboo part 2
cover PPC: Fix bamboo part 2
These patches work on top of the other patch set I sent out earlier. With these patches I can successfully run user space code with -M bamboo.
Alex
Alexander Graf (3):
PPC: Bamboo: recompile device tree
PPC: 440: Default to 440EP CPU
PPC: Enable 440EP CPU target
hw/ppc440.c | 2 +- pc-bios/bamboo.dtb | Bin 3179 -> 3211 bytes pc-bios/bamboo.dts | 128 ++++++++++++++++--------------------------- target-ppc/translate_init.c | 16 ++---- 4 files changed, 53 insertions(+), 93 deletions(-)
PATCH 1/3 PPC: Bamboo: recompile device tree
Recent dtc doesn't compile our dts anymore. Change all hex numbers to have 0x prefixes, indicate the old version and recompile using recent dtc.
This doesn't change any semantics in the device tree.
--- pc-bios/bamboo.dtb | Bin 3179 -> 3211 bytes pc-bios/bamboo.dts | 128 +++++++++++++++++++--------------------------------- 2 files changed, 47 insertions(+), 81 deletions(-)
pc-bios/bamboo.dtb binary +0 -0
pc-bios/bamboo.dts +47 -81
245 lines not on this page · raw message
Signature · 1 line
1.6.0.2
PATCH 2/3 PPC: 440: Default to 440EP CPU
In reply to Alexander GrafToday we're exposing a Virtex 440 CPU to the guest despite the fact that we're telling the guest that we're running on a 440EP one in the device tree.
So let's better default to a real 440EP to make things synced again.
--- hw/ppc440.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/ppc440.c +1 -1
@@ -48,7 +48,7 @@ CPUState *ppc440ep_init(MemoryRegion *address_space_mem, ram_addr_t *ram_size,qemu_irq *pci_irqs;if (cpu_model ==NULL ) { - cpu_model ="440-Xilinx" ;// XXX: should be 440EP + cpu_model ="440EP" ; } env =cpu_init (cpu_model);if (!env) {
Signature · 1 line
1.6.0.2
PATCH 3/3 PPC: Enable 440EP CPU target
In reply to Alexander GrafNow that we have 440 TLB emulation, we can also support running the 440EP CPU target in system emulation mode.
--- target-ppc/translate_init.c | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-)
target-ppc/translate_init.c +5 -11
@@ -3515,6 +3515,9 @@ static void init_proc_405 (CPUPPCState *env)/* PowerPC 440 EP */ #define POWERPC_INSNS_440EP (PPC_INSNS_BASE | PPC_STRING | \ + PPC_FLOAT | PPC_FLOAT_FRES | PPC_FLOAT_FSEL | \ + PPC_FLOAT_FSQRT | PPC_FLOAT_FRSQRTE | \ + PPC_FLOAT_STFIWX | \ PPC_DCR | PPC_WRTEE | PPC_RFMCI | \ PPC_CACHE | PPC_CACHE_ICBI | \ PPC_CACHE_DCBZ | PPC_CACHE_DCBA | \
@@ -3522,7 +3525,7 @@ static void init_proc_405 (CPUPPCState *env) PPC_BOOKE | PPC_4xx_COMMON | PPC_405_MAC | \ PPC_440_SPEC)#define POWERPC_INSNS2_440EP (PPC_NONE) -#define POWERPC_MSRM_440EP (0x000000000006D630ULL) +#define POWERPC_MSRM_440EP (0x000000000006FF30ULL)#define POWERPC_MMU_440EP (POWERPC_MMU_BOOKE)#define POWERPC_EXCP_440EP (POWERPC_EXCP_BOOKE)#define POWERPC_INPUT_440EP (PPC_FLAGS_INPUT_BookE)
@@ -3531,7 +3534,6 @@ static void init_proc_405 (CPUPPCState *env) POWERPC_FLAG_DE | POWERPC_FLAG_BUS_CLK)#define check_pow_440EP check_pow_nocheck -__attribute__ (( unused ))static void init_proc_440EP (CPUPPCState *env) {/* Time base */
@@ -3592,7 +3594,7 @@ static void init_proc_440EP (CPUPPCState *env)init_excp_BookE (env); env->dcache_line_size =32 ; env->icache_line_size =32 ; -/* XXX: TODO: allocate internal IRQ controller */ +ppc40x_irq_init (env);SET_FIT_PERIOD (12 ,16 ,20 ,24 );SET_WDT_PERIOD (20 ,24 ,28 ,32 );
@@ -7826,22 +7828,14 @@ static const ppc_def_t ppc_defs[] = { POWERPC_DEF("440H6", CPU_POWERPC_440H6, 440Gx5), #endif/* PowerPC 440 microcontrolers */ -#if defined(TODO_USER_ONLY )/* PowerPC 440 EP */ POWERPC_DEF("440EP", CPU_POWERPC_440EP, 440EP), -#endif -#if defined(TODO_USER_ONLY )/* PowerPC 440 EPa */ POWERPC_DEF("440EPa", CPU_POWERPC_440EPa, 440EP), -#endif -#if defined(TODO_USER_ONLY )/* PowerPC 440 EPb */ POWERPC_DEF("440EPb", CPU_POWERPC_440EPb, 440EP), -#endif -#if defined(TODO_USER_ONLY )/* PowerPC 440 EPX */ POWERPC_DEF("440EPX", CPU_POWERPC_440EPX, 440EP), -#endif #if defined(TODO_USER_ONLY) /* PowerPC 440 GP */ POWERPC_DEF("440GP", CPU_POWERPC_440GP, 440GP),
Signature · 1 line
1.6.0.2