~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to hw/xtensa/xtensa_lx60.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
{
110
110
    Lx60FpgaState *s = g_malloc(sizeof(Lx60FpgaState));
111
111
 
112
 
    memory_region_init_io(&s->iomem, &lx60_fpga_ops, s,
 
112
    memory_region_init_io(&s->iomem, NULL, &lx60_fpga_ops, s,
113
113
            "lx60.fpga", 0x10000);
114
114
    memory_region_add_subregion(address_space, base, &s->iomem);
115
115
    lx60_fpga_reset(s);
139
139
            sysbus_mmio_get_region(s, 1));
140
140
 
141
141
    ram = g_malloc(sizeof(*ram));
142
 
    memory_region_init_ram(ram, "open_eth.ram", 16384);
 
142
    memory_region_init_ram(ram, OBJECT(s), "open_eth.ram", 16384);
143
143
    vmstate_register_ram_global(ram);
144
144
    memory_region_add_subregion(address_space, buffers, ram);
145
145
}
146
146
 
147
 
static uint64_t translate_phys_addr(void *env, uint64_t addr)
 
147
static uint64_t translate_phys_addr(void *opaque, uint64_t addr)
148
148
{
149
 
    return cpu_get_phys_page_debug(env, addr);
 
149
    XtensaCPU *cpu = opaque;
 
150
 
 
151
    return cpu_get_phys_page_debug(CPU(cpu), addr);
150
152
}
151
153
 
152
154
static void lx60_reset(void *opaque)
195
197
    }
196
198
 
197
199
    ram = g_malloc(sizeof(*ram));
198
 
    memory_region_init_ram(ram, "lx60.dram", args->ram_size);
 
200
    memory_region_init_ram(ram, NULL, "lx60.dram", args->ram_size);
199
201
    vmstate_register_ram_global(ram);
200
202
    memory_region_add_subregion(system_memory, 0, ram);
201
203
 
202
204
    system_io = g_malloc(sizeof(*system_io));
203
 
    memory_region_init(system_io, "lx60.io", 224 * 1024 * 1024);
 
205
    memory_region_init(system_io, NULL, "lx60.io", 224 * 1024 * 1024);
204
206
    memory_region_add_subregion(system_memory, 0xf0000000, system_io);
205
207
    lx60_fpga_init(system_io, 0x0d020000);
206
208
    if (nd_table[0].used) {
231
233
    /* Use presence of kernel file name as 'boot from SRAM' switch. */
232
234
    if (kernel_filename) {
233
235
        rom = g_malloc(sizeof(*rom));
234
 
        memory_region_init_ram(rom, "lx60.sram", board->sram_size);
 
236
        memory_region_init_ram(rom, NULL, "lx60.sram", board->sram_size);
235
237
        vmstate_register_ram_global(rom);
236
238
        memory_region_add_subregion(system_memory, 0xfe000000, rom);
237
239
 
252
254
        }
253
255
        uint64_t elf_entry;
254
256
        uint64_t elf_lowaddr;
255
 
        int success = load_elf(kernel_filename, translate_phys_addr, env,
 
257
        int success = load_elf(kernel_filename, translate_phys_addr, cpu,
256
258
                &elf_entry, &elf_lowaddr, NULL, be, ELF_MACHINE, 0);
257
259
        if (success > 0) {
258
260
            env->pc = elf_entry;
262
264
            MemoryRegion *flash_mr = pflash_cfi01_get_memory(flash);
263
265
            MemoryRegion *flash_io = g_malloc(sizeof(*flash_io));
264
266
 
265
 
            memory_region_init_alias(flash_io, "lx60.flash",
 
267
            memory_region_init_alias(flash_io, NULL, "lx60.flash",
266
268
                    flash_mr, 0, board->flash_size);
267
269
            memory_region_add_subregion(system_memory, 0xfe000000,
268
270
                    flash_io);