Merge branch 'upstream-merge'
[qemu-kvm/markmc.git] / target-ppc / fake-exec.c
blob259e06d5a6cffb7242900a4ed020b7f40cfcb165
1 /*
2 * fake-exec.c
4 * This is a file for stub functions so that compilation is possible
5 * when TCG CPU emulation is disabled during compilation.
7 * Copyright 2007 IBM Corporation.
8 * Added by & Authors:
9 * Jerone Young <jyoung5@us.ibm.com>
10 * This work is licensed under the GNU GPL licence version 2 or later.
14 #include <stdarg.h>
15 #include <stdlib.h>
16 #include <stdio.h>
17 #include <string.h>
18 #include <inttypes.h>
20 #include "cpu.h"
21 #include "exec-all.h"
24 struct ppc_def_t {
25 const unsigned char *name;
26 uint32_t pvr;
27 uint32_t svr;
28 uint64_t insns_flags;
29 uint64_t msr_mask;
30 powerpc_mmu_t mmu_model;
31 powerpc_excp_t excp_model;
32 powerpc_input_t bus_model;
33 uint32_t flags;
34 int bfd_mach;
35 void (*init_proc)(CPUPPCState *env);
36 int (*check_pow)(CPUPPCState *env);
39 int code_copy_enabled = 0;
41 void cpu_dump_state (CPUState *env, FILE *f,
42 int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
43 int flags)
47 void ppc_cpu_list (FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...))
51 void cpu_dump_statistics (CPUState *env, FILE*f,
52 int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
53 int flags)
57 unsigned long code_gen_max_block_size(void)
59 return 32;
62 void cpu_gen_init(void)
66 int cpu_restore_state(TranslationBlock *tb,
67 CPUState *env, unsigned long searched_pc,
68 void *puc)
71 return 0;
74 int cpu_ppc_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr)
76 return 0;
79 void init_proc_ppc440ep_kvm(CPUPPCState *env)
81 ppc40x_irq_init(env);
84 static ppc_def_t ppc440ep_kvm = {
85 .name = "440EP KVM",
86 .mmu_model = POWERPC_MMU_SOFT_4xx, /*XXX needed for GDB stub */
87 .init_proc = init_proc_ppc440ep_kvm,
90 const ppc_def_t *cpu_ppc_find_by_name (const unsigned char *name)
92 return &ppc440ep_kvm;
95 int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def)
97 env->mmu_model = def->mmu_model;
98 (*def->init_proc)(env);
99 return 0;
102 void flush_icache_range(unsigned long start, unsigned long stop)