~ubuntu-branches/ubuntu/vivid/qemu-linaro/vivid

« back to all changes in this revision

Viewing changes to target-cris/cpu.h

  • Committer: Ricardo Salveti de Araujo
  • Date: 2012-09-20 18:39:31 UTC
  • mfrom: (12922.1.2 qemu-linaro)
  • Revision ID: ricardo.salveti@linaro.org-20120920183931-sp3cg6kpdl8dmwo9
* New upstream release.
  - support emulated systems with more than 2G of memory. (LP: #1030588)
* Drop powerpc-missing-include.patch - merged upstream.
* Update debian/control:
  - drop perl build dependency.
  - add libfdt-dev build dependency.
* Update debian/qemu-keymaps.install file.
* Update debian/rules:
  - update QEMU_CPU for ARM architecture: armv4l -> armv7l.
  - update conf_audio_drv: default to PulseAudio since PA is the default on
    Ubuntu.
  - enable KVM on ARM architecture.
  - enable flat device tree support (--enable-fdt). (LP: #1030594)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
#define TARGET_LONG_BITS 32
27
27
 
28
 
#define CPUState struct CPUCRISState
 
28
#define CPUArchState struct CPUCRISState
29
29
 
30
30
#include "cpu-defs.h"
31
31
 
64
64
#define PR_NRP 12
65
65
#define PR_CCS 13
66
66
#define PR_USP 14
 
67
#define PRV10_BRP 14
67
68
#define PR_SPC 15
68
69
 
69
70
/* CPU flags.  */
70
71
#define Q_FLAG 0x80000000
71
 
#define M_FLAG 0x40000000
 
72
#define M_FLAG_V32 0x40000000
72
73
#define PFIX_FLAG 0x800      /* CRISv10 Only.  */
73
74
#define F_FLAG_V10 0x400
74
75
#define P_FLAG_V10 0x200
75
76
#define S_FLAG 0x200
76
77
#define R_FLAG 0x100
77
78
#define P_FLAG 0x80
 
79
#define M_FLAG_V10 0x80
78
80
#define U_FLAG 0x40
79
81
#define I_FLAG 0x20
80
82
#define X_FLAG 0x10
169
171
        void *load_info;
170
172
} CPUCRISState;
171
173
 
172
 
CPUCRISState *cpu_cris_init(const char *cpu_model);
 
174
#include "cpu-qom.h"
 
175
 
 
176
CRISCPU *cpu_cris_init(const char *cpu_model);
173
177
int cpu_cris_exec(CPUCRISState *s);
174
178
void cpu_cris_close(CPUCRISState *s);
175
179
void do_interrupt(CPUCRISState *env);
214
218
#define TARGET_PHYS_ADDR_SPACE_BITS 32
215
219
#define TARGET_VIRT_ADDR_SPACE_BITS 32
216
220
 
217
 
#define cpu_init cpu_cris_init
 
221
static inline CPUCRISState *cpu_init(const char *cpu_model)
 
222
{
 
223
    CRISCPU *cpu = cpu_cris_init(cpu_model);
 
224
    if (cpu == NULL) {
 
225
        return NULL;
 
226
    }
 
227
    return &cpu->env;
 
228
}
 
229
 
218
230
#define cpu_exec cpu_cris_exec
219
231
#define cpu_gen_code cpu_cris_gen_code
220
232
#define cpu_signal_handler cpu_cris_signal_handler
225
237
#define MMU_MODE0_SUFFIX _kernel
226
238
#define MMU_MODE1_SUFFIX _user
227
239
#define MMU_USER_IDX 1
228
 
static inline int cpu_mmu_index (CPUState *env)
 
240
static inline int cpu_mmu_index (CPUCRISState *env)
229
241
{
230
242
        return !!(env->pregs[PR_CCS] & U_FLAG);
231
243
}
232
244
 
233
 
int cpu_cris_handle_mmu_fault(CPUState *env, target_ulong address, int rw,
 
245
int cpu_cris_handle_mmu_fault(CPUCRISState *env, target_ulong address, int rw,
234
246
                              int mmu_idx);
235
247
#define cpu_handle_mmu_fault cpu_cris_handle_mmu_fault
236
248
 
237
249
#if defined(CONFIG_USER_ONLY)
238
 
static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
 
250
static inline void cpu_clone_regs(CPUCRISState *env, target_ulong newsp)
239
251
{
240
252
    if (newsp)
241
253
        env->regs[14] = newsp;
260
272
 
261
273
#include "cpu-all.h"
262
274
 
263
 
static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
 
275
static inline void cpu_get_tb_cpu_state(CPUCRISState *env, target_ulong *pc,
264
276
                                        target_ulong *cs_base, int *flags)
265
277
{
266
278
    *pc = env->pc;
273
285
#define cpu_list cris_cpu_list
274
286
void cris_cpu_list(FILE *f, fprintf_function cpu_fprintf);
275
287
 
276
 
static inline bool cpu_has_work(CPUState *env)
 
288
static inline bool cpu_has_work(CPUCRISState *env)
277
289
{
278
290
    return env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI);
279
291
}
280
292
 
281
293
#include "exec-all.h"
282
294
 
283
 
static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
 
295
static inline void cpu_pc_from_tb(CPUCRISState *env, TranslationBlock *tb)
284
296
{
285
297
    env->pc = tb->pc;
286
298
}