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

« back to all changes in this revision

Viewing changes to hw/mips/mips_fulong2e.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:
43
43
#include "hw/timer/i8254.h"
44
44
#include "sysemu/blockdev.h"
45
45
#include "exec/address-spaces.h"
 
46
#include "sysemu/qtest.h"
 
47
#include "qemu/error-report.h"
46
48
 
47
49
#define DEBUG_FULONG2E_INIT
48
50
 
126
128
    if (loaderparams.initrd_filename) {
127
129
        initrd_size = get_image_size (loaderparams.initrd_filename);
128
130
        if (initrd_size > 0) {
129
 
            initrd_offset = (kernel_high + ~TARGET_PAGE_MASK) & TARGET_PAGE_MASK;
 
131
            initrd_offset = (kernel_high + ~INITRD_PAGE_MASK) & INITRD_PAGE_MASK;
130
132
            if (initrd_offset + initrd_size > ram_size) {
131
133
                fprintf(stderr,
132
134
                        "qemu: memory too small for initial ram disk '%s'\n",
231
233
}
232
234
 
233
235
/* Network support */
234
 
static void network_init (void)
 
236
static void network_init (PCIBus *pci_bus)
235
237
{
236
238
    int i;
237
239
 
244
246
            default_devaddr = "07";
245
247
        }
246
248
 
247
 
        pci_nic_init_nofail(nd, "rtl8139", default_devaddr);
 
249
        pci_nic_init_nofail(nd, pci_bus, "rtl8139", default_devaddr);
248
250
    }
249
251
}
250
252
 
251
253
static void cpu_request_exit(void *opaque, int irq, int level)
252
254
{
253
 
    CPUMIPSState *env = cpu_single_env;
 
255
    CPUState *cpu = current_cpu;
254
256
 
255
 
    if (env && level) {
256
 
        cpu_exit(env);
 
257
    if (cpu && level) {
 
258
        cpu_exit(cpu);
257
259
    }
258
260
}
259
261
 
300
302
    bios_size = 1024 * 1024;
301
303
 
302
304
    /* allocate RAM */
303
 
    memory_region_init_ram(ram, "fulong2e.ram", ram_size);
 
305
    memory_region_init_ram(ram, NULL, "fulong2e.ram", ram_size);
304
306
    vmstate_register_ram_global(ram);
305
 
    memory_region_init_ram(bios, "fulong2e.bios", bios_size);
 
307
    memory_region_init_ram(bios, NULL, "fulong2e.bios", bios_size);
306
308
    vmstate_register_ram_global(bios);
307
309
    memory_region_set_readonly(bios, true);
308
310
 
332
334
            bios_size = -1;
333
335
        }
334
336
 
335
 
        if ((bios_size < 0 || bios_size > BIOS_SIZE) && !kernel_filename) {
336
 
            fprintf(stderr, "qemu: Could not load MIPS bios '%s'\n", bios_name);
 
337
        if ((bios_size < 0 || bios_size > BIOS_SIZE) &&
 
338
            !kernel_filename && !qtest_enabled()) {
 
339
            error_report("Could not load MIPS bios '%s'", bios_name);
337
340
            exit(1);
338
341
        }
339
342
    }
393
396
    /* Sound card */
394
397
    audio_init(pci_bus);
395
398
    /* Network card */
396
 
    network_init();
 
399
    network_init(pci_bus);
397
400
}
398
401
 
399
402
static QEMUMachine mips_fulong2e_machine = {