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

« back to all changes in this revision

Viewing changes to hw/r2d.c

  • 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:
192
192
}
193
193
 
194
194
typedef struct ResetData {
195
 
    CPUState *env;
 
195
    SuperHCPU *cpu;
196
196
    uint32_t vector;
197
197
} ResetData;
198
198
 
199
199
static void main_cpu_reset(void *opaque)
200
200
{
201
201
    ResetData *s = (ResetData *)opaque;
202
 
    CPUState *env = s->env;
 
202
    CPUSH4State *env = &s->cpu->env;
203
203
 
204
 
    cpu_reset(env);
 
204
    cpu_reset(CPU(s->cpu));
205
205
    env->pc = s->vector;
206
206
}
207
207
 
224
224
              const char *kernel_filename, const char *kernel_cmdline,
225
225
              const char *initrd_filename, const char *cpu_model)
226
226
{
227
 
    CPUState *env;
 
227
    SuperHCPU *cpu;
 
228
    CPUSH4State *env;
228
229
    ResetData *reset_info;
229
230
    struct SH7750State *s;
230
231
    MemoryRegion *sdram = g_new(MemoryRegion, 1);
235
236
    SysBusDevice *busdev;
236
237
    MemoryRegion *address_space_mem = get_system_memory();
237
238
 
238
 
    if (!cpu_model)
 
239
    if (cpu_model == NULL) {
239
240
        cpu_model = "SH7751R";
 
241
    }
240
242
 
241
 
    env = cpu_init(cpu_model);
242
 
    if (!env) {
 
243
    cpu = cpu_sh4_init(cpu_model);
 
244
    if (cpu == NULL) {
243
245
        fprintf(stderr, "Unable to find CPU definition\n");
244
246
        exit(1);
245
247
    }
 
248
    env = &cpu->env;
 
249
 
246
250
    reset_info = g_malloc0(sizeof(ResetData));
247
 
    reset_info->env = env;
 
251
    reset_info->cpu = cpu;
248
252
    reset_info->vector = env->pc;
249
253
    qemu_register_reset(main_cpu_reset, reset_info);
250
254