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

« back to all changes in this revision

Viewing changes to hw/mips/mips_mipssim.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:
37
37
#include "elf.h"
38
38
#include "hw/sysbus.h"
39
39
#include "exec/address-spaces.h"
 
40
#include "qemu/error-report.h"
40
41
 
41
42
static struct _loaderparams {
42
43
    int ram_size;
83
84
    if (loaderparams.initrd_filename) {
84
85
        initrd_size = get_image_size (loaderparams.initrd_filename);
85
86
        if (initrd_size > 0) {
86
 
            initrd_offset = (kernel_high + ~TARGET_PAGE_MASK) & TARGET_PAGE_MASK;
 
87
            initrd_offset = (kernel_high + ~INITRD_PAGE_MASK) & INITRD_PAGE_MASK;
87
88
            if (initrd_offset + initrd_size > loaderparams.ram_size) {
88
89
                fprintf(stderr,
89
90
                        "qemu: memory too small for initial ram disk '%s'\n",
140
141
    const char *initrd_filename = args->initrd_filename;
141
142
    char *filename;
142
143
    MemoryRegion *address_space_mem = get_system_memory();
 
144
    MemoryRegion *isa = g_new(MemoryRegion, 1);
143
145
    MemoryRegion *ram = g_new(MemoryRegion, 1);
144
146
    MemoryRegion *bios = g_new(MemoryRegion, 1);
145
147
    MIPSCPU *cpu;
168
170
    qemu_register_reset(main_cpu_reset, reset_info);
169
171
 
170
172
    /* Allocate RAM. */
171
 
    memory_region_init_ram(ram, "mips_mipssim.ram", ram_size);
 
173
    memory_region_init_ram(ram, NULL, "mips_mipssim.ram", ram_size);
172
174
    vmstate_register_ram_global(ram);
173
 
    memory_region_init_ram(bios, "mips_mipssim.bios", BIOS_SIZE);
 
175
    memory_region_init_ram(bios, NULL, "mips_mipssim.bios", BIOS_SIZE);
174
176
    vmstate_register_ram_global(bios);
175
177
    memory_region_set_readonly(bios, true);
176
178
 
190
192
    }
191
193
    if ((bios_size < 0 || bios_size > BIOS_SIZE) && !kernel_filename) {
192
194
        /* Bail out if we have neither a kernel image nor boot vector code. */
193
 
        fprintf(stderr,
194
 
                "qemu: Could not load MIPS bios '%s', and no -kernel argument was specified\n",
195
 
                filename);
 
195
        error_report("Could not load MIPS bios '%s', and no "
 
196
                     "-kernel argument was specified", filename);
196
197
        exit(1);
197
198
    } else {
198
199
        /* We have a boot vector start address. */
212
213
    cpu_mips_clock_init(env);
213
214
 
214
215
    /* Register 64 KB of ISA IO space at 0x1fd00000. */
215
 
    isa_mmio_init(0x1fd00000, 0x00010000);
 
216
    memory_region_init_alias(isa, NULL, "isa_mmio",
 
217
                             get_system_io(), 0, 0x00010000);
 
218
    memory_region_add_subregion(get_system_memory(), 0x1fd00000, isa);
216
219
 
217
220
    /* A single 16450 sits at offset 0x3f8. It is attached to
218
221
       MIPS CPU INT2, which is interrupt 4. */