├── VERSION ├── sysconfigs └── target │ └── target-x86_64.conf ├── hw ├── sparc64 │ └── Makefile.objs ├── sparc │ └── Makefile.objs ├── alpha │ ├── Makefile.objs │ └── alpha_sys.h ├── block │ └── dataplane │ │ └── Makefile.objs ├── moxie │ └── Makefile.objs ├── virtio │ ├── dataplane │ │ └── Makefile.objs │ └── Makefile.objs ├── acpi │ └── Makefile.objs ├── openrisc │ └── Makefile.objs ├── cris │ ├── Makefile.objs │ └── boot.h ├── i386 │ ├── kvm │ │ └── Makefile.objs │ ├── Makefile.objs │ ├── multiboot.h │ └── xen_domainbuild.h ├── lm32 │ └── Makefile.objs ├── xtensa │ └── Makefile.objs ├── bt │ └── Makefile.objs ├── sh4 │ ├── Makefile.objs │ └── sh7750_regnames.h ├── m68k │ └── Makefile.objs ├── tpm │ └── Makefile.objs ├── microblaze │ ├── Makefile.objs │ ├── pic_cpu.h │ └── boot.h ├── misc │ └── macio │ │ └── Makefile.objs ├── unicore32 │ └── Makefile.objs ├── watchdog │ └── Makefile.objs ├── mips │ └── Makefile.objs ├── cpu │ └── Makefile.objs ├── nvram │ └── Makefile.objs ├── pci-bridge │ ├── Makefile.objs │ ├── dec.h │ ├── ioh3420.h │ ├── xio3130_upstream.h │ └── xio3130_downstream.h ├── gpio │ └── Makefile.objs ├── ssi │ └── Makefile.objs ├── s390x │ └── Makefile.objs ├── sd │ └── Makefile.objs ├── xen │ └── Makefile.objs ├── i2c │ ├── Makefile.objs │ └── bitbang_i2c.h ├── isa │ └── Makefile.objs ├── arm │ └── Makefile.objs ├── 9pfs │ └── Makefile.objs ├── ppc │ └── e500-ccsr.h ├── pci │ └── Makefile.objs ├── scsi │ └── Makefile.objs ├── input │ └── Makefile.objs ├── core │ └── Makefile.objs ├── ide │ └── Makefile.objs ├── dma │ └── Makefile.objs └── pci-host │ └── Makefile.objs ├── roms ├── config.seabios ├── config.ipxe.general.h ├── config.vga.isavga ├── config.vga.stdvga ├── config.vga.cirrus ├── configure-seabios.sh ├── config.vga.qxl └── config.vga.vmware ├── linux-headers ├── asm-arm │ └── kvm_para.h ├── README ├── asm-generic │ └── kvm_para.h └── asm-s390 │ └── kvm_para.h ├── default-configs ├── s390x-softmmu.mak ├── cris-linux-user.mak ├── i386-bsd-user.mak ├── i386-linux-user.mak ├── mips-linux-user.mak ├── or32-linux-user.mak ├── sh4-linux-user.mak ├── sparc-bsd-user.mak ├── x86_64-bsd-user.mak ├── alpha-linux-user.mak ├── mips64-linux-user.mak ├── mipsel-linux-user.mak ├── s390x-linux-user.mak ├── sh4eb-linux-user.mak ├── sparc-linux-user.mak ├── sparc64-bsd-user.mak ├── x86_64-linux-user.mak ├── mips64el-linux-user.mak ├── mipsn32-linux-user.mak ├── mipsn32el-linux-user.mak ├── sparc64-linux-user.mak ├── unicore32-linux-user.mak ├── microblaze-linux-user.mak ├── sparc32plus-linux-user.mak ├── microblazeel-linux-user.mak ├── sound.mak ├── arm-linux-user.mak ├── m68k-linux-user.mak ├── ppc-linux-user.mak ├── armeb-linux-user.mak ├── ppc64-linux-user.mak ├── ppc64abi32-linux-user.mak ├── or32-softmmu.mak ├── moxie-softmmu.mak ├── unicore32-softmmu.mak ├── xtensa-softmmu.mak ├── xtensaeb-softmmu.mak ├── cris-softmmu.mak ├── m68k-softmmu.mak ├── usb.mak ├── sh4-softmmu.mak ├── sh4eb-softmmu.mak ├── lm32-softmmu.mak ├── microblaze-softmmu.mak ├── microblazeel-softmmu.mak ├── alpha-softmmu.mak ├── sparc64-softmmu.mak └── sparc-softmmu.mak ├── include ├── config.h ├── trace.h ├── hw │ ├── qdev.h │ ├── empty_slot.h │ ├── mips │ │ ├── bios.h │ │ └── cpudevs.h │ ├── pci-host │ │ ├── ppce500.h │ │ └── apb.h │ ├── pci │ │ └── slotid_cap.h │ ├── audio │ │ └── audio.h │ ├── arm │ │ ├── primecell.h │ │ └── sharpsl.h │ ├── isa │ │ ├── vt82c686.h │ │ └── apm.h │ ├── lm32 │ │ ├── lm32_juart.h │ │ └── lm32_pic.h │ ├── qdev-dma.h │ ├── timer │ │ └── mc146818rtc.h │ ├── char │ │ └── escc.h │ ├── i2c │ │ └── pm_smbus.h │ ├── sparc │ │ └── sparc32_dma.h │ ├── kvm │ │ └── clock.h │ └── virtio │ │ └── virtio-9p.h ├── monitor │ └── qdev.h ├── qemu │ ├── thread-posix.h │ └── envlist.h ├── exec │ └── hwaddr.h └── sysemu │ ├── tpm.h │ └── rng-random.h ├── linux-user ├── cpu-uname.h ├── unicore32 │ └── termbits.h ├── arm │ └── nwfpe │ │ └── Makefile.objs ├── sparc │ └── syscall.h ├── sparc64 │ └── syscall.h ├── Makefile.objs ├── sh4 │ └── syscall.h └── m68k │ └── syscall.h ├── pc-bios ├── keymaps │ ├── nl-be │ └── modifiers ├── bios.bin ├── slof.bin ├── bamboo.dtb ├── ppc_rom.bin ├── sgabios.bin ├── vgabios.bin ├── acpi-dsdt.aml ├── efi-e1000.rom ├── efi-pcnet.rom ├── efi-virtio.rom ├── kvmvapic.bin ├── linuxboot.bin ├── multiboot.bin ├── openbios-ppc ├── pxe-e1000.rom ├── pxe-pcnet.rom ├── pxe-virtio.rom ├── qemu-icon.bmp ├── s390-ccw.img ├── s390-zipl.rom ├── spapr-rtas.bin ├── efi-eepro100.rom ├── efi-ne2k_pci.rom ├── efi-rtl8139.rom ├── openbios-sparc32 ├── openbios-sparc64 ├── palcode-clipper ├── pxe-eepro100.rom ├── pxe-ne2k_pci.rom ├── pxe-rtl8139.rom ├── vgabios-qxl.bin ├── petalogix-ml605.dtb ├── q35-acpi-dsdt.aml ├── vgabios-cirrus.bin ├── vgabios-stdvga.bin ├── vgabios-vmware.bin ├── petalogix-s3adsp1800.dtb └── Makefile ├── target-moxie ├── machine.h ├── Makefile.objs ├── helper.h └── mmu.h ├── target-sh4 └── Makefile.objs ├── scripts ├── qtest ├── tracetool │ └── format │ │ ├── c.py │ │ └── d.py ├── gtester-cat └── make-release ├── tests ├── tcg │ ├── mips │ │ ├── mips64-dspr2 │ │ │ ├── .directory │ │ │ ├── head.S │ │ │ ├── shrl_ph.c │ │ │ ├── shrav_ob.c │ │ │ ├── shrav_r_ob.c │ │ │ ├── subqh_w.c │ │ │ ├── shrlv_ph.c │ │ │ ├── subqh_ph.c │ │ │ ├── subqh_r_w.c │ │ │ ├── subuh_qb.c │ │ │ ├── precr_qb_ph.c │ │ │ ├── subqh_r_ph.c │ │ │ └── subuh_r_ob.c │ │ ├── mips32-dsp │ │ │ ├── main.c │ │ │ ├── repl_qb.c │ │ │ ├── replv_ph.c │ │ │ ├── bitrev.c │ │ │ ├── raddu_w_qb.c │ │ │ ├── replv_qb.c │ │ │ ├── preceq_w_phl.c │ │ │ ├── preceq_w_phr.c │ │ │ ├── preceu_ph_qbl.c │ │ │ ├── preceu_ph_qbr.c │ │ │ ├── precequ_ph_qbl.c │ │ │ ├── precequ_ph_qbla.c │ │ │ ├── precequ_ph_qbr.c │ │ │ ├── precequ_ph_qbra.c │ │ │ ├── preceu_ph_qbla.c │ │ │ ├── preceu_ph_qbra.c │ │ │ ├── mfhi.c │ │ │ ├── mflo.c │ │ │ ├── mthi.c │ │ │ ├── mtlo.c │ │ │ ├── packrl_ph.c │ │ │ ├── precrq_ph_w.c │ │ │ ├── precrq_qb_ph.c │ │ │ ├── repl_ph.c │ │ │ ├── lhx.c │ │ │ ├── lwx.c │ │ │ ├── lbux.c │ │ │ ├── precrqu_s_qb_ph.c │ │ │ ├── shll_s_ph.c │ │ │ ├── mulq_rs_ph.c │ │ │ ├── subu_qb.c │ │ │ ├── muleu_s_ph_qbl.c │ │ │ ├── muleu_s_ph_qbr.c │ │ │ ├── mult.c │ │ │ ├── multu.c │ │ │ ├── subu_s_qb.c │ │ │ ├── absq_s_ph.c │ │ │ ├── shra_ph.c │ │ │ └── shra_r_w.c │ │ ├── mips64-dsp │ │ │ ├── head.S │ │ │ ├── repl_qb.c │ │ │ ├── repl_ob.c │ │ │ ├── replv_ob.c │ │ │ ├── replv_ph.c │ │ │ ├── bitrev.c │ │ │ ├── raddu_w_qb.c │ │ │ ├── replv_qb.c │ │ │ ├── mtlo.c │ │ │ ├── preceq_pw_qhl.c │ │ │ ├── preceq_pw_qhr.c │ │ │ ├── raddu_l_ob.c │ │ │ ├── replv_pw.c │ │ │ ├── shra_ob.c │ │ │ ├── shra_r_ob.c │ │ │ ├── shrl_qh.c │ │ │ ├── shrl_qb.c │ │ │ ├── preceq_w_phr.c │ │ │ ├── preceu_ph_qbl.c │ │ │ ├── preceu_ph_qbr.c │ │ │ ├── preceu_qh_obl.c │ │ │ ├── preceu_qh_obla.c │ │ │ ├── shra_ph.c │ │ │ ├── preceq_pw_qhla.c │ │ │ ├── preceq_pw_qhra.c │ │ │ ├── preceq_w_phl.c │ │ │ ├── precequ_ph_qbl.c │ │ │ ├── precequ_ph_qbla.c │ │ │ ├── precequ_ph_qbr.c │ │ │ ├── precequ_ph_qbra.c │ │ │ ├── precequ_qh_obl.c │ │ │ ├── precequ_qh_obla.c │ │ │ ├── preceu_ph_qbla.c │ │ │ ├── preceu_ph_qbra.c │ │ │ ├── preceu_qh_obr.c │ │ │ ├── preceu_qh_obra.c │ │ │ ├── shra_r_ph.c │ │ │ ├── shra_r_w.c │ │ │ ├── precequ_qh_obr.c │ │ │ ├── precequ_qh_obra.c │ │ │ ├── mfhi.c │ │ │ ├── mflo.c │ │ │ ├── mthi.c │ │ │ ├── preceq_l_pwl.c │ │ │ ├── preceq_l_pwr.c │ │ │ ├── shrlv_qh.c │ │ │ ├── packrl_ph.c │ │ │ ├── shrlv_qb.c │ │ │ ├── precrq_ph_w.c │ │ │ ├── precrq_qb_ph.c │ │ │ ├── shrav_ph.c │ │ │ ├── shrav_r_w.c │ │ │ ├── packrl_pw.c │ │ │ ├── shrav_r_ph.c │ │ │ ├── precr_ob_qh.c │ │ │ ├── precrq_ob_qh.c │ │ │ ├── precrq_pw_l.c │ │ │ ├── precrq_qh_pw.c │ │ │ ├── dinsv.c │ │ │ ├── shll_qb.c │ │ │ ├── insv.c │ │ │ ├── ldx.c │ │ │ ├── lbux.c │ │ │ ├── lhx.c │ │ │ ├── lwx.c │ │ │ ├── shll_s_w.c │ │ │ ├── precrqu_s_qb_ph.c │ │ │ ├── repl_ph.c │ │ │ └── shllv_qb.c │ │ └── mips32-dspr2 │ │ │ ├── shrl_ph.c │ │ │ ├── subqh_ph.c │ │ │ ├── subqh_w.c │ │ │ ├── subuh_qb.c │ │ │ ├── precr_qb_ph.c │ │ │ ├── shrlv_ph.c │ │ │ ├── subqh_r_ph.c │ │ │ ├── subqh_r_w.c │ │ │ ├── subu_s_ph.c │ │ │ ├── shra_qb.c │ │ │ └── shra_r_qb.c │ ├── pi_10.com │ ├── alpha │ │ ├── hello-alpha.c │ │ └── crt.s │ ├── cris │ │ ├── README │ │ ├── check_hello.c │ │ ├── check_openpf4.c │ │ ├── .gdbinit │ │ ├── crt.s │ │ ├── check_cmp-2.s │ │ ├── check_stat1.c │ │ ├── check_ret.s │ │ ├── check_stat2.c │ │ ├── check_time2.c │ │ ├── sys.h │ │ ├── check_movprv32.s │ │ ├── check_gcctorture_pr28634-1.c │ │ ├── check_clearfv32.s │ │ ├── check_openpf2.c │ │ ├── check_gcctorture_pr28634.c │ │ ├── check_sigalrm.c │ │ ├── check_movpr.s │ │ └── check_not.s │ ├── xtensa │ │ ├── test_fail.S │ │ ├── test_mul32.S │ │ ├── crt.S │ │ └── test_boolean.S │ ├── lm32 │ │ ├── test_b.S │ │ ├── test_ret.S │ │ ├── test_calli.S │ │ ├── test_call.S │ │ ├── test_bi.S │ │ ├── test_break.S │ │ ├── test_scall.S │ │ ├── test_sextb.S │ │ ├── test_sexth.S │ │ ├── test_sli.S │ │ ├── test_divu.S │ │ ├── test_bret.S │ │ ├── test_eret.S │ │ ├── test_sb.S │ │ ├── test_sh.S │ │ ├── test_lw.S │ │ ├── test_cmpei.S │ │ ├── test_modu.S │ │ ├── test_ori.S │ │ ├── test_cmpnei.S │ │ ├── test_xori.S │ │ ├── test_andi.S │ │ ├── test_be.S │ │ ├── test_sw.S │ │ ├── test_bne.S │ │ └── test_orhi.S │ └── openrisc │ │ ├── test_lf_mul.c │ │ ├── test_sfles.c │ │ ├── test_j.c │ │ └── test_jal.c ├── qemu-iotests │ ├── 045.out │ ├── 030.out │ ├── .gitignore │ ├── 040.out │ ├── 041.out │ ├── Makefile │ ├── 006.out │ ├── 044.out │ ├── 012.out │ ├── 007.out │ ├── 005.out │ ├── 042.out │ ├── 054.out │ ├── 029.out │ ├── 052.out │ ├── 001.out │ ├── 008.out │ └── 053.out ├── .gitignore ├── libqos │ ├── pci-pc.h │ ├── fw_cfg-pc.h │ ├── malloc-pc.h │ └── i2c.c ├── check-block.sh └── qemu-iotests-quick.sh ├── stubs ├── cpus.c ├── sysbus.c ├── fd-register.c ├── get-vm-name.c ├── clock-warp.c ├── vm-stop.c ├── mon-is-qmp.c ├── cpu-get-clock.c ├── fdset-find-fd.c ├── fdset-remove-fd.c ├── mon-print-filename.c ├── mon-protocol-event.c ├── fdset-get-fd.c ├── cpu-get-icount.c ├── fdset-add-fd.c ├── mon-set-error.c ├── iothread-lock.c ├── migr-blocker.c ├── get-fd.c ├── mon-printf.c ├── arch-query-cpu-def.c ├── slirp.c ├── reset.c ├── set-fd-handler.c └── pci-drive-hot-add.c ├── README ├── qom └── Makefile.objs ├── target-m68k ├── Makefile.objs ├── m68k-qreg.h └── qregs.def ├── target-lm32 ├── TODO ├── Makefile.objs └── helper.h ├── target-microblaze └── Makefile.objs ├── bsd-user ├── Makefile.objs ├── sparc │ └── syscall.h ├── sparc64 │ └── syscall.h ├── x86_64 │ └── target_signal.h └── i386 │ └── target_signal.h ├── target-cris ├── Makefile.objs └── mmu.h ├── target-mips └── Makefile.objs ├── target-unicore32 └── Makefile.objs ├── target-alpha └── Makefile.objs ├── tcg ├── LICENSE └── TODO ├── libcacard ├── vcardt_internal.h └── libcacard.pc.in ├── qobject └── Makefile.objs ├── target-xtensa └── Makefile.objs ├── target-arm └── Makefile.objs ├── target-s390x └── Makefile.objs ├── trace └── ftrace.h ├── target-openrisc └── Makefile.objs ├── .exrc ├── slirp └── Makefile.objs ├── qapi └── Makefile.objs ├── backends └── Makefile.objs ├── ui └── qemu-x509.h ├── target-sparc └── Makefile.objs ├── qga └── Makefile.objs ├── fsdev ├── Makefile.objs └── qemu-fsdev-dummy.c ├── audio └── audio_win_int.h ├── target-i386 ├── Makefile.objs └── kvm-stub.c ├── target-ppc └── Makefile.objs ├── net └── Makefile.objs ├── LICENSE └── docs └── spice-port-fqdn.txt /VERSION: -------------------------------------------------------------------------------- 1 | 1.5.50 2 | -------------------------------------------------------------------------------- /sysconfigs/target/target-x86_64.conf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hw/sparc64/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += sun4u.o 2 | -------------------------------------------------------------------------------- /hw/sparc/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += sun4m.o leon3.o 2 | -------------------------------------------------------------------------------- /hw/alpha/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += dp264.o pci.o typhoon.o 2 | -------------------------------------------------------------------------------- /roms/config.seabios: -------------------------------------------------------------------------------- 1 | # empty, default config works for us 2 | -------------------------------------------------------------------------------- /hw/block/dataplane/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += ioq.o virtio-blk.o 2 | -------------------------------------------------------------------------------- /hw/moxie/Makefile.objs: -------------------------------------------------------------------------------- 1 | # moxie boards 2 | obj-y += moxiesim.o 3 | -------------------------------------------------------------------------------- /hw/virtio/dataplane/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += hostmem.o vring.o 2 | -------------------------------------------------------------------------------- /linux-headers/asm-arm/kvm_para.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /default-configs/s390x-softmmu.mak: -------------------------------------------------------------------------------- 1 | CONFIG_VIRTIO=y 2 | CONFIG_SCLPCONSOLE=y 3 | -------------------------------------------------------------------------------- /include/config.h: -------------------------------------------------------------------------------- 1 | #include "config-host.h" 2 | #include "config-target.h" 3 | -------------------------------------------------------------------------------- /linux-user/cpu-uname.h: -------------------------------------------------------------------------------- 1 | const char *cpu_to_uname_machine(void *cpu_env); 2 | -------------------------------------------------------------------------------- /pc-bios/keymaps/nl-be: -------------------------------------------------------------------------------- 1 | # Dutch (Belgium) 2 | map 0x813 3 | include common 4 | -------------------------------------------------------------------------------- /target-moxie/machine.h: -------------------------------------------------------------------------------- 1 | extern const VMStateDescription vmstate_moxie_cpu; 2 | -------------------------------------------------------------------------------- /target-sh4/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += translate.o op_helper.o helper.o cpu.o 2 | -------------------------------------------------------------------------------- /default-configs/cris-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for cris-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/i386-bsd-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for i386-bsd-user 2 | -------------------------------------------------------------------------------- /default-configs/i386-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for i386-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/mips-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for mips-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/or32-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for or32-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/sh4-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sh4-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/sparc-bsd-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sparc-bsd-user 2 | -------------------------------------------------------------------------------- /default-configs/x86_64-bsd-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for x86_64-bsd-user 2 | -------------------------------------------------------------------------------- /hw/acpi/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-$(CONFIG_ACPI) += core.o piix4.o ich9.o 2 | 3 | -------------------------------------------------------------------------------- /roms/config.ipxe.general.h: -------------------------------------------------------------------------------- 1 | #undef BANNER_TIMEOUT 2 | #define BANNER_TIMEOUT 0 3 | -------------------------------------------------------------------------------- /scripts/qtest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export QTEST_QEMU_BINARY=$1 4 | shift 5 | "$@" 6 | -------------------------------------------------------------------------------- /default-configs/alpha-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for alpha-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/mips64-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for mips64-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/mipsel-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for mipsel-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/s390x-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for s390x-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/sh4eb-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sh4eb-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/sparc-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sparc-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/sparc64-bsd-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sparc64-bsd-user 2 | -------------------------------------------------------------------------------- /default-configs/x86_64-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for x86_64-linux-user 2 | -------------------------------------------------------------------------------- /hw/openrisc/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y = pic_cpu.o cputimer.o 2 | obj-y += openrisc_sim.o 3 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/.directory: -------------------------------------------------------------------------------- 1 | [Dolphin] 2 | Timestamp=2012,8,3,16,41,52 3 | -------------------------------------------------------------------------------- /default-configs/mips64el-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for mips64el-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/mipsn32-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for mipsn32-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/mipsn32el-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for mipsn32el-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/sparc64-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sparc64-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/unicore32-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for unicore32-linux-user 2 | -------------------------------------------------------------------------------- /hw/cris/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += pic_cpu.o 2 | obj-y += boot.o 3 | obj-y += axis_dev88.o 4 | -------------------------------------------------------------------------------- /hw/i386/kvm/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += clock.o apic.o i8259.o ioapic.o i8254.o pci-assign.o 2 | -------------------------------------------------------------------------------- /hw/lm32/Makefile.objs: -------------------------------------------------------------------------------- 1 | # LM32 boards 2 | obj-y += lm32_boards.o 3 | obj-y += milkymist.o 4 | -------------------------------------------------------------------------------- /pc-bios/bios.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/bios.bin -------------------------------------------------------------------------------- /pc-bios/slof.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/slof.bin -------------------------------------------------------------------------------- /roms/config.vga.isavga: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_VGABIOS=y 2 | CONFIG_VGA_BOCHS=y 3 | CONFIG_VGA_PCI=n 4 | -------------------------------------------------------------------------------- /roms/config.vga.stdvga: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_VGABIOS=y 2 | CONFIG_VGA_BOCHS=y 3 | CONFIG_VGA_PCI=y 4 | -------------------------------------------------------------------------------- /stubs/cpus.c: -------------------------------------------------------------------------------- 1 | #include "qom/cpu.h" 2 | 3 | void cpu_resume(CPUState *cpu) 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Read the documentation in qemu-doc.html or on http://wiki.qemu.org 2 | 3 | - QEMU team 4 | -------------------------------------------------------------------------------- /default-configs/microblaze-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for microblaze-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/sparc32plus-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sparc32plus-linux-user 2 | -------------------------------------------------------------------------------- /pc-bios/bamboo.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/bamboo.dtb -------------------------------------------------------------------------------- /pc-bios/ppc_rom.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/ppc_rom.bin -------------------------------------------------------------------------------- /pc-bios/sgabios.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/sgabios.bin -------------------------------------------------------------------------------- /pc-bios/vgabios.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/vgabios.bin -------------------------------------------------------------------------------- /qom/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y = object.o container.o qom-qobject.o 2 | common-obj-y += cpu.o 3 | -------------------------------------------------------------------------------- /roms/config.vga.cirrus: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_VGABIOS=y 2 | CONFIG_VGA_CIRRUS=y 3 | CONFIG_VGA_PCI=y 4 | -------------------------------------------------------------------------------- /tests/tcg/pi_10.com: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/tests/tcg/pi_10.com -------------------------------------------------------------------------------- /default-configs/microblazeel-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for microblazeel-linux-user 2 | -------------------------------------------------------------------------------- /default-configs/sound.mak: -------------------------------------------------------------------------------- 1 | CONFIG_SB16=y 2 | CONFIG_ADLIB=y 3 | CONFIG_GUS=y 4 | CONFIG_CS4231A=y 5 | -------------------------------------------------------------------------------- /hw/xtensa/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += pic_cpu.o 2 | obj-y += xtensa_sim.o 3 | obj-y += xtensa_lx60.o 4 | -------------------------------------------------------------------------------- /pc-bios/acpi-dsdt.aml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/acpi-dsdt.aml -------------------------------------------------------------------------------- /pc-bios/efi-e1000.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/efi-e1000.rom -------------------------------------------------------------------------------- /pc-bios/efi-pcnet.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/efi-pcnet.rom -------------------------------------------------------------------------------- /pc-bios/efi-virtio.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/efi-virtio.rom -------------------------------------------------------------------------------- /pc-bios/kvmvapic.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/kvmvapic.bin -------------------------------------------------------------------------------- /pc-bios/linuxboot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/linuxboot.bin -------------------------------------------------------------------------------- /pc-bios/multiboot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/multiboot.bin -------------------------------------------------------------------------------- /pc-bios/openbios-ppc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/openbios-ppc -------------------------------------------------------------------------------- /pc-bios/pxe-e1000.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/pxe-e1000.rom -------------------------------------------------------------------------------- /pc-bios/pxe-pcnet.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/pxe-pcnet.rom -------------------------------------------------------------------------------- /pc-bios/pxe-virtio.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/pxe-virtio.rom -------------------------------------------------------------------------------- /pc-bios/qemu-icon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/qemu-icon.bmp -------------------------------------------------------------------------------- /pc-bios/s390-ccw.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/s390-ccw.img -------------------------------------------------------------------------------- /pc-bios/s390-zipl.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/s390-zipl.rom -------------------------------------------------------------------------------- /pc-bios/spapr-rtas.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/spapr-rtas.bin -------------------------------------------------------------------------------- /target-m68k/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += m68k-semi.o 2 | obj-y += translate.o op_helper.o helper.o cpu.o 3 | -------------------------------------------------------------------------------- /hw/bt/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += core.o l2cap.o sdp.o hci.o hid.o 2 | common-obj-y += hci-csr.o 3 | 4 | -------------------------------------------------------------------------------- /linux-user/unicore32/termbits.h: -------------------------------------------------------------------------------- 1 | /* NOTE: exactly the same as i386 */ 2 | #include "../i386/termbits.h" 3 | -------------------------------------------------------------------------------- /pc-bios/efi-eepro100.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/efi-eepro100.rom -------------------------------------------------------------------------------- /pc-bios/efi-ne2k_pci.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/efi-ne2k_pci.rom -------------------------------------------------------------------------------- /pc-bios/efi-rtl8139.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/efi-rtl8139.rom -------------------------------------------------------------------------------- /pc-bios/openbios-sparc32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/openbios-sparc32 -------------------------------------------------------------------------------- /pc-bios/openbios-sparc64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/openbios-sparc64 -------------------------------------------------------------------------------- /pc-bios/palcode-clipper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/palcode-clipper -------------------------------------------------------------------------------- /pc-bios/pxe-eepro100.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/pxe-eepro100.rom -------------------------------------------------------------------------------- /pc-bios/pxe-ne2k_pci.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/pxe-ne2k_pci.rom -------------------------------------------------------------------------------- /pc-bios/pxe-rtl8139.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/pxe-rtl8139.rom -------------------------------------------------------------------------------- /pc-bios/vgabios-qxl.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/vgabios-qxl.bin -------------------------------------------------------------------------------- /target-lm32/TODO: -------------------------------------------------------------------------------- 1 | * disassembler (lm32-dis.c) 2 | * linux-user emulation 3 | * native bp/wp emulation (?) 4 | -------------------------------------------------------------------------------- /tests/tcg/alpha/hello-alpha.c: -------------------------------------------------------------------------------- 1 | int main (void) 2 | { 3 | write (1, "hello\n", 6); 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /default-configs/arm-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for arm-linux-user 2 | 3 | CONFIG_GDBSTUB_XML=y 4 | -------------------------------------------------------------------------------- /default-configs/m68k-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for m68k-linux-user 2 | 3 | CONFIG_GDBSTUB_XML=y 4 | -------------------------------------------------------------------------------- /default-configs/ppc-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for ppc-linux-user 2 | 3 | CONFIG_GDBSTUB_XML=y 4 | -------------------------------------------------------------------------------- /hw/sh4/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += shix.o r2d.o 2 | 3 | obj-y += sh7750.o sh7750_regnames.o 4 | obj-y += sh_pci.o 5 | -------------------------------------------------------------------------------- /pc-bios/petalogix-ml605.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/petalogix-ml605.dtb -------------------------------------------------------------------------------- /pc-bios/q35-acpi-dsdt.aml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/q35-acpi-dsdt.aml -------------------------------------------------------------------------------- /pc-bios/vgabios-cirrus.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/vgabios-cirrus.bin -------------------------------------------------------------------------------- /pc-bios/vgabios-stdvga.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/vgabios-stdvga.bin -------------------------------------------------------------------------------- /pc-bios/vgabios-vmware.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/vgabios-vmware.bin -------------------------------------------------------------------------------- /default-configs/armeb-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for armeb-linux-user 2 | 3 | CONFIG_GDBSTUB_XML=y 4 | -------------------------------------------------------------------------------- /default-configs/ppc64-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for ppc64-linux-user 2 | 3 | CONFIG_GDBSTUB_XML=y 4 | -------------------------------------------------------------------------------- /hw/m68k/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += an5206.o mcf5208.o 2 | obj-y += dummy_m68k.o 3 | 4 | obj-y += mcf5206.o mcf_intc.o 5 | -------------------------------------------------------------------------------- /target-lm32/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += translate.o op_helper.o helper.o cpu.o 2 | obj-$(CONFIG_SOFTMMU) += machine.o 3 | -------------------------------------------------------------------------------- /target-microblaze/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += translate.o op_helper.o helper.o cpu.o 2 | obj-$(CONFIG_SOFTMMU) += mmu.o 3 | -------------------------------------------------------------------------------- /bsd-user/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \ 2 | uaccess.o 3 | -------------------------------------------------------------------------------- /pc-bios/petalogix-s3adsp1800.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowinter/qemu-trustzone/HEAD/pc-bios/petalogix-s3adsp1800.dtb -------------------------------------------------------------------------------- /stubs/sysbus.c: -------------------------------------------------------------------------------- 1 | #include "hw/qdev-core.h" 2 | 3 | BusState *sysbus_get_default(void) 4 | { 5 | return NULL; 6 | } 7 | -------------------------------------------------------------------------------- /target-cris/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += translate.o op_helper.o helper.o cpu.o 2 | obj-$(CONFIG_SOFTMMU) += mmu.o machine.o 3 | -------------------------------------------------------------------------------- /target-moxie/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += translate.o helper.o machine.o cpu.o machine.o 2 | obj-$(CONFIG_SOFTMMU) += mmu.o 3 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | printf("hello world\n"); 6 | } 7 | -------------------------------------------------------------------------------- /default-configs/ppc64abi32-linux-user.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for ppc64abi32-linux-user 2 | 3 | CONFIG_GDBSTUB_XML=y 4 | -------------------------------------------------------------------------------- /hw/tpm/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-$(CONFIG_TPM_TIS) += tpm_tis.o 2 | common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o 3 | -------------------------------------------------------------------------------- /linux-headers/README: -------------------------------------------------------------------------------- 1 | Automatically imported Linux kernel headers. 2 | Only use scripts/update-linux-headers.sh to update! 3 | -------------------------------------------------------------------------------- /default-configs/or32-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for or32-softmmu 2 | 3 | CONFIG_SERIAL=y 4 | CONFIG_OPENCORES_ETH=y 5 | -------------------------------------------------------------------------------- /include/trace.h: -------------------------------------------------------------------------------- 1 | #ifndef TRACE_H 2 | #define TRACE_H 3 | 4 | #include "trace/generated-tracers.h" 5 | 6 | #endif /* TRACE_H */ 7 | -------------------------------------------------------------------------------- /stubs/fd-register.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "qemu/main-loop.h" 3 | 4 | void qemu_fd_register(int fd) 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stubs/get-vm-name.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | 3 | const char *qemu_get_vm_name(void) 4 | { 5 | return NULL; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /tests/tcg/cris/README: -------------------------------------------------------------------------------- 1 | Test-suite for the cris port. Heavily based on the test-suite for the CRIS port of sim by Hans-Peter Nilsson. 2 | -------------------------------------------------------------------------------- /stubs/clock-warp.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "qemu/timer.h" 3 | 4 | void qemu_clock_warp(QEMUClock *clock) 5 | { 6 | } 7 | 8 | -------------------------------------------------------------------------------- /stubs/vm-stop.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "sysemu/sysemu.h" 3 | 4 | void vm_stop(RunState state) 5 | { 6 | abort(); 7 | } 8 | -------------------------------------------------------------------------------- /target-mips/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += translate.o dsp_helper.o op_helper.o lmi_helper.o helper.o cpu.o 2 | obj-$(CONFIG_SOFTMMU) += machine.o 3 | -------------------------------------------------------------------------------- /tests/qemu-iotests/045.out: -------------------------------------------------------------------------------- 1 | ...... 2 | ---------------------------------------------------------------------- 3 | Ran 6 tests 4 | 5 | OK 6 | -------------------------------------------------------------------------------- /default-configs/moxie-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for moxie-softmmu 2 | 3 | CONFIG_MC146818RTC=y 4 | CONFIG_SERIAL=y 5 | CONFIG_VGA=y 6 | -------------------------------------------------------------------------------- /default-configs/unicore32-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for unicore32-softmmu 2 | CONFIG_PUV3=y 3 | CONFIG_PTIMER=y 4 | CONFIG_PCKBD=y 5 | -------------------------------------------------------------------------------- /hw/microblaze/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += petalogix_s3adsp1800_mmu.o 2 | obj-y += petalogix_ml605_mmu.o 3 | obj-y += boot.o 4 | obj-y += pic_cpu.o 5 | -------------------------------------------------------------------------------- /hw/misc/macio/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += macio.o 2 | common-obj-$(CONFIG_CUDA) += cuda.o 3 | common-obj-$(CONFIG_MAC_DBDMA) += mac_dbdma.o 4 | -------------------------------------------------------------------------------- /hw/unicore32/Makefile.objs: -------------------------------------------------------------------------------- 1 | # For UniCore32 machines and boards 2 | 3 | # PKUnity-v3 SoC and board information 4 | obj-${CONFIG_PUV3} += puv3.o 5 | -------------------------------------------------------------------------------- /linux-headers/asm-generic/kvm_para.h: -------------------------------------------------------------------------------- 1 | /* 2 | * There isn't anything here, but the file must not be empty or patch 3 | * will delete it. 4 | */ 5 | -------------------------------------------------------------------------------- /stubs/mon-is-qmp.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "monitor/monitor.h" 3 | 4 | int monitor_cur_is_qmp(void) 5 | { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /tests/qemu-iotests/030.out: -------------------------------------------------------------------------------- 1 | ............. 2 | ---------------------------------------------------------------------- 3 | Ran 13 tests 4 | 5 | OK 6 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main () 4 | { 5 | printf ("pass\n"); 6 | exit (0); 7 | } 8 | -------------------------------------------------------------------------------- /default-configs/xtensa-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for Xtensa 2 | 3 | CONFIG_SERIAL=y 4 | CONFIG_OPENCORES_ETH=y 5 | CONFIG_PFLASH_CFI01=y 6 | -------------------------------------------------------------------------------- /default-configs/xtensaeb-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for Xtensa 2 | 3 | CONFIG_SERIAL=y 4 | CONFIG_OPENCORES_ETH=y 5 | CONFIG_PFLASH_CFI01=y 6 | -------------------------------------------------------------------------------- /tests/qemu-iotests/.gitignore: -------------------------------------------------------------------------------- 1 | check.log 2 | check.time 3 | *.out.bad 4 | *.notrun 5 | 6 | # ignore everything in the scratch directory 7 | scratch/ 8 | -------------------------------------------------------------------------------- /tests/qemu-iotests/040.out: -------------------------------------------------------------------------------- 1 | ................ 2 | ---------------------------------------------------------------------- 3 | Ran 16 tests 4 | 5 | OK 6 | -------------------------------------------------------------------------------- /roms/configure-seabios.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | config="$1" 3 | make -C seabios clean distclean 4 | cp "$config" seabios/.config 5 | make -C seabios oldnoconfig 6 | -------------------------------------------------------------------------------- /target-unicore32/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += translate.o op_helper.o helper.o cpu.o 2 | obj-y += ucf64_helper.o 3 | 4 | obj-$(CONFIG_SOFTMMU) += softmmu.o 5 | -------------------------------------------------------------------------------- /hw/watchdog/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += watchdog.o 2 | common-obj-$(CONFIG_WDT_IB6300ESB) += wdt_i6300esb.o 3 | common-obj-$(CONFIG_WDT_IB700) += wdt_ib700.o 4 | -------------------------------------------------------------------------------- /linux-user/arm/nwfpe/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o 2 | obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o 3 | -------------------------------------------------------------------------------- /tests/qemu-iotests/041.out: -------------------------------------------------------------------------------- 1 | ........................ 2 | ---------------------------------------------------------------------- 3 | Ran 24 tests 4 | 5 | OK 6 | -------------------------------------------------------------------------------- /tests/tcg/xtensa/test_fail.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | test_suite fail 4 | 5 | test fail 6 | test_fail 7 | test_end 8 | 9 | test_suite_end 10 | -------------------------------------------------------------------------------- /default-configs/cris-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for cris-softmmu 2 | 3 | CONFIG_ETRAXFS=y 4 | CONFIG_NAND=y 5 | CONFIG_PTIMER=y 6 | CONFIG_PFLASH_CFI02=y 7 | -------------------------------------------------------------------------------- /include/hw/qdev.h: -------------------------------------------------------------------------------- 1 | #ifndef QDEV_H 2 | #define QDEV_H 3 | 4 | #include "hw/hw.h" 5 | #include "hw/qdev-core.h" 6 | #include "hw/qdev-properties.h" 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /stubs/cpu-get-clock.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "qemu/timer.h" 3 | 4 | int64_t cpu_get_clock(void) 5 | { 6 | return get_clock_realtime(); 7 | } 8 | -------------------------------------------------------------------------------- /stubs/fdset-find-fd.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "monitor/monitor.h" 3 | 4 | int monitor_fdset_dup_fd_find(int dup_fd) 5 | { 6 | return -1; 7 | } 8 | -------------------------------------------------------------------------------- /stubs/fdset-remove-fd.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "monitor/monitor.h" 3 | 4 | int monitor_fdset_dup_fd_remove(int dupfd) 5 | { 6 | return -1; 7 | } 8 | -------------------------------------------------------------------------------- /roms/config.vga.qxl: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_VGABIOS=y 2 | CONFIG_VGA_BOCHS=y 3 | CONFIG_VGA_PCI=y 4 | CONFIG_OVERRIDE_PCI_ID=y 5 | CONFIG_VGA_VID=0x1b36 6 | CONFIG_VGA_DID=0x0100 7 | -------------------------------------------------------------------------------- /stubs/mon-print-filename.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "monitor/monitor.h" 3 | 4 | void monitor_print_filename(Monitor *mon, const char *filename) 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /stubs/mon-protocol-event.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "monitor/monitor.h" 3 | 4 | void monitor_protocol_event(MonitorEvent event, QObject *data) 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /target-alpha/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-$(CONFIG_SOFTMMU) += machine.o 2 | obj-y += translate.o helper.o cpu.o 3 | obj-y += int_helper.o fpu_helper.o sys_helper.o mem_helper.o 4 | -------------------------------------------------------------------------------- /tcg/LICENSE: -------------------------------------------------------------------------------- 1 | All the files in this directory and subdirectories are released under 2 | a BSD like license (see header in each file). No other license is 3 | accepted. 4 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_openpf4.c: -------------------------------------------------------------------------------- 1 | /* Basic file operations, now *with* sysroot. 2 | #sim: --sysroot=@exedir@ 3 | */ 4 | #define PREFIX "/" 5 | #include "check_openpf3.c" 6 | -------------------------------------------------------------------------------- /hw/sh4/sh7750_regnames.h: -------------------------------------------------------------------------------- 1 | #ifndef _SH7750_REGNAMES_H 2 | #define _SH7750_REGNAMES_H 3 | 4 | const char *regname(uint32_t addr); 5 | 6 | #endif /* _SH7750_REGNAMES_H */ 7 | -------------------------------------------------------------------------------- /roms/config.vga.vmware: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_VGABIOS=y 2 | CONFIG_VGA_BOCHS=y 3 | CONFIG_VGA_PCI=y 4 | CONFIG_OVERRIDE_PCI_ID=y 5 | CONFIG_VGA_VID=0x15ad 6 | CONFIG_VGA_DID=0x0405 7 | -------------------------------------------------------------------------------- /stubs/fdset-get-fd.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "monitor/monitor.h" 3 | 4 | int monitor_fdset_get_fd(int64_t fdset_id, int flags) 5 | { 6 | return -1; 7 | } 8 | -------------------------------------------------------------------------------- /libcacard/vcardt_internal.h: -------------------------------------------------------------------------------- 1 | #ifndef VCARDT_INTERNAL_H 2 | #define VCARDT_INTERNAL_H 3 | 4 | unsigned char *vcard_alloc_atr(const char *postfix, int *atr_len); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /stubs/cpu-get-icount.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "qemu/timer.h" 3 | 4 | int use_icount; 5 | 6 | int64_t cpu_get_icount(void) 7 | { 8 | abort(); 9 | } 10 | -------------------------------------------------------------------------------- /stubs/fdset-add-fd.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "monitor/monitor.h" 3 | 4 | int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd) 5 | { 6 | return -1; 7 | } 8 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_b.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name B_1 6 | load r1 jump 7 | b r1 8 | tc_fail 9 | end 10 | 11 | jump: 12 | tc_pass 13 | end 14 | -------------------------------------------------------------------------------- /include/hw/empty_slot.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_EMPTY_SLOT_H 2 | #define HW_EMPTY_SLOT_H 1 3 | 4 | /* empty_slot.c */ 5 | void empty_slot_init(hwaddr addr, uint64_t slot_size); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /qobject/Makefile.objs: -------------------------------------------------------------------------------- 1 | util-obj-y = qint.o qstring.o qdict.o qlist.o qfloat.o qbool.o 2 | util-obj-y += qjson.o json-lexer.o json-streamer.o json-parser.o 3 | util-obj-y += qerror.o 4 | -------------------------------------------------------------------------------- /stubs/mon-set-error.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "monitor/monitor.h" 3 | 4 | Monitor *cur_mon; 5 | 6 | void monitor_set_error(Monitor *mon, QError *qerror) 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /target-xtensa/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += xtensa-semi.o 2 | obj-y += core-dc232b.o 3 | obj-y += core-dc233c.o 4 | obj-y += core-fsf.o 5 | obj-y += translate.o op_helper.o helper.o cpu.o 6 | -------------------------------------------------------------------------------- /tests/qemu-iotests/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CLEANFILES= *.out.bad *.notrun check.log check.time 3 | 4 | # no default target 5 | default: 6 | 7 | clean: 8 | rm -f $(CLEANFILES) 9 | 10 | -------------------------------------------------------------------------------- /default-configs/m68k-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for m68k-softmmu 2 | 3 | include pci.mak 4 | include usb.mak 5 | CONFIG_COLDFIRE=y 6 | CONFIG_GDBSTUB_XML=y 7 | CONFIG_PTIMER=y 8 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_ret.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name RET_1 6 | load ra mark 7 | ret 8 | 9 | tc_fail 10 | end 11 | 12 | mark: 13 | tc_pass 14 | end 15 | -------------------------------------------------------------------------------- /hw/mips/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o 2 | obj-y += addr.o cputimer.o mips_int.o 3 | obj-$(CONFIG_FULONG) += mips_fulong2e.o 4 | obj-y += gt64xxx_pci.o 5 | -------------------------------------------------------------------------------- /hw/cpu/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-$(CONFIG_ARM11MPCORE) += arm11mpcore.o 2 | obj-$(CONFIG_ARM9MPCORE) += a9mpcore.o 3 | obj-$(CONFIG_ARM15MPCORE) += a15mpcore.o 4 | obj-$(CONFIG_ICC_BUS) += icc_bus.o 5 | 6 | -------------------------------------------------------------------------------- /bsd-user/sparc/syscall.h: -------------------------------------------------------------------------------- 1 | struct target_pt_regs { 2 | abi_ulong psr; 3 | abi_ulong pc; 4 | abi_ulong npc; 5 | abi_ulong y; 6 | abi_ulong u_regs[16]; 7 | }; 8 | 9 | #define UNAME_MACHINE "sun4" 10 | -------------------------------------------------------------------------------- /hw/i386/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-$(CONFIG_KVM) += kvm/ 2 | obj-y += multiboot.o smbios.o 3 | obj-y += pc.o pc_piix.o pc_q35.o 4 | obj-$(CONFIG_XEN) += xen_domainbuild.o xen_machine_pv.o 5 | 6 | obj-y += kvmvapic.o 7 | -------------------------------------------------------------------------------- /linux-user/sparc/syscall.h: -------------------------------------------------------------------------------- 1 | struct target_pt_regs { 2 | abi_ulong psr; 3 | abi_ulong pc; 4 | abi_ulong npc; 5 | abi_ulong y; 6 | abi_ulong u_regs[16]; 7 | }; 8 | 9 | #define UNAME_MACHINE "sun4" 10 | -------------------------------------------------------------------------------- /stubs/iothread-lock.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "qemu/main-loop.h" 3 | 4 | void qemu_mutex_lock_iothread(void) 5 | { 6 | } 7 | 8 | void qemu_mutex_unlock_iothread(void) 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /target-arm/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += arm-semi.o 2 | obj-$(CONFIG_SOFTMMU) += machine.o 3 | obj-$(CONFIG_KVM) += kvm.o 4 | obj-y += translate.o op_helper.o helper.o cpu.o 5 | obj-y += neon_helper.o iwmmxt_helper.o 6 | -------------------------------------------------------------------------------- /hw/nvram/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-$(CONFIG_DS1225Y) += ds1225y.o 2 | common-obj-y += eeprom93xx.o 3 | common-obj-y += fw_cfg.o 4 | common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o 5 | obj-$(CONFIG_PSERIES) += spapr_nvram.o 6 | -------------------------------------------------------------------------------- /stubs/migr-blocker.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "migration/migration.h" 3 | 4 | void migrate_add_blocker(Error *reason) 5 | { 6 | } 7 | 8 | void migrate_del_blocker(Error *reason) 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /tests/tcg/cris/.gdbinit: -------------------------------------------------------------------------------- 1 | b main 2 | b _fail 3 | b exit 4 | display /i $pc 5 | display /x $srp 6 | display /x $r0 7 | display /x $r1 8 | display /x $r2 9 | display /x $r3 10 | display /x $r4 11 | display /t $ccs 12 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_calli.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name CALLI_1 6 | calli mark 7 | return: 8 | 9 | tc_fail 10 | end 11 | 12 | mark: 13 | mv r3, ra 14 | check_r3 return 15 | end 16 | -------------------------------------------------------------------------------- /hw/microblaze/pic_cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef MICROBLAZE_PIC_CPU_H 2 | #define MICROBLAZE_PIC_CPU_H 3 | 4 | #include "qemu-common.h" 5 | 6 | qemu_irq *microblaze_pic_init_cpu(CPUMBState *env); 7 | 8 | #endif /* MICROBLAZE_PIC_CPU_H */ 9 | -------------------------------------------------------------------------------- /target-s390x/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += translate.o helper.o cpu.o interrupt.o 2 | obj-y += int_helper.o fpu_helper.o cc_helper.o mem_helper.o misc_helper.o 3 | obj-$(CONFIG_SOFTMMU) += ioinst.o 4 | obj-$(CONFIG_KVM) += kvm.o 5 | -------------------------------------------------------------------------------- /tests/qemu-iotests/006.out: -------------------------------------------------------------------------------- 1 | QA output created by 006 2 | 3 | creating 128GB image 4 | qemu-img: The image size is too large for file format 'vpc' 5 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=137438953472 6 | *** done 7 | -------------------------------------------------------------------------------- /hw/pci-bridge/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += pci_bridge_dev.o 2 | common-obj-y += ioh3420.o xio3130_upstream.o xio3130_downstream.o 3 | common-obj-y += i82801b11.o 4 | # NewWorld PowerMac 5 | common-obj-$(CONFIG_DEC_PCI) += dec.o 6 | -------------------------------------------------------------------------------- /include/hw/mips/bios.h: -------------------------------------------------------------------------------- 1 | #include "cpu.h" 2 | 3 | #define BIOS_SIZE (4 * 1024 * 1024) 4 | #ifdef TARGET_WORDS_BIGENDIAN 5 | #define BIOS_FILENAME "mips_bios.bin" 6 | #else 7 | #define BIOS_FILENAME "mipsel_bios.bin" 8 | #endif 9 | -------------------------------------------------------------------------------- /include/hw/pci-host/ppce500.h: -------------------------------------------------------------------------------- 1 | #ifndef PPCE500_PCI_H 2 | #define PPCE500_PCI_H 3 | 4 | static inline int ppce500_pci_map_irq_slot(int devno, int irq_num) 5 | { 6 | return (devno + irq_num) % 4; 7 | } 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_call.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name CALL_1 6 | load r1 mark 7 | call r1 8 | return: 9 | 10 | tc_fail 11 | end 12 | 13 | mark: 14 | mv r3, ra 15 | check_r3 return 16 | end 17 | -------------------------------------------------------------------------------- /default-configs/usb.mak: -------------------------------------------------------------------------------- 1 | CONFIG_USB_TABLET_WACOM=y 2 | CONFIG_USB_STORAGE_BOT=y 3 | CONFIG_USB_STORAGE_UAS=y 4 | CONFIG_USB_SMARTCARD=y 5 | CONFIG_USB_AUDIO=y 6 | CONFIG_USB_SERIAL=y 7 | CONFIG_USB_NETWORK=y 8 | CONFIG_USB_BLUETOOTH=y 9 | -------------------------------------------------------------------------------- /tests/tcg/cris/crt.s: -------------------------------------------------------------------------------- 1 | .data 2 | _stack_start: 3 | .space 8192, 0 4 | _stack_end: 5 | .text 6 | .global _start 7 | _start: 8 | move.d _stack_end, $sp 9 | jsr main 10 | nop 11 | moveq 0, $r10 12 | jump exit 13 | nop 14 | -------------------------------------------------------------------------------- /bsd-user/sparc64/syscall.h: -------------------------------------------------------------------------------- 1 | struct target_pt_regs { 2 | abi_ulong u_regs[16]; 3 | abi_ulong tstate; 4 | abi_ulong pc; 5 | abi_ulong npc; 6 | abi_ulong y; 7 | abi_ulong fprs; 8 | }; 9 | 10 | #define UNAME_MACHINE "sun4u" 11 | -------------------------------------------------------------------------------- /hw/gpio/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-$(CONFIG_MAX7310) += max7310.o 2 | common-obj-$(CONFIG_PL061) += pl061.o 3 | common-obj-$(CONFIG_PUV3) += puv3_gpio.o 4 | common-obj-$(CONFIG_ZAURUS) += zaurus.o 5 | 6 | obj-$(CONFIG_OMAP) += omap_gpio.o 7 | -------------------------------------------------------------------------------- /hw/pci-bridge/dec.h: -------------------------------------------------------------------------------- 1 | #ifndef DEC_PCI_H 2 | #define DEC_PCI_H 3 | 4 | #include "qemu-common.h" 5 | 6 | #define TYPE_DEC_21154 "dec-21154-sysbus" 7 | 8 | PCIBus *pci_dec_21154_init(PCIBus *parent_bus, int devfn); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /linux-user/sparc64/syscall.h: -------------------------------------------------------------------------------- 1 | struct target_pt_regs { 2 | abi_ulong u_regs[16]; 3 | abi_ulong tstate; 4 | abi_ulong pc; 5 | abi_ulong npc; 6 | abi_ulong y; 7 | abi_ulong fprs; 8 | }; 9 | 10 | #define UNAME_MACHINE "sun4u" 11 | -------------------------------------------------------------------------------- /trace/ftrace.h: -------------------------------------------------------------------------------- 1 | #ifndef TRACE_FTRACE_H 2 | #define TRACE_FTRACE_H 3 | 4 | #define MAX_TRACE_STRLEN 512 5 | #define _STR(x) #x 6 | #define STR(x) _STR(x) 7 | 8 | extern int trace_marker_fd; 9 | 10 | #endif /* ! TRACE_FTRACE_H */ 11 | -------------------------------------------------------------------------------- /target-openrisc/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-$(CONFIG_SOFTMMU) += machine.o 2 | obj-y += cpu.o exception.o interrupt.o mmu.o translate.o 3 | obj-y += exception_helper.o fpu_helper.o int_helper.o \ 4 | interrupt_helper.o mmu_helper.o sys_helper.o 5 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_cmp-2.s: -------------------------------------------------------------------------------- 1 | 2 | 3 | .include "testutils.inc" 4 | 5 | start 6 | 7 | move.d 4294967283, $r0 8 | move.d $r0, $r10 9 | cmp.d $r0, $r10 10 | beq 1f 11 | move.d $r10, $r3 12 | fail 13 | 1: 14 | pass 15 | quit 16 | -------------------------------------------------------------------------------- /.exrc: -------------------------------------------------------------------------------- 1 | "VIM settings to match QEMU coding style. They are activated by adding the 2 | "following settings (without the " symbol) as last two lines in $HOME/.vimrc: 3 | "set secure 4 | "set exrc 5 | set expandtab 6 | set shiftwidth=4 7 | set smarttab 8 | -------------------------------------------------------------------------------- /hw/ssi/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-$(CONFIG_PL022) += pl022.o 2 | common-obj-$(CONFIG_SSI) += ssi.o 3 | common-obj-$(CONFIG_XILINX_SPI) += xilinx_spi.o 4 | common-obj-$(CONFIG_XILINX_SPIPS) += xilinx_spips.o 5 | 6 | obj-$(CONFIG_OMAP) += omap_spi.o 7 | -------------------------------------------------------------------------------- /stubs/get-fd.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "monitor/monitor.h" 3 | 4 | int monitor_get_fd(Monitor *mon, const char *name, Error **errp) 5 | { 6 | error_setg(errp, "only QEMU supports file descriptor passing"); 7 | return -1; 8 | } 9 | -------------------------------------------------------------------------------- /stubs/mon-printf.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "monitor/monitor.h" 3 | 4 | void monitor_printf(Monitor *mon, const char *fmt, ...) 5 | { 6 | } 7 | 8 | void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /slirp/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o dnssearch.o 2 | common-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o 3 | common-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o arp_table.o 4 | -------------------------------------------------------------------------------- /qapi/Makefile.objs: -------------------------------------------------------------------------------- 1 | util-obj-y = qapi-visit-core.o qapi-dealloc-visitor.o qmp-input-visitor.o 2 | util-obj-y += qmp-output-visitor.o qmp-registry.o qmp-dispatch.o 3 | util-obj-y += string-input-visitor.o string-output-visitor.o 4 | 5 | util-obj-y += opts-visitor.o 6 | -------------------------------------------------------------------------------- /backends/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += rng.o rng-egd.o 2 | common-obj-$(CONFIG_POSIX) += rng-random.o 3 | 4 | common-obj-y += msmouse.o 5 | common-obj-$(CONFIG_BRLAPI) += baum.o 6 | $(obj)/baum.o: QEMU_CFLAGS += $(SDL_CFLAGS) 7 | 8 | common-obj-$(CONFIG_TPM) += tpm.o 9 | -------------------------------------------------------------------------------- /default-configs/sh4-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sh4-softmmu 2 | 3 | include pci.mak 4 | include usb.mak 5 | CONFIG_SERIAL=y 6 | CONFIG_PTIMER=y 7 | CONFIG_PFLASH_CFI02=y 8 | CONFIG_ISA_MMIO=y 9 | CONFIG_SH4=y 10 | CONFIG_IDE_MMIO=y 11 | CONFIG_SM501=y 12 | -------------------------------------------------------------------------------- /default-configs/sh4eb-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sh4eb-softmmu 2 | 3 | include pci.mak 4 | include usb.mak 5 | CONFIG_SERIAL=y 6 | CONFIG_PTIMER=y 7 | CONFIG_PFLASH_CFI02=y 8 | CONFIG_ISA_MMIO=y 9 | CONFIG_SH4=y 10 | CONFIG_IDE_MMIO=y 11 | CONFIG_SM501=y 12 | -------------------------------------------------------------------------------- /hw/s390x/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y = s390-virtio-bus.o s390-virtio.o 2 | obj-y += s390-virtio-hcall.o 3 | obj-y += sclp.o 4 | obj-y += event-facility.o 5 | obj-y += sclpquiesce.o 6 | obj-y += ipl.o 7 | obj-y += css.o 8 | obj-y += s390-virtio-ccw.o 9 | obj-y += virtio-ccw.o 10 | -------------------------------------------------------------------------------- /hw/virtio/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += virtio-rng.o 2 | common-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o 3 | common-obj-y += virtio-bus.o 4 | common-obj-$(CONFIG_VIRTIO_BLK_DATA_PLANE) += dataplane/ 5 | 6 | obj-y += virtio.o virtio-balloon.o 7 | obj-$(CONFIG_LINUX) += vhost.o 8 | -------------------------------------------------------------------------------- /linux-user/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y = main.o syscall.o strace.o mmap.o signal.o \ 2 | elfload.o linuxload.o uaccess.o cpu-uname.o 3 | 4 | obj-$(TARGET_HAS_BFLT) += flatload.o 5 | obj-$(TARGET_I386) += vm86.o 6 | obj-$(TARGET_ARM) += arm/nwfpe/ 7 | obj-$(TARGET_M68K) += m68k-sim.o 8 | -------------------------------------------------------------------------------- /stubs/arch-query-cpu-def.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "sysemu/arch_init.h" 3 | #include "qapi/qmp/qerror.h" 4 | 5 | CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp) 6 | { 7 | error_set(errp, QERR_NOT_SUPPORTED); 8 | return NULL; 9 | } 10 | -------------------------------------------------------------------------------- /default-configs/lm32-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for lm32-softmmu 2 | 3 | CONFIG_LM32=y 4 | CONFIG_MILKYMIST=y 5 | CONFIG_MILKYMIST_TMU2=$(CONFIG_GLX) 6 | CONFIG_FRAMEBUFFER=y 7 | CONFIG_PTIMER=y 8 | CONFIG_PFLASH_CFI01=y 9 | CONFIG_PFLASH_CFI02=y 10 | CONFIG_SD=y 11 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_bi.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name BI_1 6 | bi jump 7 | tc_fail 8 | end 9 | 10 | jump_back: 11 | tc_pass 12 | end 13 | 14 | jump: 15 | tc_pass 16 | 17 | test_name BI_2 18 | bi jump_back 19 | tc_fail 20 | 21 | end 22 | 23 | 24 | -------------------------------------------------------------------------------- /tests/qemu-iotests/044.out: -------------------------------------------------------------------------------- 1 | No errors were found on the image. 2 | 7292415/33554432 = 21.73% allocated, 0.00% fragmented, 0.00% compressed clusters 3 | Image end offset: 4296448000 4 | . 5 | ---------------------------------------------------------------------- 6 | Ran 1 tests 7 | 8 | OK 9 | -------------------------------------------------------------------------------- /stubs/slirp.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "slirp/slirp.h" 3 | 4 | void slirp_update_timeout(uint32_t *timeout) 5 | { 6 | } 7 | 8 | void slirp_pollfds_fill(GArray *pollfds) 9 | { 10 | } 11 | 12 | void slirp_pollfds_poll(GArray *pollfds, int select_error) 13 | { 14 | } 15 | 16 | -------------------------------------------------------------------------------- /ui/qemu-x509.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_X509_H 2 | #define QEMU_X509_H 3 | 4 | #define X509_CA_CERT_FILE "ca-cert.pem" 5 | #define X509_CA_CRL_FILE "ca-crl.pem" 6 | #define X509_SERVER_KEY_FILE "server-key.pem" 7 | #define X509_SERVER_CERT_FILE "server-cert.pem" 8 | 9 | #endif /* QEMU_X509_H */ 10 | -------------------------------------------------------------------------------- /default-configs/microblaze-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for microblaze-softmmu 2 | 3 | CONFIG_PTIMER=y 4 | CONFIG_PFLASH_CFI01=y 5 | CONFIG_SERIAL=y 6 | CONFIG_XILINX=y 7 | CONFIG_XILINX_AXI=y 8 | CONFIG_XILINX_SPI=y 9 | CONFIG_XILINX_ETHLITE=y 10 | CONFIG_SSI=y 11 | CONFIG_SSI_M25P80=y 12 | -------------------------------------------------------------------------------- /default-configs/microblazeel-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for microblazeel-softmmu 2 | 3 | CONFIG_PTIMER=y 4 | CONFIG_PFLASH_CFI01=y 5 | CONFIG_SERIAL=y 6 | CONFIG_XILINX=y 7 | CONFIG_XILINX_AXI=y 8 | CONFIG_XILINX_SPI=y 9 | CONFIG_XILINX_ETHLITE=y 10 | CONFIG_SSI=y 11 | CONFIG_SSI_M25P80=y 12 | -------------------------------------------------------------------------------- /libcacard/libcacard.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=@LIBDIR@ 4 | includedir=@INCLUDEDIR@ 5 | 6 | Name: cacard 7 | Description: CA Card library 8 | Version: @VERSION@ 9 | 10 | Requires: nss 11 | Libs: -L${libdir} -lcacard 12 | Libs.private: 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /target-sparc/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-$(CONFIG_SOFTMMU) += machine.o 2 | obj-y += translate.o helper.o cpu.o 3 | obj-y += fop_helper.o cc_helper.o win_helper.o mmu_helper.o ldst_helper.o 4 | obj-$(TARGET_SPARC) += int32_helper.o 5 | obj-$(TARGET_SPARC64) += int64_helper.o 6 | obj-$(TARGET_SPARC64) += vis_helper.o 7 | -------------------------------------------------------------------------------- /tests/qemu-iotests/012.out: -------------------------------------------------------------------------------- 1 | QA output created by 012 2 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 3 | 4 | == mark image read-only 5 | 6 | == read from read-only image 7 | read 512/512 bytes at offset 0 8 | 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 9 | *** done 10 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_break.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name BREAK_1 6 | mvi r1, 1 7 | wcsr IE, r1 8 | insn: 9 | break 10 | check_excp 1 11 | 12 | test_name BREAK_2 13 | mv r3, ba 14 | check_r3 insn 15 | 16 | test_name BREAK_3 17 | rcsr r3, IE 18 | check_r3 4 19 | 20 | end 21 | -------------------------------------------------------------------------------- /hw/sd/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-$(CONFIG_PL181) += pl181.o 2 | common-obj-$(CONFIG_SSI_SD) += ssi-sd.o 3 | common-obj-$(CONFIG_SD) += sd.o 4 | common-obj-$(CONFIG_SDHCI) += sdhci.o 5 | 6 | obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o 7 | obj-$(CONFIG_OMAP) += omap_mmc.o 8 | obj-$(CONFIG_PXA2XX) += pxa2xx_mmci.o 9 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_scall.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name SCALL_1 6 | mvi r1, 1 7 | wcsr IE, r1 8 | insn: 9 | scall 10 | check_excp 64 11 | 12 | test_name SCALL_2 13 | mv r3, ea 14 | check_r3 insn 15 | 16 | test_name SCALL_3 17 | rcsr r3, IE 18 | check_r3 2 19 | 20 | end 21 | -------------------------------------------------------------------------------- /target-m68k/m68k-qreg.h: -------------------------------------------------------------------------------- 1 | enum { 2 | #define DEFO32(name, offset) QREG_##name, 3 | #define DEFR(name, reg, mode) QREG_##name, 4 | #define DEFF64(name, offset) QREG_##name, 5 | QREG_NULL, 6 | #include "qregs.def" 7 | TARGET_NUM_QREGS = 0x100 8 | #undef DEFO32 9 | #undef DEFR 10 | #undef DEFF64 11 | }; 12 | -------------------------------------------------------------------------------- /target-moxie/helper.h: -------------------------------------------------------------------------------- 1 | #include "exec/def-helper.h" 2 | 3 | DEF_HELPER_2(raise_exception, void, env, int) 4 | DEF_HELPER_1(debug, void, env) 5 | 6 | DEF_HELPER_FLAGS_3(div, TCG_CALL_NO_WG, i32, env, i32, i32) 7 | DEF_HELPER_FLAGS_3(udiv, TCG_CALL_NO_WG, i32, env, i32, i32) 8 | 9 | #include "exec/def-helper.h" 10 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/head.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Startup Code for MIPS64 CPU-core 3 | * 4 | */ 5 | .text 6 | .globl _start 7 | .align 4 8 | _start: 9 | ori $2, $2, 0xffff 10 | sll $2, $2, 16 11 | ori $2, $2, 0xffff 12 | mtc0 $2, $12, 0 13 | jal main 14 | 15 | end: 16 | b end 17 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/head.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Startup Code for MIPS64 CPU-core 3 | * 4 | */ 5 | .text 6 | .globl _start 7 | .align 4 8 | _start: 9 | ori $2, $2, 0xffff 10 | sll $2, $2, 16 11 | ori $2, $2, 0xffff 12 | mtc0 $2, $12, 0 13 | jal main 14 | 15 | end: 16 | b end 17 | -------------------------------------------------------------------------------- /hw/cris/boot.h: -------------------------------------------------------------------------------- 1 | #ifndef _CRIS_BOOT_H 2 | #define HW_CRIS_BOOT_H 1 3 | 4 | struct cris_load_info 5 | { 6 | const char *image_filename; 7 | const char *cmdline; 8 | int image_size; 9 | 10 | hwaddr entry; 11 | }; 12 | 13 | void cris_load_image(CRISCPU *cpu, struct cris_load_info *li); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hw/xen/Makefile.objs: -------------------------------------------------------------------------------- 1 | # xen backend driver support 2 | common-obj-$(CONFIG_XEN_BACKEND) += xen_backend.o xen_devconfig.o 3 | 4 | obj-$(CONFIG_XEN_I386) += xen_platform.o xen_apic.o 5 | obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o 6 | obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_msi.o 7 | -------------------------------------------------------------------------------- /include/hw/pci/slotid_cap.h: -------------------------------------------------------------------------------- 1 | #ifndef PCI_SLOTID_CAP_H 2 | #define PCI_SLOTID_CAP_H 3 | 4 | #include "qemu-common.h" 5 | 6 | int slotid_cap_init(PCIDevice *dev, int nslots, 7 | uint8_t chassis, 8 | unsigned offset); 9 | void slotid_cap_cleanup(PCIDevice *dev); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/repl_qb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, result; 7 | 8 | result = 0xBFBFBFBF; 9 | __asm 10 | ("repl.qb %0, 0xBF\n\t" 11 | : "=r"(rd) 12 | ); 13 | assert(rd == result); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /include/hw/pci-host/apb.h: -------------------------------------------------------------------------------- 1 | #ifndef APB_PCI_H 2 | #define APB_PCI_H 3 | 4 | #include "qemu-common.h" 5 | 6 | PCIBus *pci_apb_init(hwaddr special_base, 7 | hwaddr mem_base, 8 | qemu_irq *ivec_irqs, PCIBus **bus2, PCIBus **bus3, 9 | qemu_irq **pbm_irqs); 10 | #endif 11 | -------------------------------------------------------------------------------- /pc-bios/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: only compilable with x86 cross compile tools 3 | # 4 | include ../config-host.mak 5 | 6 | DEFINES= 7 | 8 | TARGETS= 9 | 10 | all: $(TARGETS) 11 | 12 | %.o: %.S 13 | $(CC) $(DEFINES) -c -o $@ $< 14 | 15 | %.dtb: %.dts 16 | dtc -I dts -O dtb -o $@ $< 17 | 18 | clean: 19 | rm -f $(TARGETS) *.o *~ 20 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_sextb.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name SEXTB_1 6 | mvi r1, 0 7 | sextb r3, r1 8 | check_r3 0 9 | 10 | test_name SEXTB_2 11 | mvi r1, 0x7f 12 | sextb r3, r1 13 | check_r3 0x0000007f 14 | 15 | test_name SEXTB_3 16 | mvi r1, 0x80 17 | sextb r3, r1 18 | check_r3 0xffffff80 19 | 20 | end 21 | -------------------------------------------------------------------------------- /linux-user/sh4/syscall.h: -------------------------------------------------------------------------------- 1 | struct target_pt_regs { 2 | unsigned long regs[16]; 3 | unsigned long pc; 4 | unsigned long pr; 5 | unsigned long sr; 6 | unsigned long gbr; 7 | unsigned long mach; 8 | unsigned long macl; 9 | long tra; 10 | }; 11 | 12 | #define UNAME_MACHINE "sh4" 13 | -------------------------------------------------------------------------------- /target-m68k/qregs.def: -------------------------------------------------------------------------------- 1 | DEFF64(FP_RESULT, fp_result) 2 | DEFO32(PC, pc) 3 | DEFO32(SR, sr) 4 | DEFO32(CC_OP, cc_op) 5 | DEFO32(CC_DEST, cc_dest) 6 | DEFO32(CC_SRC, cc_src) 7 | DEFO32(CC_X, cc_x) 8 | DEFO32(DIV1, div1) 9 | DEFO32(DIV2, div2) 10 | DEFO32(EXCEPTION, exception_index) 11 | DEFO32(MACSR, macsr) 12 | DEFO32(MAC_MASK, mac_mask) 13 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_sexth.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name SEXTH_1 6 | mvi r1, 0 7 | sexth r3, r1 8 | check_r3 0 9 | 10 | test_name SEXTH_2 11 | load r1 0x7fff 12 | sexth r3, r1 13 | check_r3 0x00007fff 14 | 15 | test_name SEXTH_3 16 | load r1 0x8000 17 | sexth r3, r1 18 | check_r3 0xffff8000 19 | 20 | end 21 | -------------------------------------------------------------------------------- /qga/Makefile.objs: -------------------------------------------------------------------------------- 1 | qga-obj-y = commands.o guest-agent-command-state.o main.o 2 | qga-obj-$(CONFIG_POSIX) += commands-posix.o channel-posix.o 3 | qga-obj-$(CONFIG_WIN32) += commands-win32.o channel-win32.o service-win32.o 4 | qga-obj-y += qapi-generated/qga-qapi-types.o qapi-generated/qga-qapi-visit.o 5 | qga-obj-y += qapi-generated/qga-qmp-marshal.o 6 | -------------------------------------------------------------------------------- /fsdev/Makefile.objs: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_REALLY_VIRTFS),y) 2 | common-obj-y = qemu-fsdev.o virtio-9p-marshal.o 3 | else 4 | common-obj-y = qemu-fsdev-dummy.o 5 | endif 6 | common-obj-y += qemu-fsdev-opts.o 7 | 8 | # Toplevel always builds this; targets without virtio will put it in 9 | # common-obj-y 10 | common-obj-$(CONFIG_ALL) += qemu-fsdev-dummy.o 11 | -------------------------------------------------------------------------------- /hw/i2c/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += core.o smbus.o smbus_eeprom.o 2 | common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o 3 | common-obj-$(CONFIG_ACPI) += smbus_ich9.o 4 | common-obj-$(CONFIG_APM) += pm_smbus.o 5 | common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o 6 | common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o 7 | obj-$(CONFIG_OMAP) += omap_i2c.o 8 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_stat1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int main (void) 8 | { 9 | struct stat buf; 10 | 11 | if (stat (".", &buf) != 0 12 | || !S_ISDIR (buf.st_mode)) 13 | abort (); 14 | printf ("pass\n"); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /hw/isa/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += isa-bus.o 2 | common-obj-$(CONFIG_APM) += apm.o 3 | common-obj-$(CONFIG_I82378) += i82378.o 4 | common-obj-$(CONFIG_ISA_MMIO) += isa_mmio.o 5 | common-obj-$(CONFIG_PC87312) += pc87312.o 6 | common-obj-$(CONFIG_PIIX4) += piix4.o 7 | common-obj-$(CONFIG_VT82C686) += vt82c686.o 8 | 9 | obj-$(CONFIG_LPC_ICH9) += lpc_ich9.o 10 | -------------------------------------------------------------------------------- /include/hw/audio/audio.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_AUDIODEV_H 2 | #define HW_AUDIODEV_H 1 3 | 4 | void isa_register_soundhw(const char *name, const char *descr, 5 | int (*init_isa)(ISABus *bus)); 6 | 7 | void pci_register_soundhw(const char *name, const char *descr, 8 | int (*init_pci)(PCIBus *bus)); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /stubs/reset.c: -------------------------------------------------------------------------------- 1 | #include "hw/hw.h" 2 | 3 | /* Stub functions for binaries that never call qemu_devices_reset(), 4 | * and don't need to keep track of the reset handler list. 5 | */ 6 | 7 | void qemu_register_reset(QEMUResetHandler *func, void *opaque) 8 | { 9 | } 10 | 11 | void qemu_unregister_reset(QEMUResetHandler *func, void *opaque) 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /stubs/set-fd-handler.c: -------------------------------------------------------------------------------- 1 | #include "qemu-common.h" 2 | #include "qemu/main-loop.h" 3 | 4 | int qemu_set_fd_handler2(int fd, 5 | IOCanReadHandler *fd_read_poll, 6 | IOHandler *fd_read, 7 | IOHandler *fd_write, 8 | void *opaque) 9 | { 10 | abort(); 11 | } 12 | -------------------------------------------------------------------------------- /stubs/pci-drive-hot-add.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo) 6 | { 7 | /* On non-x86 we don't do PCI hotplug */ 8 | monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type); 9 | return -1; 10 | } 11 | -------------------------------------------------------------------------------- /tests/qemu-iotests/007.out: -------------------------------------------------------------------------------- 1 | QA output created by 007 2 | 3 | creating image 4 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 5 | savevm 1 6 | savevm 2 7 | savevm 3 8 | savevm 4 9 | savevm 5 10 | savevm 6 11 | savevm 7 12 | savevm 8 13 | savevm 9 14 | savevm 10 15 | 16 | checking image for errors 17 | No errors were found on the image. 18 | *** done 19 | -------------------------------------------------------------------------------- /audio/audio_win_int.h: -------------------------------------------------------------------------------- 1 | #ifndef AUDIO_WIN_INT_H 2 | #define AUDIO_WIN_INT_H 3 | 4 | int waveformat_from_audio_settings (WAVEFORMATEX *wfx, 5 | struct audsettings *as); 6 | 7 | int waveformat_to_audio_settings (WAVEFORMATEX *wfx, 8 | struct audsettings *as); 9 | 10 | #endif /* AUDIO_WIN_INT_H */ 11 | -------------------------------------------------------------------------------- /include/hw/arm/primecell.h: -------------------------------------------------------------------------------- 1 | #ifndef PRIMECELL_H 2 | #define PRIMECELL_H 3 | 4 | /* Declarations for ARM PrimeCell based periperals. */ 5 | /* Also includes some devices that are currently only used by the 6 | ARM boards. */ 7 | 8 | /* arm_sysctl GPIO lines */ 9 | #define ARM_SYSCTL_GPIO_MMC_WPROT 0 10 | #define ARM_SYSCTL_GPIO_MMC_CARDIN 1 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /hw/pci-bridge/ioh3420.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_IOH3420_H 2 | #define QEMU_IOH3420_H 3 | 4 | #include "hw/pci/pcie_port.h" 5 | 6 | PCIESlot *ioh3420_init(PCIBus *bus, int devfn, bool multifunction, 7 | const char *bus_name, pci_map_irq_fn map_irq, 8 | uint8_t port, uint8_t chassis, uint16_t slot); 9 | 10 | #endif /* QEMU_IOH3420_H */ 11 | -------------------------------------------------------------------------------- /hw/microblaze/boot.h: -------------------------------------------------------------------------------- 1 | #ifndef __MICROBLAZE_BOOT__ 2 | #define __MICROBLAZE_BOOT__ 3 | 4 | #include "hw/hw.h" 5 | 6 | void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base, 7 | uint32_t ramsize, const char *dtb_filename, 8 | void (*machine_cpu_reset)(MicroBlazeCPU *)); 9 | 10 | #endif /* __MICROBLAZE_BOOT __ */ 11 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_ret.s: -------------------------------------------------------------------------------- 1 | # mach: crisv3 crisv8 crisv10 2 | # output: 3\n 3 | 4 | # Test that ret works. 5 | 6 | .include "testutils.inc" 7 | start 8 | x: 9 | moveq 0,r3 10 | jsr z 11 | w: 12 | quit 13 | y: 14 | addq 1,r3 15 | checkr3 3 16 | quit 17 | 18 | z: 19 | addq 1,r3 20 | move srp,r2 21 | add.d y-w,r2 22 | move r2,srp 23 | ret 24 | addq 1,r3 25 | quit 26 | -------------------------------------------------------------------------------- /default-configs/alpha-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for alpha-softmmu 2 | 3 | include pci.mak 4 | include usb.mak 5 | CONFIG_SERIAL=y 6 | CONFIG_I8254=y 7 | CONFIG_PCKBD=y 8 | CONFIG_VGA=y 9 | CONFIG_VGA_PCI=y 10 | CONFIG_VGA_CIRRUS=y 11 | CONFIG_IDE_CORE=y 12 | CONFIG_IDE_QDEV=y 13 | CONFIG_VMWARE_VGA=y 14 | CONFIG_IDE_CMD646=y 15 | CONFIG_I8259=y 16 | CONFIG_MC146818RTC=y 17 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/replv_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x12345678; 10 | result = 0x56785678; 11 | __asm 12 | ("replv.ph %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | assert(rd == result); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/bitrev.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x12345678; 10 | result = 0x00001E6A; 11 | 12 | __asm 13 | ("bitrev %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(rd == result); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/raddu_w_qb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs; 7 | int result; 8 | 9 | rs = 0x12345678; 10 | result = 0x114; 11 | 12 | __asm 13 | ("raddu.w.qb %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rs) 16 | ); 17 | assert(rd == result); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/replv_qb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x12345678; 10 | result = 0x78787878; 11 | __asm 12 | ("replv.qb %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | assert(rd == result); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/repl_qb.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, result; 6 | 7 | result = 0xFFFFFFFFBFBFBFBF; 8 | __asm 9 | ("repl.qb %0, 0xBF\n\t" 10 | : "=r"(rd) 11 | ); 12 | if (rd != result) { 13 | printf("repl.qb wrong\n"); 14 | 15 | return -1; 16 | } 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /hw/arm/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += boot.o collie.o exynos4_boards.o gumstix.o highbank.o 2 | obj-y += integratorcp.o kzm.o mainstone.o musicpal.o nseries.o 3 | obj-y += omap_sx1.o palm.o pic_cpu.o realview.o spitz.o stellaris.o 4 | obj-y += tosa.o versatilepb.o vexpress.o xilinx_zynq.o z2.o 5 | 6 | obj-y += armv7m.o exynos4210.o pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o 7 | obj-y += omap1.o omap2.o strongarm.o 8 | -------------------------------------------------------------------------------- /hw/i2c/bitbang_i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef BITBANG_I2C_H 2 | #define BITBANG_I2C_H 3 | 4 | #include "hw/i2c/i2c.h" 5 | 6 | typedef struct bitbang_i2c_interface bitbang_i2c_interface; 7 | 8 | #define BITBANG_I2C_SDA 0 9 | #define BITBANG_I2C_SCL 1 10 | 11 | bitbang_i2c_interface *bitbang_i2c_init(i2c_bus *bus); 12 | int bitbang_i2c_set(bitbang_i2c_interface *i2c, int line, int level); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /include/hw/isa/vt82c686.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_VT82C686_H 2 | #define HW_VT82C686_H 3 | 4 | /* vt82c686.c */ 5 | ISABus *vt82c686b_init(PCIBus * bus, int devfn); 6 | void vt82c686b_ac97_init(PCIBus *bus, int devfn); 7 | void vt82c686b_mc97_init(PCIBus *bus, int devfn); 8 | i2c_bus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base, 9 | qemu_irq sci_irq); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /include/hw/lm32/lm32_juart.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_HW_LM32_JUART_H 2 | #define QEMU_HW_LM32_JUART_H 3 | 4 | #include "qemu-common.h" 5 | 6 | uint32_t lm32_juart_get_jtx(DeviceState *d); 7 | uint32_t lm32_juart_get_jrx(DeviceState *d); 8 | void lm32_juart_set_jtx(DeviceState *d, uint32_t jtx); 9 | void lm32_juart_set_jrx(DeviceState *d, uint32_t jrx); 10 | 11 | #endif /* QEMU_HW_LM32_JUART_H */ 12 | -------------------------------------------------------------------------------- /hw/pci-bridge/xio3130_upstream.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_XIO3130_UPSTREAM_H 2 | #define QEMU_XIO3130_UPSTREAM_H 3 | 4 | #include "hw/pci/pcie_port.h" 5 | 6 | PCIEPort *xio3130_upstream_init(PCIBus *bus, int devfn, bool multifunction, 7 | const char *bus_name, pci_map_irq_fn map_irq, 8 | uint8_t port); 9 | 10 | #endif /* QEMU_XIO3130_H */ 11 | -------------------------------------------------------------------------------- /pc-bios/keymaps/modifiers: -------------------------------------------------------------------------------- 1 | Shift_R 0x36 2 | Shift_L 0x2a 3 | 4 | Alt_R 0xb8 5 | Mode_switch 0xb8 6 | ISO_Level3_Shift 0xb8 7 | Alt_L 0x38 8 | 9 | Control_R 0x9d 10 | Control_L 0x1d 11 | 12 | # Translate Super to Windows keys. 13 | # This is hardcoded. See documentation for details. 14 | Super_R 0xdc 15 | Super_L 0xdb 16 | 17 | # Translate Menu to the Windows Application key. 18 | Menu 0xdd 19 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_stat2.c: -------------------------------------------------------------------------------- 1 | /* 2 | #notarget: cris*-*-elf 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | int main (void) 12 | { 13 | struct stat buf; 14 | 15 | if (lstat (".", &buf) != 0 16 | || !S_ISDIR (buf.st_mode)) 17 | abort (); 18 | printf ("pass\n"); 19 | exit (0); 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/preceq_w_phl.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0x87650000; 11 | 12 | __asm 13 | ("preceq.w.phl %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(result == rd); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/preceq_w_phr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0x43210000; 11 | 12 | __asm 13 | ("preceq.w.phr %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(result == rd); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/preceu_ph_qbl.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0x00870065; 11 | 12 | __asm 13 | ("preceu.ph.qbl %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(result == rd); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/preceu_ph_qbr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0x00430021; 11 | 12 | __asm 13 | ("preceu.ph.qbr %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(result == rd); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/shrl_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x12345678; 10 | result = 0x009102B3; 11 | 12 | __asm 13 | ("shrl.ph %0, %1, 0x05\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(rd == result); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /default-configs/sparc64-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sparc64-softmmu 2 | 3 | include pci.mak 4 | include usb.mak 5 | CONFIG_ISA_MMIO=y 6 | CONFIG_M48T59=y 7 | CONFIG_PTIMER=y 8 | CONFIG_VGA=y 9 | CONFIG_VGA_PCI=y 10 | CONFIG_SERIAL=y 11 | CONFIG_PARALLEL=y 12 | CONFIG_PCKBD=y 13 | CONFIG_FDC=y 14 | CONFIG_IDE_ISA=y 15 | CONFIG_IDE_CMD646=y 16 | CONFIG_PCI_APB=y 17 | CONFIG_MC146818RTC=y 18 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/precequ_ph_qbl.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0x43803280; 11 | 12 | __asm 13 | ("precequ.ph.qbl %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(result == rd); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/precequ_ph_qbla.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0x43802180; 11 | 12 | __asm 13 | ("precequ.ph.qbla %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(result == rd); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/precequ_ph_qbr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0x21801080; 11 | 12 | __asm 13 | ("precequ.ph.qbr %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(result == rd); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/precequ_ph_qbra.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0x32801080; 11 | 12 | __asm 13 | ("precequ.ph.qbra %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(result == rd); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/preceu_ph_qbla.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0x00870043; 11 | 12 | __asm 13 | ("preceu.ph.qbla %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(result == rd); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/preceu_ph_qbra.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0x00650021; 11 | 12 | __asm 13 | ("preceu.ph.qbra %0, %1\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(result == rd); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /default-configs/sparc-softmmu.mak: -------------------------------------------------------------------------------- 1 | # Default configuration for sparc-softmmu 2 | 3 | CONFIG_ECC=y 4 | CONFIG_ESP=y 5 | CONFIG_ESCC=y 6 | CONFIG_M48T59=y 7 | CONFIG_PTIMER=y 8 | CONFIG_FDC=y 9 | CONFIG_EMPTY_SLOT=y 10 | CONFIG_PCNET_COMMON=y 11 | CONFIG_LANCE=y 12 | CONFIG_TCX=y 13 | CONFIG_SLAVIO=y 14 | CONFIG_CS4231=y 15 | CONFIG_GRLIB=y 16 | CONFIG_STP2000=y 17 | CONFIG_ECCMEMCTL=y 18 | CONFIG_SUN4M=y 19 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | check-qdict 2 | check-qfloat 3 | check-qint 4 | check-qjson 5 | check-qlist 6 | check-qstring 7 | test-aio 8 | test-cutils 9 | test-hbitmap 10 | test-iov 11 | test-mul64 12 | test-qapi-types.[ch] 13 | test-qapi-visit.[ch] 14 | test-qmp-commands.h 15 | test-qmp-commands 16 | test-qmp-input-strict 17 | test-qmp-marshal.c 18 | test-thread-pool 19 | test-x86-cpuid 20 | test-xbzrle 21 | *-test 22 | -------------------------------------------------------------------------------- /tests/qemu-iotests/005.out: -------------------------------------------------------------------------------- 1 | QA output created by 005 2 | 3 | creating large image 4 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=5368709120000 5 | 6 | small read 7 | read 4096/4096 bytes at offset 1024 8 | 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 9 | 10 | small write 11 | wrote 4096/4096 bytes at offset 8192 12 | 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 13 | *** done 14 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/repl_ob.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, result; 6 | rd = 0; 7 | result = 0xFFFFFFFFFFFFFFFF; 8 | 9 | __asm 10 | ("repl.ob %0, 0xFF\n\t" 11 | : "=r"(rd) 12 | ); 13 | 14 | if (result != rd) { 15 | printf("repl.ob error\n"); 16 | 17 | return -1; 18 | } 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /include/hw/qdev-dma.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Support for dma_addr_t typed properties 3 | * 4 | * Copyright (C) 2012 David Gibson, IBM Corporation. 5 | * 6 | * This work is licensed under the terms of the GNU GPL, version 2 or later. 7 | * See the COPYING file in the top-level directory. 8 | */ 9 | #define DEFINE_PROP_DMAADDR(_n, _s, _f, _d) \ 10 | DEFINE_PROP_HEX64(_n, _s, _f, _d) 11 | -------------------------------------------------------------------------------- /hw/9pfs/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y = virtio-9p.o 2 | common-obj-y += virtio-9p-local.o virtio-9p-xattr.o 3 | common-obj-y += virtio-9p-xattr-user.o virtio-9p-posix-acl.o 4 | common-obj-y += virtio-9p-coth.o cofs.o codir.o cofile.o 5 | common-obj-y += coxattr.o virtio-9p-synth.o 6 | common-obj-$(CONFIG_OPEN_BY_HANDLE) += virtio-9p-handle.o 7 | common-obj-y += virtio-9p-proxy.o 8 | 9 | obj-y += virtio-9p-device.o 10 | -------------------------------------------------------------------------------- /tests/tcg/alpha/crt.s: -------------------------------------------------------------------------------- 1 | .text 2 | 3 | .globl _start 4 | .ent _start,0 5 | _start: 6 | .frame $15,0,$15 7 | br $29,1f 8 | 1: ldgp $29, 0($29) 9 | .prologue 0 10 | ldq $27,main($29) !literal!1 11 | jsr $26,($27) 12 | or $0,$0,$16 13 | .end _start 14 | 15 | .globl _exit 16 | _exit: 17 | lda $0,1 18 | callsys 19 | 20 | call_pal 0 21 | 22 | .globl write 23 | write: 24 | lda $0,4 25 | callsys 26 | ret 27 | -------------------------------------------------------------------------------- /hw/ppc/e500-ccsr.h: -------------------------------------------------------------------------------- 1 | #ifndef E500_CCSR_H 2 | #define E500_CCSR_H 3 | 4 | #include "hw/sysbus.h" 5 | 6 | typedef struct PPCE500CCSRState { 7 | /*< private >*/ 8 | SysBusDevice parent; 9 | /*< public >*/ 10 | 11 | MemoryRegion ccsr_space; 12 | } PPCE500CCSRState; 13 | 14 | #define TYPE_CCSR "e500-ccsr" 15 | #define CCSR(obj) OBJECT_CHECK(PPCE500CCSRState, (obj), TYPE_CCSR) 16 | 17 | #endif /* E500_CCSR_H */ 18 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_time2.c: -------------------------------------------------------------------------------- 1 | /* CB_SYS_time doesn't implement the Linux time syscall; the return 2 | value isn't written to the argument. */ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | int 9 | main (void) 10 | { 11 | time_t x = (time_t) -1; 12 | time_t t = time (&x); 13 | 14 | if (t == (time_t) -1 || t != x) 15 | abort (); 16 | printf ("pass\n"); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/mfhi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int achi, acho; 7 | int result; 8 | 9 | achi = 0x004433; 10 | result = 0x004433; 11 | 12 | __asm 13 | ("mthi %1, $ac1\n\t" 14 | "mfhi %0, $ac1\n\t" 15 | : "=r"(acho) 16 | : "r"(achi) 17 | ); 18 | assert(result == acho); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/mflo.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int acli, aclo; 7 | int result; 8 | 9 | acli = 0x004433; 10 | result = 0x004433; 11 | 12 | __asm 13 | ("mthi %1, $ac1\n\t" 14 | "mfhi %0, $ac1\n\t" 15 | : "=r"(aclo) 16 | : "r"(acli) 17 | ); 18 | assert(result == aclo); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/mthi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int achi, acho; 7 | int result; 8 | 9 | achi = 0x004433; 10 | result = 0x004433; 11 | 12 | __asm 13 | ("mthi %1, $ac1\n\t" 14 | "mfhi %0, $ac1\n\t" 15 | : "=r"(acho) 16 | : "r"(achi) 17 | ); 18 | assert(result == acho); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/mtlo.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int acli, aclo; 7 | int result; 8 | 9 | acli = 0x004433; 10 | result = 0x004433; 11 | 12 | __asm 13 | ("mthi %1, $ac1\n\t" 14 | "mfhi %0, $ac1\n\t" 15 | : "=r"(aclo) 16 | : "r"(acli) 17 | ); 18 | assert(result == aclo); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /linux-headers/asm-s390/kvm_para.h: -------------------------------------------------------------------------------- 1 | /* 2 | * User API definitions for paravirtual devices on s390 3 | * 4 | * Copyright IBM Corp. 2008 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License (version 2 only) 8 | * as published by the Free Software Foundation. 9 | * 10 | * Author(s): Christian Borntraeger 11 | */ 12 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/packrl_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int result; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0x56788765; 12 | 13 | __asm 14 | ("packrl.ph %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | assert(result == rd); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/subqh_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int result; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0x456709AB; 12 | 13 | __asm 14 | ("subqh.ph %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | assert(rd == result); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/subqh_w.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int result; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0x456789AB; 12 | 13 | __asm 14 | ("subqh.w %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | assert(rd == result); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/subuh_qb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int result; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0xC5E7092B; 12 | 13 | __asm 14 | ("subuh.qb %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | assert(rd == result); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /include/hw/arm/sharpsl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Common declarations for the Zaurii. 3 | * 4 | * This file is licensed under the GNU GPL. 5 | */ 6 | #ifndef QEMU_SHARPSL_H 7 | #define QEMU_SHARPSL_H 8 | 9 | #define zaurus_printf(format, ...) \ 10 | fprintf(stderr, "%s: " format, __FUNCTION__, ##__VA_ARGS__) 11 | 12 | /* zaurus.c */ 13 | 14 | #define SL_PXA_PARAM_BASE 0xa0000a00 15 | void sl_bootparam_write(hwaddr ptr); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /include/hw/timer/mc146818rtc.h: -------------------------------------------------------------------------------- 1 | #ifndef MC146818RTC_H 2 | #define MC146818RTC_H 3 | 4 | #include "hw/isa/isa.h" 5 | #include "hw/timer/mc146818rtc_regs.h" 6 | 7 | #define TYPE_MC146818_RTC "mc146818rtc" 8 | 9 | ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq); 10 | void rtc_set_memory(ISADevice *dev, int addr, int val); 11 | int rtc_get_memory(ISADevice *dev, int addr); 12 | 13 | #endif /* !MC146818RTC_H */ 14 | -------------------------------------------------------------------------------- /target-i386/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += translate.o helper.o cpu.o 2 | obj-y += excp_helper.o fpu_helper.o cc_helper.o int_helper.o svm_helper.o 3 | obj-y += smm_helper.o misc_helper.o mem_helper.o seg_helper.o 4 | obj-$(CONFIG_SOFTMMU) += machine.o arch_memory_mapping.o arch_dump.o 5 | obj-$(CONFIG_KVM) += kvm.o hyperv.o 6 | obj-$(CONFIG_NO_KVM) += kvm-stub.o 7 | obj-$(CONFIG_LINUX_USER) += ioport-user.o 8 | obj-$(CONFIG_BSD_USER) += ioport-user.o 9 | -------------------------------------------------------------------------------- /tests/qemu-iotests/042.out: -------------------------------------------------------------------------------- 1 | QA output created by 042 2 | 3 | == Creating zero size image == 4 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=0 5 | No errors were found on the image. 6 | 7 | == Converting the image == 8 | No errors were found on the image. 9 | 10 | == Converting the image, compressed == 11 | No errors were found on the image. 12 | 13 | == Rebasing the image == 14 | No errors were found on the image. 15 | *** done 16 | -------------------------------------------------------------------------------- /tests/tcg/cris/sys.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define STRINGIFY(x) #x 4 | #define TOSTRING(x) STRINGIFY(x) 5 | 6 | #define CURRENT_LOCATION __FILE__ ":" TOSTRING(__LINE__) 7 | 8 | #define err() \ 9 | { \ 10 | _fail("at " CURRENT_LOCATION " "); \ 11 | } 12 | 13 | #define mb() asm volatile ("" : : : "memory") 14 | 15 | void pass(void); 16 | void _fail(char *reason); 17 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/precrq_ph_w.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int result; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0x12348765; 12 | 13 | __asm 14 | ("precrq.ph.w %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | assert(result == rd); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/precrq_qb_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int result; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0x12568743; 12 | 13 | __asm 14 | ("precrq.qb.ph %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | assert(result == rd); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/precr_qb_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int result; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0x34786521; 12 | 13 | __asm 14 | ("precr.qb.ph %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | assert(result == rd); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/shrlv_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int result; 8 | 9 | rs = 0x05; 10 | rt = 0x12345678; 11 | result = 0x009102B3; 12 | 13 | __asm 14 | ("shrlv.ph %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rt), "r"(rs) 17 | ); 18 | assert(rd == result); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/subqh_r_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int result; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0x456809AC; 12 | 13 | __asm 14 | ("subqh_r.ph %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | assert(rd == result); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/subqh_r_w.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int result; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0x456789AC; 12 | 13 | __asm 14 | ("subqh_r.w %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | assert(rd == result); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/openrisc/test_lf_mul.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | float a, b, c; 6 | float result; 7 | 8 | b = 1.5; 9 | c = 4.0; 10 | result = 6.0; 11 | __asm 12 | ("lf.mul.s %0, %1, %2\n\t" 13 | : "=r"(a) 14 | : "r"(b), "r"(c) 15 | ); 16 | if (a != result) { 17 | printf("lf.mul.s error\n"); 18 | return -1; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/replv_ob.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | 7 | rt = 0xFF; 8 | result = 0xFFFFFFFFFFFFFFFF; 9 | 10 | __asm 11 | ("replv.ob %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | 16 | if (result != rd) { 17 | printf("replv.ob error\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /hw/i386/multiboot.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_MULTIBOOT_H 2 | #define QEMU_MULTIBOOT_H 3 | 4 | #include "hw/nvram/fw_cfg.h" 5 | 6 | int load_multiboot(FWCfgState *fw_cfg, 7 | FILE *f, 8 | const char *kernel_filename, 9 | const char *initrd_filename, 10 | const char *kernel_cmdline, 11 | int kernel_file_size, 12 | uint8_t *header); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /include/hw/char/escc.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_ESCC_H 2 | #define HW_ESCC_H 1 3 | 4 | /* escc.c */ 5 | #define ESCC_SIZE 4 6 | MemoryRegion *escc_init(hwaddr base, qemu_irq irqA, qemu_irq irqB, 7 | CharDriverState *chrA, CharDriverState *chrB, 8 | int clock, int it_shift); 9 | 10 | void slavio_serial_ms_kbd_init(hwaddr base, qemu_irq irq, 11 | int disabled, int clock, int it_shift); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/replv_ph.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x12345678; 9 | result = 0x56785678; 10 | __asm 11 | ("replv.ph %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | if (rd != result) { 16 | printf("replv.ph wrong\n"); 17 | 18 | return -1; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tcg/TODO: -------------------------------------------------------------------------------- 1 | - Add new instructions such as: clz, ctz, popcnt. 2 | 3 | - See if it is worth exporting mul2, mulu2, div2, divu2. 4 | 5 | - Support of globals saved in fixed registers between TBs. 6 | 7 | Ideas: 8 | 9 | - Move the slow part of the qemu_ld/st ops after the end of the TB. 10 | 11 | - Change exception syntax to get closer to QOP system (exception 12 | parameters given with a specific instruction). 13 | 14 | - Add float and vector support. 15 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_movprv32.s: -------------------------------------------------------------------------------- 1 | # mach: crisv32 2 | # output: ffffff20\nbb113344\n 3 | 4 | # Test v32-specific special registers. FIXME: more registers. 5 | 6 | .include "testutils.inc" 7 | start 8 | moveq -1,r3 9 | setf zcvn 10 | move vr,r3 11 | test_cc 1 1 1 1 12 | checkr3 ffffff20 13 | 14 | moveq -1,r3 15 | move.d 0xbb113344,r4 16 | clearf cvnz 17 | move r4,mof 18 | test_cc 0 0 0 0 19 | move mof,r3 20 | checkr3 bb113344 21 | quit 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/bitrev.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x12345678; 9 | result = 0x00001E6A; 10 | 11 | __asm 12 | ("bitrev %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (rd != result) { 17 | printf("bitrev wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/raddu_w_qb.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs; 6 | long long result; 7 | 8 | rs = 0x12345678; 9 | result = 0x114; 10 | 11 | __asm 12 | ("raddu.w.qb %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rs) 15 | ); 16 | if (rd != result) { 17 | printf("raddu.w.qb wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/replv_qb.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x12345678; 9 | result = 0x78787878; 10 | __asm 11 | ("replv.qb %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | if (rd != result) { 16 | printf("replv.qb wrong\n"); 17 | 18 | return -1; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /hw/pci/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o 2 | common-obj-$(CONFIG_PCI) += msix.o msi.o 3 | common-obj-$(CONFIG_PCI) += shpc.o 4 | common-obj-$(CONFIG_PCI) += slotid_cap.o 5 | common-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o 6 | common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o 7 | 8 | common-obj-$(CONFIG_NO_PCI) += pci-stub.o 9 | common-obj-$(CONFIG_ALL) += pci-stub.o 10 | 11 | obj-$(CONFIG_PCI_HOTPLUG) += pci-hotplug.o 12 | -------------------------------------------------------------------------------- /target-ppc/Makefile.objs: -------------------------------------------------------------------------------- 1 | obj-y += cpu-models.o 2 | obj-y += translate.o 3 | ifeq ($(CONFIG_SOFTMMU),y) 4 | obj-y += machine.o mmu_helper.o mmu-hash32.o 5 | obj-$(TARGET_PPC64) += mmu-hash64.o 6 | endif 7 | obj-$(CONFIG_KVM) += kvm.o kvm_ppc.o 8 | obj-y += excp_helper.o 9 | obj-y += fpu_helper.o 10 | obj-y += int_helper.o 11 | obj-y += timebase_helper.o 12 | obj-y += misc_helper.o 13 | obj-y += mem_helper.o 14 | obj-$(CONFIG_USER_ONLY) += user_only_helper.o 15 | -------------------------------------------------------------------------------- /tests/qemu-iotests/054.out: -------------------------------------------------------------------------------- 1 | QA output created by 054 2 | 3 | creating too large image (1 EB) 4 | qemu-img: The image size is too large for file format 'qcow2' (try using a larger cluster size) 5 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1152921504606846976 6 | 7 | creating too large image (1 EB) using qcow2.py 8 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=4294967296 9 | qemu-img: Could not open 'TEST_DIR/t.qcow2': File too large 10 | *** done 11 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/mtlo.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long acli, aclo; 6 | long long result; 7 | 8 | acli = 0x004433; 9 | result = 0x004433; 10 | 11 | __asm 12 | ("mthi %1, $ac1\n\t" 13 | "mfhi %0, $ac1\n\t" 14 | : "=r"(aclo) 15 | : "r"(acli) 16 | ); 17 | if (result != aclo) { 18 | printf("mtlo wrong\n"); 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceq_pw_qhl.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | rt = 0x0123456789ABCDEF; 7 | result = 0x0123000045670000; 8 | 9 | __asm 10 | ("preceq.pw.qhl %0, %1\n\t" 11 | : "=r"(rd) 12 | : "r"(rt) 13 | ); 14 | if (result != rd) { 15 | printf("preceq.pw.qhl error\n"); 16 | 17 | return -1; 18 | } 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceq_pw_qhr.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | rt = 0x0123456789ABCDEF; 7 | result = 0x89AB0000CDEF0000; 8 | 9 | __asm 10 | ("preceq.pw.qhr %0, %1\n\t" 11 | : "=r"(rd) 12 | : "r"(rt) 13 | ); 14 | if (result != rd) { 15 | printf("preceq.pw.qhr error\n"); 16 | 17 | return -1; 18 | } 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/raddu_l_ob.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, result; 6 | rs = 0x12345678ABCDEF0; 7 | result = 0x000000000001E258; 8 | 9 | __asm 10 | ("raddu.l.ob %0, %1, %2\n\t" 11 | : "=r"(rd) 12 | : "r"(rs) 13 | ); 14 | 15 | if (rd != result) { 16 | printf("raddu.l.ob error\n"); 17 | 18 | return -1; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/replv_pw.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | rd = 0; 7 | rt = 0xFFFFFFFF; 8 | result = 0xFFFFFFFFFFFFFFFF; 9 | 10 | __asm 11 | ("replv.pw %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | 16 | if (result != rd) { 17 | printf("replv.pw error\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shra_ob.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main() 4 | { 5 | long long rd, rt; 6 | long long res; 7 | 8 | rt = 0xbc98756abc654389; 9 | res = 0xfbf9f7f6fb0604f8; 10 | 11 | __asm 12 | ("shra.ob %0, %1, 0x4\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | 17 | if (rd != res) { 18 | printf("shra.ob error\n"); 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shra_r_ob.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main() 4 | { 5 | long long rd, rt; 6 | long long res; 7 | 8 | rt = 0xbc98756abc654389; 9 | res = 0xfcfaf8f7fc0705f9; 10 | 11 | __asm 12 | ("shra_r.ob %0, %1, 0x4\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | 17 | if (rd != res) { 18 | printf("shra_r.ob error\n"); 19 | return -1; 20 | } 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shrl_qh.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long res; 7 | 8 | rt = 0x8765679abc543786; 9 | res = 0x087606790bc50378; 10 | 11 | __asm 12 | ("shrl.qh %0, %1, 0x4\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | 17 | if (rd != res) { 18 | printf("shrl.qh error\n"); 19 | return -1; 20 | } 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/shrl_ph.c: -------------------------------------------------------------------------------- 1 | #include"io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x12345678; 9 | result = 0x009102B3; 10 | 11 | __asm 12 | ("shrl.ph %0, %1, 0x05\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (rd != result) { 17 | printf("shrl.ph error!\n"); 18 | return -1; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /include/hw/mips/cpudevs.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_MIPS_CPUDEVS_H 2 | #define HW_MIPS_CPUDEVS_H 3 | /* Definitions for MIPS CPU internal devices. */ 4 | 5 | /* mips_addr.c */ 6 | uint64_t cpu_mips_kseg0_to_phys(void *opaque, uint64_t addr); 7 | uint64_t cpu_mips_phys_to_kseg0(void *opaque, uint64_t addr); 8 | 9 | /* mips_int.c */ 10 | void cpu_mips_irq_init_cpu(CPUMIPSState *env); 11 | 12 | /* mips_timer.c */ 13 | void cpu_mips_clock_init(CPUMIPSState *); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /tests/qemu-iotests/029.out: -------------------------------------------------------------------------------- 1 | QA output created by 029 2 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 3 | wrote 4096/4096 bytes at offset 0 4 | 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 5 | No errors were found on the image. 6 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=16777216 7 | wrote 4194304/4194304 bytes at offset 0 8 | 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 9 | No errors were found on the image. 10 | *** done 11 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_gcctorture_pr28634-1.c: -------------------------------------------------------------------------------- 1 | /* PR rtl-optimization/28634. On targets with delayed branches, 2 | dbr_schedule could do the next iteration's addition in the 3 | branch delay slot, then subtract the value again if the branch 4 | wasn't taken. This can lead to rounding errors. */ 5 | int x = -1; 6 | int y = 1; 7 | int 8 | main (void) 9 | { 10 | while (y > 0) 11 | y += x; 12 | if (y != x + 1) 13 | abort (); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_sli.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name SLI_1 6 | mvi r1, 1 7 | sli r3, r1, 0 8 | check_r3 1 9 | 10 | test_name SLI_2 11 | mvi r1, 0 12 | sli r3, r1, 1 13 | check_r3 0 14 | 15 | test_name SLI_3 16 | mvi r1, 1 17 | sli r3, r1, 31 18 | check_r3 0x80000000 19 | 20 | test_name SLI_4 21 | mvi r1, 16 22 | sli r3, r1, 31 23 | check_r3 0 24 | 25 | test_name SLI_7 26 | mvi r3, 2 27 | sli r3, r3, 2 28 | check_r3 8 29 | 30 | end 31 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shrl_qb.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x12345678; 9 | result = 0x00010203; 10 | 11 | __asm 12 | ("shrl.qb %0, %1, 0x05\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (rd != result) { 17 | printf("shrl.qb wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /target-i386/kvm-stub.c: -------------------------------------------------------------------------------- 1 | /* 2 | * QEMU KVM x86 specific function stubs 3 | * 4 | * Copyright Linaro Limited 2012 5 | * 6 | * Author: Peter Maydell 7 | * 8 | * This work is licensed under the terms of the GNU GPL, version 2 or later. 9 | * See the COPYING file in the top-level directory. 10 | * 11 | */ 12 | #include "qemu-common.h" 13 | #include "kvm_i386.h" 14 | 15 | bool kvm_allows_irq0_override(void) 16 | { 17 | return 1; 18 | } 19 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_clearfv32.s: -------------------------------------------------------------------------------- 1 | # mach: crisv32 2 | # output: ef\nef\n 3 | 4 | ; Check that "clearf x" doesn't trivially fail. 5 | 6 | .include "testutils.inc" 7 | start 8 | setf puixnzvc 9 | clearf x ; Actually, x would be cleared by almost-all other insns. 10 | move ccs,r3 11 | and.d 0xff, $r3 12 | checkr3 ef 13 | 14 | setf puixnzvc 15 | moveq 0, $r3 ; moveq should only clear the xflag. 16 | move ccs,r3 17 | and.d 0xff, $r3 18 | checkr3 ef 19 | quit 20 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_openpf2.c: -------------------------------------------------------------------------------- 1 | /* Check that the simulator has chdir:ed to the --sysroot argument 2 | #sim: --sysroot=@srcdir@ 3 | (or that --sysroot is applied to relative file paths). */ 4 | 5 | #include 6 | #include 7 | #include 8 | int main (int argc, char *argv[]) 9 | { 10 | FILE *f = fopen ("check_openpf2.c", "rb"); 11 | if (f == NULL) 12 | abort (); 13 | fclose(f); 14 | printf ("pass\n"); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceq_w_phr.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0x43210000; 10 | 11 | __asm 12 | ("preceq.w.phr %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (result != rd) { 17 | printf("preceq.w.phr wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceu_ph_qbl.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0x00870065; 10 | 11 | __asm 12 | ("preceu.ph.qbl %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (result != rd) { 17 | printf("preceu.ph.qbl wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceu_ph_qbr.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0x00430021; 10 | 11 | __asm 12 | ("preceu.ph.qbr %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (result != rd) { 17 | printf("preceu.ph.qbr wrong"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceu_qh_obl.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | rt = 0x123456789ABCDEF0; 7 | result = 0x0012003400560078; 8 | 9 | __asm 10 | ("preceu.qh.obl %0, %1\n\t" 11 | : "=r"(rd) 12 | : "r"(rt) 13 | ); 14 | 15 | if (result != rd) { 16 | printf("preceu.qh.obl error\n"); 17 | 18 | return -1; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceu_qh_obla.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | rt = 0x123456789ABCDEF0; 7 | result = 0x00120056009A00DE; 8 | 9 | __asm 10 | ("preceu.qh.obla %0, %1\n\t" 11 | : "=r"(rd) 12 | : "r"(rt) 13 | ); 14 | 15 | if (result != rd) { 16 | printf("preceu.qh.obla error\n"); 17 | 18 | return -1; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shra_ph.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0xFFFFFFFFF0EC0864; 10 | 11 | __asm 12 | ("shra.ph %0, %1, 0x03\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (rd != result) { 17 | printf("shra.ph wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_divu.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name DIVU_1 6 | mvi r1, 0 7 | mvi r2, 1 8 | divu r3, r1, r2 9 | check_r3 0 10 | 11 | test_name DIVU_2 12 | mvi r1, 1 13 | mvi r2, 1 14 | divu r3, r1, r2 15 | check_r3 1 16 | 17 | test_name DIVU_3 18 | mvi r1, 0 19 | mvi r2, 0 20 | divu r3, r1, r2 21 | check_excp 16 22 | 23 | test_name DIVU_4 24 | load r1 0xabcdef12 25 | load r2 0x12345 26 | divu r3, r1, r2 27 | check_r3 0x9700 28 | 29 | end 30 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/repl_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, result; 7 | 8 | result = 0x01BF01BF; 9 | __asm 10 | ("repl.ph %0, 0x1BF\n\t" 11 | : "=r"(rd) 12 | ); 13 | assert(rd == result); 14 | 15 | result = 0x01FF01FF; 16 | __asm 17 | ("repl.ph %0, 0x01FF\n\t" 18 | : "=r"(rd) 19 | ); 20 | assert(rd == result); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceq_pw_qhla.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | 7 | rt = 0x123456789ABCDEF0; 8 | result = 0x123400009ABC0000; 9 | 10 | __asm 11 | ("preceq.pw.qhla %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | 16 | if (result != rd) { 17 | printf("preceq.pw.qhla error\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceq_pw_qhra.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | 7 | rt = 0x123456789ABCDEF0; 8 | result = 0x56780000DEF00000; 9 | 10 | __asm 11 | ("preceq.pw.qhra %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | 16 | if (result != rd) { 17 | printf("preceq.pw.qhra error\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceq_w_phl.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0xFFFFFFFF87650000; 10 | 11 | __asm 12 | ("preceq.w.phl %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (result != rd) { 17 | printf("preceq.w.phl wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precequ_ph_qbl.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0x43803280; 10 | 11 | __asm 12 | ("precequ.ph.qbl %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (result != rd) { 17 | printf("precequ.ph.qbl wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precequ_ph_qbla.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0x43802180; 10 | 11 | __asm 12 | ("precequ.ph.qbla %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (result != rd) { 17 | printf("precequ.ph.qbla wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precequ_ph_qbr.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0x21801080; 10 | 11 | __asm 12 | ("precequ.ph.qbr %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (result != rd) { 17 | printf("precequ.ph.qbr wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precequ_ph_qbra.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0x32801080; 10 | 11 | __asm 12 | ("precequ.ph.qbra %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (result != rd) { 17 | printf("precequ.ph.qbra wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precequ_qh_obl.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | rt = 0x123456789ABCDEF0; 7 | result = 0x09001A002B003C00; 8 | 9 | __asm 10 | ("precequ.qh.obla %0, %1\n\t" 11 | : "=r"(rd) 12 | : "r"(rt) 13 | ); 14 | 15 | if (result != rd) { 16 | printf("precequ.qh.obla error\n"); 17 | 18 | return -1; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precequ_qh_obla.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | rt = 0x123456789ABCDEF0; 7 | result = 0x09002B004D006F00; 8 | 9 | __asm 10 | ("precequ.qh.obla %0, %1\n\t" 11 | : "=r"(rd) 12 | : "r"(rt) 13 | ); 14 | 15 | if (result != rd) { 16 | printf("precequ.qh.obla error\n"); 17 | 18 | return -1; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceu_ph_qbla.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0x00870043; 10 | 11 | __asm 12 | ("preceu.ph.qbla %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (result != rd) { 17 | printf("preceu.ph.qbla wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceu_ph_qbra.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0x00650021; 10 | 11 | __asm 12 | ("preceu.ph.qbra %0, %1\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (result != rd) { 17 | printf("preceu.ph.qbra wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceu_qh_obr.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | 7 | rt = 0x123456789ABCDEF0; 8 | result = 0x009A00BC00DE00F0; 9 | 10 | __asm 11 | ("preceu.qh.obr %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | 16 | if (result != rd) { 17 | printf("preceu.qh.obr error\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceu_qh_obra.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | 7 | rt = 0x123456789ABCDEF0; 8 | result = 0x0034007800BC00F0; 9 | 10 | __asm 11 | ("preceu.qh.obra %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | 16 | if (result != rd) { 17 | printf("preceu.qh.obra error\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shra_r_ph.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0xFFFFFFFFF0ED0864; 10 | 11 | __asm 12 | ("shra_r.ph %0, %1, 0x03\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (rd != result) { 17 | printf("shra_r.ph wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shra_r_w.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | 8 | rt = 0x87654321; 9 | result = 0xFFFFFFFFF0ECA864; 10 | 11 | __asm 12 | ("shra_r.w %0, %1, 0x03\n\t" 13 | : "=r"(rd) 14 | : "r"(rt) 15 | ); 16 | if (rd != result) { 17 | printf("shra_r.w wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/shrav_ob.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, rs; 6 | long long res; 7 | 8 | rt = 0x1234567887654321; 9 | rs = 0x4; 10 | res = 0xf1f3f5f7f8060402; 11 | 12 | asm ("shrav.ob %0, %1, %2" 13 | : "=r"(rd) 14 | : "r"(rt), "r"(rs) 15 | ); 16 | 17 | if (rd != res) { 18 | printf("shra.ob error\n"); 19 | return -1; 20 | } 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_gcctorture_pr28634.c: -------------------------------------------------------------------------------- 1 | /* PR rtl-optimization/28634. On targets with delayed branches, 2 | dbr_schedule could do the next iteration's addition in the 3 | branch delay slot, then subtract the value again if the branch 4 | wasn't taken. This can lead to rounding errors. */ 5 | double x = -0x1.0p53; 6 | double y = 1; 7 | int 8 | main (void) 9 | { 10 | while (y > 0) 11 | y += x; 12 | if (y != x + 1) 13 | abort (); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/shrav_r_ob.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, rs; 6 | long long res; 7 | 8 | rt = 0x1234567887654321; 9 | rs = 0x4; 10 | res = 0xe3e7ebf0f1ede9e5; 11 | 12 | asm ("shrav_r.ob %0, %1, %2" 13 | : "=r"(rd) 14 | : "r"(rt), "r"(rs) 15 | ); 16 | 17 | if (rd != res) { 18 | printf("shra_r.ob error\n"); 19 | return -1; 20 | } 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/xtensa/test_mul32.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | test_suite mul32 4 | 5 | test mull 6 | movi a2, 0x137f5a5a 7 | mov a3, a2 8 | movi a4, 0xa5a5137f 9 | movi a6, 0x5de480a6 10 | mull a5, a2, a4 11 | assert eq, a5, a6 12 | mull a2, a2, a4 13 | assert eq, a2, a6 14 | mull a3, a4, a3 15 | assert eq, a3, a6 16 | test_end 17 | 18 | /* unfortunately dc232b doesn't have muluh/mulsh*/ 19 | 20 | test_suite_end 21 | -------------------------------------------------------------------------------- /bsd-user/x86_64/target_signal.h: -------------------------------------------------------------------------------- 1 | #ifndef TARGET_SIGNAL_H 2 | #define TARGET_SIGNAL_H 3 | 4 | #include "cpu.h" 5 | 6 | /* this struct defines a stack used during syscall handling */ 7 | 8 | typedef struct target_sigaltstack { 9 | abi_ulong ss_sp; 10 | abi_long ss_flags; 11 | abi_ulong ss_size; 12 | } target_stack_t; 13 | 14 | static inline abi_ulong get_sp_from_cpustate(CPUX86State *state) 15 | { 16 | return state->regs[R_ESP]; 17 | } 18 | 19 | #endif /* TARGET_SIGNAL_H */ 20 | -------------------------------------------------------------------------------- /hw/pci-bridge/xio3130_downstream.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_XIO3130_DOWNSTREAM_H 2 | #define QEMU_XIO3130_DOWNSTREAM_H 3 | 4 | #include "hw/pci/pcie_port.h" 5 | 6 | PCIESlot *xio3130_downstream_init(PCIBus *bus, int devfn, bool multifunction, 7 | const char *bus_name, pci_map_irq_fn map_irq, 8 | uint8_t port, uint8_t chassis, 9 | uint16_t slot); 10 | 11 | #endif /* QEMU_XIO3130_DOWNSTREAM_H */ 12 | -------------------------------------------------------------------------------- /tests/libqos/pci-pc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libqos PCI bindings for PC 3 | * 4 | * Copyright IBM, Corp. 2012-2013 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU GPL, version 2 or later. 10 | * See the COPYING file in the top-level directory. 11 | */ 12 | 13 | #ifndef LIBQOS_PCI_PC_H 14 | #define LIBQOS_PCI_PC_H 15 | 16 | #include "libqos/pci.h" 17 | 18 | QPCIBus *qpci_init_pc(void); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precequ_qh_obr.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | 7 | rt = 0x123456789ABCDEF0; 8 | result = 0x4D005E006F007000; 9 | 10 | __asm 11 | ("precequ.qh.obr %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | 16 | if (result != rd) { 17 | printf("precequ.qh.obr error\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precequ_qh_obra.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, result; 6 | 7 | rt = 0x123456789ABCDEF0; 8 | result = 0x1A003C005D007000; 9 | 10 | __asm 11 | ("precequ.qh.obra %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | 16 | if (result != rd) { 17 | printf("precequ.qh.obra error\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /tests/tcg/xtensa/crt.S: -------------------------------------------------------------------------------- 1 | .section .init 2 | j 1f 3 | .section .init.text 4 | 1: 5 | movi a2, _start 6 | jx a2 7 | 8 | .text 9 | .global _start 10 | _start: 11 | movi a2, 1 12 | wsr a2, windowstart 13 | movi a2, 0 14 | wsr a2, windowbase 15 | movi a1, _fstack 16 | movi a2, 0x4000f 17 | wsr a2, ps 18 | isync 19 | 20 | call0 main 21 | 22 | mov a3, a2 23 | movi a2, 1 24 | simcall 25 | -------------------------------------------------------------------------------- /bsd-user/i386/target_signal.h: -------------------------------------------------------------------------------- 1 | #ifndef TARGET_SIGNAL_H 2 | #define TARGET_SIGNAL_H 3 | 4 | #include "cpu.h" 5 | 6 | /* this struct defines a stack used during syscall handling */ 7 | 8 | typedef struct target_sigaltstack { 9 | abi_ulong ss_sp; 10 | abi_long ss_flags; 11 | abi_ulong ss_size; 12 | } target_stack_t; 13 | 14 | 15 | static inline abi_ulong get_sp_from_cpustate(CPUX86State *state) 16 | { 17 | return state->regs[R_ESP]; 18 | } 19 | 20 | #endif /* TARGET_SIGNAL_H */ 21 | -------------------------------------------------------------------------------- /include/hw/i2c/pm_smbus.h: -------------------------------------------------------------------------------- 1 | #ifndef PM_SMBUS_H 2 | #define PM_SMBUS_H 3 | 4 | typedef struct PMSMBus { 5 | i2c_bus *smbus; 6 | MemoryRegion io; 7 | 8 | uint8_t smb_stat; 9 | uint8_t smb_ctl; 10 | uint8_t smb_cmd; 11 | uint8_t smb_addr; 12 | uint8_t smb_data0; 13 | uint8_t smb_data1; 14 | uint8_t smb_data[32]; 15 | uint8_t smb_index; 16 | } PMSMBus; 17 | 18 | void pm_smbus_init(DeviceState *parent, PMSMBus *smb); 19 | 20 | #endif /* !PM_SMBUS_H */ 21 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/mfhi.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long achi, acho; 6 | long long result; 7 | 8 | achi = 0x004433; 9 | result = 0x004433; 10 | 11 | __asm 12 | ("mthi %1, $ac1\n\t" 13 | "mfhi %0, $ac1\n\t" 14 | : "=r"(acho) 15 | : "r"(achi) 16 | ); 17 | if (result != acho) { 18 | printf("mfhi wrong\n"); 19 | 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/mflo.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long acli, aclo; 6 | long long result; 7 | 8 | acli = 0x004433; 9 | result = 0x004433; 10 | 11 | __asm 12 | ("mtlo %1, $ac1\n\t" 13 | "mflo %0, $ac1\n\t" 14 | : "=r"(aclo) 15 | : "r"(acli) 16 | ); 17 | if (result != aclo) { 18 | printf("mflo wrong\n"); 19 | 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/mthi.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long achi, acho; 6 | long long result; 7 | 8 | achi = 0x004433; 9 | result = 0x004433; 10 | 11 | __asm 12 | ("mthi %1, $ac1\n\t" 13 | "mfhi %0, $ac1\n\t" 14 | : "=r"(acho) 15 | : "r"(achi) 16 | ); 17 | if (result != acho) { 18 | printf("mthi wrong\n"); 19 | 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceq_l_pwl.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | rt = 0xFFFFFFFF11111111; 8 | result = 0xFFFFFFFF00000000; 9 | 10 | __asm 11 | ("preceq.l.pwl %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | 16 | if (result != rd) { 17 | printf("preceq.l.pwl wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/preceq_l_pwr.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt; 6 | long long result; 7 | rt = 0xFFFFFFFF11111111; 8 | result = 0x1111111100000000; 9 | 10 | __asm 11 | ("preceq.l.pwl %0, %1\n\t" 12 | : "=r"(rd) 13 | : "r"(rt) 14 | ); 15 | 16 | if (result != rd) { 17 | printf("preceq.l.pwr wrong\n"); 18 | 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/subqh_w.c: -------------------------------------------------------------------------------- 1 | #include"io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x12345678; 9 | rt = 0x87654321; 10 | result = 0x456789AB; 11 | 12 | __asm 13 | ("subqh.w %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rs), "r"(rt) 16 | ); 17 | if (rd != result) { 18 | printf("subqh.w error\n"); 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /include/hw/lm32/lm32_pic.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_HW_LM32_PIC_H 2 | #define QEMU_HW_LM32_PIC_H 3 | 4 | #include "qemu-common.h" 5 | 6 | uint32_t lm32_pic_get_ip(DeviceState *d); 7 | uint32_t lm32_pic_get_im(DeviceState *d); 8 | void lm32_pic_set_ip(DeviceState *d, uint32_t ip); 9 | void lm32_pic_set_im(DeviceState *d, uint32_t im); 10 | 11 | void lm32_do_pic_info(Monitor *mon, const QDict *qdict); 12 | void lm32_irq_info(Monitor *mon, const QDict *qdict); 13 | 14 | #endif /* QEMU_HW_LM32_PIC_H */ 15 | -------------------------------------------------------------------------------- /include/hw/sparc/sparc32_dma.h: -------------------------------------------------------------------------------- 1 | #ifndef SPARC32_DMA_H 2 | #define SPARC32_DMA_H 3 | 4 | /* sparc32_dma.c */ 5 | void ledma_memory_read(void *opaque, hwaddr addr, 6 | uint8_t *buf, int len, int do_bswap); 7 | void ledma_memory_write(void *opaque, hwaddr addr, 8 | uint8_t *buf, int len, int do_bswap); 9 | void espdma_memory_read(void *opaque, uint8_t *buf, int len); 10 | void espdma_memory_write(void *opaque, uint8_t *buf, int len); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /include/monitor/qdev.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_QDEV_MONITOR_H 2 | #define QEMU_QDEV_MONITOR_H 3 | 4 | #include "hw/qdev-core.h" 5 | #include "monitor/monitor.h" 6 | 7 | /*** monitor commands ***/ 8 | 9 | void do_info_qtree(Monitor *mon, const QDict *qdict); 10 | void do_info_qdm(Monitor *mon, const QDict *qdict); 11 | int do_device_add(Monitor *mon, const QDict *qdict, QObject **ret_data); 12 | int qdev_device_help(QemuOpts *opts); 13 | DeviceState *qdev_device_add(QemuOpts *opts); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /target-lm32/helper.h: -------------------------------------------------------------------------------- 1 | #include "exec/def-helper.h" 2 | 3 | DEF_HELPER_2(raise_exception, void, env, i32) 4 | DEF_HELPER_1(hlt, void, env) 5 | DEF_HELPER_2(wcsr_im, void, env, i32) 6 | DEF_HELPER_2(wcsr_ip, void, env, i32) 7 | DEF_HELPER_2(wcsr_jtx, void, env, i32) 8 | DEF_HELPER_2(wcsr_jrx, void, env, i32) 9 | DEF_HELPER_1(rcsr_im, i32, env) 10 | DEF_HELPER_1(rcsr_ip, i32, env) 11 | DEF_HELPER_1(rcsr_jtx, i32, env) 12 | DEF_HELPER_1(rcsr_jrx, i32, env) 13 | 14 | #include "exec/def-helper.h" 15 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shrlv_qh.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, rs; 6 | long long res; 7 | 8 | rt = 0x8765679abc543786; 9 | rs = 0x4; 10 | res = 0x087606790bc50378; 11 | 12 | __asm 13 | ("shrlv.qh %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rt), "r"(rs) 16 | ); 17 | 18 | if (rd != res) { 19 | printf("shrlv.qh error\n"); 20 | return -1; 21 | } 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/shrlv_ph.c: -------------------------------------------------------------------------------- 1 | #include"io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x05; 9 | rt = 0x12345678; 10 | result = 0x009102B3; 11 | 12 | __asm 13 | ("shrlv.ph %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rt), "r"(rs) 16 | ); 17 | if (rd != result) { 18 | printf("shrlv.ph error!\n"); 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/subqh_ph.c: -------------------------------------------------------------------------------- 1 | #include"io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x12345678; 9 | rt = 0x87654321; 10 | result = 0x456709AB; 11 | 12 | __asm 13 | ("subqh.ph %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rs), "r"(rt) 16 | ); 17 | if (rd != result) { 18 | printf("subqh.ph error\n"); 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/subqh_r_w.c: -------------------------------------------------------------------------------- 1 | #include"io.h" 2 | 3 | int main() 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x12345678; 9 | rt = 0x87654321; 10 | result = 0x456789AC; 11 | 12 | __asm 13 | ("subqh_r.w %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rs), "r"(rt) 16 | ); 17 | if (rd != result) { 18 | printf("subqh_r.w error\n"); 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/subuh_qb.c: -------------------------------------------------------------------------------- 1 | #include"io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x12345678; 9 | rt = 0x87654321; 10 | result = 0xC5E7092B; 11 | 12 | __asm 13 | ("subuh.qb %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rs), "r"(rt) 16 | ); 17 | if (rd != result) { 18 | printf("subuh.qb wrong\n"); 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/libqos/fw_cfg-pc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libqos fw_cfg support for PC 3 | * 4 | * Copyright IBM, Corp. 2012-2013 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU GPL, version 2 or later. 10 | * See the COPYING file in the top-level directory. 11 | */ 12 | 13 | #ifndef LIBQOS_FW_CFG_PC_H 14 | #define LIBQOS_FW_CFG_PC_H 15 | 16 | #include "libqos/fw_cfg.h" 17 | 18 | QFWCFG *pc_fw_cfg_init(void); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_sigalrm.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #define MAGIC (0xdeadbeef) 7 | 8 | int s = 0; 9 | void sighandler(int sig) 10 | { 11 | s = MAGIC; 12 | } 13 | 14 | int main(int argc, char **argv) 15 | { 16 | int p; 17 | 18 | p = getpid(); 19 | signal(SIGALRM, sighandler); 20 | kill(p, SIGALRM); 21 | if (s != MAGIC) 22 | return EXIT_FAILURE; 23 | 24 | printf ("passed\n"); 25 | return EXIT_SUCCESS; 26 | } 27 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_bret.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name BRET_1 6 | mvi r1, 4 7 | wcsr IE, r1 8 | load ba mark 9 | bret 10 | tc_fail 11 | bi 1f 12 | 13 | mark: 14 | tc_pass 15 | 16 | 1: 17 | test_name BRET_2 18 | rcsr r3, IE 19 | check_r3 5 20 | 21 | test_name BRET_3 22 | mvi r1, 0 23 | wcsr IE, r1 24 | load ba mark2 25 | bret 26 | tc_fail 27 | bi 1f 28 | 29 | mark2: 30 | tc_pass 31 | 32 | 1: 33 | test_name BRET_4 34 | rcsr r3, IE 35 | check_r3 0 36 | 37 | end 38 | 39 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_eret.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name ERET_1 6 | mvi r1, 2 7 | wcsr IE, r1 8 | load ea mark 9 | eret 10 | tc_fail 11 | bi 1f 12 | 13 | mark: 14 | tc_pass 15 | 16 | 1: 17 | test_name ERET_2 18 | rcsr r3, IE 19 | check_r3 3 20 | 21 | test_name ERET_3 22 | mvi r1, 0 23 | wcsr IE, r1 24 | load ea mark2 25 | eret 26 | tc_fail 27 | bi 1f 28 | 29 | mark2: 30 | tc_pass 31 | 32 | 1: 33 | test_name ERET_4 34 | rcsr r3, IE 35 | check_r3 0 36 | 37 | end 38 | 39 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/packrl_ph.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x12345678; 9 | rt = 0x87654321; 10 | result = 0x56788765; 11 | 12 | __asm 13 | ("packrl.ph %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rs), "r"(rt) 16 | ); 17 | if (result != rd) { 18 | printf("packrl.ph wrong\n"); 19 | 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shrlv_qb.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x05; 9 | rt = 0x12345678; 10 | result = 0x00010203; 11 | 12 | __asm 13 | ("shrlv.qb %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rt), "r"(rs) 16 | ); 17 | if (rd != result) { 18 | printf("shrlv.qb wrong\n"); 19 | 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/precr_qb_ph.c: -------------------------------------------------------------------------------- 1 | #include"io.h" 2 | 3 | int main() 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x12345678; 9 | rt = 0x87654321; 10 | result = 0x34786521; 11 | 12 | __asm 13 | ("precr.qb.ph %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rs), "r"(rt) 16 | ); 17 | if (result != rd) { 18 | printf("precr.qb.ph error\n"); 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/subqh_r_ph.c: -------------------------------------------------------------------------------- 1 | #include"io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x12345678; 9 | rt = 0x87654321; 10 | result = 0x456809AC; 11 | 12 | __asm 13 | ("subqh_r.ph %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rs), "r"(rt) 16 | ); 17 | if (rd != result) { 18 | printf("subqh_r.ph error\n"); 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /target-cris/mmu.h: -------------------------------------------------------------------------------- 1 | #define CRIS_MMU_ERR_EXEC 0 2 | #define CRIS_MMU_ERR_READ 1 3 | #define CRIS_MMU_ERR_WRITE 2 4 | #define CRIS_MMU_ERR_FLUSH 3 5 | 6 | struct cris_mmu_result 7 | { 8 | uint32_t phy; 9 | int prot; 10 | int bf_vec; 11 | }; 12 | 13 | void cris_mmu_init(CPUCRISState *env); 14 | void cris_mmu_flush_pid(CPUCRISState *env, uint32_t pid); 15 | int cris_mmu_translate(struct cris_mmu_result *res, 16 | CPUCRISState *env, uint32_t vaddr, 17 | int rw, int mmu_idx, int debug); 18 | -------------------------------------------------------------------------------- /tests/libqos/malloc-pc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libqos malloc support for PC 3 | * 4 | * Copyright IBM, Corp. 2012-2013 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU GPL, version 2 or later. 10 | * See the COPYING file in the top-level directory. 11 | */ 12 | 13 | #ifndef LIBQOS_MALLOC_PC_H 14 | #define LIBQOS_MALLOC_PC_H 15 | 16 | #include "libqos/malloc.h" 17 | 18 | QGuestAllocator *pc_alloc_init(void); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /tests/tcg/openrisc/test_sfles.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | int a, b; 6 | int result; 7 | 8 | a = 0; 9 | b = 3; 10 | result = 4; 11 | __asm 12 | ("1:\n\t" 13 | "l.addi %0, %0, 4\n\t" 14 | "l.sfles %0, %1\n\t" 15 | "l.bf 1b\n\t" 16 | "l.nop\n\t" 17 | : "+r"(a) 18 | : "r"(b) 19 | ); 20 | if (a != result) { 21 | printf("sfles error\n"); 22 | return -1; 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /hw/scsi/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += scsi-disk.o 2 | common-obj-y += scsi-generic.o scsi-bus.o 3 | common-obj-$(CONFIG_LSI_SCSI_PCI) += lsi53c895a.o 4 | common-obj-$(CONFIG_MEGASAS_SCSI_PCI) += megasas.o 5 | common-obj-$(CONFIG_VMW_PVSCSI_SCSI_PCI) += vmw_pvscsi.o 6 | common-obj-$(CONFIG_ESP) += esp.o 7 | common-obj-$(CONFIG_ESP_PCI) += esp-pci.o 8 | obj-$(CONFIG_PSERIES) += spapr_vscsi.o 9 | 10 | ifeq ($(CONFIG_VIRTIO),y) 11 | obj-y += virtio-scsi.o 12 | obj-$(CONFIG_VHOST_SCSI) += vhost-scsi.o 13 | endif 14 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precrq_ph_w.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x12345678; 9 | rt = 0x87654321; 10 | result = 0x12348765; 11 | 12 | __asm 13 | ("precrq.ph.w %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rs), "r"(rt) 16 | ); 17 | if (result != rd) { 18 | printf("precrq.ph.w wrong\n"); 19 | 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precrq_qb_ph.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x12345678; 9 | rt = 0x87654321; 10 | result = 0x12568743; 11 | 12 | __asm 13 | ("precrq.qb.ph %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rs), "r"(rt) 16 | ); 17 | if (result != rd) { 18 | printf("precrq.qb.ph wrong\n"); 19 | 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shrav_ph.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x03; 9 | rt = 0x87654321; 10 | result = 0xFFFFFFFFF0EC0864; 11 | 12 | __asm 13 | ("shrav.ph %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rt), "r"(rs) 16 | ); 17 | if (rd != result) { 18 | printf("shrav.ph wrong\n"); 19 | 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shrav_r_w.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x03; 9 | rt = 0x87654321; 10 | result = 0xFFFFFFFFF0ECA864; 11 | 12 | __asm 13 | ("shrav_r.w %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rt), "r"(rs) 16 | ); 17 | if (rd != result) { 18 | printf("shrav_r.w wrong\n"); 19 | 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/openrisc/test_j.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | int a; 6 | int result; 7 | 8 | a = 0; 9 | result = 2; 10 | __asm 11 | ("l.addi %0, %0, 1\n\t" 12 | "l.j j\n\t" 13 | "l.nop\n\t" 14 | "l.addi %0, %0, 1\n\t" 15 | "l.nop\n\t" 16 | "j:\n\t" 17 | "l.addi %0, %0, 1\n\t" 18 | : "+r"(a) 19 | ); 20 | if (a != result) { 21 | printf("j error\n"); 22 | return -1; 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/packrl_pw.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long res; 7 | 8 | rs = 0x1234567887654321; 9 | rt = 0xabcdef9812345678; 10 | 11 | res = 0x87654321abcdef98; 12 | 13 | __asm 14 | ("packrl.pw %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | if (rd != res) { 19 | printf("packrl.pw error\n"); 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shrav_r_ph.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long result; 7 | 8 | rs = 0x03; 9 | rt = 0x87654321; 10 | result = 0xFFFFFFFFF0ED0864; 11 | 12 | __asm 13 | ("shrav_r.ph %0, %1, %2\n\t" 14 | : "=r"(rd) 15 | : "r"(rt), "r"(rs) 16 | ); 17 | if (rd != result) { 18 | printf("shrav_r.ph wrong\n"); 19 | 20 | return -1; 21 | } 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dspr2/subuh_r_ob.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt, result; 6 | 7 | rd = 0x0; 8 | rs = 0x246956789ABCDEF0; 9 | rt = 0x123456789ABCDEF0; 10 | result = 0x091B000000000000; 11 | 12 | __asm("subuh.ob %0, %1, %2\n\t" 13 | : "=r"(rd) 14 | : "r"(rs), "r"(rt) 15 | ); 16 | 17 | if (rd != result) { 18 | printf("subuh.ob error\n"); 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /tests/tcg/openrisc/test_jal.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | int a; 6 | int result; 7 | 8 | a = 0; 9 | result = 2; 10 | __asm 11 | ("l.addi %0, %0, 1\n\t" 12 | "l.jal jal\n\t" 13 | "l.nop\n\t" 14 | "l.addi %0, %0, 1\n\t" 15 | "l.nop\n\t" 16 | "jal:\n\t" 17 | "l.addi %0, %0, 1\n\t" 18 | : "+r"(a) 19 | ); 20 | if (a != result) { 21 | printf("jal error\n"); 22 | return -1; 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /tests/tcg/xtensa/test_boolean.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | test_suite boolean 4 | 5 | test all4 6 | movi a2, 0xfec0 7 | wsr a2, br 8 | all4 b0, b0 9 | rsr a3, br 10 | assert eq, a2, a3 11 | all4 b0, b4 12 | rsr a3, br 13 | assert eq, a2, a3 14 | all4 b0, b8 15 | rsr a3, br 16 | assert eq, a2, a3 17 | all4 b0, b12 18 | rsr a3, br 19 | addi a2, a2, 1 20 | assert eq, a2, a3 21 | test_end 22 | 23 | test_suite_end 24 | -------------------------------------------------------------------------------- /fsdev/qemu-fsdev-dummy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Virtio 9p 3 | * 4 | * Copyright IBM, Corp. 2010 5 | * 6 | * Authors: 7 | * Gautham R Shenoy 8 | * 9 | * This work is licensed under the terms of the GNU GPL, version 2. See 10 | * the COPYING file in the top-level directory. 11 | * 12 | */ 13 | #include 14 | #include 15 | #include "qemu-fsdev.h" 16 | #include "qemu/config-file.h" 17 | #include "qemu/module.h" 18 | 19 | int qemu_fsdev_add(QemuOpts *opts) 20 | { 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /target-moxie/mmu.h: -------------------------------------------------------------------------------- 1 | #define MOXIE_MMU_ERR_EXEC 0 2 | #define MOXIE_MMU_ERR_READ 1 3 | #define MOXIE_MMU_ERR_WRITE 2 4 | #define MOXIE_MMU_ERR_FLUSH 3 5 | 6 | typedef struct { 7 | uint32_t phy; 8 | uint32_t pfn; 9 | int g:1; 10 | int v:1; 11 | int k:1; 12 | int w:1; 13 | int e:1; 14 | int cause_op; 15 | } MoxieMMUResult; 16 | 17 | int moxie_mmu_translate(MoxieMMUResult *res, 18 | CPUMoxieState *env, uint32_t vaddr, 19 | int rw, int mmu_idx); 20 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_sb.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name SB_1 6 | load r1 data 7 | load r2 0xf0f1f2aa 8 | sb (r1+0), r2 9 | check_mem data 0xaa000000 10 | 11 | test_name SB_2 12 | load r2 0xf0f1f2bb 13 | sb (r1+1), r2 14 | check_mem data 0xaabb0000 15 | 16 | test_name SB_3 17 | load r2 0xf0f1f2cc 18 | sb (r1+-1), r2 19 | check_mem data0 0x000000cc 20 | 21 | end 22 | 23 | .data 24 | .align 4 25 | data0: 26 | .byte 0, 0, 0, 0 27 | data: 28 | .byte 0, 0, 0, 0 29 | data1: 30 | .byte 0, 0, 0, 0 31 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_sh.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name SH_1 6 | load r1 data 7 | load r2 0xf0f1aaaa 8 | sh (r1+0), r2 9 | check_mem data 0xaaaa0000 10 | 11 | test_name SH_2 12 | load r2 0xf0f1bbbb 13 | sh (r1+2), r2 14 | check_mem data 0xaaaabbbb 15 | 16 | test_name SH_3 17 | load r2 0xf0f1cccc 18 | sh (r1+-2), r2 19 | check_mem data0 0x0000cccc 20 | 21 | end 22 | 23 | .data 24 | .align 4 25 | data0: 26 | .byte 0, 0, 0, 0 27 | data: 28 | .byte 0, 0, 0, 0 29 | data1: 30 | .byte 0, 0, 0, 0 31 | -------------------------------------------------------------------------------- /hw/input/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-$(CONFIG_ADB) += adb.o 2 | common-obj-y += hid.o 3 | common-obj-$(CONFIG_LM832X) += lm832x.o 4 | common-obj-$(CONFIG_PCKBD) += pckbd.o 5 | common-obj-$(CONFIG_PL050) += pl050.o 6 | common-obj-y += ps2.o 7 | common-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o 8 | common-obj-$(CONFIG_TSC2005) += tsc2005.o 9 | common-obj-$(CONFIG_VMMOUSE) += vmmouse.o 10 | 11 | obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o 12 | obj-$(CONFIG_PXA2XX) += pxa2xx_keypad.o 13 | obj-$(CONFIG_TSC210X) += tsc210x.o 14 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precr_ob_qh.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long res; 7 | 8 | rs = 0x1234567812345678; 9 | rt = 0x8765432187654321; 10 | 11 | res = 0x3478347865216521; 12 | 13 | __asm 14 | ("precr.ob.qh %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | 19 | if (rd != res) { 20 | printf("precr.ob.qh error\n"); 21 | return -1; 22 | } 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precrq_ob_qh.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long res; 7 | 8 | rs = 0x1234567812345678; 9 | rt = 0x8765432187654321; 10 | 11 | res = 0x1256125687438743; 12 | 13 | __asm 14 | ("precrq.ob.qh %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | 19 | if (rd != res) { 20 | printf("precrq.ob.qh error\n"); 21 | return -1; 22 | } 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precrq_pw_l.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long res; 7 | 8 | rs = 0x1234567812345678; 9 | rt = 0x8765432187654321; 10 | 11 | res = 0x1234567887654321; 12 | 13 | __asm 14 | ("precrq.pw.l %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | 19 | if (rd != res) { 20 | printf("precrq.pw.l error\n"); 21 | return -1; 22 | } 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precrq_qh_pw.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long res; 7 | 8 | rs = 0x1234567812345678; 9 | rt = 0x8765432187654321; 10 | 11 | res = 0x1234123487658765; 12 | 13 | __asm 14 | ("precrq.qh.pw %0, %1, %2\n\t" 15 | : "=r"(rd) 16 | : "r"(rs), "r"(rt) 17 | ); 18 | 19 | if (rd != res) { 20 | printf("precrq.qh.pw error\n"); 21 | return -1; 22 | } 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_lw.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name LW_1 6 | load r1 data 7 | lw r3, (r1+0) 8 | check_r3 0x7e7f7071 9 | 10 | test_name LW_2 11 | lw r3, (r1+4) 12 | check_r3 0x72737475 13 | 14 | test_name LW_3 15 | lw r3, (r1+-4) 16 | check_r3 0x7a7b7c7d 17 | 18 | test_name LW_4 19 | load r3 data 20 | lw r3, (r3+0) 21 | check_r3 0x7e7f7071 22 | 23 | end 24 | 25 | .data 26 | .align 4 27 | .byte 0x7a, 0x7b, 0x7c, 0x7d 28 | data: 29 | .byte 0x7e, 0x7f, 0x70, 0x71 30 | .byte 0x72, 0x73, 0x74, 0x75 31 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/lhx.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(void) 5 | { 6 | int value, rd; 7 | int *p; 8 | unsigned long addr, index; 9 | int result; 10 | 11 | value = 0xBCDEF389; 12 | p = &value; 13 | addr = (unsigned long)p; 14 | index = 0; 15 | result = 0xFFFFF389; 16 | __asm 17 | ("lhx %0, %1(%2)\n\t" 18 | : "=r"(rd) 19 | : "r"(index), "r"(addr) 20 | ); 21 | 22 | assert(rd == result); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/lwx.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(void) 5 | { 6 | int value, rd; 7 | int *p; 8 | unsigned long addr, index; 9 | int result; 10 | 11 | value = 0xBCDEF389; 12 | p = &value; 13 | addr = (unsigned long)p; 14 | index = 0; 15 | result = 0xBCDEF389; 16 | __asm 17 | ("lwx %0, %1(%2)\n\t" 18 | : "=r"(rd) 19 | : "r"(index), "r"(addr) 20 | ); 21 | 22 | assert(rd == result); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/lbux.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(void) 5 | { 6 | int value, rd; 7 | int *p; 8 | unsigned long addr, index; 9 | int result; 10 | 11 | value = 0xBCDEF389; 12 | p = &value; 13 | addr = (unsigned long)p; 14 | index = 0; 15 | result = value & 0xFF; 16 | __asm 17 | ("lbux %0, %1(%2)\n\t" 18 | : "=r"(rd) 19 | : "r"(index), "r"(addr) 20 | ); 21 | 22 | assert(rd == result); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /hw/core/Makefile.objs: -------------------------------------------------------------------------------- 1 | # core qdev-related obj files, also used by *-user: 2 | common-obj-y += qdev.o qdev-properties.o 3 | # irq.o needed for qdev GPIO handling: 4 | common-obj-y += irq.o 5 | 6 | common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o 7 | common-obj-$(CONFIG_XILINX_AXI) += stream.o 8 | common-obj-$(CONFIG_PTIMER) += ptimer.o 9 | common-obj-$(CONFIG_SOFTMMU) += sysbus.o 10 | common-obj-$(CONFIG_SOFTMMU) += null-machine.o 11 | common-obj-$(CONFIG_SOFTMMU) += loader.o 12 | common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o 13 | 14 | -------------------------------------------------------------------------------- /include/hw/kvm/clock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * QEMU KVM support, paravirtual clock device 3 | * 4 | * Copyright (C) 2011 Siemens AG 5 | * 6 | * Authors: 7 | * Jan Kiszka 8 | * 9 | * This work is licensed under the terms of the GNU GPL version 2. 10 | * See the COPYING file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifdef CONFIG_KVM 15 | 16 | void kvmclock_create(void); 17 | 18 | #else /* CONFIG_KVM */ 19 | 20 | static inline void kvmclock_create(void) 21 | { 22 | } 23 | 24 | #endif /* !CONFIG_KVM */ 25 | -------------------------------------------------------------------------------- /net/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y = net.o queue.o checksum.o util.o hub.o 2 | common-obj-y += socket.o 3 | common-obj-y += dump.o 4 | common-obj-y += eth.o 5 | common-obj-$(CONFIG_POSIX) += tap.o 6 | common-obj-$(CONFIG_LINUX) += tap-linux.o 7 | common-obj-$(CONFIG_WIN32) += tap-win32.o 8 | common-obj-$(CONFIG_BSD) += tap-bsd.o 9 | common-obj-$(CONFIG_SOLARIS) += tap-solaris.o 10 | common-obj-$(CONFIG_AIX) += tap-aix.o 11 | common-obj-$(CONFIG_HAIKU) += tap-haiku.o 12 | common-obj-$(CONFIG_SLIRP) += slirp.o 13 | common-obj-$(CONFIG_VDE) += vde.o 14 | -------------------------------------------------------------------------------- /tests/qemu-iotests/052.out: -------------------------------------------------------------------------------- 1 | QA output created by 052 2 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 3 | 4 | == reading whole image == 5 | read 134217728/134217728 bytes at offset 0 6 | 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 7 | 8 | == writing whole image does not modify image == 9 | wrote 134217728/134217728 bytes at offset 0 10 | 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 11 | read 134217728/134217728 bytes at offset 0 12 | 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 13 | *** done 14 | -------------------------------------------------------------------------------- /hw/ide/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-$(CONFIG_IDE_CORE) += core.o atapi.o 2 | common-obj-$(CONFIG_IDE_QDEV) += qdev.o 3 | common-obj-$(CONFIG_IDE_PCI) += pci.o 4 | common-obj-$(CONFIG_IDE_ISA) += isa.o 5 | common-obj-$(CONFIG_IDE_PIIX) += piix.o 6 | common-obj-$(CONFIG_IDE_CMD646) += cmd646.o 7 | common-obj-$(CONFIG_IDE_MACIO) += macio.o 8 | common-obj-$(CONFIG_IDE_MMIO) += mmio.o 9 | common-obj-$(CONFIG_IDE_VIA) += via.o 10 | common-obj-$(CONFIG_MICRODRIVE) += microdrive.o 11 | common-obj-$(CONFIG_AHCI) += ahci.o 12 | common-obj-$(CONFIG_AHCI) += ich.o 13 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/precrqu_s_qb_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt; 7 | int dsp; 8 | int result; 9 | 10 | rs = 0x12345678; 11 | rt = 0x87657FFF; 12 | result = 0x24AC00FF; 13 | 14 | __asm 15 | ("precrqu_s.qb.ph %0, %2, %3\n\t" 16 | "rddsp %1\n\t" 17 | : "=r"(rd), "=r"(dsp) 18 | : "r"(rs), "r"(rt) 19 | ); 20 | assert(result == rd); 21 | assert(((dsp >> 22) & 0x01) == 0x01); 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /linux-user/m68k/syscall.h: -------------------------------------------------------------------------------- 1 | 2 | /* this struct defines the way the registers are stored on the 3 | stack during a system call. */ 4 | 5 | struct target_pt_regs { 6 | abi_long d1, d2, d3, d4, d5, d6, d7; 7 | abi_long a0, a1, a2, a3, a4, a5, a6; 8 | abi_ulong d0; 9 | abi_ulong usp; 10 | abi_ulong orig_d0; 11 | int16_t stkadj; 12 | uint16_t sr; 13 | abi_ulong pc; 14 | uint16_t fntvex; 15 | uint16_t __fill; 16 | }; 17 | 18 | 19 | #define UNAME_MACHINE "m68k" 20 | 21 | void do_m68k_simcall(CPUM68KState *, int); 22 | -------------------------------------------------------------------------------- /tests/qemu-iotests/001.out: -------------------------------------------------------------------------------- 1 | QA output created by 001 2 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 3 | 4 | == reading whole image == 5 | read 134217728/134217728 bytes at offset 0 6 | 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 7 | 8 | == rewriting whole image == 9 | wrote 134217728/134217728 bytes at offset 0 10 | 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 11 | 12 | == verify pattern == 13 | read 134217728/134217728 bytes at offset 0 14 | 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 15 | *** done 16 | -------------------------------------------------------------------------------- /tests/qemu-iotests/008.out: -------------------------------------------------------------------------------- 1 | QA output created by 008 2 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 3 | 4 | == reading whole image == 5 | read 134217728/134217728 bytes at offset 0 6 | 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 7 | 8 | == rewriting whole image == 9 | wrote 134217728/134217728 bytes at offset 0 10 | 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 11 | 12 | == verify pattern == 13 | read 134217728/134217728 bytes at offset 0 14 | 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 15 | *** done 16 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/shll_s_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt, dsp; 7 | int result, resultdsp; 8 | 9 | rt = 0x12345678; 10 | result = 0x7FFF7FFF; 11 | resultdsp = 0x01; 12 | 13 | __asm 14 | ("shll_s.ph %0, %2, 0x0B\n\t" 15 | "rddsp %1\n\t" 16 | : "=r"(rd), "=r"(dsp) 17 | : "r"(rt) 18 | ); 19 | dsp = (dsp >> 22) & 0x01; 20 | assert(dsp == resultdsp); 21 | assert(rd == result); 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /include/hw/virtio/virtio-9p.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Virtio 9p 3 | * 4 | * Copyright IBM, Corp. 2010 5 | * 6 | * Authors: 7 | * Aneesh Kumar K.V 8 | * 9 | * This work is licensed under the terms of the GNU GPL, version 2. See 10 | * the COPYING file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifndef QEMU_VIRTIO_9P_DEVICE_H 15 | #define QEMU_VIRTIO_9P_DEVICE_H 16 | 17 | typedef struct V9fsConf 18 | { 19 | /* tag name for the device */ 20 | char *tag; 21 | char *fsdev_id; 22 | } V9fsConf; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_cmpei.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name CMPEI_1 6 | mvi r1, 0 7 | cmpei r3, r1, 0 8 | check_r3 1 9 | 10 | test_name CMPEI_2 11 | mvi r1, 0 12 | cmpei r3, r1, 1 13 | check_r3 0 14 | 15 | test_name CMPEI_3 16 | mvi r1, 1 17 | cmpei r3, r1, 0 18 | check_r3 0 19 | 20 | test_name CMPEI_4 21 | load r1 0xffffffff 22 | cmpei r3, r1, -1 23 | check_r3 1 24 | 25 | test_name CMPEI_5 26 | mvi r3, 0 27 | cmpei r3, r3, 0 28 | check_r3 1 29 | 30 | test_name CMPEI_6 31 | mvi r3, 0 32 | cmpei r3, r3, 1 33 | check_r3 0 34 | 35 | end 36 | -------------------------------------------------------------------------------- /hw/dma/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-$(CONFIG_PUV3) += puv3_dma.o 2 | common-obj-$(CONFIG_RC4030) += rc4030.o 3 | common-obj-$(CONFIG_PL080) += pl080.o 4 | common-obj-$(CONFIG_PL330) += pl330.o 5 | common-obj-$(CONFIG_I82374) += i82374.o 6 | common-obj-$(CONFIG_I8257) += i8257.o 7 | common-obj-$(CONFIG_XILINX_AXI) += xilinx_axidma.o 8 | common-obj-$(CONFIG_ETRAXFS) += etraxfs_dma.o 9 | common-obj-$(CONFIG_STP2000) += sparc32_dma.o 10 | common-obj-$(CONFIG_SUN4M) += sun4m_iommu.o 11 | 12 | obj-$(CONFIG_OMAP) += omap_dma.o soc_dma.o 13 | obj-$(CONFIG_PXA2XX) += pxa2xx_dma.o 14 | -------------------------------------------------------------------------------- /hw/i386/xen_domainbuild.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_HW_XEN_DOMAINBUILD_H 2 | #define QEMU_HW_XEN_DOMAINBUILD_H 1 3 | 4 | #include "hw/xen/xen_common.h" 5 | 6 | int xenstore_domain_init1(const char *kernel, const char *ramdisk, 7 | const char *cmdline); 8 | int xenstore_domain_init2(int xenstore_port, int xenstore_mfn, 9 | int console_port, int console_mfn); 10 | int xen_domain_build_pv(const char *kernel, const char *ramdisk, 11 | const char *cmdline); 12 | 13 | #endif /* QEMU_HW_XEN_DOMAINBUILD_H */ 14 | -------------------------------------------------------------------------------- /hw/pci-host/Makefile.objs: -------------------------------------------------------------------------------- 1 | common-obj-y += pam.o 2 | 3 | # PPC devices 4 | common-obj-$(CONFIG_PREP_PCI) += prep.o 5 | common-obj-$(CONFIG_GRACKLE_PCI) += grackle.o 6 | # NewWorld PowerMac 7 | common-obj-$(CONFIG_UNIN_PCI) += uninorth.o 8 | # PowerPC E500 boards 9 | common-obj-$(CONFIG_PPCE500_PCI) += ppce500.o 10 | 11 | # ARM devices 12 | common-obj-$(CONFIG_VERSATILE_PCI) += versatile.o 13 | 14 | common-obj-$(CONFIG_PCI_APB) += apb.o 15 | common-obj-$(CONFIG_FULONG) += bonito.o 16 | common-obj-$(CONFIG_PCI_PIIX) += piix.o 17 | common-obj-$(CONFIG_PCI_Q35) += q35.o 18 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_modu.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name MODU_1 6 | mvi r1, 0 7 | mvi r2, 1 8 | modu r3, r1, r2 9 | check_r3 0 10 | 11 | test_name MODU_2 12 | mvi r1, 1 13 | mvi r2, 1 14 | modu r3, r1, r2 15 | check_r3 0 16 | 17 | test_name MODU_3 18 | mvi r1, 3 19 | mvi r2, 2 20 | modu r3, r1, r2 21 | check_r3 1 22 | 23 | test_name MODU_4 24 | mvi r1, 0 25 | mvi r2, 0 26 | modu r3, r1, r2 27 | check_excp 16 28 | 29 | test_name MODU_5 30 | load r1 0xabcdef12 31 | load r2 0x12345 32 | modu r3, r1, r2 33 | check_r3 0x3c12 34 | 35 | end 36 | -------------------------------------------------------------------------------- /include/qemu/thread-posix.h: -------------------------------------------------------------------------------- 1 | #ifndef __QEMU_THREAD_POSIX_H 2 | #define __QEMU_THREAD_POSIX_H 1 3 | #include "pthread.h" 4 | #include 5 | 6 | struct QemuMutex { 7 | pthread_mutex_t lock; 8 | }; 9 | 10 | struct QemuCond { 11 | pthread_cond_t cond; 12 | }; 13 | 14 | struct QemuSemaphore { 15 | #if defined(__APPLE__) || defined(__NetBSD__) 16 | pthread_mutex_t lock; 17 | pthread_cond_t cond; 18 | int count; 19 | #else 20 | sem_t sem; 21 | #endif 22 | }; 23 | 24 | struct QemuThread { 25 | pthread_t thread; 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_ori.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name ORI_1 6 | mvi r1, 0 7 | ori r3, r1, 0 8 | check_r3 0 9 | 10 | test_name ORI_2 11 | mvi r1, 0 12 | ori r3, r1, 1 13 | check_r3 1 14 | 15 | test_name ORI_3 16 | mvi r1, 1 17 | ori r3, r1, 1 18 | check_r3 1 19 | 20 | test_name ORI_4 21 | mvi r1, 1 22 | ori r3, r1, 0 23 | check_r3 1 24 | 25 | test_name ORI_5 26 | load r1 0xaa55aa55 27 | ori r3, r1, 0x55aa 28 | check_r3 0xaa55ffff 29 | 30 | test_name ORI_6 31 | load r3 0xaa55aa55 32 | ori r3, r3, 0x55aa 33 | check_r3 0xaa55ffff 34 | 35 | end 36 | -------------------------------------------------------------------------------- /tests/check-block.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export QEMU_PROG="$(pwd)/x86_64-softmmu/qemu-system-x86_64" 4 | export QEMU_IMG_PROG="$(pwd)/qemu-img" 5 | export QEMU_IO_PROG="$(pwd)/qemu-io" 6 | 7 | if [ ! -x $QEMU_PROG ]; then 8 | echo "'make check-block' requires qemu-system-x86_64" 9 | exit 1 10 | fi 11 | 12 | cd $SRC_PATH/tests/qemu-iotests 13 | 14 | ret=0 15 | ./check -T -nocache -raw || ret=1 16 | ./check -T -nocache -qcow2 || ret=1 17 | ./check -T -nocache -qed|| ret=1 18 | ./check -T -nocache -vmdk|| ret=1 19 | ./check -T -nocache -vpc || ret=1 20 | 21 | exit $ret 22 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_cmpnei.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name CMPNEI_1 6 | mvi r1, 0 7 | cmpnei r3, r1, 0 8 | check_r3 0 9 | 10 | test_name CMPNEI_2 11 | mvi r1, 0 12 | cmpnei r3, r1, 1 13 | check_r3 1 14 | 15 | test_name CMPNEI_3 16 | mvi r1, 1 17 | cmpnei r3, r1, 0 18 | check_r3 1 19 | 20 | test_name CMPNEI_4 21 | load r1 0xffffffff 22 | cmpnei r3, r1, -1 23 | check_r3 0 24 | 25 | test_name CMPNEI_5 26 | mvi r3, 0 27 | cmpnei r3, r3, 0 28 | check_r3 0 29 | 30 | test_name CMPNEI_6 31 | mvi r3, 0 32 | cmpnei r3, r3, 1 33 | check_r3 1 34 | 35 | end 36 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/mulq_rs_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt, dsp; 7 | int result, resultdsp; 8 | 9 | rs = 0x80001234; 10 | rt = 0x80004321; 11 | result = 0x7FFF098C; 12 | resultdsp = 1; 13 | 14 | __asm 15 | ("mulq_rs.ph %0, %2, %3\n\t" 16 | "rddsp %1\n\t" 17 | : "=r"(rd), "=r"(dsp) 18 | : "r"(rs), "r"(rt) 19 | ); 20 | dsp = (dsp >> 21) & 0x01; 21 | assert(rd == result); 22 | assert(dsp == resultdsp); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/subu_qb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt, dsp; 7 | int result, resultdsp; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0x8BCF1357; 12 | resultdsp = 0x01; 13 | 14 | __asm 15 | ("subu.qb %0, %2, %3\n\t" 16 | "rddsp %1\n\t" 17 | : "=r"(rd), "=r"(dsp) 18 | : "r"(rs), "r"(rt) 19 | ); 20 | dsp = (dsp >> 20) & 0x01; 21 | assert(dsp == resultdsp); 22 | assert(rd == result); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/dinsv.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rs, rt, dsp; 6 | long long res; 7 | 8 | rs = 0x1234567887654321; 9 | rt = 0x1234567812345678; 10 | dsp = 0x2222; 11 | res = 0x1234567812345678; 12 | __asm 13 | ("wrdsp %1, 0x3\n\t" 14 | "wrdsp %1\n\t" 15 | "dinsv %0, %2\n\t" 16 | : "+r"(rt) 17 | : "r"(dsp), "r"(rs) 18 | ); 19 | 20 | if (rt != res) { 21 | printf("dinsv error\n"); 22 | return -1; 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shll_qb.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, dsp; 6 | long long result, resultdsp; 7 | 8 | rt = 0x87654321; 9 | result = 0x38281808; 10 | resultdsp = 0x01; 11 | 12 | __asm 13 | ("shll.qb %0, %2, 0x03\n\t" 14 | "rddsp %1\n\t" 15 | : "=r"(rd), "=r"(dsp) 16 | : "r"(rt) 17 | ); 18 | dsp = (dsp >> 22) & 0x01; 19 | if (rd != result) { 20 | printf("shll.qb wrong\n"); 21 | 22 | return -1; 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The following points clarify the QEMU license: 2 | 3 | 1) QEMU as a whole is released under the GNU General Public License 4 | 5 | 2) Parts of QEMU have specific licenses which are compatible with the 6 | GNU General Public License. Hence each source file contains its own 7 | licensing information. 8 | 9 | Many hardware device emulation sources are released under the BSD license. 10 | 11 | 3) The Tiny Code Generator (TCG) is released under the BSD license 12 | (see license headers in files). 13 | 14 | 4) QEMU is a trademark of Fabrice Bellard. 15 | 16 | Fabrice Bellard. 17 | -------------------------------------------------------------------------------- /scripts/tracetool/format/c.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Generate .c file. 6 | """ 7 | 8 | __author__ = "Lluís Vilanova " 9 | __copyright__ = "Copyright 2012, Lluís Vilanova " 10 | __license__ = "GPL version 2 or (at your option) any later version" 11 | 12 | __maintainer__ = "Stefan Hajnoczi" 13 | __email__ = "stefanha@linux.vnet.ibm.com" 14 | 15 | 16 | from tracetool import out 17 | 18 | 19 | def begin(events): 20 | out('/* This file is autogenerated by tracetool, do not edit. */') 21 | -------------------------------------------------------------------------------- /tests/qemu-iotests-quick.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # We don't know which of the system emulator binaries there is (or if there is 4 | # any at all), so the 'quick' group doesn't contain any tests that require 5 | # running qemu proper. Assign a fake binary name so that qemu-iotests doesn't 6 | # complain about the missing binary. 7 | export QEMU_PROG="this_should_be_unused" 8 | 9 | export QEMU_IMG_PROG="$(pwd)/qemu-img" 10 | export QEMU_IO_PROG="$(pwd)/qemu-io" 11 | 12 | cd $SRC_PATH/tests/qemu-iotests 13 | 14 | ret=0 15 | ./check -T -nocache -qcow2 -g quick || ret=1 16 | 17 | exit $ret 18 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_xori.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name XORI_1 6 | mvi r1, 0 7 | xori r3, r1, 0 8 | check_r3 0 9 | 10 | test_name XORI_2 11 | mvi r1, 0 12 | xori r3, r1, 1 13 | check_r3 1 14 | 15 | test_name XORI_3 16 | mvi r1, 1 17 | xori r3, r1, 1 18 | check_r3 0 19 | 20 | test_name XORI_4 21 | mvi r1, 1 22 | xori r3, r1, 0 23 | check_r3 1 24 | 25 | test_name XORI_5 26 | load r1 0xaa55aa55 27 | xori r3, r1, 0x5555 28 | check_r3 0xaa55ff00 29 | 30 | test_name XORI_6 31 | load r3 0xaa55aa55 32 | xori r3, r3, 0x5555 33 | check_r3 0xaa55ff00 34 | 35 | end 36 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/muleu_s_ph_qbl.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt, dsp; 7 | int result, resultdsp; 8 | 9 | rs = 0x80001234; 10 | rt = 0x80004321; 11 | result = 0xFFFF0000; 12 | resultdsp = 1; 13 | 14 | __asm 15 | ("muleu_s.ph.qbl %0, %2, %3\n\t" 16 | "rddsp %1\n\t" 17 | : "=r"(rd), "=r"(dsp) 18 | : "r"(rs), "r"(rt) 19 | ); 20 | dsp = (dsp >> 21) & 0x01; 21 | assert(rd == result); 22 | assert(dsp == resultdsp); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/muleu_s_ph_qbr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt, dsp; 7 | int result, resultdsp; 8 | 9 | rs = 0x8000; 10 | rt = 0x80004321; 11 | result = 0xFFFF0000; 12 | resultdsp = 1; 13 | 14 | __asm 15 | ("muleu_s.ph.qbr %0, %2, %3\n\t" 16 | "rddsp %1\n\t" 17 | : "=r"(rd), "=r"(dsp) 18 | : "r"(rs), "r"(rt) 19 | ); 20 | dsp = (dsp >> 21) & 0x01; 21 | assert(rd == result); 22 | assert(dsp == resultdsp); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/mult.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rs, rt, ach, acl; 7 | int result, resulth, resultl; 8 | 9 | rs = 0x00FFBBAA; 10 | rt = 0x4B231000; 11 | resulth = 0x4b0f01; 12 | resultl = 0x71f8a000; 13 | __asm 14 | ("mult $ac1, %2, %3\n\t" 15 | "mfhi %0, $ac1\n\t" 16 | "mflo %1, $ac1\n\t" 17 | : "=r"(ach), "=r"(acl) 18 | : "r"(rs), "r"(rt) 19 | ); 20 | assert(ach == resulth); 21 | assert(acl == resultl); 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/multu.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rs, rt, ach, acl; 7 | int result, resulth, resultl; 8 | 9 | rs = 0x00FFBBAA; 10 | rt = 0x4B231000; 11 | resulth = 0x4b0f01; 12 | resultl = 0x71f8a000; 13 | __asm 14 | ("multu $ac1, %2, %3\n\t" 15 | "mfhi %0, $ac1\n\t" 16 | "mflo %1, $ac1\n\t" 17 | : "=r"(ach), "=r"(acl) 18 | : "r"(rs), "r"(rt) 19 | ); 20 | assert(ach == resulth); 21 | assert(acl == resultl); 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/subu_s_qb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt, dsp; 7 | int result, resultdsp; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87654321; 11 | result = 0x00001357; 12 | resultdsp = 0x01; 13 | 14 | __asm 15 | ("subu_s.qb %0, %2, %3\n\t" 16 | "rddsp %1\n\t" 17 | : "=r"(rd), "=r"(dsp) 18 | : "r"(rs), "r"(rt) 19 | ); 20 | dsp = (dsp >> 20) & 0x01; 21 | assert(dsp == resultdsp); 22 | assert(rd == result); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/subu_s_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rs, rt, dsp; 7 | int result, resultdsp; 8 | 9 | rs = 0x87654321; 10 | rt = 0x12345678; 11 | result = 0x75310000; 12 | resultdsp = 0x01; 13 | 14 | __asm 15 | ("subu_s.ph %0, %2, %3\n\t" 16 | "rddsp %1\n\t" 17 | : "=r"(rd), "=r"(dsp) 18 | : "r"(rs), "r"(rt) 19 | ); 20 | dsp = (dsp >> 20) & 0x01; 21 | assert(dsp == resultdsp); 22 | assert(rd == result); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/insv.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rt, rs, dsp; 6 | long long result; 7 | 8 | /* msb = 10, lsb = 5 */ 9 | dsp = 0x305; 10 | rt = 0x12345678; 11 | rs = 0xffffffff87654321; 12 | result = 0x12345338; 13 | __asm 14 | ("wrdsp %2, 0x03\n\t" 15 | "insv %0, %1\n\t" 16 | : "+r"(rt) 17 | : "r"(rs), "r"(dsp) 18 | ); 19 | if (rt != result) { 20 | printf("insv wrong\n"); 21 | 22 | return -1; 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /docs/spice-port-fqdn.txt: -------------------------------------------------------------------------------- 1 | A Spice port channel is an arbitrary communication between the Spice 2 | server host side and the client side. 3 | 4 | Thanks to the associated reverse fully qualified domain name (fqdn), 5 | a Spice client can handle the various ports appropriately. 6 | 7 | The following fqdn names are reserved by the QEMU project: 8 | 9 | org.qemu.monitor.hmp.0 10 | QEMU human monitor 11 | 12 | org.qemu.monitor.qmp.0: 13 | QEMU control monitor 14 | 15 | org.qemu.console.serial.0 16 | QEMU virtual serial port 17 | 18 | org.qemu.console.debug.0 19 | QEMU debug console 20 | -------------------------------------------------------------------------------- /tests/qemu-iotests/053.out: -------------------------------------------------------------------------------- 1 | QA output created by 053 2 | 3 | == Creating single sector image == 4 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=512 5 | wrote 512/512 bytes at offset 0 6 | 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 7 | 8 | == Converting the image, compressed == 9 | No errors were found on the image. 10 | 11 | == Checking compressed image virtual disk size == 12 | virtual size: 512 (512 bytes) 13 | 14 | == Verifying the compressed image == 15 | read 512/512 bytes at offset 0 16 | 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 17 | *** done 18 | -------------------------------------------------------------------------------- /include/qemu/envlist.h: -------------------------------------------------------------------------------- 1 | #ifndef ENVLIST_H 2 | #define ENVLIST_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct envlist envlist_t; 9 | 10 | envlist_t *envlist_create(void); 11 | void envlist_free(envlist_t *); 12 | int envlist_setenv(envlist_t *, const char *); 13 | int envlist_unsetenv(envlist_t *, const char *); 14 | int envlist_parse_set(envlist_t *, const char *); 15 | int envlist_parse_unset(envlist_t *, const char *); 16 | char **envlist_to_environ(const envlist_t *, size_t *); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* ENVLIST_H */ 23 | -------------------------------------------------------------------------------- /hw/alpha/alpha_sys.h: -------------------------------------------------------------------------------- 1 | /* Alpha cores and system support chips. */ 2 | 3 | #ifndef HW_ALPHA_H 4 | #define HW_ALPHA_H 1 5 | 6 | #include "hw/pci/pci.h" 7 | #include "hw/pci/pci_host.h" 8 | #include "hw/ide.h" 9 | #include "hw/i386/pc.h" 10 | #include "hw/irq.h" 11 | 12 | 13 | PCIBus *typhoon_init(ram_addr_t, ISABus **, qemu_irq *, AlphaCPU *[4], 14 | pci_map_irq_fn); 15 | 16 | /* alpha_pci.c. */ 17 | extern const MemoryRegionOps alpha_pci_bw_io_ops; 18 | extern const MemoryRegionOps alpha_pci_conf1_ops; 19 | extern const MemoryRegionOps alpha_pci_iack_ops; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /scripts/tracetool/format/d.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Generate .d file (DTrace only). 6 | """ 7 | 8 | __author__ = "Lluís Vilanova " 9 | __copyright__ = "Copyright 2012, Lluís Vilanova " 10 | __license__ = "GPL version 2 or (at your option) any later version" 11 | 12 | __maintainer__ = "Stefan Hajnoczi" 13 | __email__ = "stefanha@linux.vnet.ibm.com" 14 | 15 | 16 | from tracetool import out 17 | 18 | 19 | def begin(events): 20 | out('/* This file is autogenerated by tracetool, do not edit. */') 21 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_andi.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name ANDI_1 6 | mvi r1, 0 7 | andi r3, r1, 0 8 | check_r3 0 9 | 10 | test_name ANDI_2 11 | mvi r1, 1 12 | andi r3, r1, 1 13 | check_r3 1 14 | 15 | test_name ANDI_3 16 | load r1 0x000f0000 17 | andi r3, r1, 1 18 | check_r3 0 19 | 20 | test_name ANDI_4 21 | load r1 0xffffffff 22 | andi r3, r1, 0xffff 23 | check_r3 0xffff 24 | 25 | test_name ANDI_5 26 | load r1 0xffffffff 27 | andi r3, r1, 0 28 | check_r3 0 29 | 30 | test_name ANDI_6 31 | load r3 0xffff55aa 32 | andi r3, r3, 0xaaaa 33 | check_r3 0x000000aa 34 | 35 | end 36 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_be.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name BE_1 6 | mvi r1, 0 7 | mvi r2, 0 8 | be r1, r2, 1f 9 | tc_fail 10 | bi 2f 11 | 1: 12 | tc_pass 13 | 2: 14 | 15 | test_name BE_2 16 | mvi r1, 1 17 | mvi r2, 0 18 | be r1, r2, 1f 19 | tc_pass 20 | bi 2f 21 | 1: 22 | tc_fail 23 | 2: 24 | 25 | test_name BE_3 26 | mvi r1, 0 27 | mvi r2, 1 28 | be r1, r2, 1f 29 | tc_pass 30 | bi 2f 31 | 1: 32 | tc_fail 33 | 2: 34 | 35 | bi 2f 36 | 1: 37 | tc_pass 38 | bi 3f 39 | 2: 40 | test_name BE_4 41 | mvi r1, 1 42 | mvi r2, 1 43 | be r1, r2, 1b 44 | tc_fail 45 | 3: 46 | 47 | end 48 | 49 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/ldx.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long value, rd; 6 | long long *p; 7 | unsigned long long addr, index; 8 | long long result; 9 | 10 | value = 0xBCDEF389; 11 | p = &value; 12 | addr = (unsigned long long)p; 13 | index = 0; 14 | result = 0xBCDEF389; 15 | __asm 16 | ("ldx %0, %1(%2)\n\t" 17 | : "=r"(rd) 18 | : "r"(index), "r"(addr) 19 | ); 20 | if (rd != result) { 21 | printf("lwx wrong\n"); 22 | 23 | return -1; 24 | } 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /scripts/gtester-cat: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright IBM, Corp. 2012 4 | # 5 | # Authors: 6 | # Anthony Liguori 7 | # 8 | # This work is licensed under the terms of the GNU GPLv2 or later. 9 | # See the COPYING file in the top-level directory. 10 | 11 | cat < 13 | 14 | 15 | qemu 16 | 0.0 17 | rev 18 | 19 | EOF 20 | 21 | sed \ 22 | -e '/$/d' \ 24 | -e '//,/<\/info>/d' \ 25 | -e '$b' \ 26 | -e '/^<\/gtester>$/d' "$@" 27 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_movpr.s: -------------------------------------------------------------------------------- 1 | # mach: crisv3 crisv8 crisv10 crisv32 2 | # output: ffffff00\nffff0000\n0\nbb113344\n 3 | 4 | # Test generic "move Ps,Rd" and "move Rs,Pd" insns; the ones with 5 | # functionality common to all models. 6 | 7 | .include "testutils.inc" 8 | start 9 | moveq -1,r3 10 | clear.b r3 11 | checkr3 ffffff00 12 | 13 | moveq -1,r3 14 | clear.w r3 15 | checkr3 ffff0000 16 | 17 | moveq -1,r3 18 | clear.d r3 19 | checkr3 0 20 | 21 | moveq -1,r3 22 | move.d 0xbb113344,r4 23 | setf zcvn 24 | move r4,srp 25 | move srp,r3 26 | test_cc 1 1 1 1 27 | checkr3 bb113344 28 | quit 29 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_sw.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name SW_1 6 | load r1 data 7 | load r2 0xaabbccdd 8 | sw (r1+0), r2 9 | check_mem data 0xaabbccdd 10 | 11 | test_name SW_2 12 | load r2 0x00112233 13 | sw (r1+4), r2 14 | check_mem data1 0x00112233 15 | 16 | test_name SW_3 17 | load r2 0x44556677 18 | sw (r1+-4), r2 19 | check_mem data0 0x44556677 20 | 21 | test_name SW_4 22 | sw (r1+0), r1 23 | lw r3, (r1+0) 24 | check_r3 data 25 | 26 | end 27 | 28 | .data 29 | .align 4 30 | data0: 31 | .byte 0, 0, 0, 0 32 | data: 33 | .byte 0, 0, 0, 0 34 | data1: 35 | .byte 0, 0, 0, 0 36 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/shra_qb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x12345678; 10 | result = 0x02060A0F; 11 | 12 | __asm 13 | ("shra.qb %0, %1, 0x03\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(rd == result); 18 | 19 | rt = 0x87654321; 20 | result = 0xF00C0804; 21 | 22 | __asm 23 | ("shra.qb %0, %1, 0x03\n\t" 24 | : "=r"(rd) 25 | : "r"(rt) 26 | ); 27 | assert(rd == result); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/lbux.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long value, rd; 6 | long long *p; 7 | unsigned long long addr, index; 8 | long long result; 9 | 10 | value = 0xBCDEF389; 11 | p = &value; 12 | addr = (unsigned long long)p; 13 | index = 0; 14 | result = value & 0xFF; 15 | __asm 16 | ("lbux %0, %1(%2)\n\t" 17 | : "=r"(rd) 18 | : "r"(index), "r"(addr) 19 | ); 20 | if (rd != result) { 21 | printf("lbux wrong\n"); 22 | 23 | return -1; 24 | } 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /include/exec/hwaddr.h: -------------------------------------------------------------------------------- 1 | /* Define hwaddr if it exists. */ 2 | 3 | #ifndef HWADDR_H 4 | #define HWADDR_H 5 | 6 | #ifndef CONFIG_USER_ONLY 7 | 8 | #define HWADDR_BITS 64 9 | /* hwaddr is the type of a physical address (its size can 10 | be different from 'target_ulong'). */ 11 | 12 | typedef uint64_t hwaddr; 13 | #define HWADDR_MAX UINT64_MAX 14 | #define TARGET_FMT_plx "%016" PRIx64 15 | #define HWADDR_PRId PRId64 16 | #define HWADDR_PRIi PRIi64 17 | #define HWADDR_PRIo PRIo64 18 | #define HWADDR_PRIu PRIu64 19 | #define HWADDR_PRIx PRIx64 20 | #define HWADDR_PRIX PRIX64 21 | 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_bne.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name BNE_1 6 | mvi r1, 0 7 | mvi r2, 0 8 | bne r1, r2, 1f 9 | tc_pass 10 | bi 2f 11 | 1: 12 | tc_fail 13 | 2: 14 | 15 | test_name BNE_2 16 | mvi r1, 1 17 | mvi r2, 0 18 | bne r1, r2, 1f 19 | tc_fail 20 | bi 2f 21 | 1: 22 | tc_pass 23 | 2: 24 | 25 | test_name BNE_3 26 | mvi r1, 0 27 | mvi r2, 1 28 | bne r1, r2, 1f 29 | tc_fail 30 | bi 2f 31 | 1: 32 | tc_pass 33 | 2: 34 | 35 | bi 2f 36 | 1: 37 | tc_fail 38 | bi 3f 39 | 2: 40 | test_name BNE_4 41 | mvi r1, 1 42 | mvi r2, 1 43 | bne r1, r2, 1b 44 | tc_pass 45 | 3: 46 | 47 | end 48 | 49 | -------------------------------------------------------------------------------- /tests/tcg/lm32/test_orhi.S: -------------------------------------------------------------------------------- 1 | .include "macros.inc" 2 | 3 | start 4 | 5 | test_name ORHI_1 6 | mvi r1, 0 7 | orhi r3, r1, 0 8 | check_r3 0 9 | 10 | test_name ORHI_2 11 | mvi r1, 0 12 | orhi r3, r1, 1 13 | check_r3 0x00010000 14 | 15 | test_name ORHI_3 16 | load r1 0x00010000 17 | orhi r3, r1, 1 18 | check_r3 0x00010000 19 | 20 | test_name ORHI_4 21 | mvi r1, 1 22 | orhi r3, r1, 0 23 | check_r3 1 24 | 25 | test_name ORHI_5 26 | load r1 0xaa55aa55 27 | orhi r3, r1, 0x55aa 28 | check_r3 0xffffaa55 29 | 30 | test_name ORHI_6 31 | load r3 0xaa55aa55 32 | orhi r3, r3, 0x55aa 33 | check_r3 0xffffaa55 34 | 35 | end 36 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/lhx.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long value, rd; 6 | long long *p; 7 | unsigned long long addr, index; 8 | long long result; 9 | 10 | value = 0xBCDEF389; 11 | p = &value; 12 | addr = (unsigned long long)p; 13 | index = 0; 14 | result = 0xFFFFFFFFFFFFF389; 15 | __asm 16 | ("lhx %0, %1(%2)\n\t" 17 | : "=r"(rd) 18 | : "r"(index), "r"(addr) 19 | ); 20 | if (rd != result) { 21 | printf("lhx wrong\n"); 22 | 23 | return -1; 24 | } 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/lwx.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long value, rd; 6 | long long *p; 7 | unsigned long long addr, index; 8 | long long result; 9 | 10 | value = 0xBCDEF389; 11 | p = &value; 12 | addr = (unsigned long long)p; 13 | index = 0; 14 | result = 0xFFFFFFFFBCDEF389; 15 | __asm 16 | ("lwx %0, %1(%2)\n\t" 17 | : "=r"(rd) 18 | : "r"(index), "r"(addr) 19 | ); 20 | if (rd != result) { 21 | printf("lwx wrong\n"); 22 | 23 | return -1; 24 | } 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shll_s_w.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rt, dsp; 6 | long long result, resultdsp; 7 | 8 | rt = 0x12345678; 9 | result = 0x7FFFFFFF; 10 | resultdsp = 0x01; 11 | 12 | __asm 13 | ("shll_s.w %0, %2, 0x0B\n\t" 14 | "rddsp %1\n\t" 15 | : "=r"(rd), "=r"(dsp) 16 | : "r"(rt) 17 | ); 18 | dsp = (dsp >> 22) & 0x01; 19 | if ((dsp != resultdsp) || (rd != result)) { 20 | printf("shll_s.w wrong\n"); 21 | 22 | return -1; 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /include/hw/isa/apm.h: -------------------------------------------------------------------------------- 1 | #ifndef APM_H 2 | #define APM_H 3 | 4 | #include 5 | #include "qemu-common.h" 6 | #include "hw/hw.h" 7 | #include "exec/memory.h" 8 | 9 | typedef void (*apm_ctrl_changed_t)(uint32_t val, void *arg); 10 | 11 | typedef struct APMState { 12 | uint8_t apmc; 13 | uint8_t apms; 14 | 15 | apm_ctrl_changed_t callback; 16 | void *arg; 17 | MemoryRegion io; 18 | } APMState; 19 | 20 | void apm_init(PCIDevice *dev, APMState *s, apm_ctrl_changed_t callback, 21 | void *arg); 22 | 23 | extern const VMStateDescription vmstate_apm; 24 | 25 | #endif /* APM_H */ 26 | -------------------------------------------------------------------------------- /include/sysemu/tpm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Public TPM functions 3 | * 4 | * Copyright (C) 2011-2013 IBM Corporation 5 | * 6 | * Authors: 7 | * Stefan Berger 8 | * 9 | * This work is licensed under the terms of the GNU GPL, version 2 or later. 10 | * See the COPYING file in the top-level directory. 11 | */ 12 | #ifndef QEMU_TPM_H 13 | #define QEMU_TPM_H 14 | 15 | #include "qemu/option.h" 16 | 17 | typedef struct TPMState TPMState; 18 | 19 | int tpm_config_parse(QemuOptsList *opts_list, const char *optarg); 20 | int tpm_init(void); 21 | void tpm_cleanup(void); 22 | 23 | #endif /* QEMU_TPM_H */ 24 | -------------------------------------------------------------------------------- /tests/libqos/i2c.c: -------------------------------------------------------------------------------- 1 | /* 2 | * QTest I2C driver 3 | * 4 | * Copyright (c) 2012 Andreas Färber 5 | * 6 | * This work is licensed under the terms of the GNU GPL, version 2 or later. 7 | * See the COPYING file in the top-level directory. 8 | */ 9 | #include "libqos/i2c.h" 10 | #include "libqtest.h" 11 | 12 | void i2c_send(I2CAdapter *i2c, uint8_t addr, 13 | const uint8_t *buf, uint16_t len) 14 | { 15 | i2c->send(i2c, addr, buf, len); 16 | } 17 | 18 | void i2c_recv(I2CAdapter *i2c, uint8_t addr, 19 | uint8_t *buf, uint16_t len) 20 | { 21 | i2c->recv(i2c, addr, buf, len); 22 | } 23 | -------------------------------------------------------------------------------- /tests/tcg/cris/check_not.s: -------------------------------------------------------------------------------- 1 | # mach: crisv0 crisv3 crisv8 crisv10 crisv32 2 | # output: fffffffe\nfffffffd\nffff0f00\n0\n87ecbbad\n 3 | 4 | .include "testutils.inc" 5 | start 6 | moveq 1,r3 7 | not r3 8 | test_move_cc 1 0 0 0 9 | checkr3 fffffffe 10 | 11 | moveq 2,r3 12 | not r3 13 | test_move_cc 1 0 0 0 14 | checkr3 fffffffd 15 | 16 | move.d 0xf0ff,r3 17 | not r3 18 | test_move_cc 1 0 0 0 19 | checkr3 ffff0f00 20 | 21 | moveq -1,r3 22 | not r3 23 | test_move_cc 0 1 0 0 24 | checkr3 0 25 | 26 | move.d 0x78134452,r3 27 | not r3 28 | test_move_cc 1 0 0 0 29 | checkr3 87ecbbad 30 | 31 | quit 32 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/absq_s_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | int main() 6 | { 7 | int rd, rt; 8 | int result; 9 | 10 | rt = 0x10017EFD; 11 | result = 0x10017EFD; 12 | 13 | __asm 14 | ("absq_s.ph %0, %1\n\t" 15 | : "=r"(rd) 16 | : "r"(rt) 17 | ); 18 | assert(rd == result); 19 | 20 | rt = 0x8000A536; 21 | result = 0x7FFF5ACA; 22 | 23 | __asm 24 | ("absq_s.ph %0, %1\n\t" 25 | : "=r"(rd) 26 | : "r"(rt) 27 | ); 28 | assert(rd == result); 29 | 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/shra_ph.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0xF0EC0864; 11 | 12 | __asm 13 | ("shra.ph %0, %1, 0x03\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(rd == result); 18 | 19 | rt = 0x87654321; 20 | result = 0x87654321; 21 | 22 | __asm 23 | ("shra.ph %0, %1, 0x00\n\t" 24 | : "=r"(rd) 25 | : "r"(rt) 26 | ); 27 | assert(rd == result); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dsp/shra_r_w.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x87654321; 10 | result = 0xF0ECA864; 11 | 12 | __asm 13 | ("shra_r.w %0, %1, 0x03\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(rd == result); 18 | 19 | rt = 0x87654321; 20 | result = 0x87654321; 21 | 22 | __asm 23 | ("shra_r.w %0, %1, 0x0\n\t" 24 | : "=r"(rd) 25 | : "r"(rt) 26 | ); 27 | assert(rd == result); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips32-dspr2/shra_r_qb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int rd, rt; 7 | int result; 8 | 9 | rt = 0x12345678; 10 | result = 0x02070B0F; 11 | 12 | __asm 13 | ("shra_r.qb %0, %1, 0x03\n\t" 14 | : "=r"(rd) 15 | : "r"(rt) 16 | ); 17 | assert(rd == result); 18 | 19 | rt = 0x87654321; 20 | result = 0xF10D0804; 21 | 22 | __asm 23 | ("shra_r.qb %0, %1, 0x03\n\t" 24 | : "=r"(rd) 25 | : "r"(rt) 26 | ); 27 | assert(rd == result); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/precrqu_s_qb_ph.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt; 6 | long long dsp; 7 | long long result; 8 | 9 | rs = 0x12345678; 10 | rt = 0x87657fff; 11 | result = 0x24AC00FF; 12 | 13 | __asm 14 | ("precrqu_s.qb.ph %0, %2, %3\n\t" 15 | "rddsp %1\n\t" 16 | : "=r"(rd), "=r"(dsp) 17 | : "r"(rs), "r"(rt) 18 | ); 19 | if ((result != rd) || (((dsp >> 22) & 0x01) != 0x01)) { 20 | printf("precrqu_s.qb.ph wrong\n"); 21 | 22 | return -1; 23 | } 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/repl_ph.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, result; 6 | 7 | result = 0x01BF01BF; 8 | __asm 9 | ("repl.ph %0, 0x1BF\n\t" 10 | : "=r"(rd) 11 | ); 12 | if (rd != result) { 13 | printf("repl.ph wrong\n"); 14 | 15 | return -1; 16 | } 17 | 18 | result = 0x01FF01FF; 19 | __asm 20 | ("repl.ph %0, 0x01FF\n\t" 21 | : "=r"(rd) 22 | ); 23 | if (rd != result) { 24 | printf("repl.ph wrong\n"); 25 | 26 | return -1; 27 | } 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /tests/tcg/mips/mips64-dsp/shllv_qb.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | int main(void) 4 | { 5 | long long rd, rs, rt, dsp; 6 | long long result, resultdsp; 7 | 8 | rs = 0x03; 9 | rt = 0x87654321; 10 | result = 0x38281808; 11 | resultdsp = 0x01; 12 | 13 | __asm 14 | ("shllv.qb %0, %2, %3\n\t" 15 | "rddsp %1\n\t" 16 | : "=r"(rd), "=r"(dsp) 17 | : "r"(rt), "r"(rs) 18 | ); 19 | dsp = (dsp >> 22) & 0x01; 20 | if (rd != result) { 21 | printf("shllv.qb wrong\n"); 22 | 23 | return -1; 24 | } 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /include/sysemu/rng-random.h: -------------------------------------------------------------------------------- 1 | /* 2 | * QEMU Random Number Generator Backend 3 | * 4 | * Copyright IBM, Corp. 2012 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU GPL, version 2 or later. 10 | * See the COPYING file in the top-level directory. 11 | */ 12 | #ifndef QEMU_RNG_RANDOM_H 13 | #define QEMU_RNG_RANDOM_H 14 | 15 | #include "qom/object.h" 16 | 17 | #define TYPE_RNG_RANDOM "rng-random" 18 | #define RNG_RANDOM(obj) OBJECT_CHECK(RndRandom, (obj), TYPE_RNG_RANDOM) 19 | 20 | typedef struct RndRandom RndRandom; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /scripts/make-release: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # 3 | # QEMU Release Script 4 | # 5 | # Copyright IBM, Corp. 2012 6 | # 7 | # Authors: 8 | # Anthony Liguori 9 | # 10 | # This work is licensed under the terms of the GNU GPLv2 or later. 11 | # See the COPYING file in the top-level directory. 12 | 13 | src="$1" 14 | version="$2" 15 | destination=qemu-${version} 16 | 17 | git clone "${src}" ${destination} 18 | pushd ${destination} 19 | git checkout "v${version}" 20 | git submodule update --init 21 | rm -rf .git roms/*/.git 22 | popd 23 | tar cfj ${destination}.tar.bz2 ${destination} 24 | rm -rf ${destination} 25 | --------------------------------------------------------------------------------