ia64/xen-unstable

changeset 5028:8e5fc5fe636c

bitkeeper revision 1.1476 (428d0d8esmCTqdrDnpEQ1XlfV6CWGg)

New qemu-based ioemu for fully virtualised guests.
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu May 19 22:05:02 2005 +0000 (2005-05-19)
parents 42b69c3dba08
children 9476a53be2cf
files .rootkeys tools/Makefile tools/ioemu/COPYING tools/ioemu/COPYING.LIB tools/ioemu/Changelog tools/ioemu/Makefile tools/ioemu/Makefile.target tools/ioemu/README tools/ioemu/README.distrib tools/ioemu/TODO tools/ioemu/VERSION tools/ioemu/block-cloop.c tools/ioemu/block-cow.c tools/ioemu/block-qcow.c tools/ioemu/block-vmdk.c tools/ioemu/block.c tools/ioemu/block_int.h tools/ioemu/bswap.h tools/ioemu/configure tools/ioemu/console.c tools/ioemu/cpu-all.h tools/ioemu/cpu-defs.h tools/ioemu/cpu.h tools/ioemu/create_keysym_header.sh tools/ioemu/exec-all.h tools/ioemu/exec.c tools/ioemu/font/vga.bitmap.h tools/ioemu/gui/Makefile tools/ioemu/gui/Makefile.in tools/ioemu/gui/bitmaps/cdromd.h tools/ioemu/gui/bitmaps/cdromd.xpm tools/ioemu/gui/bitmaps/configbutton.h tools/ioemu/gui/bitmaps/configbutton.xpm tools/ioemu/gui/bitmaps/copy.h tools/ioemu/gui/bitmaps/copy.xpm tools/ioemu/gui/bitmaps/floppya.h tools/ioemu/gui/bitmaps/floppya.xpm tools/ioemu/gui/bitmaps/floppyb.h tools/ioemu/gui/bitmaps/floppyb.xpm tools/ioemu/gui/bitmaps/mouse.h tools/ioemu/gui/bitmaps/mouse.xpm tools/ioemu/gui/bitmaps/paste.h tools/ioemu/gui/bitmaps/paste.xpm tools/ioemu/gui/bitmaps/power.h tools/ioemu/gui/bitmaps/power.xpm tools/ioemu/gui/bitmaps/reset.h tools/ioemu/gui/bitmaps/reset.xpm tools/ioemu/gui/bitmaps/snapshot.h tools/ioemu/gui/bitmaps/snapshot.xpm tools/ioemu/gui/bitmaps/userbutton.h tools/ioemu/gui/bitmaps/userbutton.xpm tools/ioemu/gui/gui.cc tools/ioemu/gui/gui.h tools/ioemu/gui/icon_bochs.h tools/ioemu/gui/icon_bochs.xpm tools/ioemu/gui/keymap.cc tools/ioemu/gui/keymap.h tools/ioemu/gui/keymaps/convertmap.pl tools/ioemu/gui/keymaps/sdl-pc-de.map tools/ioemu/gui/keymaps/sdl-pc-us.map tools/ioemu/gui/keymaps/x11-pc-be.map tools/ioemu/gui/keymaps/x11-pc-da.map tools/ioemu/gui/keymaps/x11-pc-de.map tools/ioemu/gui/keymaps/x11-pc-es.map tools/ioemu/gui/keymaps/x11-pc-fr.map tools/ioemu/gui/keymaps/x11-pc-it.map tools/ioemu/gui/keymaps/x11-pc-se.map tools/ioemu/gui/keymaps/x11-pc-uk.map tools/ioemu/gui/keymaps/x11-pc-us.map tools/ioemu/gui/nogui.cc tools/ioemu/gui/rfb.cc tools/ioemu/gui/rfb.h tools/ioemu/gui/rfbproto.h tools/ioemu/gui/sdl.h tools/ioemu/gui/sdlkeys.h tools/ioemu/gui/siminterface.cc tools/ioemu/gui/siminterface.h tools/ioemu/gui/svga.cc tools/ioemu/gui/term.cc tools/ioemu/gui/textconfig.cc tools/ioemu/gui/textconfig.h tools/ioemu/gui/x.cc tools/ioemu/hw/adb.c tools/ioemu/hw/adlib.c tools/ioemu/hw/cirrus_vga.c tools/ioemu/hw/cirrus_vga_rop.h tools/ioemu/hw/cirrus_vga_rop2.h tools/ioemu/hw/cuda.c tools/ioemu/hw/dma.c tools/ioemu/hw/fdc.c tools/ioemu/hw/fmopl.c tools/ioemu/hw/fmopl.h tools/ioemu/hw/i8254.c tools/ioemu/hw/i8259.c tools/ioemu/hw/ide.c tools/ioemu/hw/iommu.c tools/ioemu/hw/lance.c tools/ioemu/hw/m48t08.c tools/ioemu/hw/m48t08.h tools/ioemu/hw/m48t59.c tools/ioemu/hw/m48t59.h tools/ioemu/hw/magic-load.c tools/ioemu/hw/mc146818rtc.c tools/ioemu/hw/ne2000.c tools/ioemu/hw/openpic.c tools/ioemu/hw/pc.c tools/ioemu/hw/pci.c tools/ioemu/hw/pckbd.c tools/ioemu/hw/ppc.c tools/ioemu/hw/ppc_chrp.c tools/ioemu/hw/ppc_prep.c tools/ioemu/hw/sb16.c tools/ioemu/hw/sched.c tools/ioemu/hw/serial.c tools/ioemu/hw/sun4m.c tools/ioemu/hw/tcx.c tools/ioemu/hw/timer.c tools/ioemu/hw/vga.c tools/ioemu/hw/vga_int.h tools/ioemu/hw/vga_template.h tools/ioemu/i386-vl.ld tools/ioemu/i386.ld tools/ioemu/include/bochs.h tools/ioemu/include/bxversion.h tools/ioemu/include/config.h tools/ioemu/include/cpu/cpu.h tools/ioemu/include/extplugin.h tools/ioemu/include/instrument.h tools/ioemu/include/ltdl.h tools/ioemu/include/ltdlconf.h tools/ioemu/include/osdep.h tools/ioemu/include/pc_system.h tools/ioemu/include/plugin.h tools/ioemu/include/state_file.h tools/ioemu/iodev/Makefile tools/ioemu/iodev/aspi-win32.h tools/ioemu/iodev/biosdev.cc tools/ioemu/iodev/biosdev.h tools/ioemu/iodev/cdrom.cc tools/ioemu/iodev/cdrom.h tools/ioemu/iodev/cdrom_beos.h tools/ioemu/iodev/cmos.cc tools/ioemu/iodev/cmos.h tools/ioemu/iodev/cpu.cc tools/ioemu/iodev/crc32.cc tools/ioemu/iodev/crc32.h tools/ioemu/iodev/devices.cc tools/ioemu/iodev/dma.cc tools/ioemu/iodev/dma.h tools/ioemu/iodev/eth.cc tools/ioemu/iodev/eth.h tools/ioemu/iodev/eth_arpback.cc tools/ioemu/iodev/eth_fbsd.cc tools/ioemu/iodev/eth_linux.cc tools/ioemu/iodev/eth_null.cc tools/ioemu/iodev/eth_packetmaker.cc tools/ioemu/iodev/eth_packetmaker.h tools/ioemu/iodev/eth_tap.cc tools/ioemu/iodev/eth_tuntap.cc tools/ioemu/iodev/extfpuirq.cc tools/ioemu/iodev/extfpuirq.h tools/ioemu/iodev/floppy.cc tools/ioemu/iodev/floppy.h tools/ioemu/iodev/gameport.cc tools/ioemu/iodev/gameport.h tools/ioemu/iodev/guest2host.h tools/ioemu/iodev/harddrv.cc tools/ioemu/iodev/harddrv.h tools/ioemu/iodev/ioapic.cc tools/ioemu/iodev/ioapic.h tools/ioemu/iodev/iodebug.cc tools/ioemu/iodev/iodebug.h tools/ioemu/iodev/iodev.h tools/ioemu/iodev/keyboard.cc tools/ioemu/iodev/keyboard.h tools/ioemu/iodev/load32bitOShack.cc tools/ioemu/iodev/logio.cc tools/ioemu/iodev/main.cc tools/ioemu/iodev/ne2k.cc tools/ioemu/iodev/ne2k.h tools/ioemu/iodev/osdep.cc tools/ioemu/iodev/parallel.cc tools/ioemu/iodev/parallel.h tools/ioemu/iodev/pc_system.cc tools/ioemu/iodev/pci.cc tools/ioemu/iodev/pci.h tools/ioemu/iodev/pci2isa.cc tools/ioemu/iodev/pci2isa.h tools/ioemu/iodev/pciusb.cc tools/ioemu/iodev/pciusb.h tools/ioemu/iodev/pcivga.cc tools/ioemu/iodev/pcivga.h tools/ioemu/iodev/pic.cc tools/ioemu/iodev/pic.h tools/ioemu/iodev/pit.cc tools/ioemu/iodev/pit.h tools/ioemu/iodev/pit82c54.cc tools/ioemu/iodev/pit82c54.h tools/ioemu/iodev/pit_wrap.cc tools/ioemu/iodev/pit_wrap.h tools/ioemu/iodev/plugin.cc tools/ioemu/iodev/scancodes.cc tools/ioemu/iodev/scancodes.h tools/ioemu/iodev/scsi_commands.h tools/ioemu/iodev/scsidefs.h tools/ioemu/iodev/scsipt.h tools/ioemu/iodev/serial.cc tools/ioemu/iodev/serial.h tools/ioemu/iodev/serial_raw.h tools/ioemu/iodev/slowdown_timer.cc tools/ioemu/iodev/slowdown_timer.h tools/ioemu/iodev/soundlnx.cc tools/ioemu/iodev/soundlnx.h tools/ioemu/iodev/soundwin.cc tools/ioemu/iodev/soundwin.h tools/ioemu/iodev/state_file.cc tools/ioemu/iodev/unmapped.cc tools/ioemu/iodev/unmapped.h tools/ioemu/iodev/vga.cc tools/ioemu/iodev/vga.h tools/ioemu/iodev/virt_timer.cc tools/ioemu/iodev/virt_timer.h tools/ioemu/keyboard_rdesktop.c tools/ioemu/keymaps/ar tools/ioemu/keymaps/common tools/ioemu/keymaps/convert-map tools/ioemu/keymaps/da tools/ioemu/keymaps/de tools/ioemu/keymaps/de-ch tools/ioemu/keymaps/en-gb tools/ioemu/keymaps/en-us tools/ioemu/keymaps/es tools/ioemu/keymaps/et tools/ioemu/keymaps/fi tools/ioemu/keymaps/fo tools/ioemu/keymaps/fr tools/ioemu/keymaps/fr-be tools/ioemu/keymaps/fr-ca tools/ioemu/keymaps/fr-ch tools/ioemu/keymaps/hr tools/ioemu/keymaps/hu tools/ioemu/keymaps/is tools/ioemu/keymaps/it tools/ioemu/keymaps/ja tools/ioemu/keymaps/lt tools/ioemu/keymaps/lv tools/ioemu/keymaps/mk tools/ioemu/keymaps/modifiers tools/ioemu/keymaps/nl tools/ioemu/keymaps/nl-be tools/ioemu/keymaps/no tools/ioemu/keymaps/pl tools/ioemu/keymaps/pt tools/ioemu/keymaps/pt-br tools/ioemu/keymaps/ru tools/ioemu/keymaps/sl tools/ioemu/keymaps/sv tools/ioemu/keymaps/th tools/ioemu/keymaps/tr tools/ioemu/main.c tools/ioemu/memory/Makefile tools/ioemu/memory/memory.cc tools/ioemu/memory/memory.h tools/ioemu/memory/misc_mem.cc tools/ioemu/mk/helix.mk tools/ioemu/monitor.c tools/ioemu/osdep.c tools/ioemu/osdep.h tools/ioemu/path.c tools/ioemu/pc-bios/Makefile tools/ioemu/pc-bios/README tools/ioemu/pc-bios/bios.bin tools/ioemu/pc-bios/bios.diff tools/ioemu/pc-bios/linux_boot.S tools/ioemu/pc-bios/linux_boot.bin tools/ioemu/pc-bios/ppc_rom.bin tools/ioemu/pc-bios/proll.bin tools/ioemu/pc-bios/proll.patch tools/ioemu/pc-bios/vgabios-cirrus.bin tools/ioemu/pc-bios/vgabios.bin tools/ioemu/qemu-binfmt-conf.sh tools/ioemu/qemu-doc.html tools/ioemu/qemu-doc.texi tools/ioemu/qemu-img.c tools/ioemu/qemu-mkcow.1 tools/ioemu/qemu-tech.html tools/ioemu/qemu-tech.texi tools/ioemu/qemu.1 tools/ioemu/readline.c tools/ioemu/sdl.c tools/ioemu/target-i386-dm/device-model tools/ioemu/target-i386-dm/helper2.c tools/ioemu/target-i386-dm/qemu-ifup tools/ioemu/target-i386-dm/qemu-vgaram-bin.gz tools/ioemu/tests/Makefile tools/ioemu/tests/hello-arm.c tools/ioemu/tests/hello-i386.c tools/ioemu/tests/linux-test.c tools/ioemu/tests/pi_10.com tools/ioemu/tests/qruncom.c tools/ioemu/tests/runcom.c tools/ioemu/tests/sha1.c tools/ioemu/tests/test-i386-code16.S tools/ioemu/tests/test-i386-muldiv.h tools/ioemu/tests/test-i386-shift.h tools/ioemu/tests/test-i386-vm86.S tools/ioemu/tests/test-i386.c tools/ioemu/tests/test-i386.h tools/ioemu/tests/test_path.c tools/ioemu/tests/testthread.c tools/ioemu/texi2pod.pl tools/ioemu/thunk.c tools/ioemu/thunk.h tools/ioemu/vgafont.h tools/ioemu/vl.c tools/ioemu/vl.h tools/ioemu/vnc.c
line diff
     1.1 --- a/.rootkeys	Thu May 19 21:53:44 2005 +0000
     1.2 +++ b/.rootkeys	Thu May 19 22:05:02 2005 +0000
     1.3 @@ -562,168 +562,160 @@ 423d3a7bHtqhyOgiRWhjWt-S-6wbYg tools/gdb
     1.4  4273458dYPghQKVnj_xu5-fC38CcOg tools/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c
     1.5  423d3a7b2ENk2IskDZYZ98pe5NsvIA tools/gdb/gdb-6.2.1-xen-sparse/mkbuildtree
     1.6  423d3a7buANO_q-kgxIRffUu7lMnUw tools/gdb/gdbbuild
     1.7 -41e2ff6dNPgvIrdIF6dC1azdex1U3A tools/ioemu/Makefile
     1.8 -41e2ff6aoF5fgddZi0QpEWqFr89E5g tools/ioemu/font/vga.bitmap.h
     1.9 -41e2ff6avgnBNvZRiL4ynyGGq2UKlw tools/ioemu/gui/Makefile
    1.10 -41e2ff6a30Xuw7pDX3SlVBx3ssOMDQ tools/ioemu/gui/Makefile.in
    1.11 -41e2ff6aGGn5D3-Yh856G7xWJ5ZJsA tools/ioemu/gui/bitmaps/cdromd.h
    1.12 -41e2ff6abNiWU34DwftxJ30sI6TQmw tools/ioemu/gui/bitmaps/cdromd.xpm
    1.13 -41e2ff6adSUYHlvyVpz7q1Izcx5_gQ tools/ioemu/gui/bitmaps/configbutton.h
    1.14 -41e2ff6aLWWXfMqIH2jSCNUzuc4_Yg tools/ioemu/gui/bitmaps/configbutton.xpm
    1.15 -41e2ff6ahsqMjwuhpbqfrFHCBqYhEA tools/ioemu/gui/bitmaps/copy.h
    1.16 -41e2ff6ajL41CnUeGefMrNijudQlCg tools/ioemu/gui/bitmaps/copy.xpm
    1.17 -41e2ff6aXn5GhkDNOGqUcfCLbDZf3w tools/ioemu/gui/bitmaps/floppya.h
    1.18 -41e2ff6agOpnECodSZ62L-Uijy5fsQ tools/ioemu/gui/bitmaps/floppya.xpm
    1.19 -41e2ff6akrHp6jG_Y2BmFpEcaswUqg tools/ioemu/gui/bitmaps/floppyb.h
    1.20 -41e2ff6aGbvPO1cQLMLduGl16rntbg tools/ioemu/gui/bitmaps/floppyb.xpm
    1.21 -41e2ff6aEcsgeBHQZ_5e3rfgo0USMA tools/ioemu/gui/bitmaps/mouse.h
    1.22 -41e2ff6aO8pXESvDVxMG7TgZL7UvFA tools/ioemu/gui/bitmaps/mouse.xpm
    1.23 -41e2ff6aSd1H6Z0dUVUYLsW-6EDrYw tools/ioemu/gui/bitmaps/paste.h
    1.24 -41e2ff6aRGfY6Jd2TThqWtXoh2CHuQ tools/ioemu/gui/bitmaps/paste.xpm
    1.25 -41e2ff6aKDap56ifPVgdBVPc9yfmvw tools/ioemu/gui/bitmaps/power.h
    1.26 -41e2ff6aDLfEO8dFUd9IpsfUpMk-Vg tools/ioemu/gui/bitmaps/power.xpm
    1.27 -41e2ff6aKWtTsWCds4vL2azV3w-XtQ tools/ioemu/gui/bitmaps/reset.h
    1.28 -41e2ff6a_AU4_ytzHU0Btr3trcbVmA tools/ioemu/gui/bitmaps/reset.xpm
    1.29 -41e2ff6a-hGpcXEChJQDo-xRyH5oGQ tools/ioemu/gui/bitmaps/snapshot.h
    1.30 -41e2ff6aRoGi5nKyQFtcUzK0-9dRDA tools/ioemu/gui/bitmaps/snapshot.xpm
    1.31 -41e2ff6aZdTp9lSJjyUI7YoXqQnCng tools/ioemu/gui/bitmaps/userbutton.h
    1.32 -41e2ff6aWc4p23rAKngLMu8eLZiXlw tools/ioemu/gui/bitmaps/userbutton.xpm
    1.33 -41e2ff6a7gMd57Q5DL0kRD-mR7JzZg tools/ioemu/gui/gui.cc
    1.34 -41e2ff6a-USvofVXiSpY76RT4C0IVw tools/ioemu/gui/gui.h
    1.35 -41e2ff6aYAuOb0x4zTVB7cWYIFIdOA tools/ioemu/gui/icon_bochs.h
    1.36 -41e2ff6aZbFf-Djysg393N4vCEJ7ig tools/ioemu/gui/icon_bochs.xpm
    1.37 -41e2ff6ai-vJcSE9hfz4SHZ20rK5QA tools/ioemu/gui/keymap.cc
    1.38 -41e2ff6a_TY9EJnCcbr5EKV_pi90kg tools/ioemu/gui/keymap.h
    1.39 -41e2ff6aP0co3DAK04MrugZCkp0roQ tools/ioemu/gui/keymaps/convertmap.pl
    1.40 -41e2ff6a-GiP9bzqtVXEjxmxiYgzeg tools/ioemu/gui/keymaps/sdl-pc-de.map
    1.41 -41e2ff6aa5xj7jyze5bcPnj-UHYgTQ tools/ioemu/gui/keymaps/sdl-pc-us.map
    1.42 -41e2ff6ahemkf0kG8SzDXq8g2qp9Pg tools/ioemu/gui/keymaps/x11-pc-be.map
    1.43 -41e2ff6ajdaBBS85yriZ3S9ecy5Odg tools/ioemu/gui/keymaps/x11-pc-da.map
    1.44 -41e2ff6aGkLyRvwOTZnDqvobziAoiQ tools/ioemu/gui/keymaps/x11-pc-de.map
    1.45 -41e2ff6aWcqOK6RjpY28Y4bVjMy9yg tools/ioemu/gui/keymaps/x11-pc-es.map
    1.46 -41e2ff6aF46Uu09XOmmkcGDotToSxw tools/ioemu/gui/keymaps/x11-pc-fr.map
    1.47 -41e2ff6aHM040MYLmOeW_PKIx1TWWg tools/ioemu/gui/keymaps/x11-pc-it.map
    1.48 -41e2ff6aCa-6fHjBOoPWP8hDweZ1Fw tools/ioemu/gui/keymaps/x11-pc-se.map
    1.49 -41e2ff6aUH4wvnqRwo91dJBnhxEYUg tools/ioemu/gui/keymaps/x11-pc-uk.map
    1.50 -41e2ff6aF7b08llRJQBLgNAEfyn9wQ tools/ioemu/gui/keymaps/x11-pc-us.map
    1.51 -41e2ff6a2gbWdoaE7X9vtizvQ4QqdQ tools/ioemu/gui/nogui.cc
    1.52 -41e2ff6a_rWAWre2toEtNUMKliCJPA tools/ioemu/gui/rfb.cc
    1.53 -41e2ff6aQfuugiO3YE07l03L6ASP9g tools/ioemu/gui/rfb.h
    1.54 -41e2ff6aTWFzmW0sjxXpQq7ulaj_Pw tools/ioemu/gui/rfbproto.h
    1.55 -41e2ff6bf4pfJkZTN5vA6HbiJJqeNA tools/ioemu/gui/sdl.h
    1.56 -41e2ff6bVnojmIqKJCbhVUKtMcUWJg tools/ioemu/gui/sdlkeys.h
    1.57 -41e2ff6bKVx97oSdGGToXQXvbQgkZA tools/ioemu/gui/siminterface.cc
    1.58 -41e2ff6bDB5XABCVAA7nMolZPe5ZoA tools/ioemu/gui/siminterface.h
    1.59 -41e2ff6benMg1o7HQ2C5PGS3KFHFow tools/ioemu/gui/svga.cc
    1.60 -41e2ff6bz3XZGzzwvXGqFadb3QqWWQ tools/ioemu/gui/term.cc
    1.61 -41e2ff6b8jzKgyKu2gNVlRWepPNA0A tools/ioemu/gui/textconfig.cc
    1.62 -41e2ff6bUKaJhGtIDqUYzAesLg1MGA tools/ioemu/gui/textconfig.h
    1.63 -41e2ff6b__Pd6Q2aYDZ5vB9bGJEMNA tools/ioemu/gui/x.cc
    1.64 -41e2ff6bp96y5NyMIFjH-HpCRcGBPg tools/ioemu/include/bochs.h
    1.65 -41e2ff6bqIMIJlitAnubjNjf70s3dw tools/ioemu/include/bxversion.h
    1.66 -41e2ff6bTfksDlUXSWC_wC_g30r1cQ tools/ioemu/include/config.h
    1.67 -41e2ff6bwDEGCUwYTf1oo9ZCva2nkw tools/ioemu/include/cpu/cpu.h
    1.68 -41e2ff6bH1PTh2iMScpOn9v9R3SDag tools/ioemu/include/extplugin.h
    1.69 -41e2ff6bFS9XP8ndI6IhGFitzsvTtw tools/ioemu/include/instrument.h
    1.70 -41e2ff6bz71jKff_NUdmI279ArbMgw tools/ioemu/include/ltdl.h
    1.71 -41e2ff6bYayW_YSVmb1sJCvk9z9-ug tools/ioemu/include/ltdlconf.h
    1.72 -41e2ff6b_MdkIIjsFYTFMIKIt7Royw tools/ioemu/include/osdep.h
    1.73 -41e2ff6bPJNSITgePniKtvlujrmcLA tools/ioemu/include/pc_system.h
    1.74 -41e2ff6bmHZyZrzF7iHpD212GeAT-w tools/ioemu/include/plugin.h
    1.75 -41e2ff6bHgstm2ZhCIdsag_c3_dVjA tools/ioemu/include/state_file.h
    1.76 -41e2ff6bJjm8-4K6Cu2k6zoanQ8Yyg tools/ioemu/iodev/Makefile
    1.77 -41e2ff6bKj9bQ4ELP2msSYoT7XrxHQ tools/ioemu/iodev/aspi-win32.h
    1.78 -41e2ff6b95DLt3iA-okw7D4NJcaDCg tools/ioemu/iodev/biosdev.cc
    1.79 -41e2ff6b1ra22hFnE6Tm9lxVaH4Mjw tools/ioemu/iodev/biosdev.h
    1.80 -41e2ff6bftET40KQA19RAisCxyDHVQ tools/ioemu/iodev/cdrom.cc
    1.81 -41e2ff6buuSLUZPj9EtlGA3tufslNQ tools/ioemu/iodev/cdrom.h
    1.82 -41e2ff6bvD6jE2JHKP0wd7I_mB7MJg tools/ioemu/iodev/cdrom_beos.h
    1.83 -41e2ff6b99qviTPyKLjy0-D5DIqACw tools/ioemu/iodev/cmos.cc
    1.84 -41e2ff6bpeZbWqQfuwM_Xj-kElElAA tools/ioemu/iodev/cmos.h
    1.85 -41e2ff6bRf7QN_i1c7BAzkQha8AFUg tools/ioemu/iodev/cpu.cc
    1.86 -41e2ff6byVHp6G3fxAlly1u1sx_DEg tools/ioemu/iodev/crc32.cc
    1.87 -41e2ff6bHWz28hOKgLKRizX9UjsyOQ tools/ioemu/iodev/crc32.h
    1.88 -41e2ff6b3tvq7uKSC9DWkOswq0Re8w tools/ioemu/iodev/devices.cc
    1.89 -41e2ff6bO-SYXzx1RB-1If_FNkyjLg tools/ioemu/iodev/dma.cc
    1.90 -41e2ff6bdI7Ri1mVb1MzkvBKlNSx6Q tools/ioemu/iodev/dma.h
    1.91 -41e2ff6bfnGRrb25sneyvOXxSi8pLg tools/ioemu/iodev/eth.cc
    1.92 -41e2ff6bteOXqvNO1FIR5iFHUwqUuA tools/ioemu/iodev/eth.h
    1.93 -41e2ff6bTQxXrfWSsDCISUAdzlAe9w tools/ioemu/iodev/eth_arpback.cc
    1.94 -41e2ff6brorlh9N9Myd1_g7ktKcIfQ tools/ioemu/iodev/eth_fbsd.cc
    1.95 -41e2ff6b5xRFy8_OISEtd2UrHEUdfw tools/ioemu/iodev/eth_linux.cc
    1.96 -41e2ff6biySiByowEn40XP_yx_lxKg tools/ioemu/iodev/eth_null.cc
    1.97 -41e2ff6bFAVD0UO_ob40usJOnEPAZg tools/ioemu/iodev/eth_packetmaker.cc
    1.98 -41e2ff6bsR-mjksFNRC9HiDDVUfI2w tools/ioemu/iodev/eth_packetmaker.h
    1.99 -41e2ff6bMnzZ7cpqVPQY0_0smpqjHw tools/ioemu/iodev/eth_tap.cc
   1.100 -41e2ff6bGa18jj0cqoOAqBPDzk2Aog tools/ioemu/iodev/eth_tuntap.cc
   1.101 -41e2ff6bY1u244mkTGfttym3HoLo5Q tools/ioemu/iodev/extfpuirq.cc
   1.102 -41e2ff6b_wh3dgYBx38KIJ00Qv4XUA tools/ioemu/iodev/extfpuirq.h
   1.103 -41e2ff6b3uiKo02slxJn11bvZKsF3g tools/ioemu/iodev/floppy.cc
   1.104 -41e2ff6bKba0nlJHGy2kWUr_3e_nvw tools/ioemu/iodev/floppy.h
   1.105 -41e2ff6bC1KaCAEBYYTkJJ5_pBydkQ tools/ioemu/iodev/gameport.cc
   1.106 -41e2ff6bePGww4K0p8vTLphdE_zdig tools/ioemu/iodev/gameport.h
   1.107 -41e2ff6biLQpMiiiKokz7qUXpBn5cg tools/ioemu/iodev/guest2host.h
   1.108 -41e2ff6bji1Iix0CzQTeh9yB-Ao14Q tools/ioemu/iodev/harddrv.cc
   1.109 -41e2ff6bcSDALK1SdvKvTCxemzpWwQ tools/ioemu/iodev/harddrv.h
   1.110 -41e2ff6b36hFBfV06tX0a5CRjFpuxA tools/ioemu/iodev/ioapic.cc
   1.111 -41e2ff6brajF6a0a7RkLHiX0M9oH7w tools/ioemu/iodev/ioapic.h
   1.112 -41e2ff6btDX2IfOnC_LkP08ZlKxjJw tools/ioemu/iodev/iodebug.cc
   1.113 -41e2ff6b-__Z4ECo9pHWVM-Rz-0ehw tools/ioemu/iodev/iodebug.h
   1.114 -41e2ff6btRbGfsUt5k4MClieCZ-EBQ tools/ioemu/iodev/iodev.h
   1.115 -41e2ff6bH5C9aG3f2QhoD6zCdShJYQ tools/ioemu/iodev/keyboard.cc
   1.116 -41e2ff6bUOmeloSf5s9Gkdffo1bEyA tools/ioemu/iodev/keyboard.h
   1.117 -41e2ff6b55oybF1yhInYSZX2bxiJSw tools/ioemu/iodev/load32bitOShack.cc
   1.118 -41e2ff6b5WcmfYXaREzUm0KQu7pKCQ tools/ioemu/iodev/logio.cc
   1.119 -41e2ff6bqqHfrDtizlRKA-_oPRbGAw tools/ioemu/iodev/main.cc
   1.120 -41e2ff6cWAAGa6Pt6eE4URbCOq8wQA tools/ioemu/iodev/ne2k.cc
   1.121 -41e2ff6cap6qrVL42AgTpxjav0QMQg tools/ioemu/iodev/ne2k.h
   1.122 -41e2ff6cHH0UoJW74RKZFnPBSt1jUw tools/ioemu/iodev/osdep.cc
   1.123 -41e2ff6ckuFNtxuAQDMVwJtYwL2QCg tools/ioemu/iodev/parallel.cc
   1.124 -41e2ff6cbqWnJwLAQ9NDZJwUyGiIww tools/ioemu/iodev/parallel.h
   1.125 -41e2ff6cAdkxmfzVhbQn9Plq3X4S_w tools/ioemu/iodev/pc_system.cc
   1.126 -41e2ff6csu1e9S_rywWOq9B85IaZzA tools/ioemu/iodev/pci.cc
   1.127 -41e2ff6cjcmNZLD17naGuKj_Qon6Ow tools/ioemu/iodev/pci.h
   1.128 -41e2ff6c91zYiAb9XulXkl2vLERo-w tools/ioemu/iodev/pci2isa.cc
   1.129 -41e2ff6cV7IdLNbFXwlWvdcOz4F1Aw tools/ioemu/iodev/pci2isa.h
   1.130 -41e2ff6cviwF37ZllnYtHA3MEHRMWw tools/ioemu/iodev/pciusb.cc
   1.131 -41e2ff6ceFmfyqr1MgYhEoRM1s6icQ tools/ioemu/iodev/pciusb.h
   1.132 -41e2ff6cd-1VHyISVo789tv3ImNgLw tools/ioemu/iodev/pcivga.cc
   1.133 -41e2ff6cVkXDlrNUTdt7D6BULEp1Tg tools/ioemu/iodev/pcivga.h
   1.134 -41e2ff6c3xjAFB8X5OLFz_8Of62v2Q tools/ioemu/iodev/pic.cc
   1.135 -41e2ff6c4UHzse5_N0Mx6u5dqKrVkw tools/ioemu/iodev/pic.h
   1.136 -41e2ff6cdD9yovRmQNNJu8QVtZg7Iw tools/ioemu/iodev/pit.cc
   1.137 -41e2ff6cXtvewmYJyoxrWGic2sOayg tools/ioemu/iodev/pit.h
   1.138 -41e2ff6cXaqNRxMagdpNiT1kTWJJUA tools/ioemu/iodev/pit82c54.cc
   1.139 -41e2ff6cHAkpKzMwyz3diMZWTswxmg tools/ioemu/iodev/pit82c54.h
   1.140 -41e2ff6cMK9E2gjqHoWV9ZQfz-cP1Q tools/ioemu/iodev/pit_wrap.cc
   1.141 -41e2ff6cbie7fPpQMgBImJ885GAPdw tools/ioemu/iodev/pit_wrap.h
   1.142 -41e2ff6c0wLrWtBHxxboIzHsrZzkRA tools/ioemu/iodev/plugin.cc
   1.143 -41e2ff6cN4Z6pnguPQaqiCkWp42MOQ tools/ioemu/iodev/scancodes.cc
   1.144 -41e2ff6chK1sqb78l1sqhF3fJhjzBw tools/ioemu/iodev/scancodes.h
   1.145 -41e2ff6cIyPvY7hNE5rP_PMZELhyVw tools/ioemu/iodev/scsi_commands.h
   1.146 -41e2ff6cF3wH8A_66_yG92Wk7I2IWQ tools/ioemu/iodev/scsidefs.h
   1.147 -41e2ff6cbAin6eD3Gfz2CozOS4_bwA tools/ioemu/iodev/scsipt.h
   1.148 -41e2ff6cce6mNXZPGmlQ1bg_I0ef8Q tools/ioemu/iodev/serial.cc
   1.149 -41e2ff6cxsITO-ikpd4vBYZUYO3qSw tools/ioemu/iodev/serial.h
   1.150 -41e2ff6cbaCEgMJ92UELiRE2wEYe3g tools/ioemu/iodev/serial_raw.h
   1.151 -41e2ff6cwDKTU8OukKNBNMDiAYUWvQ tools/ioemu/iodev/slowdown_timer.cc
   1.152 -41e2ff6cM5XYdcgL417IBOzW-QipFg tools/ioemu/iodev/slowdown_timer.h
   1.153 -41e2ff6c5X0WxdBPUyZlNmW6Zv_LRQ tools/ioemu/iodev/soundlnx.cc
   1.154 -41e2ff6cIuE1VxGF_L6rdBtD6rZ_aA tools/ioemu/iodev/soundlnx.h
   1.155 -41e2ff6cDIv87LKamP0Y-yjrdqALzQ tools/ioemu/iodev/soundwin.cc
   1.156 -41e2ff6cB55j_uYIqYh-UiLS4wlm_g tools/ioemu/iodev/soundwin.h
   1.157 -41e2ff6dRPBmtxjFbEM5WYuilnSSZg tools/ioemu/iodev/state_file.cc
   1.158 -41e2ff6dMwkI1Dpa-UHSEzHCvjpOyw tools/ioemu/iodev/unmapped.cc
   1.159 -41e2ff6d_yJMFHYPENtVmJz6wyldQA tools/ioemu/iodev/unmapped.h
   1.160 -41e2ff6dU5hJI6Kn70mFingJo4cHUw tools/ioemu/iodev/vga.cc
   1.161 -41e2ff6dh8xDcCXkZzpSqnFP-OXggw tools/ioemu/iodev/vga.h
   1.162 -41e2ff6dayXwb5dxf0K5pd3q4QppRA tools/ioemu/iodev/virt_timer.cc
   1.163 -41e2ff6dI_rNgBwki594UAWN337-zw tools/ioemu/iodev/virt_timer.h
   1.164 -41e2ff6dCCtE_btrlEopLaCsLO3JDA tools/ioemu/memory/Makefile
   1.165 -41e2ff6dZtwsTW8s-Gqv7bqObdvaXw tools/ioemu/memory/memory.cc
   1.166 -41e2ff6dpk6EFzlHlsAsFEFdyG4wrA tools/ioemu/memory/memory.h
   1.167 -41e2ff6d2i-wqgCe4iAXdckUc1GD-A tools/ioemu/memory/misc_mem.cc
   1.168 -41e2ff6dCYuZgf6pxRmphkh5yeuA9Q tools/ioemu/mk/helix.mk
   1.169 +428d0d82yOaUzYQuYQxH7VzQytKo-g tools/ioemu/COPYING
   1.170 +428d0d82EdPp1TqJBembLgyB1y413w tools/ioemu/COPYING.LIB
   1.171 +428d0d82fd6-QydvFfHmeQBGrKnrrA tools/ioemu/Changelog
   1.172 +428d0d82xvTj4yzPYiurazyGj1PaEw tools/ioemu/Makefile
   1.173 +428d0d82dUmXkgIy11G-hoKTkhvkfQ tools/ioemu/Makefile.target
   1.174 +428d0d82HvgRPoyU3f60_u_t1L28Ag tools/ioemu/README
   1.175 +428d0d820gXmfIVHub7p9VbT7bQcMw tools/ioemu/README.distrib
   1.176 +428d0d82aoWewa_6Z5kNUTgkRw0wNg tools/ioemu/TODO
   1.177 +428d0d82WYi8vrG7RKKyIJw01DAnGg tools/ioemu/VERSION
   1.178 +428d0d82wB05ibBxTCSsAhz3qRO7Gg tools/ioemu/block-cloop.c
   1.179 +428d0d82cucBBZFks3aMSL0-C3L9Nw tools/ioemu/block-cow.c
   1.180 +428d0d82s5FM7xmnj1XLAMlt_DdRIA tools/ioemu/block-qcow.c
   1.181 +428d0d83yWYa6mIH2mplo1L_3Cqadw tools/ioemu/block-vmdk.c
   1.182 +428d0d83nfcgHvu37hviRYwAAAAxSQ tools/ioemu/block.c
   1.183 +428d0d83LrXLfgm9h2RPNBRM_vkqsA tools/ioemu/block_int.h
   1.184 +428d0d83zt7CgVsTa-CIorpIGVWe7g tools/ioemu/bswap.h
   1.185 +428d0d83-I9bQJ8EduVO0OmP_YMtVg tools/ioemu/configure
   1.186 +428d0d83sUjdDRZnfykBaWd_uGjVQQ tools/ioemu/console.c
   1.187 +428d0d83Rsv-Pq8iGrvA0ChVTD-KEQ tools/ioemu/cpu-all.h
   1.188 +428d0d830tCm2-QC3iLTo-yS2D7azQ tools/ioemu/cpu-defs.h
   1.189 +428d0d83bOFEAX7Kc_lt7pm_ItnYOg tools/ioemu/cpu.h
   1.190 +428d0d83wJqNCht75GfVfWqGzaDBGA tools/ioemu/create_keysym_header.sh
   1.191 +428d0d83warJp9F3aKU4moRRVfTmFg tools/ioemu/exec-all.h
   1.192 +428d0d83m3Kwp8vJKycK1n5a_LygfA tools/ioemu/exec.c
   1.193 +428d0d83G-F1mvFyzCEMNhiU6ts8lQ tools/ioemu/hw/adb.c
   1.194 +428d0d83EE1hpyfMfr667s4aFK42hg tools/ioemu/hw/adlib.c
   1.195 +428d0d83AoBht7yFAmAUWoi-ZZS2Tw tools/ioemu/hw/cirrus_vga.c
   1.196 +428d0d83lD5ovmJG_Q1VfIIjw1Fm-A tools/ioemu/hw/cirrus_vga_rop.h
   1.197 +428d0d83SCwX65BPgonBcgYCxdKDNA tools/ioemu/hw/cirrus_vga_rop2.h
   1.198 +428d0d83zAKLZ8JX7_D6RMGcml3jRA tools/ioemu/hw/cuda.c
   1.199 +428d0d83OLV-aQor-LfByakKvo-1-g tools/ioemu/hw/dma.c
   1.200 +428d0d83P1VkKtXn90RMN8eBsvPFQA tools/ioemu/hw/fdc.c
   1.201 +428d0d849AqxX6FsPHv0ovjaFyNMVg tools/ioemu/hw/fmopl.c
   1.202 +428d0d84-hHRu7PVXjfc7oLfrDxY6g tools/ioemu/hw/fmopl.h
   1.203 +428d0d84zbtT2C8Xci_SqMP5bZ-wcQ tools/ioemu/hw/i8254.c
   1.204 +428d0d84KlR61OwSzjF0-L4iz58dfQ tools/ioemu/hw/i8259.c
   1.205 +428d0d84auhZx6c5Kv3WrfM2UZvqHA tools/ioemu/hw/ide.c
   1.206 +428d0d84WSlhNzdrcb-f-Lg-W9dniQ tools/ioemu/hw/iommu.c
   1.207 +428d0d84ri8ZtvhB6RJr1YNejjNWIQ tools/ioemu/hw/lance.c
   1.208 +428d0d84cxFFgDv5fBFrlxGoCiy6Nw tools/ioemu/hw/m48t08.c
   1.209 +428d0d84MQYDhAOLnBnag1BZWcW6JA tools/ioemu/hw/m48t08.h
   1.210 +428d0d84sE4ghX33RQ5kDSuyoLdhFg tools/ioemu/hw/m48t59.c
   1.211 +428d0d8465kZWTT4mVgf-VonglDOxw tools/ioemu/hw/m48t59.h
   1.212 +428d0d84OY7tvE-PKrBfjf2vEQXyMA tools/ioemu/hw/magic-load.c
   1.213 +428d0d84U-PYPR_GMVJoQsbCAVAQow tools/ioemu/hw/mc146818rtc.c
   1.214 +428d0d84jtSXGjQYKd_xvSiMM4C_7Q tools/ioemu/hw/ne2000.c
   1.215 +428d0d84SMHPk0cRnrZgUYkMxFXMMQ tools/ioemu/hw/openpic.c
   1.216 +428d0d84lyG0XDg5MxLMSee3MWgq3g tools/ioemu/hw/pc.c
   1.217 +428d0d84HWR3Q7dEESycfJ7hSWdGig tools/ioemu/hw/pci.c
   1.218 +428d0d84Noyn4ik0UX1E7OdfuFdrIw tools/ioemu/hw/pckbd.c
   1.219 +428d0d840SMURRjsz9V96rwt-naynw tools/ioemu/hw/ppc.c
   1.220 +428d0d84MI7kZftH_c0FK1qiiyQBZg tools/ioemu/hw/ppc_chrp.c
   1.221 +428d0d859-xwA89jmzFk6x9UyXjAeA tools/ioemu/hw/ppc_prep.c
   1.222 +428d0d85YS1n4Fr_EK7B01EWSmrYRg tools/ioemu/hw/sb16.c
   1.223 +428d0d85GrUXL_p0ppOUIfWf8--hvw tools/ioemu/hw/sched.c
   1.224 +428d0d85wP3aLdHYJ-hDAImDP2sj_g tools/ioemu/hw/serial.c
   1.225 +428d0d85mOfwFqDCO76K6bc4IQOxQA tools/ioemu/hw/sun4m.c
   1.226 +428d0d852OCpAsfS1PNoJOfnHhFPSQ tools/ioemu/hw/tcx.c
   1.227 +428d0d85gCUCX0nbuRAt28QJgQ5P8w tools/ioemu/hw/timer.c
   1.228 +428d0d85hp-zgN40hVYXWRjhInkUkg tools/ioemu/hw/vga.c
   1.229 +428d0d85G_4S-hpRyrhV4yGjSrS-cQ tools/ioemu/hw/vga_int.h
   1.230 +428d0d85oWl1ONX_gIZWS1fXjeXGlA tools/ioemu/hw/vga_template.h
   1.231 +428d0d85-wAtLF5FYFHCUAxXKNbEkA tools/ioemu/i386-vl.ld
   1.232 +428d0d85d831iQvvCD3LcaOD9rYGkg tools/ioemu/i386.ld
   1.233 +428d0d85_mNnFPE8hnoC3VvBD9CCuA tools/ioemu/keyboard_rdesktop.c
   1.234 +428d0d85SyOIeDg3SoxH2BiBpXWWkA tools/ioemu/keymaps/ar
   1.235 +428d0d85ToGTVvPrl8hKAi2QxCzp2w tools/ioemu/keymaps/common
   1.236 +428d0d85fmdxRplWI5Jp54NNZy5Mmw tools/ioemu/keymaps/convert-map
   1.237 +428d0d85t5IBwlnttPreCS0UX3nbOw tools/ioemu/keymaps/da
   1.238 +428d0d85XRNojuUlkCgvea0I_fdJEg tools/ioemu/keymaps/de
   1.239 +428d0d85QPup3ixECEpa7Pzr9lLEyw tools/ioemu/keymaps/de-ch
   1.240 +428d0d86r5UpNhOSALGJUUDaGv-vnQ tools/ioemu/keymaps/en-gb
   1.241 +428d0d86ylUT-4Skjnwa27vxIeBqYw tools/ioemu/keymaps/en-us
   1.242 +428d0d86vcHusn3XzWTLjKLDdNhZxw tools/ioemu/keymaps/es
   1.243 +428d0d86UVS0Km-9J94RAQM7iAbBzw tools/ioemu/keymaps/et
   1.244 +428d0d86hS47OlX4USgPPWk6RFWKLQ tools/ioemu/keymaps/fi
   1.245 +428d0d86kOcjaVVZqDgV2JDGcXQ8rg tools/ioemu/keymaps/fo
   1.246 +428d0d86c4GgMp1hDU2MFxiZ1Pz9Lg tools/ioemu/keymaps/fr
   1.247 +428d0d86BdbSM5PxuMaSf8vBv6rXQg tools/ioemu/keymaps/fr-be
   1.248 +428d0d86dQk_p9io2QdI9SGC6FVidg tools/ioemu/keymaps/fr-ca
   1.249 +428d0d86JpfLBZmnrv7Yp0tuezgzng tools/ioemu/keymaps/fr-ch
   1.250 +428d0d861RURctgJ3cgtnq0chW6JOA tools/ioemu/keymaps/hr
   1.251 +428d0d86mqzqw70FkLHZFzIkvTJBpw tools/ioemu/keymaps/hu
   1.252 +428d0d86O3ruSBL8ZyRBeLF7Ow67Og tools/ioemu/keymaps/is
   1.253 +428d0d87pcCatuZLYpVWtUu2Da9sgw tools/ioemu/keymaps/it
   1.254 +428d0d87M3Hy7ubCu27ZO-zWDk-YhQ tools/ioemu/keymaps/ja
   1.255 +428d0d87CqrbJBUI28UxJCIduSJ4rQ tools/ioemu/keymaps/lt
   1.256 +428d0d87jIV_V1YwET59i-Py3h0ILA tools/ioemu/keymaps/lv
   1.257 +428d0d87T3KIxrywXSAkRu-AiQQgIQ tools/ioemu/keymaps/mk
   1.258 +428d0d87_wmWi_IBHfpmZzhCKU-Baw tools/ioemu/keymaps/modifiers
   1.259 +428d0d87GgUuEd4Mz9p3mUGkdMdOsg tools/ioemu/keymaps/nl
   1.260 +428d0d87E1NtUwguKl72ifCTjDQ5rQ tools/ioemu/keymaps/nl-be
   1.261 +428d0d87lKhQOfn5yQ0tq3u7hfIgpw tools/ioemu/keymaps/no
   1.262 +428d0d87iD3aff-LOlaA4CmOUVct3Q tools/ioemu/keymaps/pl
   1.263 +428d0d870CMCzI7c6gcGZMNuIYGbnQ tools/ioemu/keymaps/pt
   1.264 +428d0d87gCs2M4A4P1ITzW86lm_-JA tools/ioemu/keymaps/pt-br
   1.265 +428d0d87nzQ8eK1b9_Zs1Z82dOuX1Q tools/ioemu/keymaps/ru
   1.266 +428d0d87uHdsh15a5mAD-HyWni8QDw tools/ioemu/keymaps/sl
   1.267 +428d0d87gsUMIP42oFecYrdZAJDAuw tools/ioemu/keymaps/sv
   1.268 +428d0d87OcfLjKuhg6p2uuiAPvJBqQ tools/ioemu/keymaps/th
   1.269 +428d0d87QbRtHJUft9qBkNXcl4pbzw tools/ioemu/keymaps/tr
   1.270 +428d0d88CJoMejkmBh6pWaqKMvQF8A tools/ioemu/main.c
   1.271 +428d0d88Fcan7gQZ6axXOmokBDLe7g tools/ioemu/monitor.c
   1.272 +428d0d88lVaOC64YBZ1Wzt-WV4JaSw tools/ioemu/osdep.c
   1.273 +428d0d885W7r27CDEJCW6Jlbxggc9g tools/ioemu/osdep.h
   1.274 +428d0d88CiP9tVdIdLWAzOnCOSdafg tools/ioemu/path.c
   1.275 +428d0d88jzHltLAzyhV1lpFckzy8CA tools/ioemu/pc-bios/Makefile
   1.276 +428d0d889pv_iPNBFn6cNRzQfJMC3A tools/ioemu/pc-bios/README
   1.277 +428d0d88mhWW8SQFNfp-NaH3c8QQkg tools/ioemu/pc-bios/bios.bin
   1.278 +428d0d88LMSMDbTFG1-sS8LL90hExw tools/ioemu/pc-bios/bios.diff
   1.279 +428d0d89SHpdZE1S-ywjJCulIWs4Ag tools/ioemu/pc-bios/linux_boot.S
   1.280 +428d0d89hiL0UgU71ero86GEu1loaA tools/ioemu/pc-bios/linux_boot.bin
   1.281 +428d0d894MKpOb385vcoB_s_4q0QOA tools/ioemu/pc-bios/ppc_rom.bin
   1.282 +428d0d896uo6qr-ONYkpleolayT4zw tools/ioemu/pc-bios/proll.bin
   1.283 +428d0d893gsF8AcCadeYXcKM-aqssA tools/ioemu/pc-bios/proll.patch
   1.284 +428d0d89GgbrVx4Ov3Zg-SFX_0BRdw tools/ioemu/pc-bios/vgabios-cirrus.bin
   1.285 +428d0d89h9nqxPIgDpPMXZIWkdosNw tools/ioemu/pc-bios/vgabios.bin
   1.286 +428d0d8908B65zMmhdGVME3jv7gpww tools/ioemu/qemu-binfmt-conf.sh
   1.287 +428d0d89eKfKJmNEURTxLUtIjclvDw tools/ioemu/qemu-doc.html
   1.288 +428d0d89jF9HlGboO7nLco-tqjLJqQ tools/ioemu/qemu-doc.texi
   1.289 +428d0d89taY6NPlnIyOAMQd_Ww5qUw tools/ioemu/qemu-img.c
   1.290 +428d0d89uGqd5VkBf5j3HFIkQMxsNA tools/ioemu/qemu-mkcow.1
   1.291 +428d0d8941iGGM85zXzn4wSj6zgbQg tools/ioemu/qemu-tech.html
   1.292 +428d0d89IkHVfdVTilpTpxDvOCOiIw tools/ioemu/qemu-tech.texi
   1.293 +428d0d89ME4klwpFGjbiKXQrj2KF7A tools/ioemu/qemu.1
   1.294 +428d0d89FY-g4UPH-ZW7t5ZCqvQVTQ tools/ioemu/readline.c
   1.295 +428d0d89dLURbktZFufDKSHan01GFg tools/ioemu/sdl.c
   1.296 +428d0d8atdIE_8ACJPPii5_asQNafw tools/ioemu/target-i386-dm/device-model
   1.297 +428d0d8ahpRAYl6s_itBxnTcxyMHaQ tools/ioemu/target-i386-dm/helper2.c
   1.298 +428d0d8aU3Moaq4zNW5QMV_NxD-4XA tools/ioemu/target-i386-dm/qemu-ifup
   1.299 +428d0d8aqidj8n5H2_2qhBV0mIIJzA tools/ioemu/target-i386-dm/qemu-vgaram-bin.gz
   1.300 +428d0d8ahJ-jctJYDXyAMh91-ifrmg tools/ioemu/tests/Makefile
   1.301 +428d0d8ax12h3Jd3Vhw4nh-eG99-iQ tools/ioemu/tests/hello-arm.c
   1.302 +428d0d8acsBcsGQPd0qQllU-4c9fXw tools/ioemu/tests/hello-i386.c
   1.303 +428d0d8aSEf5Q4wB3iaEThUssfFH8w tools/ioemu/tests/linux-test.c
   1.304 +428d0d8a_orWq4Mg5EasDj2l6f4a0w tools/ioemu/tests/pi_10.com
   1.305 +428d0d8aBv9VBjblSU8iAaVojF4qqw tools/ioemu/tests/qruncom.c
   1.306 +428d0d8az-0qSZDA45Mt6y2SdsqF4w tools/ioemu/tests/runcom.c
   1.307 +428d0d8aSf3jnF_aFvwAemDeROZcKQ tools/ioemu/tests/sha1.c
   1.308 +428d0d8aBZGfRZ662SQIuXLdpmih0w tools/ioemu/tests/test-i386-code16.S
   1.309 +428d0d8a8DbLZWzSyVQ_wX1RGr9SVQ tools/ioemu/tests/test-i386-muldiv.h
   1.310 +428d0d8aaMQbnc_vqyQyOcUzyVrXyg tools/ioemu/tests/test-i386-shift.h
   1.311 +428d0d8aKYkFtFSCFHFUivErvx0iqg tools/ioemu/tests/test-i386-vm86.S
   1.312 +428d0d8aHx2CzT77VEsXouep7lZaYQ tools/ioemu/tests/test-i386.c
   1.313 +428d0d8aDSIoqxC4_zr2z8vxMKrmeA tools/ioemu/tests/test-i386.h
   1.314 +428d0d8ajPT5QfGuunOvjNibmURtqQ tools/ioemu/tests/test_path.c
   1.315 +428d0d8bPccWrah4Y_zICBNZ5exhDw tools/ioemu/tests/testthread.c
   1.316 +428d0d8b5F7EB4JnUbdTi_SZvF2wXg tools/ioemu/texi2pod.pl
   1.317 +428d0d8bMq0ZpccpHb1iVvSNbJjRxg tools/ioemu/thunk.c
   1.318 +428d0d8b2PYfwKLLShlnWcM3VWq9ag tools/ioemu/thunk.h
   1.319 +428d0d8bfvbYQwj6MgDr958m4_SfRA tools/ioemu/vgafont.h
   1.320 +428d0d8bgAojEQcAcTV2gj2E_eG4Lw tools/ioemu/vl.c
   1.321 +428d0d8bXiCY4iTjoSPxGry8jXdAtg tools/ioemu/vl.h
   1.322 +428d0d8bQVKedvN5EIPm39s33TXkpA tools/ioemu/vnc.c
   1.323  3fbba6dbDfYvJSsw9500b4SZyUhxjQ tools/libxc/Makefile
   1.324  41dde8afKYRKxS4XtLv1KUegGQy_bg tools/libxc/linux_boot_params.h
   1.325  41cc934abX-QLXJXW_clV_wRjM0zYg tools/libxc/plan9a.out.h
     2.1 --- a/tools/Makefile	Thu May 19 21:53:44 2005 +0000
     2.2 +++ b/tools/Makefile	Thu May 19 22:05:02 2005 +0000
     2.3 @@ -10,30 +10,36 @@ SUBDIRS += xentrace
     2.4  SUBDIRS += python
     2.5  SUBDIRS += xfrd
     2.6  SUBDIRS += xcs
     2.7 -ifndef XEN_NO_IOEMU
     2.8 -SUBDIRS += ioemu
     2.9 -endif
    2.10  SUBDIRS += pygrub
    2.11  
    2.12 -.PHONY: all install clean check check_clean
    2.13 +.PHONY: all install clean check check_clean ioemu eioemuinstall ioemuclean
    2.14 +
    2.15 +ifndef XEN_NO_IOEMU
    2.16 +ioemu ioemuinstall ioemuclean:
    2.17 +	[ -f ioemu/config-host.h ] || \
    2.18 +	(cd ioemu; ./configure --prefix=$(DESTDIR)/usr)
    2.19 +	$(MAKE) -C ioemu $(patsubst ioemu%,%,$@)
    2.20 +else
    2.21 +ioemu ioemuinstall ioemuclean:
    2.22 +endif
    2.23  
    2.24  all: check
    2.25  	@set -e; for subdir in $(SUBDIRS); do \
    2.26 -                if [ -f $$subdir/configure ]; then \
    2.27 -                        (cd $$subdir; ./configure --prefix=$(DESTDIR)/usr) \
    2.28 -                fi; \
    2.29  		$(MAKE) -C $$subdir $@; \
    2.30  	done
    2.31 +	$(MAKE) ioemu
    2.32  
    2.33  install: check
    2.34  	@set -e; for subdir in $(SUBDIRS); do \
    2.35  		$(MAKE) -C $$subdir $@; \
    2.36  	done
    2.37 +	$(MAKE) ioemuinstall
    2.38  
    2.39  clean: check_clean
    2.40  	@set -e; for subdir in $(SUBDIRS); do \
    2.41  		$(MAKE) -C $$subdir $@; \
    2.42  	done
    2.43 +	$(MAKE) ioemuclean
    2.44  
    2.45  check:
    2.46  	$(MAKE) -C check
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tools/ioemu/COPYING	Thu May 19 22:05:02 2005 +0000
     3.3 @@ -0,0 +1,339 @@
     3.4 +		    GNU GENERAL PUBLIC LICENSE
     3.5 +		       Version 2, June 1991
     3.6 +
     3.7 + Copyright (C) 1989, 1991 Free Software Foundation, Inc.
     3.8 +                          675 Mass Ave, Cambridge, MA 02139, USA
     3.9 + Everyone is permitted to copy and distribute verbatim copies
    3.10 + of this license document, but changing it is not allowed.
    3.11 +
    3.12 +			    Preamble
    3.13 +
    3.14 +  The licenses for most software are designed to take away your
    3.15 +freedom to share and change it.  By contrast, the GNU General Public
    3.16 +License is intended to guarantee your freedom to share and change free
    3.17 +software--to make sure the software is free for all its users.  This
    3.18 +General Public License applies to most of the Free Software
    3.19 +Foundation's software and to any other program whose authors commit to
    3.20 +using it.  (Some other Free Software Foundation software is covered by
    3.21 +the GNU Library General Public License instead.)  You can apply it to
    3.22 +your programs, too.
    3.23 +
    3.24 +  When we speak of free software, we are referring to freedom, not
    3.25 +price.  Our General Public Licenses are designed to make sure that you
    3.26 +have the freedom to distribute copies of free software (and charge for
    3.27 +this service if you wish), that you receive source code or can get it
    3.28 +if you want it, that you can change the software or use pieces of it
    3.29 +in new free programs; and that you know you can do these things.
    3.30 +
    3.31 +  To protect your rights, we need to make restrictions that forbid
    3.32 +anyone to deny you these rights or to ask you to surrender the rights.
    3.33 +These restrictions translate to certain responsibilities for you if you
    3.34 +distribute copies of the software, or if you modify it.
    3.35 +
    3.36 +  For example, if you distribute copies of such a program, whether
    3.37 +gratis or for a fee, you must give the recipients all the rights that
    3.38 +you have.  You must make sure that they, too, receive or can get the
    3.39 +source code.  And you must show them these terms so they know their
    3.40 +rights.
    3.41 +
    3.42 +  We protect your rights with two steps: (1) copyright the software, and
    3.43 +(2) offer you this license which gives you legal permission to copy,
    3.44 +distribute and/or modify the software.
    3.45 +
    3.46 +  Also, for each author's protection and ours, we want to make certain
    3.47 +that everyone understands that there is no warranty for this free
    3.48 +software.  If the software is modified by someone else and passed on, we
    3.49 +want its recipients to know that what they have is not the original, so
    3.50 +that any problems introduced by others will not reflect on the original
    3.51 +authors' reputations.
    3.52 +
    3.53 +  Finally, any free program is threatened constantly by software
    3.54 +patents.  We wish to avoid the danger that redistributors of a free
    3.55 +program will individually obtain patent licenses, in effect making the
    3.56 +program proprietary.  To prevent this, we have made it clear that any
    3.57 +patent must be licensed for everyone's free use or not licensed at all.
    3.58 +
    3.59 +  The precise terms and conditions for copying, distribution and
    3.60 +modification follow.
    3.61 +
    3.62 +		    GNU GENERAL PUBLIC LICENSE
    3.63 +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    3.64 +
    3.65 +  0. This License applies to any program or other work which contains
    3.66 +a notice placed by the copyright holder saying it may be distributed
    3.67 +under the terms of this General Public License.  The "Program", below,
    3.68 +refers to any such program or work, and a "work based on the Program"
    3.69 +means either the Program or any derivative work under copyright law:
    3.70 +that is to say, a work containing the Program or a portion of it,
    3.71 +either verbatim or with modifications and/or translated into another
    3.72 +language.  (Hereinafter, translation is included without limitation in
    3.73 +the term "modification".)  Each licensee is addressed as "you".
    3.74 +
    3.75 +Activities other than copying, distribution and modification are not
    3.76 +covered by this License; they are outside its scope.  The act of
    3.77 +running the Program is not restricted, and the output from the Program
    3.78 +is covered only if its contents constitute a work based on the
    3.79 +Program (independent of having been made by running the Program).
    3.80 +Whether that is true depends on what the Program does.
    3.81 +
    3.82 +  1. You may copy and distribute verbatim copies of the Program's
    3.83 +source code as you receive it, in any medium, provided that you
    3.84 +conspicuously and appropriately publish on each copy an appropriate
    3.85 +copyright notice and disclaimer of warranty; keep intact all the
    3.86 +notices that refer to this License and to the absence of any warranty;
    3.87 +and give any other recipients of the Program a copy of this License
    3.88 +along with the Program.
    3.89 +
    3.90 +You may charge a fee for the physical act of transferring a copy, and
    3.91 +you may at your option offer warranty protection in exchange for a fee.
    3.92 +
    3.93 +  2. You may modify your copy or copies of the Program or any portion
    3.94 +of it, thus forming a work based on the Program, and copy and
    3.95 +distribute such modifications or work under the terms of Section 1
    3.96 +above, provided that you also meet all of these conditions:
    3.97 +
    3.98 +    a) You must cause the modified files to carry prominent notices
    3.99 +    stating that you changed the files and the date of any change.
   3.100 +
   3.101 +    b) You must cause any work that you distribute or publish, that in
   3.102 +    whole or in part contains or is derived from the Program or any
   3.103 +    part thereof, to be licensed as a whole at no charge to all third
   3.104 +    parties under the terms of this License.
   3.105 +
   3.106 +    c) If the modified program normally reads commands interactively
   3.107 +    when run, you must cause it, when started running for such
   3.108 +    interactive use in the most ordinary way, to print or display an
   3.109 +    announcement including an appropriate copyright notice and a
   3.110 +    notice that there is no warranty (or else, saying that you provide
   3.111 +    a warranty) and that users may redistribute the program under
   3.112 +    these conditions, and telling the user how to view a copy of this
   3.113 +    License.  (Exception: if the Program itself is interactive but
   3.114 +    does not normally print such an announcement, your work based on
   3.115 +    the Program is not required to print an announcement.)
   3.116 +
   3.117 +These requirements apply to the modified work as a whole.  If
   3.118 +identifiable sections of that work are not derived from the Program,
   3.119 +and can be reasonably considered independent and separate works in
   3.120 +themselves, then this License, and its terms, do not apply to those
   3.121 +sections when you distribute them as separate works.  But when you
   3.122 +distribute the same sections as part of a whole which is a work based
   3.123 +on the Program, the distribution of the whole must be on the terms of
   3.124 +this License, whose permissions for other licensees extend to the
   3.125 +entire whole, and thus to each and every part regardless of who wrote it.
   3.126 +
   3.127 +Thus, it is not the intent of this section to claim rights or contest
   3.128 +your rights to work written entirely by you; rather, the intent is to
   3.129 +exercise the right to control the distribution of derivative or
   3.130 +collective works based on the Program.
   3.131 +
   3.132 +In addition, mere aggregation of another work not based on the Program
   3.133 +with the Program (or with a work based on the Program) on a volume of
   3.134 +a storage or distribution medium does not bring the other work under
   3.135 +the scope of this License.
   3.136 +
   3.137 +  3. You may copy and distribute the Program (or a work based on it,
   3.138 +under Section 2) in object code or executable form under the terms of
   3.139 +Sections 1 and 2 above provided that you also do one of the following:
   3.140 +
   3.141 +    a) Accompany it with the complete corresponding machine-readable
   3.142 +    source code, which must be distributed under the terms of Sections
   3.143 +    1 and 2 above on a medium customarily used for software interchange; or,
   3.144 +
   3.145 +    b) Accompany it with a written offer, valid for at least three
   3.146 +    years, to give any third party, for a charge no more than your
   3.147 +    cost of physically performing source distribution, a complete
   3.148 +    machine-readable copy of the corresponding source code, to be
   3.149 +    distributed under the terms of Sections 1 and 2 above on a medium
   3.150 +    customarily used for software interchange; or,
   3.151 +
   3.152 +    c) Accompany it with the information you received as to the offer
   3.153 +    to distribute corresponding source code.  (This alternative is
   3.154 +    allowed only for noncommercial distribution and only if you
   3.155 +    received the program in object code or executable form with such
   3.156 +    an offer, in accord with Subsection b above.)
   3.157 +
   3.158 +The source code for a work means the preferred form of the work for
   3.159 +making modifications to it.  For an executable work, complete source
   3.160 +code means all the source code for all modules it contains, plus any
   3.161 +associated interface definition files, plus the scripts used to
   3.162 +control compilation and installation of the executable.  However, as a
   3.163 +special exception, the source code distributed need not include
   3.164 +anything that is normally distributed (in either source or binary
   3.165 +form) with the major components (compiler, kernel, and so on) of the
   3.166 +operating system on which the executable runs, unless that component
   3.167 +itself accompanies the executable.
   3.168 +
   3.169 +If distribution of executable or object code is made by offering
   3.170 +access to copy from a designated place, then offering equivalent
   3.171 +access to copy the source code from the same place counts as
   3.172 +distribution of the source code, even though third parties are not
   3.173 +compelled to copy the source along with the object code.
   3.174 +
   3.175 +  4. You may not copy, modify, sublicense, or distribute the Program
   3.176 +except as expressly provided under this License.  Any attempt
   3.177 +otherwise to copy, modify, sublicense or distribute the Program is
   3.178 +void, and will automatically terminate your rights under this License.
   3.179 +However, parties who have received copies, or rights, from you under
   3.180 +this License will not have their licenses terminated so long as such
   3.181 +parties remain in full compliance.
   3.182 +
   3.183 +  5. You are not required to accept this License, since you have not
   3.184 +signed it.  However, nothing else grants you permission to modify or
   3.185 +distribute the Program or its derivative works.  These actions are
   3.186 +prohibited by law if you do not accept this License.  Therefore, by
   3.187 +modifying or distributing the Program (or any work based on the
   3.188 +Program), you indicate your acceptance of this License to do so, and
   3.189 +all its terms and conditions for copying, distributing or modifying
   3.190 +the Program or works based on it.
   3.191 +
   3.192 +  6. Each time you redistribute the Program (or any work based on the
   3.193 +Program), the recipient automatically receives a license from the
   3.194 +original licensor to copy, distribute or modify the Program subject to
   3.195 +these terms and conditions.  You may not impose any further
   3.196 +restrictions on the recipients' exercise of the rights granted herein.
   3.197 +You are not responsible for enforcing compliance by third parties to
   3.198 +this License.
   3.199 +
   3.200 +  7. If, as a consequence of a court judgment or allegation of patent
   3.201 +infringement or for any other reason (not limited to patent issues),
   3.202 +conditions are imposed on you (whether by court order, agreement or
   3.203 +otherwise) that contradict the conditions of this License, they do not
   3.204 +excuse you from the conditions of this License.  If you cannot
   3.205 +distribute so as to satisfy simultaneously your obligations under this
   3.206 +License and any other pertinent obligations, then as a consequence you
   3.207 +may not distribute the Program at all.  For example, if a patent
   3.208 +license would not permit royalty-free redistribution of the Program by
   3.209 +all those who receive copies directly or indirectly through you, then
   3.210 +the only way you could satisfy both it and this License would be to
   3.211 +refrain entirely from distribution of the Program.
   3.212 +
   3.213 +If any portion of this section is held invalid or unenforceable under
   3.214 +any particular circumstance, the balance of the section is intended to
   3.215 +apply and the section as a whole is intended to apply in other
   3.216 +circumstances.
   3.217 +
   3.218 +It is not the purpose of this section to induce you to infringe any
   3.219 +patents or other property right claims or to contest validity of any
   3.220 +such claims; this section has the sole purpose of protecting the
   3.221 +integrity of the free software distribution system, which is
   3.222 +implemented by public license practices.  Many people have made
   3.223 +generous contributions to the wide range of software distributed
   3.224 +through that system in reliance on consistent application of that
   3.225 +system; it is up to the author/donor to decide if he or she is willing
   3.226 +to distribute software through any other system and a licensee cannot
   3.227 +impose that choice.
   3.228 +
   3.229 +This section is intended to make thoroughly clear what is believed to
   3.230 +be a consequence of the rest of this License.
   3.231 +
   3.232 +  8. If the distribution and/or use of the Program is restricted in
   3.233 +certain countries either by patents or by copyrighted interfaces, the
   3.234 +original copyright holder who places the Program under this License
   3.235 +may add an explicit geographical distribution limitation excluding
   3.236 +those countries, so that distribution is permitted only in or among
   3.237 +countries not thus excluded.  In such case, this License incorporates
   3.238 +the limitation as if written in the body of this License.
   3.239 +
   3.240 +  9. The Free Software Foundation may publish revised and/or new versions
   3.241 +of the General Public License from time to time.  Such new versions will
   3.242 +be similar in spirit to the present version, but may differ in detail to
   3.243 +address new problems or concerns.
   3.244 +
   3.245 +Each version is given a distinguishing version number.  If the Program
   3.246 +specifies a version number of this License which applies to it and "any
   3.247 +later version", you have the option of following the terms and conditions
   3.248 +either of that version or of any later version published by the Free
   3.249 +Software Foundation.  If the Program does not specify a version number of
   3.250 +this License, you may choose any version ever published by the Free Software
   3.251 +Foundation.
   3.252 +
   3.253 +  10. If you wish to incorporate parts of the Program into other free
   3.254 +programs whose distribution conditions are different, write to the author
   3.255 +to ask for permission.  For software which is copyrighted by the Free
   3.256 +Software Foundation, write to the Free Software Foundation; we sometimes
   3.257 +make exceptions for this.  Our decision will be guided by the two goals
   3.258 +of preserving the free status of all derivatives of our free software and
   3.259 +of promoting the sharing and reuse of software generally.
   3.260 +
   3.261 +			    NO WARRANTY
   3.262 +
   3.263 +  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
   3.264 +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
   3.265 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
   3.266 +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
   3.267 +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   3.268 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
   3.269 +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
   3.270 +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
   3.271 +REPAIR OR CORRECTION.
   3.272 +
   3.273 +  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
   3.274 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
   3.275 +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
   3.276 +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
   3.277 +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
   3.278 +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
   3.279 +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
   3.280 +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
   3.281 +POSSIBILITY OF SUCH DAMAGES.
   3.282 +
   3.283 +		     END OF TERMS AND CONDITIONS
   3.284 +
   3.285 +	    How to Apply These Terms to Your New Programs
   3.286 +
   3.287 +  If you develop a new program, and you want it to be of the greatest
   3.288 +possible use to the public, the best way to achieve this is to make it
   3.289 +free software which everyone can redistribute and change under these terms.
   3.290 +
   3.291 +  To do so, attach the following notices to the program.  It is safest
   3.292 +to attach them to the start of each source file to most effectively
   3.293 +convey the exclusion of warranty; and each file should have at least
   3.294 +the "copyright" line and a pointer to where the full notice is found.
   3.295 +
   3.296 +    <one line to give the program's name and a brief idea of what it does.>
   3.297 +    Copyright (C) 19yy  <name of author>
   3.298 +
   3.299 +    This program is free software; you can redistribute it and/or modify
   3.300 +    it under the terms of the GNU General Public License as published by
   3.301 +    the Free Software Foundation; either version 2 of the License, or
   3.302 +    (at your option) any later version.
   3.303 +
   3.304 +    This program is distributed in the hope that it will be useful,
   3.305 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   3.306 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   3.307 +    GNU General Public License for more details.
   3.308 +
   3.309 +    You should have received a copy of the GNU General Public License
   3.310 +    along with this program; if not, write to the Free Software
   3.311 +    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   3.312 +
   3.313 +Also add information on how to contact you by electronic and paper mail.
   3.314 +
   3.315 +If the program is interactive, make it output a short notice like this
   3.316 +when it starts in an interactive mode:
   3.317 +
   3.318 +    Gnomovision version 69, Copyright (C) 19yy name of author
   3.319 +    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
   3.320 +    This is free software, and you are welcome to redistribute it
   3.321 +    under certain conditions; type `show c' for details.
   3.322 +
   3.323 +The hypothetical commands `show w' and `show c' should show the appropriate
   3.324 +parts of the General Public License.  Of course, the commands you use may
   3.325 +be called something other than `show w' and `show c'; they could even be
   3.326 +mouse-clicks or menu items--whatever suits your program.
   3.327 +
   3.328 +You should also get your employer (if you work as a programmer) or your
   3.329 +school, if any, to sign a "copyright disclaimer" for the program, if
   3.330 +necessary.  Here is a sample; alter the names:
   3.331 +
   3.332 +  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
   3.333 +  `Gnomovision' (which makes passes at compilers) written by James Hacker.
   3.334 +
   3.335 +  <signature of Ty Coon>, 1 April 1989
   3.336 +  Ty Coon, President of Vice
   3.337 +
   3.338 +This General Public License does not permit incorporating your program into
   3.339 +proprietary programs.  If your program is a subroutine library, you may
   3.340 +consider it more useful to permit linking proprietary applications with the
   3.341 +library.  If this is what you want to do, use the GNU Library General
   3.342 +Public License instead of this License.
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/tools/ioemu/COPYING.LIB	Thu May 19 22:05:02 2005 +0000
     4.3 @@ -0,0 +1,504 @@
     4.4 +		  GNU LESSER GENERAL PUBLIC LICENSE
     4.5 +		       Version 2.1, February 1999
     4.6 +
     4.7 + Copyright (C) 1991, 1999 Free Software Foundation, Inc.
     4.8 +     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     4.9 + Everyone is permitted to copy and distribute verbatim copies
    4.10 + of this license document, but changing it is not allowed.
    4.11 +
    4.12 +[This is the first released version of the Lesser GPL.  It also counts
    4.13 + as the successor of the GNU Library Public License, version 2, hence
    4.14 + the version number 2.1.]
    4.15 +
    4.16 +			    Preamble
    4.17 +
    4.18 +  The licenses for most software are designed to take away your
    4.19 +freedom to share and change it.  By contrast, the GNU General Public
    4.20 +Licenses are intended to guarantee your freedom to share and change
    4.21 +free software--to make sure the software is free for all its users.
    4.22 +
    4.23 +  This license, the Lesser General Public License, applies to some
    4.24 +specially designated software packages--typically libraries--of the
    4.25 +Free Software Foundation and other authors who decide to use it.  You
    4.26 +can use it too, but we suggest you first think carefully about whether
    4.27 +this license or the ordinary General Public License is the better
    4.28 +strategy to use in any particular case, based on the explanations below.
    4.29 +
    4.30 +  When we speak of free software, we are referring to freedom of use,
    4.31 +not price.  Our General Public Licenses are designed to make sure that
    4.32 +you have the freedom to distribute copies of free software (and charge
    4.33 +for this service if you wish); that you receive source code or can get
    4.34 +it if you want it; that you can change the software and use pieces of
    4.35 +it in new free programs; and that you are informed that you can do
    4.36 +these things.
    4.37 +
    4.38 +  To protect your rights, we need to make restrictions that forbid
    4.39 +distributors to deny you these rights or to ask you to surrender these
    4.40 +rights.  These restrictions translate to certain responsibilities for
    4.41 +you if you distribute copies of the library or if you modify it.
    4.42 +
    4.43 +  For example, if you distribute copies of the library, whether gratis
    4.44 +or for a fee, you must give the recipients all the rights that we gave
    4.45 +you.  You must make sure that they, too, receive or can get the source
    4.46 +code.  If you link other code with the library, you must provide
    4.47 +complete object files to the recipients, so that they can relink them
    4.48 +with the library after making changes to the library and recompiling
    4.49 +it.  And you must show them these terms so they know their rights.
    4.50 +
    4.51 +  We protect your rights with a two-step method: (1) we copyright the
    4.52 +library, and (2) we offer you this license, which gives you legal
    4.53 +permission to copy, distribute and/or modify the library.
    4.54 +
    4.55 +  To protect each distributor, we want to make it very clear that
    4.56 +there is no warranty for the free library.  Also, if the library is
    4.57 +modified by someone else and passed on, the recipients should know
    4.58 +that what they have is not the original version, so that the original
    4.59 +author's reputation will not be affected by problems that might be
    4.60 +introduced by others.
    4.61 +
    4.62 +  Finally, software patents pose a constant threat to the existence of
    4.63 +any free program.  We wish to make sure that a company cannot
    4.64 +effectively restrict the users of a free program by obtaining a
    4.65 +restrictive license from a patent holder.  Therefore, we insist that
    4.66 +any patent license obtained for a version of the library must be
    4.67 +consistent with the full freedom of use specified in this license.
    4.68 +
    4.69 +  Most GNU software, including some libraries, is covered by the
    4.70 +ordinary GNU General Public License.  This license, the GNU Lesser
    4.71 +General Public License, applies to certain designated libraries, and
    4.72 +is quite different from the ordinary General Public License.  We use
    4.73 +this license for certain libraries in order to permit linking those
    4.74 +libraries into non-free programs.
    4.75 +
    4.76 +  When a program is linked with a library, whether statically or using
    4.77 +a shared library, the combination of the two is legally speaking a
    4.78 +combined work, a derivative of the original library.  The ordinary
    4.79 +General Public License therefore permits such linking only if the
    4.80 +entire combination fits its criteria of freedom.  The Lesser General
    4.81 +Public License permits more lax criteria for linking other code with
    4.82 +the library.
    4.83 +
    4.84 +  We call this license the "Lesser" General Public License because it
    4.85 +does Less to protect the user's freedom than the ordinary General
    4.86 +Public License.  It also provides other free software developers Less
    4.87 +of an advantage over competing non-free programs.  These disadvantages
    4.88 +are the reason we use the ordinary General Public License for many
    4.89 +libraries.  However, the Lesser license provides advantages in certain
    4.90 +special circumstances.
    4.91 +
    4.92 +  For example, on rare occasions, there may be a special need to
    4.93 +encourage the widest possible use of a certain library, so that it becomes
    4.94 +a de-facto standard.  To achieve this, non-free programs must be
    4.95 +allowed to use the library.  A more frequent case is that a free
    4.96 +library does the same job as widely used non-free libraries.  In this
    4.97 +case, there is little to gain by limiting the free library to free
    4.98 +software only, so we use the Lesser General Public License.
    4.99 +
   4.100 +  In other cases, permission to use a particular library in non-free
   4.101 +programs enables a greater number of people to use a large body of
   4.102 +free software.  For example, permission to use the GNU C Library in
   4.103 +non-free programs enables many more people to use the whole GNU
   4.104 +operating system, as well as its variant, the GNU/Linux operating
   4.105 +system.
   4.106 +
   4.107 +  Although the Lesser General Public License is Less protective of the
   4.108 +users' freedom, it does ensure that the user of a program that is
   4.109 +linked with the Library has the freedom and the wherewithal to run
   4.110 +that program using a modified version of the Library.
   4.111 +
   4.112 +  The precise terms and conditions for copying, distribution and
   4.113 +modification follow.  Pay close attention to the difference between a
   4.114 +"work based on the library" and a "work that uses the library".  The
   4.115 +former contains code derived from the library, whereas the latter must
   4.116 +be combined with the library in order to run.
   4.117 +
   4.118 +		  GNU LESSER GENERAL PUBLIC LICENSE
   4.119 +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
   4.120 +
   4.121 +  0. This License Agreement applies to any software library or other
   4.122 +program which contains a notice placed by the copyright holder or
   4.123 +other authorized party saying it may be distributed under the terms of
   4.124 +this Lesser General Public License (also called "this License").
   4.125 +Each licensee is addressed as "you".
   4.126 +
   4.127 +  A "library" means a collection of software functions and/or data
   4.128 +prepared so as to be conveniently linked with application programs
   4.129 +(which use some of those functions and data) to form executables.
   4.130 +
   4.131 +  The "Library", below, refers to any such software library or work
   4.132 +which has been distributed under these terms.  A "work based on the
   4.133 +Library" means either the Library or any derivative work under
   4.134 +copyright law: that is to say, a work containing the Library or a
   4.135 +portion of it, either verbatim or with modifications and/or translated
   4.136 +straightforwardly into another language.  (Hereinafter, translation is
   4.137 +included without limitation in the term "modification".)
   4.138 +
   4.139 +  "Source code" for a work means the preferred form of the work for
   4.140 +making modifications to it.  For a library, complete source code means
   4.141 +all the source code for all modules it contains, plus any associated
   4.142 +interface definition files, plus the scripts used to control compilation
   4.143 +and installation of the library.
   4.144 +
   4.145 +  Activities other than copying, distribution and modification are not
   4.146 +covered by this License; they are outside its scope.  The act of
   4.147 +running a program using the Library is not restricted, and output from
   4.148 +such a program is covered only if its contents constitute a work based
   4.149 +on the Library (independent of the use of the Library in a tool for
   4.150 +writing it).  Whether that is true depends on what the Library does
   4.151 +and what the program that uses the Library does.
   4.152 +  
   4.153 +  1. You may copy and distribute verbatim copies of the Library's
   4.154 +complete source code as you receive it, in any medium, provided that
   4.155 +you conspicuously and appropriately publish on each copy an
   4.156 +appropriate copyright notice and disclaimer of warranty; keep intact
   4.157 +all the notices that refer to this License and to the absence of any
   4.158 +warranty; and distribute a copy of this License along with the
   4.159 +Library.
   4.160 +
   4.161 +  You may charge a fee for the physical act of transferring a copy,
   4.162 +and you may at your option offer warranty protection in exchange for a
   4.163 +fee.
   4.164 +
   4.165 +  2. You may modify your copy or copies of the Library or any portion
   4.166 +of it, thus forming a work based on the Library, and copy and
   4.167 +distribute such modifications or work under the terms of Section 1
   4.168 +above, provided that you also meet all of these conditions:
   4.169 +
   4.170 +    a) The modified work must itself be a software library.
   4.171 +
   4.172 +    b) You must cause the files modified to carry prominent notices
   4.173 +    stating that you changed the files and the date of any change.
   4.174 +
   4.175 +    c) You must cause the whole of the work to be licensed at no
   4.176 +    charge to all third parties under the terms of this License.
   4.177 +
   4.178 +    d) If a facility in the modified Library refers to a function or a
   4.179 +    table of data to be supplied by an application program that uses
   4.180 +    the facility, other than as an argument passed when the facility
   4.181 +    is invoked, then you must make a good faith effort to ensure that,
   4.182 +    in the event an application does not supply such function or
   4.183 +    table, the facility still operates, and performs whatever part of
   4.184 +    its purpose remains meaningful.
   4.185 +
   4.186 +    (For example, a function in a library to compute square roots has
   4.187 +    a purpose that is entirely well-defined independent of the
   4.188 +    application.  Therefore, Subsection 2d requires that any
   4.189 +    application-supplied function or table used by this function must
   4.190 +    be optional: if the application does not supply it, the square
   4.191 +    root function must still compute square roots.)
   4.192 +
   4.193 +These requirements apply to the modified work as a whole.  If
   4.194 +identifiable sections of that work are not derived from the Library,
   4.195 +and can be reasonably considered independent and separate works in
   4.196 +themselves, then this License, and its terms, do not apply to those
   4.197 +sections when you distribute them as separate works.  But when you
   4.198 +distribute the same sections as part of a whole which is a work based
   4.199 +on the Library, the distribution of the whole must be on the terms of
   4.200 +this License, whose permissions for other licensees extend to the
   4.201 +entire whole, and thus to each and every part regardless of who wrote
   4.202 +it.
   4.203 +
   4.204 +Thus, it is not the intent of this section to claim rights or contest
   4.205 +your rights to work written entirely by you; rather, the intent is to
   4.206 +exercise the right to control the distribution of derivative or
   4.207 +collective works based on the Library.
   4.208 +
   4.209 +In addition, mere aggregation of another work not based on the Library
   4.210 +with the Library (or with a work based on the Library) on a volume of
   4.211 +a storage or distribution medium does not bring the other work under
   4.212 +the scope of this License.
   4.213 +
   4.214 +  3. You may opt to apply the terms of the ordinary GNU General Public
   4.215 +License instead of this License to a given copy of the Library.  To do
   4.216 +this, you must alter all the notices that refer to this License, so
   4.217 +that they refer to the ordinary GNU General Public License, version 2,
   4.218 +instead of to this License.  (If a newer version than version 2 of the
   4.219 +ordinary GNU General Public License has appeared, then you can specify
   4.220 +that version instead if you wish.)  Do not make any other change in
   4.221 +these notices.
   4.222 +
   4.223 +  Once this change is made in a given copy, it is irreversible for
   4.224 +that copy, so the ordinary GNU General Public License applies to all
   4.225 +subsequent copies and derivative works made from that copy.
   4.226 +
   4.227 +  This option is useful when you wish to copy part of the code of
   4.228 +the Library into a program that is not a library.
   4.229 +
   4.230 +  4. You may copy and distribute the Library (or a portion or
   4.231 +derivative of it, under Section 2) in object code or executable form
   4.232 +under the terms of Sections 1 and 2 above provided that you accompany
   4.233 +it with the complete corresponding machine-readable source code, which
   4.234 +must be distributed under the terms of Sections 1 and 2 above on a
   4.235 +medium customarily used for software interchange.
   4.236 +
   4.237 +  If distribution of object code is made by offering access to copy
   4.238 +from a designated place, then offering equivalent access to copy the
   4.239 +source code from the same place satisfies the requirement to
   4.240 +distribute the source code, even though third parties are not
   4.241 +compelled to copy the source along with the object code.
   4.242 +
   4.243 +  5. A program that contains no derivative of any portion of the
   4.244 +Library, but is designed to work with the Library by being compiled or
   4.245 +linked with it, is called a "work that uses the Library".  Such a
   4.246 +work, in isolation, is not a derivative work of the Library, and
   4.247 +therefore falls outside the scope of this License.
   4.248 +
   4.249 +  However, linking a "work that uses the Library" with the Library
   4.250 +creates an executable that is a derivative of the Library (because it
   4.251 +contains portions of the Library), rather than a "work that uses the
   4.252 +library".  The executable is therefore covered by this License.
   4.253 +Section 6 states terms for distribution of such executables.
   4.254 +
   4.255 +  When a "work that uses the Library" uses material from a header file
   4.256 +that is part of the Library, the object code for the work may be a
   4.257 +derivative work of the Library even though the source code is not.
   4.258 +Whether this is true is especially significant if the work can be
   4.259 +linked without the Library, or if the work is itself a library.  The
   4.260 +threshold for this to be true is not precisely defined by law.
   4.261 +
   4.262 +  If such an object file uses only numerical parameters, data
   4.263 +structure layouts and accessors, and small macros and small inline
   4.264 +functions (ten lines or less in length), then the use of the object
   4.265 +file is unrestricted, regardless of whether it is legally a derivative
   4.266 +work.  (Executables containing this object code plus portions of the
   4.267 +Library will still fall under Section 6.)
   4.268 +
   4.269 +  Otherwise, if the work is a derivative of the Library, you may
   4.270 +distribute the object code for the work under the terms of Section 6.
   4.271 +Any executables containing that work also fall under Section 6,
   4.272 +whether or not they are linked directly with the Library itself.
   4.273 +
   4.274 +  6. As an exception to the Sections above, you may also combine or
   4.275 +link a "work that uses the Library" with the Library to produce a
   4.276 +work containing portions of the Library, and distribute that work
   4.277 +under terms of your choice, provided that the terms permit
   4.278 +modification of the work for the customer's own use and reverse
   4.279 +engineering for debugging such modifications.
   4.280 +
   4.281 +  You must give prominent notice with each copy of the work that the
   4.282 +Library is used in it and that the Library and its use are covered by
   4.283 +this License.  You must supply a copy of this License.  If the work
   4.284 +during execution displays copyright notices, you must include the
   4.285 +copyright notice for the Library among them, as well as a reference
   4.286 +directing the user to the copy of this License.  Also, you must do one
   4.287 +of these things:
   4.288 +
   4.289 +    a) Accompany the work with the complete corresponding
   4.290 +    machine-readable source code for the Library including whatever
   4.291 +    changes were used in the work (which must be distributed under
   4.292 +    Sections 1 and 2 above); and, if the work is an executable linked
   4.293 +    with the Library, with the complete machine-readable "work that
   4.294 +    uses the Library", as object code and/or source code, so that the
   4.295 +    user can modify the Library and then relink to produce a modified
   4.296 +    executable containing the modified Library.  (It is understood
   4.297 +    that the user who changes the contents of definitions files in the
   4.298 +    Library will not necessarily be able to recompile the application
   4.299 +    to use the modified definitions.)
   4.300 +
   4.301 +    b) Use a suitable shared library mechanism for linking with the
   4.302 +    Library.  A suitable mechanism is one that (1) uses at run time a
   4.303 +    copy of the library already present on the user's computer system,
   4.304 +    rather than copying library functions into the executable, and (2)
   4.305 +    will operate properly with a modified version of the library, if
   4.306 +    the user installs one, as long as the modified version is
   4.307 +    interface-compatible with the version that the work was made with.
   4.308 +
   4.309 +    c) Accompany the work with a written offer, valid for at
   4.310 +    least three years, to give the same user the materials
   4.311 +    specified in Subsection 6a, above, for a charge no more
   4.312 +    than the cost of performing this distribution.
   4.313 +
   4.314 +    d) If distribution of the work is made by offering access to copy
   4.315 +    from a designated place, offer equivalent access to copy the above
   4.316 +    specified materials from the same place.
   4.317 +
   4.318 +    e) Verify that the user has already received a copy of these
   4.319 +    materials or that you have already sent this user a copy.
   4.320 +
   4.321 +  For an executable, the required form of the "work that uses the
   4.322 +Library" must include any data and utility programs needed for
   4.323 +reproducing the executable from it.  However, as a special exception,
   4.324 +the materials to be distributed need not include anything that is
   4.325 +normally distributed (in either source or binary form) with the major
   4.326 +components (compiler, kernel, and so on) of the operating system on
   4.327 +which the executable runs, unless that component itself accompanies
   4.328 +the executable.
   4.329 +
   4.330 +  It may happen that this requirement contradicts the license
   4.331 +restrictions of other proprietary libraries that do not normally
   4.332 +accompany the operating system.  Such a contradiction means you cannot
   4.333 +use both them and the Library together in an executable that you
   4.334 +distribute.
   4.335 +
   4.336 +  7. You may place library facilities that are a work based on the
   4.337 +Library side-by-side in a single library together with other library
   4.338 +facilities not covered by this License, and distribute such a combined
   4.339 +library, provided that the separate distribution of the work based on
   4.340 +the Library and of the other library facilities is otherwise
   4.341 +permitted, and provided that you do these two things:
   4.342 +
   4.343 +    a) Accompany the combined library with a copy of the same work
   4.344 +    based on the Library, uncombined with any other library
   4.345 +    facilities.  This must be distributed under the terms of the
   4.346 +    Sections above.
   4.347 +
   4.348 +    b) Give prominent notice with the combined library of the fact
   4.349 +    that part of it is a work based on the Library, and explaining
   4.350 +    where to find the accompanying uncombined form of the same work.
   4.351 +
   4.352 +  8. You may not copy, modify, sublicense, link with, or distribute
   4.353 +the Library except as expressly provided under this License.  Any
   4.354 +attempt otherwise to copy, modify, sublicense, link with, or
   4.355 +distribute the Library is void, and will automatically terminate your
   4.356 +rights under this License.  However, parties who have received copies,
   4.357 +or rights, from you under this License will not have their licenses
   4.358 +terminated so long as such parties remain in full compliance.
   4.359 +
   4.360 +  9. You are not required to accept this License, since you have not
   4.361 +signed it.  However, nothing else grants you permission to modify or
   4.362 +distribute the Library or its derivative works.  These actions are
   4.363 +prohibited by law if you do not accept this License.  Therefore, by
   4.364 +modifying or distributing the Library (or any work based on the
   4.365 +Library), you indicate your acceptance of this License to do so, and
   4.366 +all its terms and conditions for copying, distributing or modifying
   4.367 +the Library or works based on it.
   4.368 +
   4.369 +  10. Each time you redistribute the Library (or any work based on the
   4.370 +Library), the recipient automatically receives a license from the
   4.371 +original licensor to copy, distribute, link with or modify the Library
   4.372 +subject to these terms and conditions.  You may not impose any further
   4.373 +restrictions on the recipients' exercise of the rights granted herein.
   4.374 +You are not responsible for enforcing compliance by third parties with
   4.375 +this License.
   4.376 +
   4.377 +  11. If, as a consequence of a court judgment or allegation of patent
   4.378 +infringement or for any other reason (not limited to patent issues),
   4.379 +conditions are imposed on you (whether by court order, agreement or
   4.380 +otherwise) that contradict the conditions of this License, they do not
   4.381 +excuse you from the conditions of this License.  If you cannot
   4.382 +distribute so as to satisfy simultaneously your obligations under this
   4.383 +License and any other pertinent obligations, then as a consequence you
   4.384 +may not distribute the Library at all.  For example, if a patent
   4.385 +license would not permit royalty-free redistribution of the Library by
   4.386 +all those who receive copies directly or indirectly through you, then
   4.387 +the only way you could satisfy both it and this License would be to
   4.388 +refrain entirely from distribution of the Library.
   4.389 +
   4.390 +If any portion of this section is held invalid or unenforceable under any
   4.391 +particular circumstance, the balance of the section is intended to apply,
   4.392 +and the section as a whole is intended to apply in other circumstances.
   4.393 +
   4.394 +It is not the purpose of this section to induce you to infringe any
   4.395 +patents or other property right claims or to contest validity of any
   4.396 +such claims; this section has the sole purpose of protecting the
   4.397 +integrity of the free software distribution system which is
   4.398 +implemented by public license practices.  Many people have made
   4.399 +generous contributions to the wide range of software distributed
   4.400 +through that system in reliance on consistent application of that
   4.401 +system; it is up to the author/donor to decide if he or she is willing
   4.402 +to distribute software through any other system and a licensee cannot
   4.403 +impose that choice.
   4.404 +
   4.405 +This section is intended to make thoroughly clear what is believed to
   4.406 +be a consequence of the rest of this License.
   4.407 +
   4.408 +  12. If the distribution and/or use of the Library is restricted in
   4.409 +certain countries either by patents or by copyrighted interfaces, the
   4.410 +original copyright holder who places the Library under this License may add
   4.411 +an explicit geographical distribution limitation excluding those countries,
   4.412 +so that distribution is permitted only in or among countries not thus
   4.413 +excluded.  In such case, this License incorporates the limitation as if
   4.414 +written in the body of this License.
   4.415 +
   4.416 +  13. The Free Software Foundation may publish revised and/or new
   4.417 +versions of the Lesser General Public License from time to time.
   4.418 +Such new versions will be similar in spirit to the present version,
   4.419 +but may differ in detail to address new problems or concerns.
   4.420 +
   4.421 +Each version is given a distinguishing version number.  If the Library
   4.422 +specifies a version number of this License which applies to it and
   4.423 +"any later version", you have the option of following the terms and
   4.424 +conditions either of that version or of any later version published by
   4.425 +the Free Software Foundation.  If the Library does not specify a
   4.426 +license version number, you may choose any version ever published by
   4.427 +the Free Software Foundation.
   4.428 +
   4.429 +  14. If you wish to incorporate parts of the Library into other free
   4.430 +programs whose distribution conditions are incompatible with these,
   4.431 +write to the author to ask for permission.  For software which is
   4.432 +copyrighted by the Free Software Foundation, write to the Free
   4.433 +Software Foundation; we sometimes make exceptions for this.  Our
   4.434 +decision will be guided by the two goals of preserving the free status
   4.435 +of all derivatives of our free software and of promoting the sharing
   4.436 +and reuse of software generally.
   4.437 +
   4.438 +			    NO WARRANTY
   4.439 +
   4.440 +  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
   4.441 +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
   4.442 +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
   4.443 +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
   4.444 +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
   4.445 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   4.446 +PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
   4.447 +LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
   4.448 +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
   4.449 +
   4.450 +  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
   4.451 +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
   4.452 +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
   4.453 +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
   4.454 +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
   4.455 +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
   4.456 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
   4.457 +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
   4.458 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
   4.459 +DAMAGES.
   4.460 +
   4.461 +		     END OF TERMS AND CONDITIONS
   4.462 +
   4.463 +           How to Apply These Terms to Your New Libraries
   4.464 +
   4.465 +  If you develop a new library, and you want it to be of the greatest
   4.466 +possible use to the public, we recommend making it free software that
   4.467 +everyone can redistribute and change.  You can do so by permitting
   4.468 +redistribution under these terms (or, alternatively, under the terms of the
   4.469 +ordinary General Public License).
   4.470 +
   4.471 +  To apply these terms, attach the following notices to the library.  It is
   4.472 +safest to attach them to the start of each source file to most effectively
   4.473 +convey the exclusion of warranty; and each file should have at least the
   4.474 +"copyright" line and a pointer to where the full notice is found.
   4.475 +
   4.476 +    <one line to give the library's name and a brief idea of what it does.>
   4.477 +    Copyright (C) <year>  <name of author>
   4.478 +
   4.479 +    This library is free software; you can redistribute it and/or
   4.480 +    modify it under the terms of the GNU Lesser General Public
   4.481 +    License as published by the Free Software Foundation; either
   4.482 +    version 2 of the License, or (at your option) any later version.
   4.483 +
   4.484 +    This library is distributed in the hope that it will be useful,
   4.485 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   4.486 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   4.487 +    Lesser General Public License for more details.
   4.488 +
   4.489 +    You should have received a copy of the GNU Lesser General Public
   4.490 +    License along with this library; if not, write to the Free Software
   4.491 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   4.492 +
   4.493 +Also add information on how to contact you by electronic and paper mail.
   4.494 +
   4.495 +You should also get your employer (if you work as a programmer) or your
   4.496 +school, if any, to sign a "copyright disclaimer" for the library, if
   4.497 +necessary.  Here is a sample; alter the names:
   4.498 +
   4.499 +  Yoyodyne, Inc., hereby disclaims all copyright interest in the
   4.500 +  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
   4.501 +
   4.502 +  <signature of Ty Coon>, 1 April 1990
   4.503 +  Ty Coon, President of Vice
   4.504 +
   4.505 +That's all there is to it!
   4.506 +
   4.507 +
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/tools/ioemu/Changelog	Thu May 19 22:05:02 2005 +0000
     5.3 @@ -0,0 +1,295 @@
     5.4 +version 0.6.1:
     5.5 +
     5.6 +  - Mac OS X port (Pierre d'Herbemont)
     5.7 +  - Virtual console support
     5.8 +  - Better monitor line edition
     5.9 +  - New block device layer 
    5.10 +  - New 'qcow' growable disk image support with AES encryption and
    5.11 +    transparent decompression
    5.12 +  - VMware 3 and 4 read-only disk image support (untested)
    5.13 +  - Support for up to 4 serial ports
    5.14 +  - TFTP server support (Magnus Damm)
    5.15 +  - Port redirection support in user mode networking
    5.16 +  - Support for not executable data sections
    5.17 +  - Compressed loop disk image support (Johannes Schindelin)
    5.18 +  - Level triggered IRQ fix (aka NE2000 PCI performance fix) (Steve
    5.19 +    Wormley)
    5.20 +  - Fixed Fedora Core 2 problems (now you can run qemu without any
    5.21 +    LD_ASSUME_KERNEL tricks on FC2)
    5.22 +  - DHCP fix for Windows (accept DHCPREQUEST alone)
    5.23 +  - SPARC system emulation (Blue Swirl)
    5.24 +  - Automatic Samba configuration for host file access from Windows.
    5.25 +  - '-loadvm' and '-full-screen' options
    5.26 +  - ne2000 savevm support (Johannes Schindelin)
    5.27 +  - Ctrl-Alt is now the default grab key. Ctrl-Alt-[0-9] switches to
    5.28 +    the virtual consoles.
    5.29 +  - BIOS floppy fix for NT4 (Mike Nordell, Derek Fawcus, Volker Ruppert)
    5.30 +  - Floppy fixes for NT4 and NT5 (Mike Nordell)
    5.31 +  - NT4 IDE fixes (Ben Pfaf, Mike Nordell)
    5.32 +  - SDL Audio support and SB16 fixes (malc)
    5.33 +  - ENTER instruction bug fix (initial patch by Stefan Kisdaroczi)
    5.34 +  - VGA font change fix
    5.35 +  - VGA read-only CRTC register fix
    5.36 +
    5.37 +version 0.6.0:
    5.38 +
    5.39 +  - minimalist FPU exception support (NetBSD FPU probe fix)
    5.40 +  - cr0.ET fix (Win95 boot)
    5.41 +  - *BSD port (Markus Niemisto)
    5.42 +  - I/O access fix (signaled by Mark Jonckheere)
    5.43 +  - IDE drives serial number fix (Mike Nordell)
    5.44 +  - int13 CDROM BIOS fix (aka Solaris x86 install CD fix)
    5.45 +  - int15, ah=86 BIOS fix (aka Solaris x86 hardware probe hang up fix)
    5.46 +  - BSR/BSF "undefined behaviour" fix
    5.47 +  - vmdk2raw: convert VMware disk images to raw images
    5.48 +  - PCI support
    5.49 +  - NE2K PCI support
    5.50 +  - dummy VGA PCI support
    5.51 +  - VGA font selection fix (Daniel Serpell)
    5.52 +  - PIC reset fix (Hidemi KAWAI)
    5.53 +  - PIC spurious irq support (aka Solaris install bug)
    5.54 +  - added '-localtime' option
    5.55 +  - Cirrus CL-GD54xx VGA support (initial patch by Makoto Suzuki (suzu))
    5.56 +  - APM and system shutdown support
    5.57 +  - Fixed system reset
    5.58 +  - Support for other PC BIOSes
    5.59 +  - Initial PowerMac hardware emulation
    5.60 +  - PowerMac/PREP OpenFirmware compatible BIOS (Jocelyn Mayer)
    5.61 +  - initial IDE BMDMA support (needed for Darwin x86)
    5.62 +  - Set the default memory size for PC emulation to 128 MB
    5.63 +
    5.64 +version 0.5.5:
    5.65 +
    5.66 +  - SDL full screen support (initial patch by malc)
    5.67 +  - VGA support on PowerPC PREP
    5.68 +  - VBE fixes (Matthew Mastracci)
    5.69 +  - PIT fixes (aka Win98 hardware probe and "VGA slowness" bug)
    5.70 +  - IDE master only fixes (aka Win98 CD-ROM probe bug)
    5.71 +  - ARM load/store half word fix (Ulrich Hecht)
    5.72 +  - FDC fixes for Win98
    5.73 +
    5.74 +version 0.5.4:
    5.75 +  
    5.76 +  - qemu-fast fixes
    5.77 +  - BIOS area protection fix (aka EMM386.EXE fix) (Mike Nordell)
    5.78 +  - keyboard/mouse fix (Mike Nordell)
    5.79 +  - IDE fixes (Linux did not recognized slave drivers)
    5.80 +  - VM86 EIP masking fix (aka NT5 install fix) (Mike Nordell)
    5.81 +  - QEMU can now boot a PowerPC Linux kernel (Jocelyn Mayer)
    5.82 +  - User mode network stack
    5.83 +  - imul imm8 fix + 0x82 opcode support (Hidemi KAWAI)
    5.84 +  - precise self modifying code (aka BeOS install bug)
    5.85 +
    5.86 +version 0.5.3:
    5.87 +
    5.88 +  - added Bochs VESA VBE support
    5.89 +  - VGA memory map mode 3 access fix (OS/2 install fix)
    5.90 +  - IDE fixes (Jens Axboe)
    5.91 +  - CPU interrupt fixes
    5.92 +  - fixed various TLB invalidation cases (NT install)
    5.93 +  - fixed cr0.WP semantics (XP install)
    5.94 +  - direct chaining support for SPARC and PowerPC (faster)
    5.95 +  - ARM NWFPE support (initial patch by Ulrich Hecht)
    5.96 +  - added specific x86 to x86 translator (close to native performance
    5.97 +    in qemu-i386 and qemu-fast)
    5.98 +  - shm syscalls support (Paul McKerras)
    5.99 +  - added accurate CR0.MP/ME/TS emulation
   5.100 +  - fixed DMA memory write access (Win95 boot floppy fix)
   5.101 +  - graphical x86 linux loader
   5.102 +  - command line monitor 
   5.103 +  - generic removable device support
   5.104 +  - support of CD-ROM change
   5.105 +  - multiple network interface support
   5.106 +  - initial x86-64 host support (Gwenole Beauchesne)
   5.107 +  - lret to outer priviledge fix (OS/2 install fix)
   5.108 +  - task switch fixes (SkyOS boot)
   5.109 +  - VM save/restore commands
   5.110 +  - new timer API
   5.111 +  - more precise RTC emulation (periodic timers + time updates)
   5.112 +  - Win32 port (initial patch by Kazu)
   5.113 +
   5.114 +version 0.5.2:
   5.115 +
   5.116 +  - improved soft MMU speed (assembly functions and specializing)
   5.117 +  - improved multitasking speed by avoiding flushing TBs when
   5.118 +    switching tasks
   5.119 +  - improved qemu-fast speed
   5.120 +  - improved self modifying code handling (big performance gain in
   5.121 +    softmmu mode).
   5.122 +  - fixed IO checking
   5.123 +  - fixed CD-ROM detection (win98 install CD)
   5.124 +  - fixed addseg real mode bug (GRUB boot fix)
   5.125 +  - added ROM memory support (win98 boot)
   5.126 +  - fixed 'call Ev' in case of paging exception
   5.127 +  - updated the script 'qemu-binfmt-conf.sh' to use QEMU automagically
   5.128 +    when launching executables for the supported target CPUs.
   5.129 +  - PowerPC system emulation update (Jocelyn Mayer)
   5.130 +  - PC floppy emulation and DMA fixes (Jocelyn Mayer)
   5.131 +  - polled mode for PIC (Jocelyn Mayer)
   5.132 +  - fixed PTE dirty bit handling
   5.133 +  - fixed xadd same reg bug
   5.134 +  - fixed cmpxchg exception safeness
   5.135 +  - access to virtual memory in gdb stub
   5.136 +  - task gate and NT flag fixes
   5.137 +  - eflags optimisation fix for string operations
   5.138 +
   5.139 +version 0.5.1:
   5.140 +  
   5.141 +  - float access fixes when using soft mmu
   5.142 +  - PC emulation support on PowerPC
   5.143 +  - A20 support
   5.144 +  - IDE CD-ROM emulation
   5.145 +  - ARM fixes (Ulrich Hecht)
   5.146 +  - SB16 emulation (malc)
   5.147 +  - IRET and INT fixes in VM86 mode with IOPL=3
   5.148 +  - Port I/Os use TSS io map
   5.149 +  - Full task switching/task gate support
   5.150 +  - added verr, verw, arpl, fcmovxx
   5.151 +  - PowerPC target support (Jocelyn Mayer)
   5.152 +  - Major SPARC target fixes (dynamically linked programs begin to work)
   5.153 +
   5.154 +version 0.5.0:
   5.155 +  
   5.156 +  - full hardware level VGA emulation
   5.157 +  - graphical display with SDL
   5.158 +  - added PS/2 mouse and keyboard emulation
   5.159 +  - popw (%esp) fix
   5.160 +  - mov to/from segment data width fix
   5.161 +  - added real mode support
   5.162 +  - added Bochs BIOS and LGPL'ed VGA BIOS loader in qemu
   5.163 +  - m68k host port (Richard Zidlicky)
   5.164 +  - partial soft MMU support for memory mapped I/Os
   5.165 +  - multi-target build
   5.166 +  - fixed: no error code in hardware interrupts
   5.167 +  - fixed: pop ss, mov ss, x and sti disable hardware irqs for the next insn
   5.168 +  - correct single stepping thru string operations
   5.169 +  - preliminary SPARC target support (Thomas M. Ogrisegg)
   5.170 +  - tun-fd option (Rusty Russell)
   5.171 +  - automatic IDE geometry detection
   5.172 +  - renamed 'vl' to qemu[-fast] and user qemu to qemu-{cpu}.
   5.173 +  - added man page
   5.174 +  - added full soft mmu mode to launch unpatched OSes.
   5.175 +
   5.176 +version 0.4.3:
   5.177 +
   5.178 +  - x86 exception fix in case of nop instruction.
   5.179 +  - gcc 3.2.2 bug workaround (RedHat 9 fix)
   5.180 +  - sparc and Alpha host fixes
   5.181 +  - many ARM target fixes: 'ls' and 'bash' can be launched.
   5.182 +
   5.183 +version 0.4.2:
   5.184 +
   5.185 + - many exception handling fixes (can compile a Linux kernel inside vl)
   5.186 + - IDE emulation support
   5.187 + - initial GDB stub support
   5.188 + - deferred update support for disk images (Rusty Russell)
   5.189 + - accept User Mode Linux Copy On Write disk images
   5.190 + - SMP kernels can at least be booted
   5.191 +
   5.192 +version 0.4.1:
   5.193 +  
   5.194 + - more accurate timer support in vl.
   5.195 + - more reliable NE2000 probe in vl.
   5.196 + - added 2.5.66 kernel in vl-test.
   5.197 + - added VLTMPDIR environment variable in vl.
   5.198 +
   5.199 +version 0.4:
   5.200 +
   5.201 + - initial support for ring 0 x86 processor emulation
   5.202 + - fixed signal handling for correct dosemu DPMI emulation
   5.203 + - fast x86 MMU emulation with mmap()
   5.204 + - fixed popl (%esp) case
   5.205 + - Linux kernel can be executed by QEMU with the 'vl' command.
   5.206 +
   5.207 +version 0.3:
   5.208 +
   5.209 + - initial support for ARM emulation
   5.210 + - added fnsave, frstor, fnstenv, fldenv FPU instructions
   5.211 + - added FPU register save in signal emulation
   5.212 + - initial ARM port
   5.213 + - Sparc and Alpha ports work on the regression test
   5.214 + - generic ioctl number conversion
   5.215 + - fixed ioctl type conversion
   5.216 +
   5.217 +version 0.2:
   5.218 +
   5.219 + - PowerPC disassembly and ELF symbols output (Rusty Russell)
   5.220 + - flock support (Rusty Russell)
   5.221 + - ugetrlimit support (Rusty Russell)
   5.222 + - fstat64 fix (Rusty Russell)
   5.223 + - initial Alpha port (Falk Hueffner)
   5.224 + - initial IA64 port (Matt Wilson)
   5.225 + - initial Sparc and Sparc64 port (David S. Miller)
   5.226 + - added HLT instruction
   5.227 + - LRET instruction fix.
   5.228 + - added GPF generation for I/Os.
   5.229 + - added INT3 and TF flag support.
   5.230 + - SHL instruction C flag fix.
   5.231 + - mmap emulation for host page size > 4KB
   5.232 + - self-modifying code support
   5.233 + - better VM86 support (dosemu works on non trivial programs)
   5.234 + - precise exception support (EIP is computed correctly in most cases)
   5.235 + - more precise LDT/GDT/IDT emulation
   5.236 + - faster segment load in vm86 mode
   5.237 + - direct chaining of basic blocks (faster emulation)
   5.238 +
   5.239 +version 0.1.6:
   5.240 +
   5.241 + - automatic library search system. QEMU can now work with unpatched
   5.242 +   ELF dynamic loader and libc (Rusty Russell).
   5.243 + - ISO C warning fixes (Alistair Strachan)
   5.244 + - first self-virtualizable version (works only as long as the
   5.245 +   translation cache is not flushed)
   5.246 + - RH9 fixes
   5.247 +
   5.248 +version 0.1.5:
   5.249 +
   5.250 + - ppc64 support + personality() patch (Rusty Russell)
   5.251 + - first Alpha CPU patches (Falk Hueffner)
   5.252 + - removed bfd.h dependancy
   5.253 + - fixed shrd, shld, idivl and divl on PowerPC.
   5.254 + - fixed buggy glibc PowerPC rint() function (test-i386 passes now on PowerPC).
   5.255 +
   5.256 +version 0.1.4:
   5.257 +
   5.258 + - more accurate VM86 emulation (can launch small DOS 16 bit
   5.259 +   executables in wine).
   5.260 + - fixed push/pop fs/gs
   5.261 + - added iret instruction.
   5.262 + - added times() syscall and SIOCATMARK ioctl.
   5.263 +
   5.264 +version 0.1.3:
   5.265 +
   5.266 + - S390 support (Ulrich Weigand)
   5.267 + - glibc 2.3.x compile fix (Ulrich Weigand)
   5.268 + - socketcall endian fix (Ulrich Weigand)
   5.269 + - struct sockaddr endian fix (Ulrich Weigand)
   5.270 + - sendmsg/recvmsg endian fix (Ulrich Weigand)
   5.271 + - execve endian fix (Ulrich Weigand)
   5.272 + - fdset endian fix (Ulrich Weigand)
   5.273 + - partial setsockopt syscall support (Ulrich Weigand)
   5.274 + - more accurate pushf/popf emulation
   5.275 + - first partial vm86() syscall support (can be used with runcom example).
   5.276 + - added bound, cmpxchg8b, cpuid instructions
   5.277 + - added 16 bit addressing support/override for string operations
   5.278 + - poll() fix
   5.279 + 
   5.280 +version 0.1.2:
   5.281 +
   5.282 + - compile fixes
   5.283 + - xlat instruction
   5.284 + - xchg instruction memory lock
   5.285 + - added simple vm86 example (not working with QEMU yet). The 54 byte
   5.286 +   DOS executable 'pi_10.com' program was released by Bertram
   5.287 +   Felgenhauer (more information at http://www.boo.net/~jasonp/pipage.html).
   5.288 +
   5.289 +version 0.1.1:
   5.290 +
   5.291 + - glibc 2.2 compilation fixes
   5.292 + - added -s and -L options
   5.293 + - binary distribution of x86 glibc and wine
   5.294 + - big endian fixes in ELF loader and getdents.
   5.295 +
   5.296 +version 0.1:
   5.297 +
   5.298 + - initial public release.
     6.1 --- a/tools/ioemu/Makefile	Thu May 19 21:53:44 2005 +0000
     6.2 +++ b/tools/ioemu/Makefile	Thu May 19 22:05:02 2005 +0000
     6.3 @@ -1,19 +1,136 @@
     6.4 -# Order is important!
     6.5 -SUBDIRS=gui memory iodev
     6.6 -
     6.7 -.PHONY: all clean install
     6.8 +-include config-host.mak
     6.9  
    6.10 -all:
    6.11 -	@for subdir in $(SUBDIRS); do 				\
    6.12 -		$(MAKE) -C $$subdir $(MAKEDEFS) $@ || exit -1; 	\
    6.13 -	done
    6.14 +CFLAGS=-Wall -O2 -g -fno-strict-aliasing 
    6.15 +ifdef CONFIG_DARWIN
    6.16 +CFLAGS+= -mdynamic-no-pic
    6.17 +endif
    6.18 +ifdef CONFIG_WIN32
    6.19 +CFLAGS+=-fpack-struct 
    6.20 +endif
    6.21 +LDFLAGS=-g
    6.22 +LIBS=
    6.23 +DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
    6.24 +TOOLS=qemu-img
    6.25 +ifdef CONFIG_STATIC
    6.26 +LDFLAGS+=-static
    6.27 +endif
    6.28 +DOCS=qemu-doc.html qemu-tech.html qemu.1
    6.29 +
    6.30 +all: $(DOCS) HEADERS
    6.31 +	for d in $(TARGET_DIRS); do \
    6.32 +	$(MAKE) -C $$d $@ || exit 1 ; \
    6.33 +        done
    6.34 +
    6.35 +qemu-img: qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c
    6.36 +	$(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS)
    6.37 +
    6.38 +dyngen$(EXESUF): dyngen.c
    6.39 +	$(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
    6.40  
    6.41  clean:
    6.42 -	@for subdir in $(SUBDIRS); do 				\
    6.43 -		$(MAKE) -C $$subdir $(MAKEDEFS) $@ || exit -1; 	\
    6.44 -	done
    6.45 +# avoid old build problems by removing potentially incorrect old files
    6.46 +	rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h 
    6.47 +	rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS qemu.pod *~ */*~
    6.48 +	$(MAKE) -C tests clean
    6.49 +	for d in $(TARGET_DIRS); do \
    6.50 +	$(MAKE) -C $$d $@ || exit 1 ; \
    6.51 +        done
    6.52 +
    6.53 +distclean: clean
    6.54 +	rm -f config-host.mak config-host.h
    6.55 +	rm -f keysym_adapter_sdl.h keysym_adapter_vnc.h
    6.56 +	for d in $(TARGET_DIRS); do \
    6.57 +	rm -rf $$d || exit 1 ; \
    6.58 +        done
    6.59 +
    6.60 +KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
    6.61 +ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
    6.62 +common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr
    6.63 +
    6.64 +install: all 
    6.65 +	mkdir -p "$(bindir)"
    6.66 +ifndef CONFIG_WIN32
    6.67 +#	install -m 755 -s $(TOOLS) "$(bindir)"
    6.68 +endif
    6.69 +	mkdir -p "$(DESTDIR)/$(datadir)"
    6.70 +	install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \
    6.71 +                       pc-bios/vgabios-cirrus.bin \
    6.72 +                       pc-bios/ppc_rom.bin \
    6.73 +                       pc-bios/proll.bin \
    6.74 +                       pc-bios/linux_boot.bin "$(DESTDIR)/$(datadir)"
    6.75 +	mkdir -p "$(DESTDIR)/$(docdir)"
    6.76 +	install -m 644 qemu-doc.html  qemu-tech.html "$(DESTDIR)/$(docdir)"
    6.77 +ifndef CONFIG_WIN32
    6.78 +	mkdir -p "$(DESTDIR)/$(mandir)/man1"
    6.79 +	install qemu.1 qemu-mkcow.1 "$(DESTDIR)/$(mandir)/man1"
    6.80 +	mkdir -p "$(DESTDIR)/$(datadir)/keymaps"
    6.81 +	install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(DESTDIR)/$(datadir)/keymaps"
    6.82 +endif
    6.83 +	for d in $(TARGET_DIRS); do \
    6.84 +	$(MAKE) -C $$d $@ || exit 1 ; \
    6.85 +        done
    6.86 +
    6.87 +# various test targets
    6.88 +test speed test2: all
    6.89 +	$(MAKE) -C tests $@
    6.90 +
    6.91 +TAGS: 
    6.92 +	etags *.[ch] tests/*.[ch]
    6.93 +
    6.94 +# documentation
    6.95 +%.html: %.texi
    6.96 +	texi2html -monolithic -number $<
    6.97  
    6.98 -install:
    6.99 -	@for subdir in $(SUBDIRS); do 				\
   6.100 -		$(MAKE) -C $$subdir $(MAKEDEFS) $@ || exit -1; 	\
   6.101 -	done
   6.102 +qemu.1: qemu-doc.texi
   6.103 +	./texi2pod.pl $< qemu.pod
   6.104 +	pod2man --section=1 --center=" " --release=" " qemu.pod > $@
   6.105 +
   6.106 +FILE=qemu-$(shell cat VERSION)
   6.107 +
   6.108 +# tar release (use 'make -k tar' on a checkouted tree)
   6.109 +tar:
   6.110 +	rm -rf /tmp/$(FILE)
   6.111 +	cp -r . /tmp/$(FILE)
   6.112 +	( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
   6.113 +	rm -rf /tmp/$(FILE)
   6.114 +
   6.115 +# generate a binary distribution
   6.116 +tarbin:
   6.117 +	( cd $(DESTDIR) ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
   6.118 +	$(DESTDIR)/$(bindir)/qemu $(DESTDIR)/$(bindir)/qemu-fast \
   6.119 +	$(DESTDIR)/$(bindir)/qemu-system-ppc \
   6.120 +	$(DESTDIR)/$(bindir)/qemu-i386 \
   6.121 +        $(DESTDIR)/$(bindir)/qemu-arm \
   6.122 +        $(DESTDIR)/$(bindir)/qemu-sparc \
   6.123 +        $(DESTDIR)/$(bindir)/qemu-ppc \
   6.124 +	$(DESTDIR)/$(datadir)/bios.bin \
   6.125 +	$(DESTDIR)/$(datadir)/vgabios.bin \
   6.126 +	$(DESTDIR)/$(datadir)/vgabios-cirrus.bin \
   6.127 +	$(DESTDIR)/$(datadir)/ppc_rom.bin \
   6.128 +	$(DESTDIR)/$(datadir)/proll.bin \
   6.129 +	$(DESTDIR)/$(datadir)/linux_boot.bin \
   6.130 +	$(DESTDIR)/$(docdir)/qemu-doc.html \
   6.131 +	$(DESTDIR)/$(docdir)/qemu-tech.html \
   6.132 +	$(DESTDIR)/$(mandir)/man1/qemu.1 $(DESTDIR)/$(mandir)/man1/qemu-mkcow.1 )
   6.133 +
   6.134 +ifneq ($(wildcard .depend),)
   6.135 +include .depend
   6.136 +endif
   6.137 +
   6.138 +HEADERS:
   6.139 +
   6.140 +ifdef CONFIG_SDL
   6.141 +HEADERS: keysym_adapter_sdl.h
   6.142 +endif
   6.143 +
   6.144 +ifdef CONFIG_VNC
   6.145 +HEADERS: keysym_adapter_vnc.h
   6.146 +endif
   6.147 +
   6.148 +keysym_adapter_sdl.h: Makefile create_keysym_header.sh
   6.149 +	sh create_keysym_header.sh sdl "$(SDL_CFLAGS)"
   6.150 +
   6.151 +keysym_adapter_vnc.h: Makefile create_keysym_header.sh
   6.152 +	sh create_keysym_header.sh vnc "$(VNC_CFLAGS)"
   6.153 +
   6.154 +
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/tools/ioemu/Makefile.target	Thu May 19 22:05:02 2005 +0000
     7.3 @@ -0,0 +1,392 @@
     7.4 +include config.mak
     7.5 +
     7.6 +#assume we directly put qemu code in tools/, same level as bochs dm(ioemu)
     7.7 +XEN_PATH=../../..
     7.8 +TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH)
     7.9 +VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
    7.10 +DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH) -I$(XEN_PATH)/xen/include/public
    7.11 +DEFINES+= -I$(XEN_PATH)/tools/libxc
    7.12 +ifdef CONFIG_USER_ONLY
    7.13 +VPATH+=:$(SRC_PATH)/linux-user
    7.14 +DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
    7.15 +endif
    7.16 +CFLAGS=-Wall -O2 -g -fno-strict-aliasing
    7.17 +LDFLAGS=-g
    7.18 +LIBS=
    7.19 +HELPER_CFLAGS=$(CFLAGS)
    7.20 +DYNGEN=../dyngen$(EXESUF)
    7.21 +# user emulator name
    7.22 +QEMU_USER=qemu-$(TARGET_ARCH)
    7.23 +# system emulator name
    7.24 +ifdef CONFIG_SOFTMMU
    7.25 +ifeq ($(TARGET_ARCH), i386)
    7.26 +QEMU_SYSTEM=qemu$(EXESUF)
    7.27 +else
    7.28 +QEMU_SYSTEM=qemu-system-$(TARGET_ARCH)$(EXESUF)
    7.29 +endif
    7.30 +else
    7.31 +QEMU_SYSTEM=qemu-fast
    7.32 +endif
    7.33 +
    7.34 +QEMU_SYSTEM=qemu-dm
    7.35 +PROGS=$(QEMU_SYSTEM)
    7.36 +
    7.37 +ifdef CONFIG_USER_ONLY
    7.38 +PROGS=$(QEMU_USER)
    7.39 +else
    7.40 +ifeq ($(TARGET_ARCH), i386)
    7.41 +
    7.42 +ifeq ($(ARCH), i386)
    7.43 +PROGS+=$(QEMU_SYSTEM)
    7.44 +ifndef CONFIG_SOFTMMU
    7.45 +CONFIG_STATIC=y
    7.46 +endif
    7.47 +else
    7.48 +# the system emulator using soft mmu is portable
    7.49 +ifdef CONFIG_SOFTMMU
    7.50 +PROGS+=$(QEMU_SYSTEM)
    7.51 +endif
    7.52 +endif # ARCH != i386
    7.53 +
    7.54 +endif # TARGET_ARCH = i386
    7.55 +
    7.56 +ifeq ($(TARGET_ARCH), ppc)
    7.57 +
    7.58 +ifeq ($(ARCH), ppc)
    7.59 +PROGS+=$(QEMU_SYSTEM)
    7.60 +endif
    7.61 +
    7.62 +ifeq ($(ARCH), i386)
    7.63 +ifdef CONFIG_SOFTMMU
    7.64 +PROGS+=$(QEMU_SYSTEM)
    7.65 +endif
    7.66 +endif # ARCH = i386
    7.67 +
    7.68 +ifeq ($(ARCH), amd64)
    7.69 +ifdef CONFIG_SOFTMMU
    7.70 +PROGS+=$(QEMU_SYSTEM)
    7.71 +endif
    7.72 +endif # ARCH = amd64
    7.73 +
    7.74 +endif # TARGET_ARCH = ppc
    7.75 +
    7.76 +ifeq ($(TARGET_ARCH), sparc)
    7.77 +
    7.78 +ifeq ($(ARCH), ppc)
    7.79 +PROGS+=$(QEMU_SYSTEM)
    7.80 +endif
    7.81 +
    7.82 +ifeq ($(ARCH), i386)
    7.83 +ifdef CONFIG_SOFTMMU
    7.84 +PROGS+=$(QEMU_SYSTEM)
    7.85 +endif
    7.86 +endif # ARCH = i386
    7.87 +
    7.88 +ifeq ($(ARCH), amd64)
    7.89 +ifdef CONFIG_SOFTMMU
    7.90 +PROGS+=$(QEMU_SYSTEM)
    7.91 +endif
    7.92 +endif # ARCH = amd64
    7.93 +
    7.94 +endif # TARGET_ARCH = sparc
    7.95 +endif # !CONFIG_USER_ONLY
    7.96 +
    7.97 +ifdef CONFIG_STATIC
    7.98 +LDFLAGS+=-static
    7.99 +endif
   7.100 +
   7.101 +ifeq ($(ARCH),i386)
   7.102 +CFLAGS+=-fomit-frame-pointer
   7.103 +OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2
   7.104 +ifeq ($(HAVE_GCC3_OPTIONS),yes)
   7.105 +OP_CFLAGS+= -falign-functions=0 -fno-gcse
   7.106 +else
   7.107 +OP_CFLAGS+= -malign-functions=0
   7.108 +endif
   7.109 +
   7.110 +ifdef TARGET_GPROF
   7.111 +USE_I386_LD=y
   7.112 +endif
   7.113 +ifdef CONFIG_STATIC
   7.114 +USE_I386_LD=y
   7.115 +endif
   7.116 +ifdef USE_I386_LD
   7.117 +LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386.ld
   7.118 +else
   7.119 +# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
   7.120 +# that the kernel ELF loader considers as an executable. I think this
   7.121 +# is the simplest way to make it self virtualizable!
   7.122 +LDFLAGS+=-Wl,-shared
   7.123 +endif
   7.124 +endif
   7.125 +
   7.126 +ifeq ($(ARCH),amd64)
   7.127 +OP_CFLAGS=$(CFLAGS) -falign-functions=0
   7.128 +LDFLAGS+=-Wl,-T,$(SRC_PATH)/amd64.ld
   7.129 +endif
   7.130 +
   7.131 +ifeq ($(ARCH),ppc)
   7.132 +CFLAGS+= -D__powerpc__
   7.133 +OP_CFLAGS=$(CFLAGS)
   7.134 +LDFLAGS+=-Wl,-T,$(SRC_PATH)/ppc.ld
   7.135 +endif
   7.136 +
   7.137 +ifeq ($(ARCH),s390)
   7.138 +OP_CFLAGS=$(CFLAGS)
   7.139 +LDFLAGS+=-Wl,-T,$(SRC_PATH)/s390.ld
   7.140 +endif
   7.141 +
   7.142 +ifeq ($(ARCH),sparc)
   7.143 +CFLAGS+=-m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6
   7.144 +LDFLAGS+=-m32
   7.145 +OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0
   7.146 +HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat
   7.147 +# -static is used to avoid g1/g3 usage by the dynamic linker
   7.148 +LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc.ld -static
   7.149 +endif
   7.150 +
   7.151 +ifeq ($(ARCH),sparc64)
   7.152 +CFLAGS+=-m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6
   7.153 +LDFLAGS+=-m64
   7.154 +OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0
   7.155 +endif
   7.156 +
   7.157 +ifeq ($(ARCH),alpha)
   7.158 +# -msmall-data is not used because we want two-instruction relocations
   7.159 +# for the constant constructions
   7.160 +OP_CFLAGS=-Wall -O2 -g
   7.161 +# Ensure there's only a single GP
   7.162 +CFLAGS += -msmall-data
   7.163 +LDFLAGS+=-Wl,-T,$(SRC_PATH)/alpha.ld
   7.164 +endif
   7.165 +
   7.166 +ifeq ($(ARCH),ia64)
   7.167 +OP_CFLAGS=$(CFLAGS)
   7.168 +endif
   7.169 +
   7.170 +ifeq ($(ARCH),arm)
   7.171 +OP_CFLAGS=$(CFLAGS) -mno-sched-prolog
   7.172 +LDFLAGS+=-Wl,-T,$(SRC_PATH)/arm.ld
   7.173 +endif
   7.174 +
   7.175 +ifeq ($(ARCH),m68k)
   7.176 +OP_CFLAGS=$(CFLAGS) -fomit-frame-pointer
   7.177 +LDFLAGS+=-Wl,-T,m68k.ld
   7.178 +endif
   7.179 +
   7.180 +ifeq ($(HAVE_GCC3_OPTIONS),yes)
   7.181 +# very important to generate a return at the end of every operation
   7.182 +OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls
   7.183 +endif
   7.184 +
   7.185 +ifeq ($(CONFIG_DARWIN),yes)
   7.186 +OP_CFLAGS+= -mdynamic-no-pic
   7.187 +endif
   7.188 +
   7.189 +#########################################################
   7.190 +
   7.191 +DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
   7.192 +LIBS+=-lm -L$(XEN_PATH)/dist/install/usr/$(LIBDIR) -lxc -lxutil
   7.193 +ifndef CONFIG_USER_ONLY
   7.194 +LIBS+=-lz
   7.195 +endif
   7.196 +ifdef CONFIG_WIN32
   7.197 +LIBS+=-lwinmm -lws2_32 -liphlpapi
   7.198 +endif
   7.199 +
   7.200 +# profiling code
   7.201 +ifdef TARGET_GPROF
   7.202 +LDFLAGS+=-p
   7.203 +main.o: CFLAGS+=-p
   7.204 +endif
   7.205 +
   7.206 +OBJS= elfload.o main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o 
   7.207 +ifeq ($(TARGET_ARCH), i386)
   7.208 +OBJS+= vm86.o
   7.209 +endif
   7.210 +ifeq ($(TARGET_ARCH), arm)
   7.211 +OBJS+=nwfpe/softfloat.o nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \
   7.212 +nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \
   7.213 + nwfpe/double_cpdo.o nwfpe/extended_cpdo.o
   7.214 +endif
   7.215 +SRCS:= $(OBJS:.o=.c)
   7.216 +OBJS+= libqemu.a
   7.217 +
   7.218 +# cpu emulator library
   7.219 +LIBOBJS=
   7.220 +
   7.221 +ifeq ($(TARGET_ARCH), i386)
   7.222 +LIBOBJS+= helper2.o
   7.223 +ifeq ($(ARCH), i386)
   7.224 +LIBOBJS+=translate-copy.o
   7.225 +endif
   7.226 +endif
   7.227 +
   7.228 +ifeq ($(TARGET_ARCH), ppc)
   7.229 +LIBOBJS+= op_helper.o helper.o
   7.230 +endif
   7.231 +
   7.232 +ifeq ($(TARGET_ARCH), sparc)
   7.233 +LIBOBJS+= op_helper.o helper.o
   7.234 +endif
   7.235 +
   7.236 +all: $(PROGS)
   7.237 +
   7.238 +$(QEMU_USER): $(OBJS)
   7.239 +	$(CC) $(LDFLAGS) -o $@ $^  $(LIBS)
   7.240 +ifeq ($(ARCH),alpha)
   7.241 +# Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
   7.242 +# the address space (31 bit so sign extending doesn't matter)
   7.243 +	echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc
   7.244 +endif
   7.245 +
   7.246 +# must use static linking to avoid leaving stuff in virtual address space
   7.247 +VL_OBJS=vl.o exec.o monitor.o osdep.o block.o readline.o pci.o console.o 
   7.248 +#VL_OBJS+=block-cow.o block-qcow.o block-vmdk.o block-cloop.o
   7.249 +VL_OBJS+= block-cloop.o
   7.250 +
   7.251 +SOUND_HW = sb16.o
   7.252 +AUDIODRV = audio.o noaudio.o wavaudio.o
   7.253 +ifdef CONFIG_SDL
   7.254 +AUDIODRV += sdlaudio.o
   7.255 +endif
   7.256 +ifdef CONFIG_OSS
   7.257 +AUDIODRV += ossaudio.o
   7.258 +endif
   7.259 +
   7.260 +pc.o: DEFINES := -DUSE_SB16 $(DEFINES)
   7.261 +
   7.262 +ifdef CONFIG_ADLIB
   7.263 +SOUND_HW += fmopl.o adlib.o
   7.264 +endif
   7.265 +
   7.266 +ifdef CONFIG_FMOD
   7.267 +AUDIODRV += fmodaudio.o
   7.268 +audio.o fmodaudio.o: DEFINES := -I$(CONFIG_FMOD_INC) $(DEFINES)
   7.269 +LIBS += $(CONFIG_FMOD_LIB)
   7.270 +endif
   7.271 +
   7.272 +# Hardware support
   7.273 +VL_OBJS+= ide.o ne2000.o pckbd.o vga.o dma.o
   7.274 +VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o
   7.275 +
   7.276 +ifeq ($(TARGET_ARCH), ppc)
   7.277 +VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
   7.278 +VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o
   7.279 +VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o mixeng.o
   7.280 +endif
   7.281 +ifeq ($(TARGET_ARCH), sparc)
   7.282 +VL_OBJS+= sun4m.o tcx.o lance.o iommu.o sched.o m48t08.o magic-load.o timer.o
   7.283 +endif
   7.284 +ifdef CONFIG_GDBSTUB
   7.285 +VL_OBJS+=gdbstub.o 
   7.286 +endif
   7.287 +ifdef CONFIG_VNC
   7.288 +VL_OBJS+=vnc.o
   7.289 +endif
   7.290 +ifdef CONFIG_SDL
   7.291 +VL_OBJS+=sdl.o
   7.292 +endif
   7.293 +ifdef CONFIG_SLIRP
   7.294 +DEFINES+=-I$(SRC_PATH)/slirp
   7.295 +SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \
   7.296 +slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \
   7.297 +tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o
   7.298 +VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJS))
   7.299 +endif
   7.300 +
   7.301 +VL_LDFLAGS=
   7.302 +# specific flags are needed for non soft mmu emulator
   7.303 +ifdef CONFIG_STATIC
   7.304 +VL_LDFLAGS+=-static
   7.305 +endif
   7.306 +ifndef CONFIG_SOFTMMU
   7.307 +VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386-vl.ld
   7.308 +endif
   7.309 +ifndef CONFIG_DARWIN
   7.310 +ifndef CONFIG_WIN32
   7.311 +VL_LIBS=-lutil
   7.312 +endif
   7.313 +endif
   7.314 +
   7.315 +$(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
   7.316 +	$(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(VNC_LIBS) $(VL_LIBS)
   7.317 +
   7.318 +vnc.o: vnc.c keyboard_rdesktop.c
   7.319 +	$(CC) $(CFLAGS) $(DEFINES) $(VNC_CFLAGS) -c -o $@ $<
   7.320 +
   7.321 +sdl.o: sdl.c keyboard_rdesktop.c
   7.322 +	$(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $<
   7.323 +
   7.324 +sdlaudio.o: sdlaudio.c
   7.325 +	$(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $<
   7.326 +
   7.327 +depend: $(SRCS)
   7.328 +	$(CC) -MM $(CFLAGS) $(DEFINES) $^ 1>.depend
   7.329 +
   7.330 +# libqemu 
   7.331 +
   7.332 +libqemu.a: $(LIBOBJS)
   7.333 +	rm -f $@
   7.334 +	$(AR) rcs $@ $(LIBOBJS)
   7.335 +
   7.336 +translate.o: translate.c gen-op.h opc.h cpu.h
   7.337 +
   7.338 +translate-all.o: translate-all.c op.h opc.h cpu.h
   7.339 +
   7.340 +op.h: op.o $(DYNGEN)
   7.341 +	$(DYNGEN) -o $@ $<
   7.342 +
   7.343 +opc.h: op.o $(DYNGEN)
   7.344 +	$(DYNGEN) -c -o $@ $<
   7.345 +
   7.346 +gen-op.h: op.o $(DYNGEN)
   7.347 +	$(DYNGEN) -g -o $@ $<
   7.348 +
   7.349 +op.o: op.c
   7.350 +	$(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $<
   7.351 +
   7.352 +helper.o: helper.c
   7.353 +	$(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $<
   7.354 +
   7.355 +ifeq ($(TARGET_ARCH), i386)
   7.356 +op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h
   7.357 +endif
   7.358 +
   7.359 +ifeq ($(TARGET_ARCH), arm)
   7.360 +op.o: op.c op_template.h
   7.361 +endif
   7.362 +
   7.363 +ifeq ($(TARGET_ARCH), sparc)
   7.364 +op.o: op.c op_template.h op_mem.h
   7.365 +endif
   7.366 +
   7.367 +ifeq ($(TARGET_ARCH), ppc)
   7.368 +op.o: op.c op_template.h op_mem.h
   7.369 +op_helper.o: op_helper_mem.h
   7.370 +endif
   7.371 +
   7.372 +mixeng.o: mixeng.c mixeng.h mixeng_template.h
   7.373 +
   7.374 +%.o: %.c
   7.375 +	$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
   7.376 +
   7.377 +%.o: %.S
   7.378 +	$(CC) $(DEFINES) -c -o $@ $<
   7.379 +
   7.380 +clean:
   7.381 +	rm -rf *.o  *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe slirp qemu-vgaram-bin
   7.382 +
   7.383 +install: all 
   7.384 +	if [ ! -d $(DESTDIR)$(bindir) ];then mkdir -p $(DESTDIR)$(bindir);fi
   7.385 +	if [ ! -d $(DESTDIR)$(configdir) ];then mkdir -p $(DESTDIR)$(configdir);fi
   7.386 +ifneq ($(PROGS),)
   7.387 +	install -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
   7.388 +endif
   7.389 +	install -m 755 device-model "$(DESTDIR)$(bindir)"
   7.390 +	install -m 755 qemu-ifup "$(DESTDIR)$(configdir)"
   7.391 +	gunzip -c qemu-vgaram-bin.gz >qemu-vgaram-bin 
   7.392 +	install -m 755 qemu-vgaram-bin "$(DESTDIR)$(configdir)"
   7.393 +ifneq ($(wildcard .depend),)
   7.394 +include .depend
   7.395 +endif
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/tools/ioemu/README	Thu May 19 22:05:02 2005 +0000
     8.3 @@ -0,0 +1,61 @@
     8.4 +The QEMU x86 emulator
     8.5 +---------------------
     8.6 +
     8.7 +INSTALLATION
     8.8 +------------
     8.9 +
    8.10 +Type 
    8.11 +
    8.12 +    ./configure
    8.13 +    make
    8.14 +
    8.15 +to build qemu, qemu-CPU and libqemu.a (CPU is the name of the various
    8.16 +supported target CPUs).
    8.17 +
    8.18 +Type
    8.19 +
    8.20 +    make install
    8.21 +
    8.22 +to install QEMU in /usr/local
    8.23 +
    8.24 +Tested tool versions
    8.25 +--------------------
    8.26 +
    8.27 +In order to compile QEMU succesfully, it is very important that you
    8.28 +have the right tools. The most important one is gcc. I cannot guaranty
    8.29 +that QEMU works if you do not use a tested gcc version. Look at
    8.30 +'configure' and 'Makefile' if you want to make a different gcc
    8.31 +version work.
    8.32 +
    8.33 +host      gcc      binutils      glibc    linux       distribution
    8.34 +----------------------------------------------------------------------
    8.35 +x86       2.95.2   2.13.2        2.1.3    2.4.18           
    8.36 +          3.2      2.13.2        2.1.3    2.4.18
    8.37 +          2.96     2.11.93.0.2   2.2.5    2.4.18      Red Hat 7.3
    8.38 +          3.2.2    2.13.90.0.18  2.3.2    2.4.20      Red Hat 9
    8.39 +
    8.40 +PowerPC   3.3 [4]  2.13.90.0.18  2.3.1    2.4.20briq
    8.41 +          3.2
    8.42 +
    8.43 +Alpha     3.3 [1]  2.14.90.0.4   2.2.5    2.2.20 [2]  Debian 3.0
    8.44 +
    8.45 +Sparc32   2.95.4   2.12.90.0.1   2.2.5    2.4.18      Debian 3.0
    8.46 +
    8.47 +ARM       2.95.4   2.12.90.0.1   2.2.5    2.4.9 [3]   Debian 3.0
    8.48 +
    8.49 +[1] On Alpha, QEMU needs the gcc 'visibility' attribute only available
    8.50 +    for gcc version >= 3.3.
    8.51 +[2] Linux >= 2.4.20 is necessary for precise exception support
    8.52 +    (untested).
    8.53 +[3] 2.4.9-ac10-rmk2-np1-cerf2
    8.54 +
    8.55 +[4] gcc 2.95.x generates invalid code when using too many register
    8.56 +variables. You must use gcc 3.x on PowerPC.
    8.57 +
    8.58 +Documentation
    8.59 +-------------
    8.60 +
    8.61 +Read the documentation in qemu-doc.html.
    8.62 +
    8.63 +
    8.64 +Fabrice Bellard.
    8.65 \ No newline at end of file
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/tools/ioemu/README.distrib	Thu May 19 22:05:02 2005 +0000
     9.3 @@ -0,0 +1,16 @@
     9.4 +Information about the various packages used to build the current qemu
     9.5 +x86 binary distribution:
     9.6 +
     9.7 +* gcc 2.95.2 was used for the build. A glibc 2.1.3 Debian distribution
     9.8 +  was used to get most of the binary packages.
     9.9 +
    9.10 +* wine-20020411 tarball
    9.11 +
    9.12 +  ./configure --prefix=/usr/local/wine-i386
    9.13 +  
    9.14 +  All exe and libs were stripped. Some compile time tools and the
    9.15 +  includes were deleted.
    9.16 +
    9.17 +* ldconfig was launched to build the library links:
    9.18 +
    9.19 +  qemu-i386 /usr/gnemul/qemu-i386/bin/ldconfig-i386 -C /usr/gnemul/qemu-i386/etc/ld.so.cache
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/tools/ioemu/TODO	Thu May 19 22:05:02 2005 +0000
    10.3 @@ -0,0 +1,66 @@
    10.4 +short term:
    10.5 +----------
    10.6 +- debug option in 'configure' script + disable -fomit-frame-pointer
    10.7 +- Solaris display error with Cirrus VGA
    10.8 +  (http://lists.gnu.org/archive/html/qemu-devel/2004-10/msg00390.html).
    10.9 +- Precise VGA timings for old games/demos (malc patch)
   10.10 +- merge PIC spurious interrupt patch
   10.11 +- merge VNC keyboard patch
   10.12 +- merge Solaris patch
   10.13 +- merge ARM patches + self modifying code patch (Paul Brook)
   10.14 +- warning for OS/2: must not use 128 MB memory
   10.15 +- config file (at least for windows/Mac OS X)
   10.16 +- commit message if execution of code in IO memory
   10.17 +- update doc: PCI infos.
   10.18 +- VNC patch + Synaptic patch.
   10.19 +- basic VGA optimizations
   10.20 +- test sysenter/sysexit and fxsr for L4 pistachio 686
   10.21 +- physical memory cache (reduce qemu-fast address space size to about 32 MB)
   10.22 +- better code fetch (different exception handling + CS.limit support)
   10.23 +- do not resize vga if invalid size.
   10.24 +- avoid looping if only exceptions
   10.25 +- cycle counter for all archs
   10.26 +- TLB code protection support for PPC
   10.27 +- see openMosix Doc 
   10.28 +- disable SMC handling for ARM/SPARC/PPC (not finished)
   10.29 +- see undefined flags for BTx insn
   10.30 +- user/kernel PUSHL/POPL in helper.c
   10.31 +- keyboard output buffer filling timing emulation
   10.32 +- return UD exception if LOCK prefix incorrectly used
   10.33 +- test ldt limit < 7 ?
   10.34 +- tests for each target CPU
   10.35 +- fix CCOP optimisation
   10.36 +- fix all remaining thread lock issues (must put TBs in a specific invalid
   10.37 +  state, find a solution for tb_flush()).
   10.38 +- fix arm fpu rounding (at least for float->integer conversions)
   10.39 +- SMP support
   10.40 +
   10.41 +ppc specific:
   10.42 +------------
   10.43 +- TLB invalidate not needed if msr_pr changes
   10.44 +- endianness bugs in do_load_fpscr and do_store_fpscr
   10.45 +- SPR_ENCODE() not useful
   10.46 +- enable shift optimizations ?
   10.47 +
   10.48 +lower priority:
   10.49 +--------------
   10.50 +- more friendly BIOS (logo)
   10.51 +- int15 ah=86: use better timing
   10.52 +- HDD geometry in CMOS (not used except for very old DOS programs)
   10.53 +- suppress shift_mem ops
   10.54 +- fix some 16 bit sp push/pop overflow (pusha/popa, lcall lret)
   10.55 +- sysenter/sysexit emulation
   10.56 +- optimize FPU operations (evaluate x87 stack pointer statically)
   10.57 +- add IPC syscalls
   10.58 +- use -msoft-float on ARM
   10.59 +- use kernel traps for unaligned accesses on ARM ?
   10.60 +- handle rare page fault cases (in particular if page fault in helpers or
   10.61 +  in syscall emulation code).
   10.62 +- fix thread stack freeing (use kernel 2.5.x CLONE_CHILD_CLEARTID)
   10.63 +- more syscalls (in particular all 64 bit ones, IPCs, fix 64 bit
   10.64 +  issues, fix 16 bit uid issues)
   10.65 +- use page_unprotect_range in every suitable syscall to handle all
   10.66 +  cases of self modifying code.
   10.67 +- use gcc as a backend to generate better code (easy to do by using
   10.68 +  op-i386.c operations as local inline functions).
   10.69 +- add SSE2/MMX operations
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/tools/ioemu/VERSION	Thu May 19 22:05:02 2005 +0000
    11.3 @@ -0,0 +1,1 @@
    11.4 +0.6.1
    11.5 \ No newline at end of file
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/tools/ioemu/block-cloop.c	Thu May 19 22:05:02 2005 +0000
    12.3 @@ -0,0 +1,167 @@
    12.4 +/*
    12.5 + * QEMU System Emulator block driver
    12.6 + * 
    12.7 + * Copyright (c) 2004 Johannes E. Schindelin
    12.8 + * 
    12.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   12.10 + * of this software and associated documentation files (the "Software"), to deal
   12.11 + * in the Software without restriction, including without limitation the rights
   12.12 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   12.13 + * copies of the Software, and to permit persons to whom the Software is
   12.14 + * furnished to do so, subject to the following conditions:
   12.15 + *
   12.16 + * The above copyright notice and this permission notice shall be included in
   12.17 + * all copies or substantial portions of the Software.
   12.18 + *
   12.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   12.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   12.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
   12.22 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   12.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   12.24 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   12.25 + * THE SOFTWARE.
   12.26 + */
   12.27 +#include "vl.h"
   12.28 +#include "block_int.h"
   12.29 +#include <zlib.h>
   12.30 +
   12.31 +typedef struct BDRVCloopState {
   12.32 +    int fd;
   12.33 +    uint32_t block_size;
   12.34 +    uint32_t n_blocks;
   12.35 +    uint64_t* offsets;
   12.36 +    uint32_t sectors_per_block;
   12.37 +    uint32_t current_block;
   12.38 +    char* compressed_block;
   12.39 +    char* uncompressed_block;
   12.40 +    z_stream zstream;
   12.41 +} BDRVCloopState;
   12.42 +
   12.43 +static int cloop_probe(const uint8_t *buf, int buf_size, const char *filename)
   12.44 +{
   12.45 +    const char* magic_version_2_0="#!/bin/sh\n"
   12.46 +	"#V2.0 Format\n"
   12.47 +	"modprobe cloop file=$0 && mount -r -t iso9660 /dev/cloop $1\n";
   12.48 +    int length=strlen(magic_version_2_0);
   12.49 +    if(length>buf_size)
   12.50 +	length=buf_size;
   12.51 +    if(!memcmp(magic_version_2_0,buf,length))
   12.52 +	return 2;
   12.53 +    return 0;
   12.54 +}
   12.55 +
   12.56 +static int cloop_open(BlockDriverState *bs, const char *filename)
   12.57 +{
   12.58 +    BDRVCloopState *s = bs->opaque;
   12.59 +    uint32_t offsets_size,max_compressed_block_size=1,i;
   12.60 +
   12.61 +    s->fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
   12.62 +    if (s->fd < 0)
   12.63 +        return -1;
   12.64 +    bs->read_only = 1;
   12.65 +
   12.66 +    /* read header */
   12.67 +    if(lseek(s->fd,128,SEEK_SET)<0) {
   12.68 +cloop_close:
   12.69 +	close(s->fd);
   12.70 +	return -1;
   12.71 +    }
   12.72 +    if(read(s->fd,&s->block_size,4)<4)
   12.73 +	goto cloop_close;
   12.74 +    s->block_size=be32_to_cpu(s->block_size);
   12.75 +    if(read(s->fd,&s->n_blocks,4)<4)
   12.76 +	goto cloop_close;
   12.77 +    s->n_blocks=be32_to_cpu(s->n_blocks);
   12.78 +
   12.79 +    /* read offsets */
   12.80 +    offsets_size=s->n_blocks*sizeof(uint64_t);
   12.81 +    if(!(s->offsets=(uint64_t*)malloc(offsets_size)))
   12.82 +	goto cloop_close;
   12.83 +    if(read(s->fd,s->offsets,offsets_size)<offsets_size)
   12.84 +	goto cloop_close;
   12.85 +    for(i=0;i<s->n_blocks;i++) {
   12.86 +	s->offsets[i]=be64_to_cpu(s->offsets[i]);
   12.87 +	if(i>0) {
   12.88 +	    uint32_t size=s->offsets[i]-s->offsets[i-1];
   12.89 +	    if(size>max_compressed_block_size)
   12.90 +		max_compressed_block_size=size;
   12.91 +	}
   12.92 +    }
   12.93 +
   12.94 +    /* initialize zlib engine */
   12.95 +    if(!(s->compressed_block=(char*)malloc(max_compressed_block_size+1)))
   12.96 +	goto cloop_close;
   12.97 +    if(!(s->uncompressed_block=(char*)malloc(s->block_size)))
   12.98 +	goto cloop_close;
   12.99 +    if(inflateInit(&s->zstream) != Z_OK)
  12.100 +	goto cloop_close;
  12.101 +    s->current_block=s->n_blocks;
  12.102 +    
  12.103 +    s->sectors_per_block = s->block_size/512;
  12.104 +    bs->total_sectors = s->n_blocks*s->sectors_per_block;
  12.105 +    return 0;
  12.106 +}
  12.107 +
  12.108 +static inline int cloop_read_block(BDRVCloopState *s,int block_num)
  12.109 +{
  12.110 +    if(s->current_block != block_num) {
  12.111 +	int ret;
  12.112 +        uint32_t bytes = s->offsets[block_num+1]-s->offsets[block_num];
  12.113 +	    
  12.114 +	lseek(s->fd, s->offsets[block_num], SEEK_SET);
  12.115 +        ret = read(s->fd, s->compressed_block, bytes);
  12.116 +        if (ret != bytes) 
  12.117 +            return -1;
  12.118 +	
  12.119 +	s->zstream.next_in = s->compressed_block;
  12.120 +	s->zstream.avail_in = bytes;
  12.121 +	s->zstream.next_out = s->uncompressed_block;
  12.122 +	s->zstream.avail_out = s->block_size;
  12.123 +	ret = inflateReset(&s->zstream);
  12.124 +	if(ret != Z_OK)
  12.125 +	    return -1;
  12.126 +	ret = inflate(&s->zstream, Z_FINISH);
  12.127 +	if(ret != Z_STREAM_END || s->zstream.total_out != s->block_size)
  12.128 +	    return -1;
  12.129 +	
  12.130 +	s->current_block = block_num;
  12.131 +    }
  12.132 +    return 0;
  12.133 +}
  12.134 +
  12.135 +static int cloop_read(BlockDriverState *bs, int64_t sector_num, 
  12.136 +                    uint8_t *buf, int nb_sectors)
  12.137 +{
  12.138 +    BDRVCloopState *s = bs->opaque;
  12.139 +    int i;
  12.140 +
  12.141 +    for(i=0;i<nb_sectors;i++) {
  12.142 +	uint32_t sector_offset_in_block=((sector_num+i)%s->sectors_per_block),
  12.143 +	    block_num=(sector_num+i)/s->sectors_per_block;
  12.144 +	if(cloop_read_block(s, block_num) != 0)
  12.145 +	    return -1;
  12.146 +	memcpy(buf+i*512,s->uncompressed_block+sector_offset_in_block*512,512);
  12.147 +    }
  12.148 +    return 0;
  12.149 +}
  12.150 +
  12.151 +static void cloop_close(BlockDriverState *bs)
  12.152 +{
  12.153 +    BDRVCloopState *s = bs->opaque;
  12.154 +    close(s->fd);
  12.155 +    free(s->compressed_block);
  12.156 +    free(s->uncompressed_block);
  12.157 +    inflateEnd(&s->zstream);
  12.158 +}
  12.159 +
  12.160 +BlockDriver bdrv_cloop = {
  12.161 +    "cloop",
  12.162 +    sizeof(BDRVCloopState),
  12.163 +    cloop_probe,
  12.164 +    cloop_open,
  12.165 +    cloop_read,
  12.166 +    NULL,
  12.167 +    cloop_close,
  12.168 +};
  12.169 +
  12.170 +
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/tools/ioemu/block-cow.c	Thu May 19 22:05:02 2005 +0000
    13.3 @@ -0,0 +1,263 @@
    13.4 +/*
    13.5 + * Block driver for the COW format
    13.6 + * 
    13.7 + * Copyright (c) 2004 Fabrice Bellard
    13.8 + * 
    13.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   13.10 + * of this software and associated documentation files (the "Software"), to deal
   13.11 + * in the Software without restriction, including without limitation the rights
   13.12 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   13.13 + * copies of the Software, and to permit persons to whom the Software is
   13.14 + * furnished to do so, subject to the following conditions:
   13.15 + *
   13.16 + * The above copyright notice and this permission notice shall be included in
   13.17 + * all copies or substantial portions of the Software.
   13.18 + *
   13.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   13.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   13.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
   13.22 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   13.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   13.24 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   13.25 + * THE SOFTWARE.
   13.26 + */
   13.27 +#ifndef _WIN32
   13.28 +#include "vl.h"
   13.29 +#include "block_int.h"
   13.30 +#include <sys/mman.h>
   13.31 +
   13.32 +/**************************************************************/
   13.33 +/* COW block driver using file system holes */
   13.34 +
   13.35 +/* user mode linux compatible COW file */
   13.36 +#define COW_MAGIC 0x4f4f4f4d  /* MOOO */
   13.37 +#define COW_VERSION 2
   13.38 +
   13.39 +struct cow_header_v2 {
   13.40 +    uint32_t magic;
   13.41 +    uint32_t version;
   13.42 +    char backing_file[1024];
   13.43 +    int32_t mtime;
   13.44 +    uint64_t size;
   13.45 +    uint32_t sectorsize;
   13.46 +};
   13.47 +
   13.48 +typedef struct BDRVCowState {
   13.49 +    int fd;
   13.50 +    uint8_t *cow_bitmap; /* if non NULL, COW mappings are used first */
   13.51 +    uint8_t *cow_bitmap_addr; /* mmap address of cow_bitmap */
   13.52 +    int cow_bitmap_size;
   13.53 +    int64_t cow_sectors_offset;
   13.54 +} BDRVCowState;
   13.55 +
   13.56 +static int cow_probe(const uint8_t *buf, int buf_size, const char *filename)
   13.57 +{
   13.58 +    const struct cow_header_v2 *cow_header = (const void *)buf;
   13.59 +
   13.60 +    if (be32_to_cpu(cow_header->magic) == COW_MAGIC &&
   13.61 +        be32_to_cpu(cow_header->version) == COW_VERSION) 
   13.62 +        return 100;
   13.63 +    else
   13.64 +        return 0;
   13.65 +}
   13.66 +
   13.67 +static int cow_open(BlockDriverState *bs, const char *filename)
   13.68 +{
   13.69 +    BDRVCowState *s = bs->opaque;
   13.70 +    int fd;
   13.71 +    struct cow_header_v2 cow_header;
   13.72 +    int64_t size;
   13.73 +
   13.74 +    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
   13.75 +    if (fd < 0) {
   13.76 +        fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
   13.77 +        if (fd < 0)
   13.78 +            return -1;
   13.79 +    }
   13.80 +    s->fd = fd;
   13.81 +    /* see if it is a cow image */
   13.82 +    if (read(fd, &cow_header, sizeof(cow_header)) != sizeof(cow_header)) {
   13.83 +        goto fail;
   13.84 +    }
   13.85 +
   13.86 +    if (be32_to_cpu(cow_header.magic) != COW_MAGIC ||
   13.87 +        be32_to_cpu(cow_header.version) != COW_VERSION) {
   13.88 +        goto fail;
   13.89 +    }
   13.90 +        
   13.91 +    /* cow image found */
   13.92 +    size = be64_to_cpu(cow_header.size);
   13.93 +    bs->total_sectors = size / 512;
   13.94 +
   13.95 +    pstrcpy(bs->backing_file, sizeof(bs->backing_file), 
   13.96 +            cow_header.backing_file);
   13.97 +    
   13.98 +#if 0
   13.99 +    if (cow_header.backing_file[0] != '\0') {
  13.100 +        if (stat(cow_header.backing_file, &st) != 0) {
  13.101 +            fprintf(stderr, "%s: could not find original disk image '%s'\n", filename, cow_header.backing_file);
  13.102 +            goto fail;
  13.103 +        }
  13.104 +        if (st.st_mtime != be32_to_cpu(cow_header.mtime)) {
  13.105 +            fprintf(stderr, "%s: original raw disk image '%s' does not match saved timestamp\n", filename, cow_header.backing_file);
  13.106 +            goto fail;
  13.107 +            }
  13.108 +        fd = open(cow_header.backing_file, O_RDONLY | O_LARGEFILE);
  13.109 +        if (fd < 0)
  13.110 +            goto fail;
  13.111 +        bs->fd = fd;
  13.112 +    }
  13.113 +#endif
  13.114 +    /* mmap the bitmap */
  13.115 +    s->cow_bitmap_size = ((bs->total_sectors + 7) >> 3) + sizeof(cow_header);
  13.116 +    s->cow_bitmap_addr = mmap(get_mmap_addr(s->cow_bitmap_size), 
  13.117 +                              s->cow_bitmap_size, 
  13.118 +                              PROT_READ | PROT_WRITE,
  13.119 +                              MAP_SHARED, s->fd, 0);
  13.120 +    if (s->cow_bitmap_addr == MAP_FAILED)
  13.121 +        goto fail;
  13.122 +    s->cow_bitmap = s->cow_bitmap_addr + sizeof(cow_header);
  13.123 +    s->cow_sectors_offset = (s->cow_bitmap_size + 511) & ~511;
  13.124 +    return 0;
  13.125 + fail:
  13.126 +    close(fd);
  13.127 +    return -1;
  13.128 +}
  13.129 +
  13.130 +static inline void set_bit(uint8_t *bitmap, int64_t bitnum)
  13.131 +{
  13.132 +    bitmap[bitnum / 8] |= (1 << (bitnum%8));
  13.133 +}
  13.134 +
  13.135 +static inline int is_bit_set(const uint8_t *bitmap, int64_t bitnum)
  13.136 +{
  13.137 +    return !!(bitmap[bitnum / 8] & (1 << (bitnum%8)));
  13.138 +}
  13.139 +
  13.140 +
  13.141 +/* Return true if first block has been changed (ie. current version is
  13.142 + * in COW file).  Set the number of continuous blocks for which that
  13.143 + * is true. */
  13.144 +static inline int is_changed(uint8_t *bitmap,
  13.145 +                             int64_t sector_num, int nb_sectors,
  13.146 +                             int *num_same)
  13.147 +{
  13.148 +    int changed;
  13.149 +
  13.150 +    if (!bitmap || nb_sectors == 0) {
  13.151 +	*num_same = nb_sectors;
  13.152 +	return 0;
  13.153 +    }
  13.154 +
  13.155 +    changed = is_bit_set(bitmap, sector_num);
  13.156 +    for (*num_same = 1; *num_same < nb_sectors; (*num_same)++) {
  13.157 +	if (is_bit_set(bitmap, sector_num + *num_same) != changed)
  13.158 +	    break;
  13.159 +    }
  13.160 +
  13.161 +    return changed;
  13.162 +}
  13.163 +
  13.164 +static int cow_is_allocated(BlockDriverState *bs, int64_t sector_num, 
  13.165 +                            int nb_sectors, int *pnum)
  13.166 +{
  13.167 +    BDRVCowState *s = bs->opaque;
  13.168 +    return is_changed(s->cow_bitmap, sector_num, nb_sectors, pnum);
  13.169 +}
  13.170 +
  13.171 +static int cow_read(BlockDriverState *bs, int64_t sector_num, 
  13.172 +                    uint8_t *buf, int nb_sectors)
  13.173 +{
  13.174 +    BDRVCowState *s = bs->opaque;
  13.175 +    int ret, n;
  13.176 +    
  13.177 +    while (nb_sectors > 0) {
  13.178 +        if (is_changed(s->cow_bitmap, sector_num, nb_sectors, &n)) {
  13.179 +            lseek(s->fd, s->cow_sectors_offset + sector_num * 512, SEEK_SET);
  13.180 +            ret = read(s->fd, buf, n * 512);
  13.181 +            if (ret != n * 512) 
  13.182 +                return -1;
  13.183 +        } else {
  13.184 +            memset(buf, 0, n * 512);
  13.185 +        }
  13.186 +        nb_sectors -= n;
  13.187 +        sector_num += n;
  13.188 +        buf += n * 512;
  13.189 +    }
  13.190 +    return 0;
  13.191 +}
  13.192 +
  13.193 +static int cow_write(BlockDriverState *bs, int64_t sector_num, 
  13.194 +                     const uint8_t *buf, int nb_sectors)
  13.195 +{
  13.196 +    BDRVCowState *s = bs->opaque;
  13.197 +    int ret, i;
  13.198 +    
  13.199 +    lseek(s->fd, s->cow_sectors_offset + sector_num * 512, SEEK_SET);
  13.200 +    ret = write(s->fd, buf, nb_sectors * 512);
  13.201 +    if (ret != nb_sectors * 512) 
  13.202 +        return -1;
  13.203 +    for (i = 0; i < nb_sectors; i++)
  13.204 +        set_bit(s->cow_bitmap, sector_num + i);
  13.205 +    return 0;
  13.206 +}
  13.207 +
  13.208 +static void cow_close(BlockDriverState *bs)
  13.209 +{
  13.210 +    BDRVCowState *s = bs->opaque;
  13.211 +    munmap(s->cow_bitmap_addr, s->cow_bitmap_size);
  13.212 +    close(s->fd);
  13.213 +}
  13.214 +
  13.215 +static int cow_create(const char *filename, int64_t image_sectors,
  13.216 +                      const char *image_filename, int flags)
  13.217 +{
  13.218 +    int fd, cow_fd;
  13.219 +    struct cow_header_v2 cow_header;
  13.220 +    struct stat st;
  13.221 +
  13.222 +    if (flags)
  13.223 +        return -ENOTSUP;
  13.224 +
  13.225 +    cow_fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE, 
  13.226 +              0644);
  13.227 +    if (cow_fd < 0)
  13.228 +        return -1;
  13.229 +    memset(&cow_header, 0, sizeof(cow_header));
  13.230 +    cow_header.magic = cpu_to_be32(COW_MAGIC);
  13.231 +    cow_header.version = cpu_to_be32(COW_VERSION);
  13.232 +    if (image_filename) {
  13.233 +        fd = open(image_filename, O_RDONLY | O_BINARY);
  13.234 +        if (fd < 0) {
  13.235 +            close(cow_fd);
  13.236 +            return -1;
  13.237 +        }
  13.238 +        if (fstat(fd, &st) != 0) {
  13.239 +            close(fd);
  13.240 +            return -1;
  13.241 +        }
  13.242 +        close(fd);
  13.243 +        cow_header.mtime = cpu_to_be32(st.st_mtime);
  13.244 +        realpath(image_filename, cow_header.backing_file);
  13.245 +    }
  13.246 +    cow_header.sectorsize = cpu_to_be32(512);
  13.247 +    cow_header.size = cpu_to_be64(image_sectors * 512);
  13.248 +    write(cow_fd, &cow_header, sizeof(cow_header));
  13.249 +    /* resize to include at least all the bitmap */
  13.250 +    ftruncate(cow_fd, sizeof(cow_header) + ((image_sectors + 7) >> 3));
  13.251 +    close(cow_fd);
  13.252 +    return 0;
  13.253 +}
  13.254 +
  13.255 +BlockDriver bdrv_cow = {
  13.256 +    "cow",
  13.257 +    sizeof(BDRVCowState),
  13.258 +    cow_probe,
  13.259 +    cow_open,
  13.260 +    cow_read,
  13.261 +    cow_write,
  13.262 +    cow_close,
  13.263 +    cow_create,
  13.264 +    cow_is_allocated,
  13.265 +};
  13.266 +#endif
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/tools/ioemu/block-qcow.c	Thu May 19 22:05:02 2005 +0000
    14.3 @@ -0,0 +1,677 @@
    14.4 +/*
    14.5 + * Block driver for the QCOW format
    14.6 + * 
    14.7 + * Copyright (c) 2004 Fabrice Bellard
    14.8 + * 
    14.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   14.10 + * of this software and associated documentation files (the "Software"), to deal
   14.11 + * in the Software without restriction, including without limitation the rights
   14.12 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   14.13 + * copies of the Software, and to permit persons to whom the Software is
   14.14 + * furnished to do so, subject to the following conditions:
   14.15 + *
   14.16 + * The above copyright notice and this permission notice shall be included in
   14.17 + * all copies or substantial portions of the Software.
   14.18 + *
   14.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   14.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   14.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
   14.22 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   14.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   14.24 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   14.25 + * THE SOFTWARE.
   14.26 + */
   14.27 +#include "vl.h"
   14.28 +#include "block_int.h"
   14.29 +#include <zlib.h>
   14.30 +#include "aes.h"
   14.31 +
   14.32 +/**************************************************************/
   14.33 +/* QEMU COW block driver with compression and encryption support */
   14.34 +
   14.35 +#define QCOW_MAGIC (('Q' << 24) | ('F' << 16) | ('I' << 8) | 0xfb)
   14.36 +#define QCOW_VERSION 1
   14.37 +
   14.38 +#define QCOW_CRYPT_NONE 0
   14.39 +#define QCOW_CRYPT_AES  1
   14.40 +
   14.41 +#define QCOW_OFLAG_COMPRESSED (1LL << 63)
   14.42 +
   14.43 +typedef struct QCowHeader {
   14.44 +    uint32_t magic;
   14.45 +    uint32_t version;
   14.46 +    uint64_t backing_file_offset;
   14.47 +    uint32_t backing_file_size;
   14.48 +    uint32_t mtime;
   14.49 +    uint64_t size; /* in bytes */
   14.50 +    uint8_t cluster_bits;
   14.51 +    uint8_t l2_bits;
   14.52 +    uint32_t crypt_method;
   14.53 +    uint64_t l1_table_offset;
   14.54 +} QCowHeader;
   14.55 +
   14.56 +#define L2_CACHE_SIZE 16
   14.57 +
   14.58 +typedef struct BDRVQcowState {
   14.59 +    int fd;
   14.60 +    int cluster_bits;
   14.61 +    int cluster_size;
   14.62 +    int cluster_sectors;
   14.63 +    int l2_bits;
   14.64 +    int l2_size;
   14.65 +    int l1_size;
   14.66 +    uint64_t cluster_offset_mask;
   14.67 +    uint64_t l1_table_offset;
   14.68 +    uint64_t *l1_table;
   14.69 +    uint64_t *l2_cache;
   14.70 +    uint64_t l2_cache_offsets[L2_CACHE_SIZE];
   14.71 +    uint32_t l2_cache_counts[L2_CACHE_SIZE];
   14.72 +    uint8_t *cluster_cache;
   14.73 +    uint8_t *cluster_data;
   14.74 +    uint64_t cluster_cache_offset;
   14.75 +    uint32_t crypt_method; /* current crypt method, 0 if no key yet */
   14.76 +    uint32_t crypt_method_header;
   14.77 +    AES_KEY aes_encrypt_key;
   14.78 +    AES_KEY aes_decrypt_key;
   14.79 +} BDRVQcowState;
   14.80 +
   14.81 +static int decompress_cluster(BDRVQcowState *s, uint64_t cluster_offset);
   14.82 +
   14.83 +static int qcow_probe(const uint8_t *buf, int buf_size, const char *filename)
   14.84 +{
   14.85 +    const QCowHeader *cow_header = (const void *)buf;
   14.86 +
   14.87 +    if (be32_to_cpu(cow_header->magic) == QCOW_MAGIC &&
   14.88 +        be32_to_cpu(cow_header->version) == QCOW_VERSION) 
   14.89 +        return 100;
   14.90 +    else
   14.91 +        return 0;
   14.92 +}
   14.93 +
   14.94 +static int qcow_open(BlockDriverState *bs, const char *filename)
   14.95 +{
   14.96 +    BDRVQcowState *s = bs->opaque;
   14.97 +    int fd, len, i, shift;
   14.98 +    QCowHeader header;
   14.99 +    
  14.100 +    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
  14.101 +    if (fd < 0) {
  14.102 +        fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
  14.103 +        if (fd < 0)
  14.104 +            return -1;
  14.105 +    }
  14.106 +    s->fd = fd;
  14.107 +    if (read(fd, &header, sizeof(header)) != sizeof(header))
  14.108 +        goto fail;
  14.109 +    be32_to_cpus(&header.magic);
  14.110 +    be32_to_cpus(&header.version);
  14.111 +    be64_to_cpus(&header.backing_file_offset);
  14.112 +    be32_to_cpus(&header.backing_file_size);
  14.113 +    be32_to_cpus(&header.mtime);
  14.114 +    be64_to_cpus(&header.size);
  14.115 +    be32_to_cpus(&header.crypt_method);
  14.116 +    be64_to_cpus(&header.l1_table_offset);
  14.117 +    
  14.118 +    if (header.magic != QCOW_MAGIC || header.version != QCOW_VERSION)
  14.119 +        goto fail;
  14.120 +    if (header.size <= 1 || header.cluster_bits < 9)
  14.121 +        goto fail;
  14.122 +    if (header.crypt_method > QCOW_CRYPT_AES)
  14.123 +        goto fail;
  14.124 +    s->crypt_method_header = header.crypt_method;
  14.125 +    if (s->crypt_method_header)
  14.126 +        bs->encrypted = 1;
  14.127 +    s->cluster_bits = header.cluster_bits;
  14.128 +    s->cluster_size = 1 << s->cluster_bits;
  14.129 +    s->cluster_sectors = 1 << (s->cluster_bits - 9);
  14.130 +    s->l2_bits = header.l2_bits;
  14.131 +    s->l2_size = 1 << s->l2_bits;
  14.132 +    bs->total_sectors = header.size / 512;
  14.133 +    s->cluster_offset_mask = (1LL << (63 - s->cluster_bits)) - 1;
  14.134 +
  14.135 +    /* read the level 1 table */
  14.136 +    shift = s->cluster_bits + s->l2_bits;
  14.137 +    s->l1_size = (header.size + (1LL << shift) - 1) >> shift;
  14.138 +
  14.139 +    s->l1_table_offset = header.l1_table_offset;
  14.140 +    s->l1_table = qemu_malloc(s->l1_size * sizeof(uint64_t));
  14.141 +    if (!s->l1_table)
  14.142 +        goto fail;
  14.143 +    lseek(fd, s->l1_table_offset, SEEK_SET);
  14.144 +    if (read(fd, s->l1_table, s->l1_size * sizeof(uint64_t)) != 
  14.145 +        s->l1_size * sizeof(uint64_t))
  14.146 +        goto fail;
  14.147 +    for(i = 0;i < s->l1_size; i++) {
  14.148 +        be64_to_cpus(&s->l1_table[i]);
  14.149 +    }
  14.150 +    /* alloc L2 cache */
  14.151 +    s->l2_cache = qemu_malloc(s->l2_size * L2_CACHE_SIZE * sizeof(uint64_t));
  14.152 +    if (!s->l2_cache)
  14.153 +        goto fail;
  14.154 +    s->cluster_cache = qemu_malloc(s->cluster_size);
  14.155 +    if (!s->cluster_cache)
  14.156 +        goto fail;
  14.157 +    s->cluster_data = qemu_malloc(s->cluster_size);
  14.158 +    if (!s->cluster_data)
  14.159 +        goto fail;
  14.160 +    s->cluster_cache_offset = -1;
  14.161 +    
  14.162 +    /* read the backing file name */
  14.163 +    if (header.backing_file_offset != 0) {
  14.164 +        len = header.backing_file_size;
  14.165 +        if (len > 1023)
  14.166 +            len = 1023;
  14.167 +        lseek(fd, header.backing_file_offset, SEEK_SET);
  14.168 +        if (read(fd, bs->backing_file, len) != len)
  14.169 +            goto fail;
  14.170 +        bs->backing_file[len] = '\0';
  14.171 +    }
  14.172 +    return 0;
  14.173 +
  14.174 + fail:
  14.175 +    qemu_free(s->l1_table);
  14.176 +    qemu_free(s->l2_cache);
  14.177 +    qemu_free(s->cluster_cache);
  14.178 +    qemu_free(s->cluster_data);
  14.179 +    close(fd);
  14.180 +    return -1;
  14.181 +}
  14.182 +
  14.183 +static int qcow_set_key(BlockDriverState *bs, const char *key)
  14.184 +{
  14.185 +    BDRVQcowState *s = bs->opaque;
  14.186 +    uint8_t keybuf[16];
  14.187 +    int len, i;
  14.188 +    
  14.189 +    memset(keybuf, 0, 16);
  14.190 +    len = strlen(key);
  14.191 +    if (len > 16)
  14.192 +        len = 16;
  14.193 +    /* XXX: we could compress the chars to 7 bits to increase
  14.194 +       entropy */
  14.195 +    for(i = 0;i < len;i++) {
  14.196 +        keybuf[i] = key[i];
  14.197 +    }
  14.198 +    s->crypt_method = s->crypt_method_header;
  14.199 +
  14.200 +    if (AES_set_encrypt_key(keybuf, 128, &s->aes_encrypt_key) != 0)
  14.201 +        return -1;
  14.202 +    if (AES_set_decrypt_key(keybuf, 128, &s->aes_decrypt_key) != 0)
  14.203 +        return -1;
  14.204 +#if 0
  14.205 +    /* test */
  14.206 +    {
  14.207 +        uint8_t in[16];
  14.208 +        uint8_t out[16];
  14.209 +        uint8_t tmp[16];
  14.210 +        for(i=0;i<16;i++)
  14.211 +            in[i] = i;
  14.212 +        AES_encrypt(in, tmp, &s->aes_encrypt_key);
  14.213 +        AES_decrypt(tmp, out, &s->aes_decrypt_key);
  14.214 +        for(i = 0; i < 16; i++)
  14.215 +            printf(" %02x", tmp[i]);
  14.216 +        printf("\n");
  14.217 +        for(i = 0; i < 16; i++)
  14.218 +            printf(" %02x", out[i]);
  14.219 +        printf("\n");
  14.220 +    }
  14.221 +#endif
  14.222 +    return 0;
  14.223 +}
  14.224 +
  14.225 +/* The crypt function is compatible with the linux cryptoloop
  14.226 +   algorithm for < 4 GB images. NOTE: out_buf == in_buf is
  14.227 +   supported */
  14.228 +static void encrypt_sectors(BDRVQcowState *s, int64_t sector_num,
  14.229 +                            uint8_t *out_buf, const uint8_t *in_buf,
  14.230 +                            int nb_sectors, int enc,
  14.231 +                            const AES_KEY *key)
  14.232 +{
  14.233 +    union {
  14.234 +        uint64_t ll[2];
  14.235 +        uint8_t b[16];
  14.236 +    } ivec;
  14.237 +    int i;
  14.238 +
  14.239 +    for(i = 0; i < nb_sectors; i++) {
  14.240 +        ivec.ll[0] = cpu_to_le64(sector_num);
  14.241 +        ivec.ll[1] = 0;
  14.242 +        AES_cbc_encrypt(in_buf, out_buf, 512, key, 
  14.243 +                        ivec.b, enc);
  14.244 +        sector_num++;
  14.245 +        in_buf += 512;
  14.246 +        out_buf += 512;
  14.247 +    }
  14.248 +}
  14.249 +
  14.250 +/* 'allocate' is:
  14.251 + *
  14.252 + * 0 to not allocate.
  14.253 + *
  14.254 + * 1 to allocate a normal cluster (for sector indexes 'n_start' to
  14.255 + * 'n_end')
  14.256 + *
  14.257 + * 2 to allocate a compressed cluster of size
  14.258 + * 'compressed_size'. 'compressed_size' must be > 0 and <
  14.259 + * cluster_size 
  14.260 + *
  14.261 + * return 0 if not allocated.
  14.262 + */
  14.263 +static uint64_t get_cluster_offset(BlockDriverState *bs,
  14.264 +                                   uint64_t offset, int allocate,
  14.265 +                                   int compressed_size,
  14.266 +                                   int n_start, int n_end)
  14.267 +{
  14.268 +    BDRVQcowState *s = bs->opaque;
  14.269 +    int min_index, i, j, l1_index, l2_index;
  14.270 +    uint64_t l2_offset, *l2_table, cluster_offset, tmp;
  14.271 +    uint32_t min_count;
  14.272 +    int new_l2_table;
  14.273 +    
  14.274 +    l1_index = offset >> (s->l2_bits + s->cluster_bits);
  14.275 +    l2_offset = s->l1_table[l1_index];
  14.276 +    new_l2_table = 0;
  14.277 +    if (!l2_offset) {
  14.278 +        if (!allocate)
  14.279 +            return 0;
  14.280 +        /* allocate a new l2 entry */
  14.281 +        l2_offset = lseek(s->fd, 0, SEEK_END);
  14.282 +        /* round to cluster size */
  14.283 +        l2_offset = (l2_offset + s->cluster_size - 1) & ~(s->cluster_size - 1);
  14.284 +        /* update the L1 entry */
  14.285 +        s->l1_table[l1_index] = l2_offset;
  14.286 +        tmp = cpu_to_be64(l2_offset);
  14.287 +        lseek(s->fd, s->l1_table_offset + l1_index * sizeof(tmp), SEEK_SET);
  14.288 +        if (write(s->fd, &tmp, sizeof(tmp)) != sizeof(tmp))
  14.289 +            return 0;
  14.290 +        new_l2_table = 1;
  14.291 +    }
  14.292 +    for(i = 0; i < L2_CACHE_SIZE; i++) {
  14.293 +        if (l2_offset == s->l2_cache_offsets[i]) {
  14.294 +            /* increment the hit count */
  14.295 +            if (++s->l2_cache_counts[i] == 0xffffffff) {
  14.296 +                for(j = 0; j < L2_CACHE_SIZE; j++) {
  14.297 +                    s->l2_cache_counts[j] >>= 1;
  14.298 +                }
  14.299 +            }
  14.300 +            l2_table = s->l2_cache + (i << s->l2_bits);
  14.301 +            goto found;
  14.302 +        }
  14.303 +    }
  14.304 +    /* not found: load a new entry in the least used one */
  14.305 +    min_index = 0;
  14.306 +    min_count = 0xffffffff;
  14.307 +    for(i = 0; i < L2_CACHE_SIZE; i++) {
  14.308 +        if (s->l2_cache_counts[i] < min_count) {
  14.309 +            min_count = s->l2_cache_counts[i];
  14.310 +            min_index = i;
  14.311 +        }
  14.312 +    }
  14.313 +    l2_table = s->l2_cache + (min_index << s->l2_bits);
  14.314 +    lseek(s->fd, l2_offset, SEEK_SET);
  14.315 +    if (new_l2_table) {
  14.316 +        memset(l2_table, 0, s->l2_size * sizeof(uint64_t));
  14.317 +        if (write(s->fd, l2_table, s->l2_size * sizeof(uint64_t)) !=
  14.318 +            s->l2_size * sizeof(uint64_t))
  14.319 +            return 0;
  14.320 +    } else {
  14.321 +        if (read(s->fd, l2_table, s->l2_size * sizeof(uint64_t)) != 
  14.322 +            s->l2_size * sizeof(uint64_t))
  14.323 +            return 0;
  14.324 +    }
  14.325 +    s->l2_cache_offsets[min_index] = l2_offset;
  14.326 +    s->l2_cache_counts[min_index] = 1;
  14.327 + found:
  14.328 +    l2_index = (offset >> s->cluster_bits) & (s->l2_size - 1);
  14.329 +    cluster_offset = be64_to_cpu(l2_table[l2_index]);
  14.330 +    if (!cluster_offset || 
  14.331 +        ((cluster_offset & QCOW_OFLAG_COMPRESSED) && allocate == 1)) {
  14.332 +        if (!allocate)
  14.333 +            return 0;
  14.334 +        /* allocate a new cluster */
  14.335 +        if ((cluster_offset & QCOW_OFLAG_COMPRESSED) &&
  14.336 +            (n_end - n_start) < s->cluster_sectors) {
  14.337 +            /* if the cluster is already compressed, we must
  14.338 +               decompress it in the case it is not completely
  14.339 +               overwritten */
  14.340 +            if (decompress_cluster(s, cluster_offset) < 0)
  14.341 +                return 0;
  14.342 +            cluster_offset = lseek(s->fd, 0, SEEK_END);
  14.343 +            cluster_offset = (cluster_offset + s->cluster_size - 1) & 
  14.344 +                ~(s->cluster_size - 1);
  14.345 +            /* write the cluster content */
  14.346 +            lseek(s->fd, cluster_offset, SEEK_SET);
  14.347 +            if (write(s->fd, s->cluster_cache, s->cluster_size) != 
  14.348 +                s->cluster_size)
  14.349 +                return -1;
  14.350 +        } else {
  14.351 +            cluster_offset = lseek(s->fd, 0, SEEK_END);
  14.352 +            if (allocate == 1) {
  14.353 +                /* round to cluster size */
  14.354 +                cluster_offset = (cluster_offset + s->cluster_size - 1) & 
  14.355 +                    ~(s->cluster_size - 1);
  14.356 +                ftruncate(s->fd, cluster_offset + s->cluster_size);
  14.357 +                /* if encrypted, we must initialize the cluster
  14.358 +                   content which won't be written */
  14.359 +                if (s->crypt_method && 
  14.360 +                    (n_end - n_start) < s->cluster_sectors) {
  14.361 +                    uint64_t start_sect;
  14.362 +                    start_sect = (offset & ~(s->cluster_size - 1)) >> 9;
  14.363 +                    memset(s->cluster_data + 512, 0xaa, 512);
  14.364 +                    for(i = 0; i < s->cluster_sectors; i++) {
  14.365 +                        if (i < n_start || i >= n_end) {
  14.366 +                            encrypt_sectors(s, start_sect + i, 
  14.367 +                                            s->cluster_data, 
  14.368 +                                            s->cluster_data + 512, 1, 1,
  14.369 +                                            &s->aes_encrypt_key);
  14.370 +                            lseek(s->fd, cluster_offset + i * 512, SEEK_SET);
  14.371 +                            if (write(s->fd, s->cluster_data, 512) != 512)
  14.372 +                                return -1;
  14.373 +                        }
  14.374 +                    }
  14.375 +                }
  14.376 +            } else {
  14.377 +                cluster_offset |= QCOW_OFLAG_COMPRESSED | 
  14.378 +                    (uint64_t)compressed_size << (63 - s->cluster_bits);
  14.379 +            }
  14.380 +        }
  14.381 +        /* update L2 table */
  14.382 +        tmp = cpu_to_be64(cluster_offset);
  14.383 +        l2_table[l2_index] = tmp;
  14.384 +        lseek(s->fd, l2_offset + l2_index * sizeof(tmp), SEEK_SET);
  14.385 +        if (write(s->fd, &tmp, sizeof(tmp)) != sizeof(tmp))
  14.386 +            return 0;
  14.387 +    }
  14.388 +    return cluster_offset;
  14.389 +}
  14.390 +
  14.391 +static int qcow_is_allocated(BlockDriverState *bs, int64_t sector_num, 
  14.392 +                             int nb_sectors, int *pnum)
  14.393 +{
  14.394 +    BDRVQcowState *s = bs->opaque;
  14.395 +    int index_in_cluster, n;
  14.396 +    uint64_t cluster_offset;
  14.397 +
  14.398 +    cluster_offset = get_cluster_offset(bs, sector_num << 9, 0, 0, 0, 0);
  14.399 +    index_in_cluster = sector_num & (s->cluster_sectors - 1);
  14.400 +    n = s->cluster_sectors - index_in_cluster;
  14.401 +    if (n > nb_sectors)
  14.402 +        n = nb_sectors;
  14.403 +    *pnum = n;
  14.404 +    return (cluster_offset != 0);
  14.405 +}
  14.406 +
  14.407 +static int decompress_buffer(uint8_t *out_buf, int out_buf_size,
  14.408 +                             const uint8_t *buf, int buf_size)
  14.409 +{
  14.410 +    z_stream strm1, *strm = &strm1;
  14.411 +    int ret, out_len;
  14.412 +
  14.413 +    memset(strm, 0, sizeof(*strm));
  14.414 +
  14.415 +    strm->next_in = (uint8_t *)buf;
  14.416 +    strm->avail_in = buf_size;
  14.417 +    strm->next_out = out_buf;
  14.418 +    strm->avail_out = out_buf_size;
  14.419 +
  14.420 +    ret = inflateInit2(strm, -12);
  14.421 +    if (ret != Z_OK)
  14.422 +        return -1;
  14.423 +    ret = inflate(strm, Z_FINISH);
  14.424 +    out_len = strm->next_out - out_buf;
  14.425 +    if ((ret != Z_STREAM_END && ret != Z_BUF_ERROR) ||
  14.426 +        out_len != out_buf_size) {
  14.427 +        inflateEnd(strm);
  14.428 +        return -1;
  14.429 +    }
  14.430 +    inflateEnd(strm);
  14.431 +    return 0;
  14.432 +}
  14.433 +                              
  14.434 +static int decompress_cluster(BDRVQcowState *s, uint64_t cluster_offset)
  14.435 +{
  14.436 +    int ret, csize;
  14.437 +    uint64_t coffset;
  14.438 +
  14.439 +    coffset = cluster_offset & s->cluster_offset_mask;
  14.440 +    if (s->cluster_cache_offset != coffset) {
  14.441 +        csize = cluster_offset >> (63 - s->cluster_bits);
  14.442 +        csize &= (s->cluster_size - 1);
  14.443 +        lseek(s->fd, coffset, SEEK_SET);
  14.444 +        ret = read(s->fd, s->cluster_data, csize);
  14.445 +        if (ret != csize) 
  14.446 +            return -1;
  14.447 +        if (decompress_buffer(s->cluster_cache, s->cluster_size,
  14.448 +                              s->cluster_data, csize) < 0) {
  14.449 +            return -1;
  14.450 +        }
  14.451 +        s->cluster_cache_offset = coffset;
  14.452 +    }
  14.453 +    return 0;
  14.454 +}
  14.455 +
  14.456 +static int qcow_read(BlockDriverState *bs, int64_t sector_num, 
  14.457 +                     uint8_t *buf, int nb_sectors)
  14.458 +{
  14.459 +    BDRVQcowState *s = bs->opaque;
  14.460 +    int ret, index_in_cluster, n;
  14.461 +    uint64_t cluster_offset;
  14.462 +    
  14.463 +    while (nb_sectors > 0) {
  14.464 +        cluster_offset = get_cluster_offset(bs, sector_num << 9, 0, 0, 0, 0);
  14.465 +        index_in_cluster = sector_num & (s->cluster_sectors - 1);
  14.466 +        n = s->cluster_sectors - index_in_cluster;
  14.467 +        if (n > nb_sectors)
  14.468 +            n = nb_sectors;
  14.469 +        if (!cluster_offset) {
  14.470 +            memset(buf, 0, 512 * n);
  14.471 +        } else if (cluster_offset & QCOW_OFLAG_COMPRESSED) {
  14.472 +            if (decompress_cluster(s, cluster_offset) < 0)
  14.473 +                return -1;
  14.474 +            memcpy(buf, s->cluster_cache + index_in_cluster * 512, 512 * n);
  14.475 +        } else {
  14.476 +            lseek(s->fd, cluster_offset + index_in_cluster * 512, SEEK_SET);
  14.477 +            ret = read(s->fd, buf, n * 512);
  14.478 +            if (ret != n * 512) 
  14.479 +                return -1;
  14.480 +            if (s->crypt_method) {
  14.481 +                encrypt_sectors(s, sector_num, buf, buf, n, 0, 
  14.482 +                                &s->aes_decrypt_key);
  14.483 +            }
  14.484 +        }
  14.485 +        nb_sectors -= n;
  14.486 +        sector_num += n;
  14.487 +        buf += n * 512;
  14.488 +    }
  14.489 +    return 0;
  14.490 +}
  14.491 +
  14.492 +static int qcow_write(BlockDriverState *bs, int64_t sector_num, 
  14.493 +                     const uint8_t *buf, int nb_sectors)
  14.494 +{
  14.495 +    BDRVQcowState *s = bs->opaque;
  14.496 +    int ret, index_in_cluster, n;
  14.497 +    uint64_t cluster_offset;
  14.498 +    
  14.499 +    while (nb_sectors > 0) {
  14.500 +        index_in_cluster = sector_num & (s->cluster_sectors - 1);
  14.501 +        n = s->cluster_sectors - index_in_cluster;
  14.502 +        if (n > nb_sectors)
  14.503 +            n = nb_sectors;
  14.504 +        cluster_offset = get_cluster_offset(bs, sector_num << 9, 1, 0, 
  14.505 +                                            index_in_cluster, 
  14.506 +                                            index_in_cluster + n);
  14.507 +        if (!cluster_offset)
  14.508 +            return -1;
  14.509 +        lseek(s->fd, cluster_offset + index_in_cluster * 512, SEEK_SET);
  14.510 +        if (s->crypt_method) {
  14.511 +            encrypt_sectors(s, sector_num, s->cluster_data, buf, n, 1,
  14.512 +                            &s->aes_encrypt_key);
  14.513 +            ret = write(s->fd, s->cluster_data, n * 512);
  14.514 +        } else {
  14.515 +            ret = write(s->fd, buf, n * 512);
  14.516 +        }
  14.517 +        if (ret != n * 512) 
  14.518 +            return -1;
  14.519 +        nb_sectors -= n;
  14.520 +        sector_num += n;
  14.521 +        buf += n * 512;
  14.522 +    }
  14.523 +    s->cluster_cache_offset = -1; /* disable compressed cache */
  14.524 +    return 0;
  14.525 +}
  14.526 +
  14.527 +static void qcow_close(BlockDriverState *bs)
  14.528 +{
  14.529 +    BDRVQcowState *s = bs->opaque;
  14.530 +    qemu_free(s->l1_table);
  14.531 +    qemu_free(s->l2_cache);
  14.532 +    qemu_free(s->cluster_cache);
  14.533 +    qemu_free(s->cluster_data);
  14.534 +    close(s->fd);
  14.535 +}
  14.536 +
  14.537 +static int qcow_create(const char *filename, int64_t total_size,
  14.538 +                      const char *backing_file, int flags)
  14.539 +{
  14.540 +    int fd, header_size, backing_filename_len, l1_size, i, shift;
  14.541 +    QCowHeader header;
  14.542 +    char backing_filename[1024];
  14.543 +    uint64_t tmp;
  14.544 +    struct stat st;
  14.545 +
  14.546 +    fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE, 
  14.547 +              0644);
  14.548 +    if (fd < 0)
  14.549 +        return -1;
  14.550 +    memset(&header, 0, sizeof(header));
  14.551 +    header.magic = cpu_to_be32(QCOW_MAGIC);
  14.552 +    header.version = cpu_to_be32(QCOW_VERSION);
  14.553 +    header.size = cpu_to_be64(total_size * 512);
  14.554 +    header_size = sizeof(header);
  14.555 +    backing_filename_len = 0;
  14.556 +    if (backing_file) {
  14.557 +        realpath(backing_file, backing_filename);
  14.558 +        if (stat(backing_filename, &st) != 0) {
  14.559 +            return -1;
  14.560 +        }
  14.561 +        header.mtime = cpu_to_be32(st.st_mtime);
  14.562 +        header.backing_file_offset = cpu_to_be64(header_size);
  14.563 +        backing_filename_len = strlen(backing_filename);
  14.564 +        header.backing_file_size = cpu_to_be32(backing_filename_len);
  14.565 +        header_size += backing_filename_len;
  14.566 +        header.cluster_bits = 9; /* 512 byte cluster to avoid copying
  14.567 +                                    unmodifyed sectors */
  14.568 +        header.l2_bits = 12; /* 32 KB L2 tables */
  14.569 +    } else {
  14.570 +        header.cluster_bits = 12; /* 4 KB clusters */
  14.571 +        header.l2_bits = 9; /* 4 KB L2 tables */
  14.572 +    }
  14.573 +    header_size = (header_size + 7) & ~7;
  14.574 +    shift = header.cluster_bits + header.l2_bits;
  14.575 +    l1_size = ((total_size * 512) + (1LL << shift) - 1) >> shift;
  14.576 +
  14.577 +    header.l1_table_offset = cpu_to_be64(header_size);
  14.578 +    if (flags) {
  14.579 +        header.crypt_method = cpu_to_be32(QCOW_CRYPT_AES);
  14.580 +    } else {
  14.581 +        header.crypt_method = cpu_to_be32(QCOW_CRYPT_NONE);
  14.582 +    }
  14.583 +    
  14.584 +    /* write all the data */
  14.585 +    write(fd, &header, sizeof(header));
  14.586 +    if (backing_file) {
  14.587 +        write(fd, backing_filename, backing_filename_len);
  14.588 +    }
  14.589 +    lseek(fd, header_size, SEEK_SET);
  14.590 +    tmp = 0;
  14.591 +    for(i = 0;i < l1_size; i++) {
  14.592 +        write(fd, &tmp, sizeof(tmp));
  14.593 +    }
  14.594 +    close(fd);
  14.595 +    return 0;
  14.596 +}
  14.597 +
  14.598 +int qcow_get_cluster_size(BlockDriverState *bs)
  14.599 +{
  14.600 +    BDRVQcowState *s = bs->opaque;
  14.601 +    if (bs->drv != &bdrv_qcow)
  14.602 +        return -1;
  14.603 +    return s->cluster_size;
  14.604 +}
  14.605 +
  14.606 +/* XXX: put compressed sectors first, then all the cluster aligned
  14.607 +   tables to avoid losing bytes in alignment */
  14.608 +int qcow_compress_cluster(BlockDriverState *bs, int64_t sector_num, 
  14.609 +                          const uint8_t *buf)
  14.610 +{
  14.611 +    BDRVQcowState *s = bs->opaque;
  14.612 +    z_stream strm;
  14.613 +    int ret, out_len;
  14.614 +    uint8_t *out_buf;
  14.615 +    uint64_t cluster_offset;
  14.616 +
  14.617 +    if (bs->drv != &bdrv_qcow)
  14.618 +        return -1;
  14.619 +
  14.620 +    out_buf = qemu_malloc(s->cluster_size + (s->cluster_size / 1000) + 128);
  14.621 +    if (!out_buf)
  14.622 +        return -1;
  14.623 +
  14.624 +    /* best compression, small window, no zlib header */
  14.625 +    memset(&strm, 0, sizeof(strm));
  14.626 +    ret = deflateInit2(&strm, Z_DEFAULT_COMPRESSION,
  14.627 +                       Z_DEFLATED, -12, 
  14.628 +                       9, Z_DEFAULT_STRATEGY);
  14.629 +    if (ret != 0) {
  14.630 +        qemu_free(out_buf);
  14.631 +        return -1;
  14.632 +    }
  14.633 +
  14.634 +    strm.avail_in = s->cluster_size;
  14.635 +    strm.next_in = (uint8_t *)buf;
  14.636 +    strm.avail_out = s->cluster_size;
  14.637 +    strm.next_out = out_buf;
  14.638 +
  14.639 +    ret = deflate(&strm, Z_FINISH);
  14.640 +    if (ret != Z_STREAM_END && ret != Z_OK) {
  14.641 +        qemu_free(out_buf);
  14.642 +        deflateEnd(&strm);
  14.643 +        return -1;
  14.644 +    }
  14.645 +    out_len = strm.next_out - out_buf;
  14.646 +
  14.647 +    deflateEnd(&strm);
  14.648 +
  14.649 +    if (ret != Z_STREAM_END || out_len >= s->cluster_size) {
  14.650 +        /* could not compress: write normal cluster */
  14.651 +        qcow_write(bs, sector_num, buf, s->cluster_sectors);
  14.652 +    } else {
  14.653 +        cluster_offset = get_cluster_offset(bs, sector_num << 9, 2, 
  14.654 +                                            out_len, 0, 0);
  14.655 +        cluster_offset &= s->cluster_offset_mask;
  14.656 +        lseek(s->fd, cluster_offset, SEEK_SET);
  14.657 +        if (write(s->fd, out_buf, out_len) != out_len) {
  14.658 +            qemu_free(out_buf);
  14.659 +            return -1;
  14.660 +        }
  14.661 +    }
  14.662 +    
  14.663 +    qemu_free(out_buf);
  14.664 +    return 0;
  14.665 +}
  14.666 +
  14.667 +BlockDriver bdrv_qcow = {
  14.668 +    "qcow",
  14.669 +    sizeof(BDRVQcowState),
  14.670 +    qcow_probe,
  14.671 +    qcow_open,
  14.672 +    qcow_read,
  14.673 +    qcow_write,
  14.674 +    qcow_close,
  14.675 +    qcow_create,
  14.676 +    qcow_is_allocated,
  14.677 +    qcow_set_key,
  14.678 +};
  14.679 +
  14.680 +
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/tools/ioemu/block-vmdk.c	Thu May 19 22:05:02 2005 +0000
    15.3 @@ -0,0 +1,279 @@
    15.4 +/*
    15.5 + * Block driver for the VMDK format
    15.6 + * 
    15.7 + * Copyright (c) 2004 Fabrice Bellard
    15.8 + * 
    15.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   15.10 + * of this software and associated documentation files (the "Software"), to deal
   15.11 + * in the Software without restriction, including without limitation the rights
   15.12 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   15.13 + * copies of the Software, and to permit persons to whom the Software is
   15.14 + * furnished to do so, subject to the following conditions:
   15.15 + *
   15.16 + * The above copyright notice and this permission notice shall be included in
   15.17 + * all copies or substantial portions of the Software.
   15.18 + *
   15.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   15.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   15.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
   15.22 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   15.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   15.24 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   15.25 + * THE SOFTWARE.
   15.26 + */
   15.27 +#include "vl.h"
   15.28 +#include "block_int.h"
   15.29 +
   15.30 +/* XXX: this code is untested */
   15.31 +/* XXX: add write support */
   15.32 +
   15.33 +#define VMDK3_MAGIC (('C' << 24) | ('O' << 16) | ('W' << 8) | 'D')
   15.34 +#define VMDK4_MAGIC (('K' << 24) | ('D' << 16) | ('M' << 8) | 'V')
   15.35 +
   15.36 +typedef struct {
   15.37 +    uint32_t version;
   15.38 +    uint32_t flags;
   15.39 +    uint32_t disk_sectors;
   15.40 +    uint32_t granularity;
   15.41 +    uint32_t l1dir_offset;
   15.42 +    uint32_t l1dir_size;
   15.43 +    uint32_t file_sectors;
   15.44 +    uint32_t cylinders;
   15.45 +    uint32_t heads;
   15.46 +    uint32_t sectors_per_track;
   15.47 +} VMDK3Header;
   15.48 +
   15.49 +typedef struct {
   15.50 +    uint32_t version;
   15.51 +    uint32_t flags;
   15.52 +    int64_t capacity;
   15.53 +    int64_t granularity;
   15.54 +    int64_t desc_offset;
   15.55 +    int64_t desc_size;
   15.56 +    int32_t num_gtes_per_gte;
   15.57 +    int64_t rgd_offset;
   15.58 +    int64_t gd_offset;
   15.59 +    int64_t grain_offset;
   15.60 +    char filler[1];
   15.61 +    char check_bytes[4];
   15.62 +} VMDK4Header;
   15.63 +
   15.64 +#define L2_CACHE_SIZE 16
   15.65 +
   15.66 +typedef struct BDRVVmdkState {
   15.67 +    int fd;
   15.68 +    int64_t l1_table_offset;
   15.69 +    uint32_t *l1_table;
   15.70 +    unsigned int l1_size;
   15.71 +    uint32_t l1_entry_sectors;
   15.72 +
   15.73 +    unsigned int l2_size;
   15.74 +    uint32_t *l2_cache;
   15.75 +    uint32_t l2_cache_offsets[L2_CACHE_SIZE];
   15.76 +    uint32_t l2_cache_counts[L2_CACHE_SIZE];
   15.77 +
   15.78 +    unsigned int cluster_sectors;
   15.79 +} BDRVVmdkState;
   15.80 +
   15.81 +static int vmdk_probe(const uint8_t *buf, int buf_size, const char *filename)
   15.82 +{
   15.83 +    uint32_t magic;
   15.84 +
   15.85 +    if (buf_size < 4)
   15.86 +        return 0;
   15.87 +    magic = be32_to_cpu(*(uint32_t *)buf);
   15.88 +    if (magic == VMDK3_MAGIC ||
   15.89 +        magic == VMDK4_MAGIC)
   15.90 +        return 100;
   15.91 +    else
   15.92 +        return 0;
   15.93 +}
   15.94 +
   15.95 +static int vmdk_open(BlockDriverState *bs, const char *filename)
   15.96 +{
   15.97 +    BDRVVmdkState *s = bs->opaque;
   15.98 +    int fd, i;
   15.99 +    uint32_t magic;
  15.100 +    int l1_size;
  15.101 +
  15.102 +    fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
  15.103 +    if (fd < 0)
  15.104 +        return -1;
  15.105 +    if (read(fd, &magic, sizeof(magic)) != sizeof(magic))
  15.106 +        goto fail;
  15.107 +    magic = be32_to_cpu(magic);
  15.108 +    if (magic == VMDK3_MAGIC) {
  15.109 +        VMDK3Header header;
  15.110 +        if (read(fd, &header, sizeof(header)) != 
  15.111 +            sizeof(header))
  15.112 +            goto fail;
  15.113 +        s->cluster_sectors = le32_to_cpu(header.granularity);
  15.114 +        s->l2_size = 1 << 9;
  15.115 +        s->l1_size = 1 << 6;
  15.116 +        bs->total_sectors = le32_to_cpu(header.disk_sectors);
  15.117 +        s->l1_table_offset = le32_to_cpu(header.l1dir_offset) * 512;
  15.118 +        s->l1_entry_sectors = s->l2_size * s->cluster_sectors;
  15.119 +    } else if (magic == VMDK4_MAGIC) {
  15.120 +        VMDK4Header header;
  15.121 +        
  15.122 +        if (read(fd, &header, sizeof(header)) != sizeof(header))
  15.123 +            goto fail;
  15.124 +        bs->total_sectors = le32_to_cpu(header.capacity);
  15.125 +        s->cluster_sectors = le32_to_cpu(header.granularity);
  15.126 +        s->l2_size = le32_to_cpu(header.num_gtes_per_gte);
  15.127 +        s->l1_entry_sectors = s->l2_size * s->cluster_sectors;
  15.128 +        if (s->l1_entry_sectors <= 0)
  15.129 +            goto fail;
  15.130 +        s->l1_size = (bs->total_sectors + s->l1_entry_sectors - 1) 
  15.131 +            / s->l1_entry_sectors;
  15.132 +        s->l1_table_offset = le64_to_cpu(header.rgd_offset) * 512;
  15.133 +    } else {
  15.134 +        goto fail;
  15.135 +    }
  15.136 +    /* read the L1 table */
  15.137 +    l1_size = s->l1_size * sizeof(uint32_t);
  15.138 +    s->l1_table = qemu_malloc(l1_size);
  15.139 +    if (!s->l1_table)
  15.140 +        goto fail;
  15.141 +    if (lseek(fd, s->l1_table_offset, SEEK_SET) == -1)
  15.142 +        goto fail;
  15.143 +    if (read(fd, s->l1_table, l1_size) != l1_size)
  15.144 +        goto fail;
  15.145 +    for(i = 0; i < s->l1_size; i++) {
  15.146 +        le32_to_cpus(&s->l1_table[i]);
  15.147 +    }
  15.148 +
  15.149 +    s->l2_cache = qemu_malloc(s->l2_size * L2_CACHE_SIZE * sizeof(uint32_t));
  15.150 +    if (!s->l2_cache)
  15.151 +        goto fail;
  15.152 +    s->fd = fd;
  15.153 +    /* XXX: currently only read only */
  15.154 +    bs->read_only = 1;
  15.155 +    return 0;
  15.156 + fail:
  15.157 +    qemu_free(s->l1_table);
  15.158 +    qemu_free(s->l2_cache);
  15.159 +    close(fd);
  15.160 +    return -1;
  15.161 +}
  15.162 +
  15.163 +static uint64_t get_cluster_offset(BlockDriverState *bs,
  15.164 +                                   uint64_t offset)
  15.165 +{
  15.166 +    BDRVVmdkState *s = bs->opaque;
  15.167 +    unsigned int l1_index, l2_offset, l2_index;
  15.168 +    int min_index, i, j;
  15.169 +    uint32_t min_count, *l2_table;
  15.170 +    uint64_t cluster_offset;
  15.171 +    
  15.172 +    l1_index = (offset >> 9) / s->l1_entry_sectors;
  15.173 +    if (l1_index >= s->l1_size)
  15.174 +        return 0;
  15.175 +    l2_offset = s->l1_table[l1_index];
  15.176 +    if (!l2_offset)
  15.177 +        return 0;
  15.178 +    
  15.179 +    for(i = 0; i < L2_CACHE_SIZE; i++) {
  15.180 +        if (l2_offset == s->l2_cache_offsets[i]) {
  15.181 +            /* increment the hit count */
  15.182 +            if (++s->l2_cache_counts[i] == 0xffffffff) {
  15.183 +                for(j = 0; j < L2_CACHE_SIZE; j++) {
  15.184 +                    s->l2_cache_counts[j] >>= 1;
  15.185 +                }
  15.186 +            }
  15.187 +            l2_table = s->l2_cache + (i * s->l2_size);
  15.188 +            goto found;
  15.189 +        }
  15.190 +    }
  15.191 +    /* not found: load a new entry in the least used one */
  15.192 +    min_index = 0;
  15.193 +    min_count = 0xffffffff;
  15.194 +    for(i = 0; i < L2_CACHE_SIZE; i++) {
  15.195 +        if (s->l2_cache_counts[i] < min_count) {
  15.196 +            min_count = s->l2_cache_counts[i];
  15.197 +            min_index = i;
  15.198 +        }
  15.199 +    }
  15.200 +    l2_table = s->l2_cache + (min_index * s->l2_size);
  15.201 +    lseek(s->fd, (int64_t)l2_offset * 512, SEEK_SET);
  15.202 +    if (read(s->fd, l2_table, s->l2_size * sizeof(uint32_t)) != 
  15.203 +        s->l2_size * sizeof(uint32_t))
  15.204 +        return 0;
  15.205 +    s->l2_cache_offsets[min_index] = l2_offset;
  15.206 +    s->l2_cache_counts[min_index] = 1;
  15.207 + found:
  15.208 +    l2_index = ((offset >> 9) / s->cluster_sectors) % s->l2_size;
  15.209 +    cluster_offset = le32_to_cpu(l2_table[l2_index]);
  15.210 +    cluster_offset <<= 9;
  15.211 +    return cluster_offset;
  15.212 +}
  15.213 +
  15.214 +static int vmdk_is_allocated(BlockDriverState *bs, int64_t sector_num, 
  15.215 +                             int nb_sectors, int *pnum)
  15.216 +{
  15.217 +    BDRVVmdkState *s = bs->opaque;
  15.218 +    int index_in_cluster, n;
  15.219 +    uint64_t cluster_offset;
  15.220 +
  15.221 +    cluster_offset = get_cluster_offset(bs, sector_num << 9);
  15.222 +    index_in_cluster = sector_num % s->cluster_sectors;
  15.223 +    n = s->cluster_sectors - index_in_cluster;
  15.224 +    if (n > nb_sectors)
  15.225 +        n = nb_sectors;
  15.226 +    *pnum = n;
  15.227 +    return (cluster_offset != 0);
  15.228 +}
  15.229 +
  15.230 +static int vmdk_read(BlockDriverState *bs, int64_t sector_num, 
  15.231 +                    uint8_t *buf, int nb_sectors)
  15.232 +{
  15.233 +    BDRVVmdkState *s = bs->opaque;
  15.234 +    int ret, index_in_cluster, n;
  15.235 +    uint64_t cluster_offset;
  15.236 +    
  15.237 +    while (nb_sectors > 0) {
  15.238 +        cluster_offset = get_cluster_offset(bs, sector_num << 9);
  15.239 +        index_in_cluster = sector_num % s->cluster_sectors;
  15.240 +        n = s->cluster_sectors - index_in_cluster;
  15.241 +        if (n > nb_sectors)
  15.242 +            n = nb_sectors;
  15.243 +        if (!cluster_offset) {
  15.244 +            memset(buf, 0, 512 * n);
  15.245 +        } else {
  15.246 +            lseek(s->fd, cluster_offset + index_in_cluster * 512, SEEK_SET);
  15.247 +            ret = read(s->fd, buf, n * 512);
  15.248 +            if (ret != n * 512) 
  15.249 +                return -1;
  15.250 +        }
  15.251 +        nb_sectors -= n;
  15.252 +        sector_num += n;
  15.253 +        buf += n * 512;
  15.254 +    }
  15.255 +    return 0;
  15.256 +}
  15.257 +
  15.258 +static int vmdk_write(BlockDriverState *bs, int64_t sector_num, 
  15.259 +                     const uint8_t *buf, int nb_sectors)
  15.260 +{
  15.261 +    return -1;
  15.262 +}
  15.263 +
  15.264 +static void vmdk_close(BlockDriverState *bs)
  15.265 +{
  15.266 +    BDRVVmdkState *s = bs->opaque;
  15.267 +    qemu_free(s->l1_table);
  15.268 +    qemu_free(s->l2_cache);
  15.269 +    close(s->fd);
  15.270 +}
  15.271 +
  15.272 +BlockDriver bdrv_vmdk = {
  15.273 +    "vmdk",
  15.274 +    sizeof(BDRVVmdkState),
  15.275 +    vmdk_probe,
  15.276 +    vmdk_open,
  15.277 +    vmdk_read,
  15.278 +    vmdk_write,
  15.279 +    vmdk_close,
  15.280 +    NULL, /* no create yet */
  15.281 +    vmdk_is_allocated,
  15.282 +};
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/tools/ioemu/block.c	Thu May 19 22:05:02 2005 +0000
    16.3 @@ -0,0 +1,548 @@
    16.4 +/*
    16.5 + * QEMU System Emulator block driver
    16.6 + * 
    16.7 + * Copyright (c) 2003 Fabrice Bellard
    16.8 + * 
    16.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   16.10 + * of this software and associated documentation files (the "Software"), to deal
   16.11 + * in the Software without restriction, including without limitation the rights
   16.12 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   16.13 + * copies of the Software, and to permit persons to whom the Software is
   16.14 + * furnished to do so, subject to the following conditions:
   16.15 + *
   16.16 + * The above copyright notice and this permission notice shall be included in
   16.17 + * all copies or substantial portions of the Software.
   16.18 + *
   16.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   16.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   16.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
   16.22 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   16.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   16.24 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   16.25 + * THE SOFTWARE.
   16.26 + */
   16.27 +#include "vl.h"
   16.28 +#include "block_int.h"
   16.29 +
   16.30 +static BlockDriverState *bdrv_first;
   16.31 +static BlockDriver *first_drv;
   16.32 +
   16.33 +void bdrv_register(BlockDriver *bdrv)
   16.34 +{
   16.35 +    bdrv->next = first_drv;
   16.36 +    first_drv = bdrv;
   16.37 +}
   16.38 +
   16.39 +/* create a new block device (by default it is empty) */
   16.40 +BlockDriverState *bdrv_new(const char *device_name)
   16.41 +{
   16.42 +    BlockDriverState **pbs, *bs;
   16.43 +
   16.44 +    bs = qemu_mallocz(sizeof(BlockDriverState));
   16.45 +    if(!bs)
   16.46 +        return NULL;
   16.47 +    pstrcpy(bs->device_name, sizeof(bs->device_name), device_name);
   16.48 +    if (device_name[0] != '\0') {
   16.49 +        /* insert at the end */
   16.50 +        pbs = &bdrv_first;
   16.51 +        while (*pbs != NULL)
   16.52 +            pbs = &(*pbs)->next;
   16.53 +        *pbs = bs;
   16.54 +    }
   16.55 +    return bs;
   16.56 +}
   16.57 +
   16.58 +BlockDriver *bdrv_find_format(const char *format_name)
   16.59 +{
   16.60 +    BlockDriver *drv1;
   16.61 +    for(drv1 = first_drv; drv1 != NULL; drv1 = drv1->next) {
   16.62 +        if (!strcmp(drv1->format_name, format_name))
   16.63 +            return drv1;
   16.64 +    }
   16.65 +    return NULL;
   16.66 +}
   16.67 +
   16.68 +int bdrv_create(BlockDriver *drv, 
   16.69 +                const char *filename, int64_t size_in_sectors,
   16.70 +                const char *backing_file, int flags)
   16.71 +{
   16.72 +    if (!drv->bdrv_create)
   16.73 +        return -ENOTSUP;
   16.74 +    return drv->bdrv_create(filename, size_in_sectors, backing_file, flags);
   16.75 +}
   16.76 +
   16.77 +static BlockDriver *find_image_format(const char *filename)
   16.78 +{
   16.79 +    int fd, ret, score, score_max;
   16.80 +    BlockDriver *drv1, *drv;
   16.81 +    uint8_t buf[1024];
   16.82 +
   16.83 +    fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
   16.84 +    if (fd < 0)
   16.85 +        return NULL;
   16.86 +    ret = read(fd, buf, sizeof(buf));
   16.87 +    if (ret < 0) {
   16.88 +        close(fd);
   16.89 +        return NULL;
   16.90 +    }
   16.91 +    close(fd);
   16.92 +    
   16.93 +    drv = NULL;
   16.94 +    score_max = 0;
   16.95 +    for(drv1 = first_drv; drv1 != NULL; drv1 = drv1->next) {
   16.96 +        score = drv1->bdrv_probe(buf, ret, filename);
   16.97 +        if (score > score_max) {
   16.98 +            score_max = score;
   16.99 +            drv = drv1;
  16.100 +        }
  16.101 +    }
  16.102 +    return drv;
  16.103 +}
  16.104 +
  16.105 +int bdrv_open(BlockDriverState *bs, const char *filename, int snapshot)
  16.106 +{
  16.107 +    return bdrv_open2(bs, filename, snapshot, NULL);
  16.108 +}
  16.109 +
  16.110 +int bdrv_open2(BlockDriverState *bs, const char *filename, int snapshot,
  16.111 +               BlockDriver *drv)
  16.112 +{
  16.113 +    int ret;
  16.114 +    
  16.115 +    bs->read_only = 0;
  16.116 +    bs->is_temporary = 0;
  16.117 +    bs->encrypted = 0;
  16.118 +    
  16.119 +    pstrcpy(bs->filename, sizeof(bs->filename), filename);
  16.120 +    if (!drv) {
  16.121 +        drv = find_image_format(filename);
  16.122 +        if (!drv)
  16.123 +            return -1;
  16.124 +    }
  16.125 +    bs->drv = drv;
  16.126 +    bs->opaque = qemu_mallocz(drv->instance_size);
  16.127 +    if (bs->opaque == NULL && drv->instance_size > 0)
  16.128 +        return -1;
  16.129 +    
  16.130 +    ret = drv->bdrv_open(bs, filename);
  16.131 +    if (ret < 0) {
  16.132 +        qemu_free(bs->opaque);
  16.133 +        return -1;
  16.134 +    }
  16.135 +#ifndef _WIN32
  16.136 +    if (bs->is_temporary) {
  16.137 +        unlink(filename);
  16.138 +    }
  16.139 +#endif
  16.140 +    if (bs->backing_file[0] != '\0' && drv->bdrv_is_allocated) {
  16.141 +        /* if there is a backing file, use it */
  16.142 +        bs->backing_hd = bdrv_new("");
  16.143 +        if (!bs->backing_hd) {
  16.144 +        fail:
  16.145 +            bdrv_close(bs);
  16.146 +            return -1;
  16.147 +        }
  16.148 +        if (bdrv_open(bs->backing_hd, bs->backing_file, 0) < 0)
  16.149 +            goto fail;
  16.150 +    }
  16.151 +
  16.152 +    bs->inserted = 1;
  16.153 +
  16.154 +    /* call the change callback */
  16.155 +    if (bs->change_cb)
  16.156 +        bs->change_cb(bs->change_opaque);
  16.157 +
  16.158 +    return 0;
  16.159 +}
  16.160 +
  16.161 +void bdrv_close(BlockDriverState *bs)
  16.162 +{
  16.163 +    if (bs->inserted) {
  16.164 +        if (bs->backing_hd)
  16.165 +            bdrv_delete(bs->backing_hd);
  16.166 +        bs->drv->bdrv_close(bs);
  16.167 +        qemu_free(bs->opaque);
  16.168 +#ifdef _WIN32
  16.169 +        if (bs->is_temporary) {
  16.170 +            unlink(bs->filename);
  16.171 +        }
  16.172 +#endif
  16.173 +        bs->opaque = NULL;
  16.174 +        bs->drv = NULL;
  16.175 +        bs->inserted = 0;
  16.176 +
  16.177 +        /* call the change callback */
  16.178 +        if (bs->change_cb)
  16.179 +            bs->change_cb(bs->change_opaque);
  16.180 +    }
  16.181 +}
  16.182 +
  16.183 +void bdrv_delete(BlockDriverState *bs)
  16.184 +{
  16.185 +    /* XXX: remove the driver list */
  16.186 +    bdrv_close(bs);
  16.187 +    qemu_free(bs);
  16.188 +}
  16.189 +
  16.190 +/* commit COW file into the raw image */
  16.191 +int bdrv_commit(BlockDriverState *bs)
  16.192 +{
  16.193 +    int64_t i;
  16.194 +    int n, j;
  16.195 +    unsigned char sector[512];
  16.196 +
  16.197 +    if (!bs->inserted)
  16.198 +        return -ENOENT;
  16.199 +
  16.200 +    if (bs->read_only) {
  16.201 +	return -EACCES;
  16.202 +    }
  16.203 +
  16.204 +    if (!bs->backing_hd) {
  16.205 +	return -ENOTSUP;
  16.206 +    }
  16.207 +
  16.208 +    for (i = 0; i < bs->total_sectors;) {
  16.209 +        if (bs->drv->bdrv_is_allocated(bs, i, 65536, &n)) {
  16.210 +            for(j = 0; j < n; j++) {
  16.211 +                if (bdrv_read(bs, i, sector, 1) != 0) {
  16.212 +                    return -EIO;
  16.213 +                }
  16.214 +
  16.215 +                if (bdrv_write(bs->backing_hd, i, sector, 1) != 0) {
  16.216 +                    return -EIO;
  16.217 +                }
  16.218 +                i++;
  16.219 +	    }
  16.220 +	} else {
  16.221 +            i += n;
  16.222 +        }
  16.223 +    }
  16.224 +    return 0;
  16.225 +}
  16.226 +
  16.227 +/* return -1 if error */
  16.228 +int bdrv_read(BlockDriverState *bs, int64_t sector_num, 
  16.229 +              uint8_t *buf, int nb_sectors)
  16.230 +{
  16.231 +    int ret, n;
  16.232 +    BlockDriver *drv = bs->drv;
  16.233 +
  16.234 +    if (!bs->inserted)
  16.235 +        return -1;
  16.236 +
  16.237 +    while (nb_sectors > 0) {
  16.238 +        if (sector_num == 0 && bs->boot_sector_enabled) {
  16.239 +            memcpy(buf, bs->boot_sector_data, 512);
  16.240 +            n = 1;
  16.241 +        } else if (bs->backing_hd) {
  16.242 +            if (drv->bdrv_is_allocated(bs, sector_num, nb_sectors, &n)) {
  16.243 +                ret = drv->bdrv_read(bs, sector_num, buf, n);
  16.244 +                if (ret < 0)
  16.245 +                    return -1;
  16.246 +            } else {
  16.247 +                /* read from the base image */
  16.248 +                ret = bdrv_read(bs->backing_hd, sector_num, buf, n);
  16.249 +                if (ret < 0)
  16.250 +                    return -1;
  16.251 +            }
  16.252 +        } else {
  16.253 +            ret = drv->bdrv_read(bs, sector_num, buf, nb_sectors);
  16.254 +            if (ret < 0)
  16.255 +                return -1;
  16.256 +            /* no need to loop */
  16.257 +            break;
  16.258 +        }
  16.259 +        nb_sectors -= n;
  16.260 +        sector_num += n;
  16.261 +        buf += n * 512;
  16.262 +    }
  16.263 +    return 0;
  16.264 +}
  16.265 +
  16.266 +/* return -1 if error */
  16.267 +int bdrv_write(BlockDriverState *bs, int64_t sector_num, 
  16.268 +               const uint8_t *buf, int nb_sectors)
  16.269 +{
  16.270 +    if (!bs->inserted)
  16.271 +        return -1;
  16.272 +    if (bs->read_only)
  16.273 +        return -1;
  16.274 +    return bs->drv->bdrv_write(bs, sector_num, buf, nb_sectors);
  16.275 +}
  16.276 +
  16.277 +void bdrv_get_geometry(BlockDriverState *bs, int64_t *nb_sectors_ptr)
  16.278 +{
  16.279 +    *nb_sectors_ptr = bs->total_sectors;
  16.280 +}
  16.281 +
  16.282 +/* force a given boot sector. */
  16.283 +void bdrv_set_boot_sector(BlockDriverState *bs, const uint8_t *data, int size)
  16.284 +{
  16.285 +    bs->boot_sector_enabled = 1;
  16.286 +    if (size > 512)
  16.287 +        size = 512;
  16.288 +    memcpy(bs->boot_sector_data, data, size);
  16.289 +    memset(bs->boot_sector_data + size, 0, 512 - size);
  16.290 +}
  16.291 +
  16.292 +void bdrv_set_geometry_hint(BlockDriverState *bs, 
  16.293 +                            int cyls, int heads, int secs)
  16.294 +{
  16.295 +    bs->cyls = cyls;
  16.296 +    bs->heads = heads;
  16.297 +    bs->secs = secs;
  16.298 +}
  16.299 +
  16.300 +void bdrv_set_type_hint(BlockDriverState *bs, int type)
  16.301 +{
  16.302 +    bs->type = type;
  16.303 +    bs->removable = ((type == BDRV_TYPE_CDROM ||
  16.304 +                      type == BDRV_TYPE_FLOPPY));
  16.305 +}
  16.306 +
  16.307 +void bdrv_get_geometry_hint(BlockDriverState *bs, 
  16.308 +                            int *pcyls, int *pheads, int *psecs)
  16.309 +{
  16.310 +    *pcyls = bs->cyls;
  16.311 +    *pheads = bs->heads;
  16.312 +    *psecs = bs->secs;
  16.313 +}
  16.314 +
  16.315 +int bdrv_get_type_hint(BlockDriverState *bs)
  16.316 +{
  16.317 +    return bs->type;
  16.318 +}
  16.319 +
  16.320 +int bdrv_is_removable(BlockDriverState *bs)
  16.321 +{
  16.322 +    return bs->removable;
  16.323 +}
  16.324 +
  16.325 +int bdrv_is_read_only(BlockDriverState *bs)
  16.326 +{
  16.327 +    return bs->read_only;
  16.328 +}
  16.329 +
  16.330 +int bdrv_is_inserted(BlockDriverState *bs)
  16.331 +{
  16.332 +    return bs->inserted;
  16.333 +}
  16.334 +
  16.335 +int bdrv_is_locked(BlockDriverState *bs)
  16.336 +{
  16.337 +    return bs->locked;
  16.338 +}
  16.339 +
  16.340 +void bdrv_set_locked(BlockDriverState *bs, int locked)
  16.341 +{
  16.342 +    bs->locked = locked;
  16.343 +}
  16.344 +
  16.345 +void bdrv_set_change_cb(BlockDriverState *bs, 
  16.346 +                        void (*change_cb)(void *opaque), void *opaque)
  16.347 +{
  16.348 +    bs->change_cb = change_cb;
  16.349 +    bs->change_opaque = opaque;
  16.350 +}
  16.351 +
  16.352 +int bdrv_is_encrypted(BlockDriverState *bs)
  16.353 +{
  16.354 +    if (bs->backing_hd && bs->backing_hd->encrypted)
  16.355 +        return 1;
  16.356 +    return bs->encrypted;
  16.357 +}
  16.358 +
  16.359 +int bdrv_set_key(BlockDriverState *bs, const char *key)
  16.360 +{
  16.361 +    int ret;
  16.362 +    if (bs->backing_hd && bs->backing_hd->encrypted) {
  16.363 +        ret = bdrv_set_key(bs->backing_hd, key);
  16.364 +        if (ret < 0)
  16.365 +            return ret;
  16.366 +        if (!bs->encrypted)
  16.367 +            return 0;
  16.368 +    }
  16.369 +    if (!bs->encrypted || !bs->drv || !bs->drv->bdrv_set_key)
  16.370 +        return -1;
  16.371 +    return bs->drv->bdrv_set_key(bs, key);
  16.372 +}
  16.373 +
  16.374 +void bdrv_get_format(BlockDriverState *bs, char *buf, int buf_size)
  16.375 +{
  16.376 +    if (!bs->inserted || !bs->drv) {
  16.377 +        buf[0] = '\0';
  16.378 +    } else {
  16.379 +        pstrcpy(buf, buf_size, bs->drv->format_name);
  16.380 +    }
  16.381 +}
  16.382 +
  16.383 +void bdrv_iterate_format(void (*it)(void *opaque, const char *name), 
  16.384 +                         void *opaque)
  16.385 +{
  16.386 +    BlockDriver *drv;
  16.387 +
  16.388 +    for (drv = first_drv; drv != NULL; drv = drv->next) {
  16.389 +        it(opaque, drv->format_name);
  16.390 +    }
  16.391 +}
  16.392 +
  16.393 +BlockDriverState *bdrv_find(const char *name)
  16.394 +{
  16.395 +    BlockDriverState *bs;
  16.396 +
  16.397 +    for (bs = bdrv_first; bs != NULL; bs = bs->next) {
  16.398 +        if (!strcmp(name, bs->device_name))
  16.399 +            return bs;
  16.400 +    }
  16.401 +    return NULL;
  16.402 +}
  16.403 +
  16.404 +void bdrv_iterate(void (*it)(void *opaque, const char *name), void *opaque)
  16.405 +{
  16.406 +    BlockDriverState *bs;
  16.407 +
  16.408 +    for (bs = bdrv_first; bs != NULL; bs = bs->next) {
  16.409 +        it(opaque, bs->device_name);
  16.410 +    }
  16.411 +}
  16.412 +
  16.413 +const char *bdrv_get_device_name(BlockDriverState *bs)
  16.414 +{
  16.415 +    return bs->device_name;
  16.416 +}
  16.417 +
  16.418 +void bdrv_info(void)
  16.419 +{
  16.420 +    BlockDriverState *bs;
  16.421 +
  16.422 +    for (bs = bdrv_first; bs != NULL; bs = bs->next) {
  16.423 +        term_printf("%s:", bs->device_name);
  16.424 +        term_printf(" type=");
  16.425 +        switch(bs->type) {
  16.426 +        case BDRV_TYPE_HD:
  16.427 +            term_printf("hd");
  16.428 +            break;
  16.429 +        case BDRV_TYPE_CDROM:
  16.430 +            term_printf("cdrom");
  16.431 +            break;
  16.432 +        case BDRV_TYPE_FLOPPY:
  16.433 +            term_printf("floppy");
  16.434 +            break;
  16.435 +        }
  16.436 +        term_printf(" removable=%d", bs->removable);
  16.437 +        if (bs->removable) {
  16.438 +            term_printf(" locked=%d", bs->locked);
  16.439 +        }
  16.440 +        if (bs->inserted) {
  16.441 +            term_printf(" file=%s", bs->filename);
  16.442 +            if (bs->backing_file[0] != '\0')
  16.443 +                term_printf(" backing_file=%s", bs->backing_file);
  16.444 +            term_printf(" ro=%d", bs->read_only);
  16.445 +            term_printf(" drv=%s", bs->drv->format_name);
  16.446 +            if (bs->encrypted)
  16.447 +                term_printf(" encrypted");
  16.448 +        } else {
  16.449 +            term_printf(" [not inserted]");
  16.450 +        }
  16.451 +        term_printf("\n");
  16.452 +    }
  16.453 +}
  16.454 +
  16.455 +
  16.456 +/**************************************************************/
  16.457 +/* RAW block driver */
  16.458 +
  16.459 +typedef struct BDRVRawState {
  16.460 +    int fd;
  16.461 +} BDRVRawState;
  16.462 +
  16.463 +static int raw_probe(const uint8_t *buf, int buf_size, const char *filename)
  16.464 +{
  16.465 +    return 1; /* maybe */
  16.466 +}
  16.467 +
  16.468 +static int raw_open(BlockDriverState *bs, const char *filename)
  16.469 +{
  16.470 +    BDRVRawState *s = bs->opaque;
  16.471 +    int fd;
  16.472 +    int64_t size;
  16.473 +
  16.474 +    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
  16.475 +    if (fd < 0) {
  16.476 +        fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
  16.477 +        if (fd < 0)
  16.478 +            return -1;
  16.479 +        bs->read_only = 1;
  16.480 +    }
  16.481 +    size = lseek(fd, 0, SEEK_END);
  16.482 +    bs->total_sectors = size / 512;
  16.483 +    s->fd = fd;
  16.484 +    return 0;
  16.485 +}
  16.486 +
  16.487 +static int raw_read(BlockDriverState *bs, int64_t sector_num, 
  16.488 +                    uint8_t *buf, int nb_sectors)
  16.489 +{
  16.490 +    BDRVRawState *s = bs->opaque;
  16.491 +    int ret;
  16.492 +    
  16.493 +    lseek(s->fd, sector_num * 512, SEEK_SET);
  16.494 +    ret = read(s->fd, buf, nb_sectors * 512);
  16.495 +    if (ret != nb_sectors * 512) 
  16.496 +        return -1;
  16.497 +    return 0;
  16.498 +}
  16.499 +
  16.500 +static int raw_write(BlockDriverState *bs, int64_t sector_num, 
  16.501 +                     const uint8_t *buf, int nb_sectors)
  16.502 +{
  16.503 +    BDRVRawState *s = bs->opaque;
  16.504 +    int ret;
  16.505 +    
  16.506 +    lseek(s->fd, sector_num * 512, SEEK_SET);
  16.507 +    ret = write(s->fd, buf, nb_sectors * 512);
  16.508 +    if (ret != nb_sectors * 512) 
  16.509 +        return -1;
  16.510 +    return 0;
  16.511 +}
  16.512 +
  16.513 +static void raw_close(BlockDriverState *bs)
  16.514 +{
  16.515 +    BDRVRawState *s = bs->opaque;
  16.516 +    close(s->fd);
  16.517 +}
  16.518 +
  16.519 +static int raw_create(const char *filename, int64_t total_size,
  16.520 +                      const char *backing_file, int flags)
  16.521 +{
  16.522 +    int fd;
  16.523 +
  16.524 +    if (flags || backing_file)
  16.525 +        return -ENOTSUP;
  16.526 +
  16.527 +    fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE, 
  16.528 +              0644);
  16.529 +    if (fd < 0)
  16.530 +        return -EIO;
  16.531 +    ftruncate(fd, total_size * 512);
  16.532 +    close(fd);
  16.533 +    return 0;
  16.534 +}
  16.535 +
  16.536 +BlockDriver bdrv_raw = {
  16.537 +    "raw",
  16.538 +    sizeof(BDRVRawState),
  16.539 +    raw_probe,
  16.540 +    raw_open,
  16.541 +    raw_read,
  16.542 +    raw_write,
  16.543 +    raw_close,
  16.544 +    raw_create,
  16.545 +};
  16.546 +
  16.547 +void bdrv_init(void)
  16.548 +{
  16.549 +    bdrv_register(&bdrv_raw);
  16.550 +    bdrv_register(&bdrv_cloop);
  16.551 +}
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/tools/ioemu/block_int.h	Thu May 19 22:05:02 2005 +0000
    17.3 @@ -0,0 +1,77 @@
    17.4 +/*
    17.5 + * QEMU System Emulator block driver
    17.6 + * 
    17.7 + * Copyright (c) 2003 Fabrice Bellard
    17.8 + * 
    17.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   17.10 + * of this software and associated documentation files (the "Software"), to deal
   17.11 + * in the Software without restriction, including without limitation the rights
   17.12 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   17.13 + * copies of the Software, and to permit persons to whom the Software is
   17.14 + * furnished to do so, subject to the following conditions:
   17.15 + *
   17.16 + * The above copyright notice and this permission notice shall be included in
   17.17 + * all copies or substantial portions of the Software.
   17.18 + *
   17.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   17.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   17.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
   17.22 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   17.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   17.24 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   17.25 + * THE SOFTWARE.
   17.26 + */
   17.27 +#ifndef BLOCK_INT_H
   17.28 +#define BLOCK_INT_H
   17.29 +
   17.30 +struct BlockDriver {
   17.31 +    const char *format_name;
   17.32 +    int instance_size;
   17.33 +    int (*bdrv_probe)(const uint8_t *buf, int buf_size, const char *filename);
   17.34 +    int (*bdrv_open)(BlockDriverState *bs, const char *filename);
   17.35 +    int (*bdrv_read)(BlockDriverState *bs, int64_t sector_num, 
   17.36 +                     uint8_t *buf, int nb_sectors);
   17.37 +    int (*bdrv_write)(BlockDriverState *bs, int64_t sector_num, 
   17.38 +                      const uint8_t *buf, int nb_sectors);
   17.39 +    void (*bdrv_close)(BlockDriverState *bs);
   17.40 +    int (*bdrv_create)(const char *filename, int64_t total_sectors, 
   17.41 +                       const char *backing_file, int flags);
   17.42 +    int (*bdrv_is_allocated)(BlockDriverState *bs, int64_t sector_num,
   17.43 +                             int nb_sectors, int *pnum);
   17.44 +    int (*bdrv_set_key)(BlockDriverState *bs, const char *key);
   17.45 +    struct BlockDriver *next;
   17.46 +};
   17.47 +
   17.48 +struct BlockDriverState {
   17.49 +    int64_t total_sectors;
   17.50 +    int read_only; /* if true, the media is read only */
   17.51 +    int inserted; /* if true, the media is present */
   17.52 +    int removable; /* if true, the media can be removed */
   17.53 +    int locked;    /* if true, the media cannot temporarily be ejected */
   17.54 +    int encrypted; /* if true, the media is encrypted */
   17.55 +    /* event callback when inserting/removing */
   17.56 +    void (*change_cb)(void *opaque);
   17.57 +    void *change_opaque;
   17.58 +
   17.59 +    BlockDriver *drv;
   17.60 +    void *opaque;
   17.61 +
   17.62 +    int boot_sector_enabled;
   17.63 +    uint8_t boot_sector_data[512];
   17.64 +
   17.65 +    char filename[1024];
   17.66 +    char backing_file[1024]; /* if non zero, the image is a diff of
   17.67 +                                this file image */
   17.68 +    int is_temporary;
   17.69 +    
   17.70 +    BlockDriverState *backing_hd;
   17.71 +    
   17.72 +    /* NOTE: the following infos are only hints for real hardware
   17.73 +       drivers. They are not used by the block driver */
   17.74 +    int cyls, heads, secs;
   17.75 +    int type;
   17.76 +    char device_name[32];
   17.77 +    BlockDriverState *next;
   17.78 +};
   17.79 +
   17.80 +#endif /* BLOCK_INT_H */
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/tools/ioemu/bswap.h	Thu May 19 22:05:02 2005 +0000
    18.3 @@ -0,0 +1,202 @@
    18.4 +#ifndef BSWAP_H
    18.5 +#define BSWAP_H
    18.6 +
    18.7 +#include "config-host.h"
    18.8 +
    18.9 +#include <inttypes.h>
   18.10 +
   18.11 +#ifdef HAVE_BYTESWAP_H
   18.12 +#include <byteswap.h>
   18.13 +#else
   18.14 +
   18.15 +#define bswap_16(x) \
   18.16 +({ \
   18.17 +	uint16_t __x = (x); \
   18.18 +	((uint16_t)( \
   18.19 +		(((uint16_t)(__x) & (uint16_t)0x00ffU) << 8) | \
   18.20 +		(((uint16_t)(__x) & (uint16_t)0xff00U) >> 8) )); \
   18.21 +})
   18.22 +
   18.23 +#define bswap_32(x) \
   18.24 +({ \
   18.25 +	uint32_t __x = (x); \
   18.26 +	((uint32_t)( \
   18.27 +		(((uint32_t)(__x) & (uint32_t)0x000000ffUL) << 24) | \
   18.28 +		(((uint32_t)(__x) & (uint32_t)0x0000ff00UL) <<  8) | \
   18.29 +		(((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >>  8) | \
   18.30 +		(((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) )); \
   18.31 +})
   18.32 +
   18.33 +#define bswap_64(x) \
   18.34 +({ \
   18.35 +	uint64_t __x = (x); \
   18.36 +	((uint64_t)( \
   18.37 +		(uint64_t)(((uint64_t)(__x) & (uint64_t)0x00000000000000ffULL) << 56) | \
   18.38 +		(uint64_t)(((uint64_t)(__x) & (uint64_t)0x000000000000ff00ULL) << 40) | \
   18.39 +		(uint64_t)(((uint64_t)(__x) & (uint64_t)0x0000000000ff0000ULL) << 24) | \
   18.40 +		(uint64_t)(((uint64_t)(__x) & (uint64_t)0x00000000ff000000ULL) <<  8) | \
   18.41 +	        (uint64_t)(((uint64_t)(__x) & (uint64_t)0x000000ff00000000ULL) >>  8) | \
   18.42 +		(uint64_t)(((uint64_t)(__x) & (uint64_t)0x0000ff0000000000ULL) >> 24) | \
   18.43 +		(uint64_t)(((uint64_t)(__x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \
   18.44 +		(uint64_t)(((uint64_t)(__x) & (uint64_t)0xff00000000000000ULL) >> 56) )); \
   18.45 +})
   18.46 +
   18.47 +#endif /* !HAVE_BYTESWAP_H */
   18.48 +
   18.49 +static inline uint16_t bswap16(uint16_t x)
   18.50 +{
   18.51 +    return bswap_16(x);
   18.52 +}
   18.53 +
   18.54 +static inline uint32_t bswap32(uint32_t x) 
   18.55 +{
   18.56 +    return bswap_32(x);
   18.57 +}
   18.58 +
   18.59 +static inline uint64_t bswap64(uint64_t x) 
   18.60 +{
   18.61 +    return bswap_64(x);
   18.62 +}
   18.63 +
   18.64 +static inline void bswap16s(uint16_t *s)
   18.65 +{
   18.66 +    *s = bswap16(*s);
   18.67 +}
   18.68 +
   18.69 +static inline void bswap32s(uint32_t *s)
   18.70 +{
   18.71 +    *s = bswap32(*s);
   18.72 +}
   18.73 +
   18.74 +static inline void bswap64s(uint64_t *s)
   18.75 +{
   18.76 +    *s = bswap64(*s);
   18.77 +}
   18.78 +
   18.79 +#if defined(WORDS_BIGENDIAN)
   18.80 +#define be_bswap(v, size) (v)
   18.81 +#define le_bswap(v, size) bswap ## size(v)
   18.82 +#define be_bswaps(v, size)
   18.83 +#define le_bswaps(p, size) *p = bswap ## size(*p);
   18.84 +#else
   18.85 +#define le_bswap(v, size) (v)
   18.86 +#define be_bswap(v, size) bswap ## size(v)
   18.87 +#define le_bswaps(v, size)
   18.88 +#define be_bswaps(p, size) *p = bswap ## size(*p);
   18.89 +#endif
   18.90 +
   18.91 +#define CPU_CONVERT(endian, size, type)\
   18.92 +static inline type endian ## size ## _to_cpu(type v)\
   18.93 +{\
   18.94 +    return endian ## _bswap(v, size);\
   18.95 +}\
   18.96 +\
   18.97 +static inline type cpu_to_ ## endian ## size(type v)\
   18.98 +{\
   18.99 +    return endian ## _bswap(v, size);\
  18.100 +}\
  18.101 +\
  18.102 +static inline void endian ## size ## _to_cpus(type *p)\
  18.103 +{\
  18.104 +    endian ## _bswaps(p, size)\
  18.105 +}\
  18.106 +\
  18.107 +static inline void cpu_to_ ## endian ## size ## s(type *p)\
  18.108 +{\
  18.109 +    endian ## _bswaps(p, size)\
  18.110 +}\
  18.111 +\
  18.112 +static inline type endian ## size ## _to_cpup(const type *p)\
  18.113 +{\
  18.114 +    return endian ## size ## _to_cpu(*p);\
  18.115 +}\
  18.116 +\
  18.117 +static inline void cpu_to_ ## endian ## size ## w(type *p, type v)\
  18.118 +{\
  18.119 +     *p = cpu_to_ ## endian ## size(v);\
  18.120 +}
  18.121 +
  18.122 +CPU_CONVERT(be, 16, uint16_t)
  18.123 +CPU_CONVERT(be, 32, uint32_t)
  18.124 +CPU_CONVERT(be, 64, uint64_t)
  18.125 +
  18.126 +CPU_CONVERT(le, 16, uint16_t)
  18.127 +CPU_CONVERT(le, 32, uint32_t)
  18.128 +CPU_CONVERT(le, 64, uint64_t)
  18.129 +
  18.130 +/* unaligned versions (optimized for frequent unaligned accesses)*/
  18.131 +
  18.132 +#if defined(__i386__) || defined(__powerpc__)
  18.133 +
  18.134 +#define cpu_to_le16wu(p, v) cpu_to_le16w(p, v)
  18.135 +#define cpu_to_le32wu(p, v) cpu_to_le32w(p, v)
  18.136 +#define le16_to_cpupu(p) le16_to_cpup(p)
  18.137 +#define le32_to_cpupu(p) le32_to_cpup(p)
  18.138 +
  18.139 +#define cpu_to_be16wu(p, v) cpu_to_be16w(p, v)
  18.140 +#define cpu_to_be32wu(p, v) cpu_to_be32w(p, v)
  18.141 +
  18.142 +#else
  18.143 +
  18.144 +static inline void cpu_to_le16wu(uint16_t *p, uint16_t v)
  18.145 +{
  18.146 +    uint8_t *p1 = (uint8_t *)p;
  18.147 +
  18.148 +    p1[0] = v;
  18.149 +    p1[1] = v >> 8;
  18.150 +}
  18.151 +
  18.152 +static inline void cpu_to_le32wu(uint32_t *p, uint32_t v)
  18.153 +{
  18.154 +    uint8_t *p1 = (uint8_t *)p;
  18.155 +
  18.156 +    p1[0] = v;
  18.157 +    p1[1] = v >> 8;
  18.158 +    p1[2] = v >> 16;
  18.159 +    p1[3] = v >> 24;
  18.160 +}
  18.161 +
  18.162 +static inline uint16_t le16_to_cpupu(const uint16_t *p)
  18.163 +{
  18.164 +    const uint8_t *p1 = (const uint8_t *)p;
  18.165 +    return p1[0] | (p1[1] << 8);
  18.166 +}
  18.167 +
  18.168 +static inline uint32_t le32_to_cpupu(const uint32_t *p)
  18.169 +{
  18.170 +    const uint8_t *p1 = (const uint8_t *)p;
  18.171 +    return p1[0] | (p1[1] << 8) | (p1[2] << 16) | (p1[3] << 24);
  18.172 +}
  18.173 +
  18.174 +static inline void cpu_to_be16wu(uint16_t *p, uint16_t v)
  18.175 +{
  18.176 +    uint8_t *p1 = (uint8_t *)p;
  18.177 +
  18.178 +    p1[0] = v >> 8;
  18.179 +    p1[1] = v;
  18.180 +}
  18.181 +
  18.182 +static inline void cpu_to_be32wu(uint32_t *p, uint32_t v)
  18.183 +{
  18.184 +    uint8_t *p1 = (uint8_t *)p;
  18.185 +
  18.186 +    p1[0] = v >> 24;
  18.187 +    p1[1] = v >> 16;
  18.188 +    p1[2] = v >> 8;
  18.189 +    p1[3] = v;
  18.190 +}
  18.191 +
  18.192 +#endif
  18.193 +
  18.194 +#ifdef WORDS_BIGENDIAN
  18.195 +#define cpu_to_32wu cpu_to_be32wu
  18.196 +#else
  18.197 +#define cpu_to_32wu cpu_to_le32wu
  18.198 +#endif
  18.199 +
  18.200 +#undef le_bswap
  18.201 +#undef be_bswap
  18.202 +#undef le_bswaps
  18.203 +#undef be_bswaps
  18.204 +
  18.205 +#endif /* BSWAP_H */
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/tools/ioemu/configure	Thu May 19 22:05:02 2005 +0000
    19.3 @@ -0,0 +1,585 @@
    19.4 +#!/bin/sh
    19.5 +#
    19.6 +# qemu configure script (c) 2003 Fabrice Bellard
    19.7 +#
    19.8 +# set temporary file name
    19.9 +if test ! -z "$TMPDIR" ; then
   19.10 +    TMPDIR1="${TMPDIR}"
   19.11 +elif test ! -z "$TEMPDIR" ; then
   19.12 +    TMPDIR1="${TEMPDIR}"
   19.13 +else
   19.14 +    TMPDIR1="/tmp"
   19.15 +fi
   19.16 +
   19.17 +TMPC="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c"
   19.18 +TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o"
   19.19 +TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}"
   19.20 +TMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.S"
   19.21 +
   19.22 +# default parameters
   19.23 +prefix=""
   19.24 +static="no"
   19.25 +libdir="lib"
   19.26 +cross_prefix=""
   19.27 +cc="gcc"
   19.28 +host_cc="gcc"
   19.29 +ar="ar"
   19.30 +make="make"
   19.31 +strip="strip"
   19.32 +cpu=`uname -m`
   19.33 +target_list="target-i386-dm"
   19.34 +case "$cpu" in
   19.35 +  i386|i486|i586|i686|i86pc|BePC)
   19.36 +    cpu="i386"
   19.37 +  ;;
   19.38 +  armv4l)
   19.39 +    cpu="armv4l"
   19.40 +  ;;
   19.41 +  alpha)
   19.42 +    cpu="alpha"
   19.43 +  ;;
   19.44 +  "Power Macintosh"|ppc|ppc64)
   19.45 +    cpu="powerpc"
   19.46 +  ;;
   19.47 +  mips)
   19.48 +    cpu="mips"
   19.49 +  ;;
   19.50 +  s390)
   19.51 +    cpu="s390"
   19.52 +  ;;
   19.53 +  sparc)
   19.54 +    cpu="sparc"
   19.55 +  ;;
   19.56 +  sparc64)
   19.57 +    cpu="sparc64"
   19.58 +  ;;
   19.59 +  ia64)
   19.60 +    cpu="ia64"
   19.61 +  ;;
   19.62 +  m68k)
   19.63 +    cpu="m68k"
   19.64 +  ;;
   19.65 +  x86_64|amd64)
   19.66 +    cpu="amd64"
   19.67 +    libdir="lib64"
   19.68 +  ;;
   19.69 +  *)
   19.70 +    cpu="unknown"
   19.71 +  ;;
   19.72 +esac
   19.73 +gprof="no"
   19.74 +bigendian="no"
   19.75 +mingw32="no"
   19.76 +EXESUF=""
   19.77 +gdbstub="no"
   19.78 +slirp="no"
   19.79 +adlib="no"
   19.80 +oss="no"
   19.81 +fmod="no"
   19.82 +fmod_lib=""
   19.83 +fmod_inc=""
   19.84 +
   19.85 +# OS specific
   19.86 +targetos=`uname -s`
   19.87 +case $targetos in
   19.88 +MINGW32*)
   19.89 +mingw32="yes"
   19.90 +;;
   19.91 +FreeBSD)
   19.92 +bsd="yes"
   19.93 +oss="yes"
   19.94 +;;
   19.95 +NetBSD)
   19.96 +bsd="yes"
   19.97 +oss="yes"
   19.98 +;;
   19.99 +OpenBSD)
  19.100 +bsd="yes"
  19.101 +oss="yes"
  19.102 +;;
  19.103 +Darwin)
  19.104 +bsd="yes"
  19.105 +darwin="yes"
  19.106 +;;
  19.107 +*) 
  19.108 +oss="yes"
  19.109 +;;
  19.110 +esac
  19.111 +
  19.112 +if [ "$bsd" = "yes" ] ; then
  19.113 +  if [ ! "$darwin" = "yes" ] ; then
  19.114 +    make="gmake"
  19.115 +  fi
  19.116 +  target_list="i386-softmmu ppc-softmmu sparc-softmmu"
  19.117 +fi
  19.118 +
  19.119 +# find source path
  19.120 +# XXX: we assume an absolute path is given when launching configure, 
  19.121 +# except in './configure' case.
  19.122 +source_path=${0%configure}
  19.123 +source_path=${source_path%/}
  19.124 +source_path_used="yes"
  19.125 +if test -z "$source_path" -o "$source_path" = "." ; then
  19.126 +    source_path=`pwd`
  19.127 +    source_path_used="no"
  19.128 +fi
  19.129 +
  19.130 +for opt do
  19.131 +  case "$opt" in
  19.132 +  --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
  19.133 +  ;;
  19.134 +  --interp-prefix=*) interp_prefix=`echo $opt | cut -d '=' -f 2`
  19.135 +  ;;
  19.136 +  --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
  19.137 +  ;;
  19.138 +  --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
  19.139 +  ;;
  19.140 +  --cc=*) cc=`echo $opt | cut -d '=' -f 2`
  19.141 +  ;;
  19.142 +  --make=*) make=`echo $opt | cut -d '=' -f 2`
  19.143 +  ;;
  19.144 +  --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
  19.145 +  ;;
  19.146 +  --extra-ldflags=*) LDFLAGS="${opt#--extra-ldflags=}"
  19.147 +  ;;
  19.148 +  --extra-libs=*) extralibs=${opt#--extra-libs=}
  19.149 +  ;;
  19.150 +  --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
  19.151 +  ;;
  19.152 +  --target-list=*) target_list=${opt#--target-list=}
  19.153 +  ;;
  19.154 +  --enable-gprof) gprof="yes"
  19.155 +  ;;
  19.156 +  --static) static="yes"
  19.157 +  ;;
  19.158 +  --disable-sdl) sdl="no"
  19.159 +  ;;
  19.160 +  --enable-fmod) fmod="yes"
  19.161 +  ;;
  19.162 +  --fmod-lib=*) fmod_lib=${opt#--fmod-lib=}
  19.163 +  ;;
  19.164 +  --fmod-inc=*) fmod_inc=${opt#--fmod-inc=}
  19.165 +  ;;
  19.166 +  --disable-vnc) vnc="no"
  19.167 +  ;;
  19.168 +  --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-"
  19.169 +  ;; 
  19.170 +  --disable-slirp) slirp="no"
  19.171 +  ;; 
  19.172 +  --enable-adlib) adlib="yes"
  19.173 +  ;; 
  19.174 +  esac
  19.175 +done
  19.176 +
  19.177 +# Checking for CFLAGS
  19.178 +if test -z "$CFLAGS"; then
  19.179 +    CFLAGS="-O2"
  19.180 +fi
  19.181 +
  19.182 +cc="${cross_prefix}${cc}"
  19.183 +ar="${cross_prefix}${ar}"
  19.184 +strip="${cross_prefix}${strip}"
  19.185 +
  19.186 +if test "$mingw32" = "yes" ; then
  19.187 +    target_list="i386-softmmu ppc-softmmu sparc-softmmu"
  19.188 +    EXESUF=".exe"
  19.189 +    gdbstub="no"
  19.190 +    oss="no"
  19.191 +fi
  19.192 +
  19.193 +if test -z "$cross_prefix" ; then
  19.194 +
  19.195 +# ---
  19.196 +# big/little endian test
  19.197 +cat > $TMPC << EOF
  19.198 +#include <inttypes.h>
  19.199 +int main(int argc, char ** argv){
  19.200 +	volatile uint32_t i=0x01234567;
  19.201 +	return (*((uint8_t*)(&i))) == 0x67;
  19.202 +}
  19.203 +EOF
  19.204 +
  19.205 +if $cc -o $TMPE $TMPC 2>/dev/null ; then
  19.206 +$TMPE && bigendian="yes"
  19.207 +else
  19.208 +echo big/little test failed
  19.209 +fi
  19.210 +
  19.211 +else
  19.212 +
  19.213 +# if cross compiling, cannot launch a program, so make a static guess
  19.214 +if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k"; then
  19.215 +    bigendian="yes"
  19.216 +fi
  19.217 +
  19.218 +fi
  19.219 +
  19.220 +# check gcc options support
  19.221 +cat > $TMPC <<EOF
  19.222 +int main(void) {
  19.223 +}
  19.224 +EOF
  19.225 +
  19.226 +have_gcc3_options="no"
  19.227 +if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/null ; then
  19.228 +   have_gcc3_options="yes"
  19.229 +fi
  19.230 +
  19.231 +##########################################
  19.232 +# VNC probe
  19.233 +
  19.234 +if test -z "$vnc"; then
  19.235 +
  19.236 +if libvncserver-config --version > /dev/null; then
  19.237 +    vnc=yes
  19.238 +else
  19.239 +    vnc=no
  19.240 +fi
  19.241 +
  19.242 +fi
  19.243 +
  19.244 +##########################################
  19.245 +# SDL probe
  19.246 +
  19.247 +sdl_too_old=no
  19.248 +
  19.249 +if test -z "$sdl" ; then
  19.250 +
  19.251 +sdl_config="sdl-config"
  19.252 +sdl=no
  19.253 +sdl_static=no
  19.254 +
  19.255 +if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then
  19.256 +# win32 cross compilation case
  19.257 +    sdl_config="i386-mingw32msvc-sdl-config"
  19.258 +    sdl=yes
  19.259 +else
  19.260 +# normal SDL probe
  19.261 +cat > $TMPC << EOF
  19.262 +#include <SDL.h>
  19.263 +#undef main /* We don't want SDL to override our main() */
  19.264 +int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
  19.265 +EOF
  19.266 +
  19.267 +if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then
  19.268 +_sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
  19.269 +if test "$_sdlversion" -lt 121 ; then
  19.270 +sdl_too_old=yes
  19.271 +else
  19.272 +sdl=yes
  19.273 +fi
  19.274 +
  19.275 +# static link with sdl ?
  19.276 +if test "$sdl" = "yes" ; then
  19.277 +aa="no"
  19.278 +`$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes"
  19.279 +sdl_static_libs=`$sdl_config --static-libs`
  19.280 +if [ "$aa" = "yes" ] ; then
  19.281 +  sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
  19.282 +fi
  19.283 +
  19.284 +if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then
  19.285 +  sdl_static=yes
  19.286 +fi
  19.287 +
  19.288 +fi # static link
  19.289 +
  19.290 +fi # sdl compile test
  19.291 +
  19.292 +fi # cross compilation
  19.293 +fi # -z $sdl
  19.294 +
  19.295 +if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
  19.296 +cat << EOF
  19.297 +
  19.298 +Usage: configure [options]
  19.299 +Options: [defaults in brackets after descriptions]
  19.300 +
  19.301 +EOF
  19.302 +echo "Standard options:"
  19.303 +echo "  --help                   print this message"
  19.304 +echo "  --prefix=PREFIX          install in PREFIX [$prefix]"
  19.305 +echo "  --interp-prefix=PREFIX   where to find shared libraries, etc."
  19.306 +echo "                           use %M for cpu name [$interp_prefix]"
  19.307 +echo "  --target-list=LIST       set target list [$target_list]"
  19.308 +echo "  --disable-vnc            disable vnc support (else configure checks"
  19.309 +echo "                           for libvncserver-config in your PATH)"
  19.310 +echo ""
  19.311 +echo "Advanced options (experts only):"
  19.312 +echo "  --source-path=PATH       path of source code [$source_path]"
  19.313 +echo "  --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]"
  19.314 +echo "  --cc=CC                  use C compiler CC [$cc]"
  19.315 +echo "  --make=MAKE              use specified make [$make]"
  19.316 +echo "  --static                 enable static build [$static]"
  19.317 +echo "  --enable-mingw32         enable Win32 cross compilation with mingw32"
  19.318 +echo "  --enable-fmod            enable FMOD audio output driver"
  19.319 +echo "  --fmod-lib               path to FMOD library"
  19.320 +echo "  --fmod-inc               path to FMOD includes"
  19.321 +echo ""
  19.322 +echo "NOTE: The object files are build at the place where configure is launched"
  19.323 +exit 1
  19.324 +fi
  19.325 +
  19.326 +#installroot=$source_path/../../dist/install
  19.327 +installroot=
  19.328 +
  19.329 +if test "$mingw32" = "yes" ; then
  19.330 +if test -z "$prefix" ; then
  19.331 +    prefix="/c/Program Files/Qemu"
  19.332 +fi
  19.333 +
  19.334 +mandir="$prefix"
  19.335 +datadir="$prefix"
  19.336 +docdir="$prefix"
  19.337 +bindir="$prefix"
  19.338 +configdir=""
  19.339 +else
  19.340 +if test -z "$prefix" ; then
  19.341 +    prefix="usr/local"
  19.342 +fi
  19.343 +mandir="$installroot/$prefix/share/man"
  19.344 +datadir="$installroot/$prefix/share/qemu"
  19.345 +docdir="$installroot/$prefix/share/doc/qemu"
  19.346 +bindir="$installroot/$prefix/bin"
  19.347 +configdir="$installroot/etc/xen"
  19.348 +fi
  19.349 +
  19.350 +echo "Install prefix    $prefix"
  19.351 +echo "BIOS directory    $datadir"
  19.352 +echo "binary directory  $bindir"
  19.353 +if test "$mingw32" = "no" ; then
  19.354 +echo "Manual directory  $mandir"
  19.355 +fi
  19.356 +echo "Source path       $source_path"
  19.357 +echo "C compiler        $cc"
  19.358 +echo "make              $make"
  19.359 +echo "host CPU          $cpu"
  19.360 +echo "host big endian   $bigendian"
  19.361 +echo "target list       $target_list"
  19.362 +echo "gprof enabled     $gprof"
  19.363 +echo "static build      $static"
  19.364 +echo "VNC support       $vnc"
  19.365 +echo "SDL support       $sdl"
  19.366 +echo "SDL static link   $sdl_static"
  19.367 +echo "mingw32 support   $mingw32"
  19.368 +echo "Adlib support     $adlib"
  19.369 +echo -n "FMOD support      $fmod"
  19.370 +if test $fmod = "yes"; then
  19.371 +    echo -n " (lib='$fmod_lib' include='$fmod_inc')"
  19.372 +fi
  19.373 +echo ""
  19.374 +
  19.375 +if test $sdl_too_old = "yes"; then
  19.376 +echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
  19.377 +fi
  19.378 +if test "$sdl_static" = "no"; then
  19.379 +  echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output"
  19.380 +fi
  19.381 +
  19.382 +config_mak="config-host.mak"
  19.383 +config_h="config-host.h"
  19.384 +
  19.385 +#echo "Creating $config_mak and $config_h"
  19.386 +
  19.387 +echo "# Automatically generated by configure - do not modify" > $config_mak
  19.388 +echo "/* Automatically generated by configure - do not modify */" > $config_h
  19.389 +
  19.390 +echo "prefix=$prefix" >> $config_mak
  19.391 +echo "bindir=$bindir" >> $config_mak
  19.392 +echo "mandir=$mandir" >> $config_mak
  19.393 +echo "datadir=$datadir" >> $config_mak
  19.394 +echo "docdir=$docdir" >> $config_mak
  19.395 +echo "configdir=$configdir" >> $config_mak
  19.396 +echo "LIBDIR=$libdir" >> $config_mak
  19.397 +echo "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h
  19.398 +echo "MAKE=$make" >> $config_mak
  19.399 +echo "CC=$cc" >> $config_mak
  19.400 +if test "$have_gcc3_options" = "yes" ; then
  19.401 +  echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak
  19.402 +fi
  19.403 +echo "HOST_CC=$host_cc" >> $config_mak
  19.404 +echo "AR=$ar" >> $config_mak
  19.405 +echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
  19.406 +echo "CFLAGS=$CFLAGS" >> $config_mak
  19.407 +echo "LDFLAGS=$LDFLAGS" >> $config_mak
  19.408 +echo "EXESUF=$EXESUF" >> $config_mak
  19.409 +
  19.410 +if test "$bigendian" = "yes" ; then
  19.411 +  echo "WORDS_BIGENDIAN=yes" >> $config_mak
  19.412 +  echo "#define WORDS_BIGENDIAN 1" >> $config_h
  19.413 +fi
  19.414 +if test "$mingw32" = "yes" ; then
  19.415 +  echo "CONFIG_WIN32=yes" >> $config_mak
  19.416 +  echo "#define CONFIG_WIN32 1" >> $config_h
  19.417 +elif test -f "/usr/include/byteswap.h" ; then
  19.418 +  echo "#define HAVE_BYTESWAP_H 1" >> $config_h
  19.419 +fi
  19.420 +if test "$darwin" = "yes" ; then
  19.421 +  echo "CONFIG_DARWIN=yes" >> $config_mak
  19.422 +  echo "#define CONFIG_DARWIN 1" >> $config_h
  19.423 +fi
  19.424 +if test "$gdbstub" = "yes" ; then
  19.425 +  echo "CONFIG_GDBSTUB=yes" >> $config_mak
  19.426 +  echo "#define CONFIG_GDBSTUB 1" >> $config_h
  19.427 +fi
  19.428 +if test "$gprof" = "yes" ; then
  19.429 +  echo "TARGET_GPROF=yes" >> $config_mak
  19.430 +  echo "#define HAVE_GPROF 1" >> $config_h
  19.431 +fi
  19.432 +if test "$static" = "yes" ; then
  19.433 +  echo "CONFIG_STATIC=yes" >> $config_mak
  19.434 +  echo "#define CONFIG_STATIC 1" >> $config_h
  19.435 +fi
  19.436 +if test "$slirp" = "yes" ; then
  19.437 +  echo "CONFIG_SLIRP=yes" >> $config_mak
  19.438 +  echo "#define CONFIG_SLIRP 1" >> $config_h
  19.439 +fi
  19.440 +if test "$adlib" = "yes" ; then
  19.441 +  echo "CONFIG_ADLIB=yes" >> $config_mak
  19.442 +  echo "#define CONFIG_ADLIB 1" >> $config_h
  19.443 +fi
  19.444 +if test "$oss" = "yes" ; then
  19.445 +  echo "CONFIG_OSS=yes" >> $config_mak
  19.446 +  echo "#define CONFIG_OSS 1" >> $config_h
  19.447 +fi
  19.448 +if test "$fmod" = "yes" ; then
  19.449 +  echo "CONFIG_FMOD=yes" >> $config_mak
  19.450 +  echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak
  19.451 +  echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
  19.452 +  echo "#define CONFIG_FMOD 1" >> $config_h
  19.453 +fi
  19.454 +echo -n "VERSION=" >>$config_mak
  19.455 +head $source_path/VERSION >>$config_mak
  19.456 +echo "" >>$config_mak
  19.457 +echo -n "#define QEMU_VERSION \"" >> $config_h
  19.458 +head $source_path/VERSION >> $config_h
  19.459 +echo "\"" >> $config_h
  19.460 +
  19.461 +echo "SRC_PATH=$source_path" >> $config_mak
  19.462 +echo "TARGET_DIRS=$target_list" >> $config_mak
  19.463 +
  19.464 +# XXX: suppress that
  19.465 +if [ "$bsd" = "yes" ] ; then
  19.466 +  echo "#define O_LARGEFILE 0" >> $config_h
  19.467 +  echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
  19.468 +  echo "#define _BSD 1" >> $config_h
  19.469 +fi
  19.470 +
  19.471 +if test "$vnc" = "yes"; then
  19.472 +  echo "CONFIG_VNC=yes" >> $config_mak
  19.473 +  vnc_cflags=`libvncserver-config --cflags`
  19.474 +  if [ -z $vnc_cflags ]; then
  19.475 +    vnc_cflags="/usr/include"
  19.476 +  fi
  19.477 +  echo "VNC_CFLAGS=$vnc_cflags" >> $config_mak
  19.478 +fi
  19.479 +
  19.480 +if test "$sdl" = "yes"; then
  19.481 +  echo "CONFIG_SDL=yes" >> $config_mak
  19.482 +  echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
  19.483 +fi
  19.484 +
  19.485 +for target in $target_list; do 
  19.486 +
  19.487 +target_dir="$target"
  19.488 +config_mak=$target_dir/config.mak
  19.489 +config_h=$target_dir/config.h
  19.490 +target_cpu=`echo $target | cut -d '-' -f 2`
  19.491 +[ "$target_cpu" = "ppc" ] && target_bigendian=yes
  19.492 +target_softmmu="no"
  19.493 +if expr $target : '.*-softmmu' > /dev/null ; then
  19.494 +  target_softmmu="yes"
  19.495 +fi
  19.496 +target_user_only="no"
  19.497 +if expr $target : '.*-user' > /dev/null ; then
  19.498 +  target_user_only="yes"
  19.499 +fi
  19.500 +#echo "Creating $config_mak, $config_h and $target_dir/Makefile"
  19.501 +
  19.502 +mkdir -p $target_dir
  19.503 +if test "$target" = "arm-user" ; then
  19.504 +  mkdir -p $target_dir/nwfpe
  19.505 +fi
  19.506 +if test "$target_user_only" = "no" ; then
  19.507 +  mkdir -p $target_dir/slirp
  19.508 +fi
  19.509 +
  19.510 +ln -sf $source_path/Makefile.target $target_dir/Makefile
  19.511 +
  19.512 +echo "# Automatically generated by configure - do not modify" > $config_mak
  19.513 +echo "/* Automatically generated by configure - do not modify */" > $config_h
  19.514 +
  19.515 +
  19.516 +echo "include ../config-host.mak" >> $config_mak
  19.517 +echo "#include \"../config-host.h\"" >> $config_h
  19.518 +
  19.519 +if test "$target_cpu" = "i386" ; then
  19.520 +  echo "TARGET_ARCH=i386" >> $config_mak
  19.521 +  echo "#define TARGET_ARCH \"i386\"" >> $config_h
  19.522 +  echo "#define TARGET_I386 1" >> $config_h
  19.523 +fi
  19.524 +
  19.525 +interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"`
  19.526 +echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
  19.527 +
  19.528 +if test "$target_bigendian" = "yes" ; then
  19.529 +  echo "TARGET_WORDS_BIGENDIAN=yes" >> $config_mak
  19.530 +  echo "#define TARGET_WORDS_BIGENDIAN 1" >> $config_h
  19.531 +fi
  19.532 +if test "$target_softmmu" = "yes" ; then
  19.533 +  echo "CONFIG_SOFTMMU=yes" >> $config_mak
  19.534 +  echo "#define CONFIG_SOFTMMU 1" >> $config_h
  19.535 +fi
  19.536 +if test "$target_user_only" = "yes" ; then
  19.537 +  echo "CONFIG_USER_ONLY=yes" >> $config_mak
  19.538 +  echo "#define CONFIG_USER_ONLY 1" >> $config_h
  19.539 +fi
  19.540 +
  19.541 +if test "$target_user_only" = "no"; then
  19.542 +    if test "$vnc" = "yes"; then
  19.543 +	echo "#define CONFIG_VNC 1" >> $config_h
  19.544 +	echo "CONFIG_VNC=yes" >> $config_mak
  19.545 +	echo "VNC_CFLAGS=`libvncserver-config --cflags`" >> $config_mak
  19.546 +	echo "VNC_LIBS=`libvncserver-config --libs`" >> $config_mak
  19.547 +    fi
  19.548 +fi
  19.549 +
  19.550 +# sdl defines
  19.551 +
  19.552 +if test "$sdl" = "yes" -a "$target_user_only" = "no"; then
  19.553 +    if test "$target_softmmu" = "no" -o "$static" = "yes"; then
  19.554 +        sdl1=$sdl_static
  19.555 +    else
  19.556 +        sdl1=$sdl
  19.557 +    fi
  19.558 +    if test "$sdl1" = "yes" ; then
  19.559 +        echo "#define CONFIG_SDL 1" >> $config_h
  19.560 +        echo "CONFIG_SDL=yes" >> $config_mak
  19.561 +        if test "$target_softmmu" = "no" -o "$static" = "yes"; then
  19.562 +            echo "SDL_LIBS=$sdl_static_libs" >> $config_mak
  19.563 +        else
  19.564 +            echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak
  19.565 +        fi
  19.566 +        echo -n "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
  19.567 +        if [ "${aa}" = "yes" ] ; then
  19.568 +            echo -n " `aalib-config --cflags`" >> $config_mak ;
  19.569 +        fi
  19.570 +        echo "" >> $config_mak
  19.571 +    fi
  19.572 +fi
  19.573 +
  19.574 +done # for target in $targets
  19.575 +
  19.576 +# build tree in object directory if source path is different from current one
  19.577 +if test "$source_path_used" = "yes" ; then
  19.578 +    DIRS="tests"
  19.579 +    FILES="Makefile tests/Makefile"
  19.580 +    for dir in $DIRS ; do
  19.581 +            mkdir -p $dir
  19.582 +    done
  19.583 +    for f in $FILES ; do
  19.584 +        ln -sf $source_path/$f $f
  19.585 +    done
  19.586 +fi
  19.587 +
  19.588 +rm -f $TMPO $TMPC $TMPE $TMPS
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/tools/ioemu/console.c	Thu May 19 22:05:02 2005 +0000
    20.3 @@ -0,0 +1,731 @@
    20.4 +/*
    20.5 + * QEMU graphical console
    20.6 + * 
    20.7 + * Copyright (c) 2004 Fabrice Bellard
    20.8 + * 
    20.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   20.10 + * of this software and associated documentation files (the "Software"), to deal
   20.11 + * in the Software without restriction, including without limitation the rights
   20.12 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   20.13 + * copies of the Software, and to permit persons to whom the Software is
   20.14 + * furnished to do so, subject to the following conditions:
   20.15 + *
   20.16 + * The above copyright notice and this permission notice shall be included in
   20.17 + * all copies or substantial portions of the Software.
   20.18 + *
   20.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   20.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   20.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
   20.22 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   20.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   20.24 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   20.25 + * THE SOFTWARE.
   20.26 + */
   20.27 +#include "vl.h"
   20.28 +
   20.29 +#define DEFAULT_BACKSCROLL 512
   20.30 +#define MAX_CONSOLES 12
   20.31 +
   20.32 +#define RGBA(r, g, b, a) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))
   20.33 +#define RGB(r, g, b) RGBA(r, g, b, 0xff)
   20.34 +
   20.35 +typedef struct TextCell {
   20.36 +    uint8_t ch;
   20.37 +    uint8_t bgcol:4;
   20.38 +    uint8_t fgcol:4;
   20.39 +} TextCell;
   20.40 +
   20.41 +#define MAX_ESC_PARAMS 3
   20.42 +
   20.43 +enum TTYState {
   20.44 +    TTY_STATE_NORM,
   20.45 +    TTY_STATE_ESC,
   20.46 +    TTY_STATE_CSI,
   20.47 +};
   20.48 +
   20.49 +struct TextConsole {
   20.50 +    int text_console; /* true if text console */
   20.51 +    DisplayState *ds;
   20.52 +    int g_width, g_height;
   20.53 +    int width;
   20.54 +    int height;
   20.55 +    int total_height;
   20.56 +    int backscroll_height;
   20.57 +    int fgcol;
   20.58 +    int bgcol;
   20.59 +    int x, y;
   20.60 +    int y_displayed;
   20.61 +    int y_base;
   20.62 +    TextCell *cells;
   20.63 +
   20.64 +    enum TTYState state;
   20.65 +    int esc_params[MAX_ESC_PARAMS];
   20.66 +    int nb_esc_params;
   20.67 +
   20.68 +    /* kbd read handler */
   20.69 +    IOReadHandler *fd_read;
   20.70 +    void *fd_opaque;
   20.71 +};
   20.72 +
   20.73 +static TextConsole *active_console;
   20.74 +static TextConsole *consoles[MAX_CONSOLES];
   20.75 +static int nb_consoles = 0;
   20.76 +
   20.77 +/* convert a RGBA color to a color index usable in graphic primitives */
   20.78 +static unsigned int vga_get_color(DisplayState *ds, unsigned int rgba)
   20.79 +{
   20.80 +    unsigned int r, g, b, color;
   20.81 +
   20.82 +    switch(ds->depth) {
   20.83 +#if 0
   20.84 +    case 8:
   20.85 +        r = (rgba >> 16) & 0xff;
   20.86 +        g = (rgba >> 8) & 0xff;
   20.87 +        b = (rgba) & 0xff;
   20.88 +        color = (rgb_to_index[r] * 6 * 6) + 
   20.89 +            (rgb_to_index[g] * 6) + 
   20.90 +            (rgb_to_index[b]);
   20.91 +        break;
   20.92 +#endif
   20.93 +    case 15:
   20.94 +        r = (rgba >> 16) & 0xff;
   20.95 +        g = (rgba >> 8) & 0xff;
   20.96 +        b = (rgba) & 0xff;
   20.97 +        color = ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3);
   20.98 +        break;
   20.99 +    case 16:
  20.100 +        r = (rgba >> 16) & 0xff;
  20.101 +        g = (rgba >> 8) & 0xff;
  20.102 +        b = (rgba) & 0xff;
  20.103 +        color = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3);
  20.104 +        break;
  20.105 +    case 32:
  20.106 +    default:
  20.107 +        color = rgba;
  20.108 +        break;
  20.109 +    }
  20.110 +    return color;
  20.111 +}
  20.112 +
  20.113 +static void vga_fill_rect (DisplayState *ds, 
  20.114 +                           int posx, int posy, int width, int height, uint32_t color)
  20.115 +{
  20.116 +    uint8_t *d, *d1;
  20.117 +    int x, y, bpp;
  20.118 +    
  20.119 +    bpp = (ds->depth + 7) >> 3;
  20.120 +    d1 = ds->data + 
  20.121 +        ds->linesize * posy + bpp * posx;
  20.122 +    for (y = 0; y < height; y++) {
  20.123 +        d = d1;
  20.124 +        switch(bpp) {
  20.125 +        case 1:
  20.126 +            for (x = 0; x < width; x++) {
  20.127 +                *((uint8_t *)d) = color;
  20.128 +                d++;
  20.129 +            }
  20.130 +            break;
  20.131 +        case 2:
  20.132 +            for (x = 0; x < width; x++) {
  20.133 +                *((uint16_t *)d) = color;
  20.134 +                d += 2;
  20.135 +            }
  20.136 +            break;
  20.137 +        case 4:
  20.138 +            for (x = 0; x < width; x++) {
  20.139 +                *((uint32_t *)d) = color;
  20.140 +                d += 4;
  20.141 +            }
  20.142 +            break;
  20.143 +        }
  20.144 +        d1 += ds->linesize;
  20.145 +    }
  20.146 +}
  20.147 +
  20.148 +/* copy from (xs, ys) to (xd, yd) a rectangle of size (w, h) */
  20.149 +static void vga_bitblt(DisplayState *ds, int xs, int ys, int xd, int yd, int w, int h)
  20.150 +{
  20.151 +    const uint8_t *s;
  20.152 +    uint8_t *d;
  20.153 +    int wb, y, bpp;
  20.154 +
  20.155 +    bpp = (ds->depth + 7) >> 3;
  20.156 +    wb = w * bpp;
  20.157 +    if (yd <= ys) {
  20.158 +        s = ds->data + 
  20.159 +            ds->linesize * ys + bpp * xs;
  20.160 +        d = ds->data + 
  20.161 +            ds->linesize * yd + bpp * xd;
  20.162 +        for (y = 0; y < h; y++) {
  20.163 +            memmove(d, s, wb);
  20.164 +            d += ds->linesize;
  20.165 +            s += ds->linesize;
  20.166 +        }
  20.167 +    } else {
  20.168 +        s = ds->data + 
  20.169 +            ds->linesize * (ys + h - 1) + bpp * xs;
  20.170 +        d = ds->data + 
  20.171 +            ds->linesize * (yd + h - 1) + bpp * xd;
  20.172 +       for (y = 0; y < h; y++) {
  20.173 +            memmove(d, s, wb);
  20.174 +            d -= ds->linesize;
  20.175 +            s -= ds->linesize;
  20.176 +        }
  20.177 +    }
  20.178 +}
  20.179 +
  20.180 +/***********************************************************/
  20.181 +/* basic char display */
  20.182 +
  20.183 +#define FONT_HEIGHT 16
  20.184 +#define FONT_WIDTH 8
  20.185 +
  20.186 +#include "vgafont.h"
  20.187 +
  20.188 +#define cbswap_32(__x) \
  20.189 +((uint32_t)( \
  20.190 +		(((uint32_t)(__x) & (uint32_t)0x000000ffUL) << 24) | \
  20.191 +		(((uint32_t)(__x) & (uint32_t)0x0000ff00UL) <<  8) | \
  20.192 +		(((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >>  8) | \
  20.193 +		(((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) ))
  20.194 +
  20.195 +#ifdef WORDS_BIGENDIAN
  20.196 +#define PAT(x) x
  20.197 +#else
  20.198 +#define PAT(x) cbswap_32(x)
  20.199 +#endif
  20.200 +
  20.201 +static const uint32_t dmask16[16] = {
  20.202 +    PAT(0x00000000),
  20.203 +    PAT(0x000000ff),
  20.204 +    PAT(0x0000ff00),
  20.205 +    PAT(0x0000ffff),
  20.206 +    PAT(0x00ff0000),
  20.207 +    PAT(0x00ff00ff),
  20.208 +    PAT(0x00ffff00),
  20.209 +    PAT(0x00ffffff),
  20.210 +    PAT(0xff000000),
  20.211 +    PAT(0xff0000ff),
  20.212 +    PAT(0xff00ff00),
  20.213 +    PAT(0xff00ffff),
  20.214 +    PAT(0xffff0000),
  20.215 +    PAT(0xffff00ff),
  20.216 +    PAT(0xffffff00),
  20.217 +    PAT(0xffffffff),
  20.218 +};
  20.219 +
  20.220 +static const uint32_t dmask4[4] = {
  20.221 +    PAT(0x00000000),
  20.222 +    PAT(0x0000ffff),
  20.223 +    PAT(0xffff0000),
  20.224 +    PAT(0xffffffff),
  20.225 +};
  20.226 +
  20.227 +static uint32_t color_table[8];
  20.228 +
  20.229 +static const uint32_t color_table_rgb[8] = {
  20.230 +    RGB(0x00, 0x00, 0x00),
  20.231 +    RGB(0xff, 0x00, 0x00),
  20.232 +    RGB(0x00, 0xff, 0x00),
  20.233 +    RGB(0xff, 0xff, 0x00),
  20.234 +    RGB(0x00, 0x00, 0xff),
  20.235 +    RGB(0xff, 0x00, 0xff),
  20.236 +    RGB(0x00, 0xff, 0xff),
  20.237 +    RGB(0xff, 0xff, 0xff),
  20.238 +};
  20.239 +
  20.240 +static inline unsigned int col_expand(DisplayState *ds, unsigned int col)
  20.241 +{
  20.242 +    switch(ds->depth) {
  20.243 +    case 8:
  20.244 +        col |= col << 8;
  20.245 +        col |= col << 16;
  20.246 +        break;
  20.247 +    case 15:
  20.248 +    case 16:
  20.249 +        col |= col << 16;
  20.250 +        break;
  20.251 +    default:
  20.252 +        break;
  20.253 +    }
  20.254 +
  20.255 +    return col;
  20.256 +}
  20.257 +
  20.258 +static void vga_putcharxy(DisplayState *ds, int x, int y, int ch, 
  20.259 +                          unsigned int fgcol, unsigned int bgcol)
  20.260 +{
  20.261 +    uint8_t *d;
  20.262 +    const uint8_t *font_ptr;
  20.263 +    unsigned int font_data, linesize, xorcol, bpp;
  20.264 +    int i;
  20.265 +
  20.266 +    bpp = (ds->depth + 7) >> 3;
  20.267 +    d = ds->data + 
  20.268 +        ds->linesize * y * FONT_HEIGHT + bpp * x * FONT_WIDTH;
  20.269 +    linesize = ds->linesize;
  20.270 +    font_ptr = vgafont16 + FONT_HEIGHT * ch;
  20.271 +    xorcol = bgcol ^ fgcol;
  20.272 +    switch(ds->depth) {
  20.273 +    case 8:
  20.274 +        for(i = 0; i < FONT_HEIGHT; i++) {
  20.275 +            font_data = *font_ptr++;
  20.276 +            ((uint32_t *)d)[0] = (dmask16[(font_data >> 4)] & xorcol) ^ bgcol;
  20.277 +            ((uint32_t *)d)[1] = (dmask16[(font_data >> 0) & 0xf] & xorcol) ^ bgcol;
  20.278 +            d += linesize;
  20.279 +        }
  20.280 +        break;
  20.281 +    case 16:
  20.282 +    case 15:
  20.283 +        for(i = 0; i < FONT_HEIGHT; i++) {
  20.284 +            font_data = *font_ptr++;
  20.285 +            ((uint32_t *)d)[0] = (dmask4[(font_data >> 6)] & xorcol) ^ bgcol;
  20.286 +            ((uint32_t *)d)[1] = (dmask4[(font_data >> 4) & 3] & xorcol) ^ bgcol;
  20.287 +            ((uint32_t *)d)[2] = (dmask4[(font_data >> 2) & 3] & xorcol) ^ bgcol;
  20.288 +            ((uint32_t *)d)[3] = (dmask4[(font_data >> 0) & 3] & xorcol) ^ bgcol;
  20.289 +            d += linesize;
  20.290 +        }
  20.291 +        break;
  20.292 +    case 32:
  20.293 +        for(i = 0; i < FONT_HEIGHT; i++) {
  20.294 +            font_data = *font_ptr++;
  20.295 +            ((uint32_t *)d)[0] = (-((font_data >> 7)) & xorcol) ^ bgcol;
  20.296 +            ((uint32_t *)d)[1] = (-((font_data >> 6) & 1) & xorcol) ^ bgcol;
  20.297 +            ((uint32_t *)d)[2] = (-((font_data >> 5) & 1) & xorcol) ^ bgcol;
  20.298 +            ((uint32_t *)d)[3] = (-((font_data >> 4) & 1) & xorcol) ^ bgcol;
  20.299 +            ((uint32_t *)d)[4] = (-((font_data >> 3) & 1) & xorcol) ^ bgcol;
  20.300 +            ((uint32_t *)d)[5] = (-((font_data >> 2) & 1) & xorcol) ^ bgcol;
  20.301 +            ((uint32_t *)d)[6] = (-((font_data >> 1) & 1) & xorcol) ^ bgcol;
  20.302 +            ((uint32_t *)d)[7] = (-((font_data >> 0) & 1) & xorcol) ^ bgcol;
  20.303 +            d += linesize;
  20.304 +        }
  20.305 +        break;
  20.306 +    }
  20.307 +}
  20.308 +
  20.309 +static void text_console_resize(TextConsole *s)
  20.310 +{
  20.311 +    TextCell *cells, *c, *c1;
  20.312 +    int w1, x, y, last_width;
  20.313 +
  20.314 +    last_width = s->width;
  20.315 +    s->width = s->g_width / FONT_WIDTH;
  20.316 +    s->height = s->g_height / FONT_HEIGHT;
  20.317 +
  20.318 +    w1 = last_width;
  20.319 +    if (s->width < w1)
  20.320 +        w1 = s->width;
  20.321 +
  20.322 +    cells = qemu_malloc(s->width * s->total_height * sizeof(TextCell));
  20.323 +    for(y = 0; y < s->total_height; y++) {
  20.324 +        c = &cells[y * s->width];
  20.325 +        if (w1 > 0) {
  20.326 +            c1 = &s->cells[y * last_width];
  20.327 +            for(x = 0; x < w1; x++) {
  20.328 +                *c++ = *c1++;
  20.329 +            }
  20.330 +        }
  20.331 +        for(x = w1; x < s->width; x++) {
  20.332 +            c->ch = ' ';
  20.333 +            c->fgcol = 7;
  20.334 +            c->bgcol = 0;
  20.335 +            c++;
  20.336 +        }
  20.337 +    }
  20.338 +    qemu_free(s->cells);
  20.339 +    s->cells = cells;
  20.340 +}
  20.341 +
  20.342 +static void update_xy(TextConsole *s, int x, int y)
  20.343 +{
  20.344 +    TextCell *c;
  20.345 +    int y1, y2;
  20.346 +
  20.347 +    if (s == active_console) {
  20.348 +        y1 = (s->y_base + y) % s->total_height;
  20.349 +        y2 = y1 - s->y_displayed;
  20.350 +        if (y2 < 0)
  20.351 +            y2 += s->total_height;
  20.352 +        if (y2 < s->height) {
  20.353 +            c = &s->cells[y1 * s->width + x];
  20.354 +            vga_putcharxy(s->ds, x, y2, c->ch, 
  20.355 +                          color_table[c->fgcol], color_table[c->bgcol]);
  20.356 +            dpy_update(s->ds, x * FONT_WIDTH, y2 * FONT_HEIGHT, 
  20.357 +                       FONT_WIDTH, FONT_HEIGHT);
  20.358 +        }
  20.359 +    }
  20.360 +}
  20.361 +
  20.362 +static void console_show_cursor(TextConsole *s, int show)
  20.363 +{
  20.364 +    TextCell *c;
  20.365 +    int y, y1;
  20.366 +
  20.367 +    if (s == active_console) {
  20.368 +        y1 = (s->y_base + s->y) % s->total_height;
  20.369 +        y = y1 - s->y_displayed;
  20.370 +        if (y < 0)
  20.371 +            y += s->total_height;
  20.372 +        if (y < s->height) {
  20.373 +            c = &s->cells[y1 * s->width + s->x];
  20.374 +            if (show) {
  20.375 +                vga_putcharxy(s->ds, s->x, y, c->ch, 
  20.376 +                              color_table[0], color_table[7]);
  20.377 +            } else {
  20.378 +                vga_putcharxy(s->ds, s->x, y, c->ch, 
  20.379 +                              color_table[c->fgcol], color_table[c->bgcol]);
  20.380 +            }
  20.381 +            dpy_update(s->ds, s->x * FONT_WIDTH, y * FONT_HEIGHT, 
  20.382 +                       FONT_WIDTH, FONT_HEIGHT);
  20.383 +        }
  20.384 +    }
  20.385 +}
  20.386 +
  20.387 +static void console_refresh(TextConsole *s)
  20.388 +{
  20.389 +    TextCell *c;
  20.390 +    int x, y, y1;
  20.391 +
  20.392 +    if (s != active_console) 
  20.393 +        return;
  20.394 +
  20.395 +    vga_fill_rect(s->ds, 0, 0, s->ds->width, s->ds->height,
  20.396 +                  color_table[0]);
  20.397 +    y1 = s->y_displayed;
  20.398 +    for(y = 0; y < s->height; y++) {
  20.399 +        c = s->cells + y1 * s->width;
  20.400 +        for(x = 0; x < s->width; x++) {
  20.401 +            vga_putcharxy(s->ds, x, y, c->ch, 
  20.402 +                          color_table[c->fgcol], color_table[c->bgcol]);
  20.403 +            c++;
  20.404 +        }
  20.405 +        if (++y1 == s->total_height)
  20.406 +            y1 = 0;
  20.407 +    }
  20.408 +    dpy_update(s->ds, 0, 0, s->ds->width, s->ds->height);
  20.409 +    console_show_cursor(s, 1);
  20.410 +}
  20.411 +
  20.412 +static void console_scroll(int ydelta)
  20.413 +{
  20.414 +    TextConsole *s;
  20.415 +    int i, y1;
  20.416 +    
  20.417 +    s = active_console;
  20.418 +    if (!s || !s->text_console)
  20.419 +        return;
  20.420 +
  20.421 +    if (ydelta > 0) {
  20.422 +        for(i = 0; i < ydelta; i++) {
  20.423 +            if (s->y_displayed == s->y_base)
  20.424 +                break;
  20.425 +            if (++s->y_displayed == s->total_height)
  20.426 +                s->y_displayed = 0;
  20.427 +        }
  20.428 +    } else {
  20.429 +        ydelta = -ydelta;
  20.430 +        i = s->backscroll_height;
  20.431 +        if (i > s->total_height - s->height)
  20.432 +            i = s->total_height - s->height;
  20.433 +        y1 = s->y_base - i;
  20.434 +        if (y1 < 0)
  20.435 +            y1 += s->total_height;
  20.436 +        for(i = 0; i < ydelta; i++) {
  20.437 +            if (s->y_displayed == y1)
  20.438 +                break;
  20.439 +            if (--s->y_displayed < 0)
  20.440 +                s->y_displayed = s->total_height - 1;
  20.441 +        }
  20.442 +    }
  20.443 +    console_refresh(s);
  20.444 +}
  20.445 +
  20.446 +static void console_put_lf(TextConsole *s)
  20.447 +{
  20.448 +    TextCell *c;
  20.449 +    int x, y1;
  20.450 +
  20.451 +    s->x = 0;
  20.452 +    s->y++;
  20.453 +    if (s->y >= s->height) {
  20.454 +        s->y = s->height - 1;
  20.455 +        
  20.456 +        if (s->y_displayed == s->y_base) {
  20.457 +            if (++s->y_displayed == s->total_height)
  20.458 +                s->y_displayed = 0;
  20.459 +        }
  20.460 +        if (++s->y_base == s->total_height)
  20.461 +            s->y_base = 0;
  20.462 +        if (s->backscroll_height < s->total_height)
  20.463 +            s->backscroll_height++;
  20.464 +        y1 = (s->y_base + s->height - 1) % s->total_height;
  20.465 +        c = &s->cells[y1 * s->width];
  20.466 +        for(x = 0; x < s->width; x++) {
  20.467 +            c->ch = ' ';
  20.468 +            c->fgcol = s->fgcol;
  20.469 +            c->bgcol = s->bgcol;
  20.470 +            c++;
  20.471 +        }
  20.472 +        if (s == active_console && s->y_displayed == s->y_base) {
  20.473 +            vga_bitblt(s->ds, 0, FONT_HEIGHT, 0, 0, 
  20.474 +                       s->width * FONT_WIDTH, 
  20.475 +                       (s->height - 1) * FONT_HEIGHT);
  20.476 +            vga_fill_rect(s->ds, 0, (s->height - 1) * FONT_HEIGHT,
  20.477 +                          s->width * FONT_WIDTH, FONT_HEIGHT, 
  20.478 +                          color_table[s->bgcol]);
  20.479 +            dpy_update(s->ds, 0, 0, 
  20.480 +                       s->width * FONT_WIDTH, s->height * FONT_HEIGHT);
  20.481 +        }
  20.482 +    }
  20.483 +}
  20.484 +
  20.485 +static void console_putchar(TextConsole *s, int ch)
  20.486 +{
  20.487 +    TextCell *c;
  20.488 +    int y1, i, x;
  20.489 +
  20.490 +    switch(s->state) {
  20.491 +    case TTY_STATE_NORM:
  20.492 +        switch(ch) {
  20.493 +        case '\r':
  20.494 +            s->x = 0;
  20.495 +            break;
  20.496 +        case '\n':
  20.497 +            console_put_lf(s);
  20.498 +            break;
  20.499 +        case 27:
  20.500 +            s->state = TTY_STATE_ESC;
  20.501 +            break;
  20.502 +        default:
  20.503 +            y1 = (s->y_base + s->y) % s->total_height;
  20.504 +            c = &s->cells[y1 * s->width + s->x];
  20.505 +            c->ch = ch;
  20.506 +            c->fgcol = s->fgcol;
  20.507 +            c->bgcol = s->bgcol;
  20.508 +            update_xy(s, s->x, s->y);
  20.509 +            s->x++;
  20.510 +            if (s->x >= s->width)
  20.511 +                console_put_lf(s);
  20.512 +            break;
  20.513 +        }
  20.514 +        break;
  20.515 +    case TTY_STATE_ESC:
  20.516 +        if (ch == '[') {
  20.517 +            for(i=0;i<MAX_ESC_PARAMS;i++)
  20.518 +                s->esc_params[i] = 0;
  20.519 +            s->nb_esc_params = 0;
  20.520 +            s->state = TTY_STATE_CSI;
  20.521 +        } else {
  20.522 +            s->state = TTY_STATE_NORM;
  20.523 +        }
  20.524 +        break;
  20.525 +    case TTY_STATE_CSI:
  20.526 +        if (ch >= '0' && ch <= '9') {
  20.527 +            if (s->nb_esc_params < MAX_ESC_PARAMS) {
  20.528 +                s->esc_params[s->nb_esc_params] = 
  20.529 +                    s->esc_params[s->nb_esc_params] * 10 + ch - '0';
  20.530 +            }
  20.531 +        } else {
  20.532 +            s->nb_esc_params++;
  20.533 +            if (ch == ';')
  20.534 +                break;
  20.535 +            s->state = TTY_STATE_NORM;
  20.536 +            switch(ch) {
  20.537 +            case 'D':
  20.538 +                if (s->x > 0)
  20.539 +                    s->x--;
  20.540 +                break;
  20.541 +            case 'C':
  20.542 +                if (s->x < (s->width - 1))
  20.543 +                    s->x++;
  20.544 +                break;
  20.545 +            case 'K':
  20.546 +                /* clear to eol */
  20.547 +                y1 = (s->y_base + s->y) % s->total_height;
  20.548 +                for(x = s->x; x < s->width; x++) {
  20.549 +                    c = &s->cells[y1 * s->width + x];
  20.550 +                    c->ch = ' ';
  20.551 +                    c->fgcol = s->fgcol;
  20.552 +                    c->bgcol = s->bgcol;
  20.553 +                    c++;
  20.554 +                    update_xy(s, x, s->y);
  20.555 +                }
  20.556 +                break;
  20.557 +            default:
  20.558 +                break;
  20.559 +            }
  20.560 +            break;
  20.561 +        }
  20.562 +    }
  20.563 +}
  20.564 +
  20.565 +void console_select(unsigned int index)
  20.566 +{
  20.567 +    TextConsole *s;
  20.568 +    
  20.569 +    if (index >= MAX_CONSOLES)
  20.570 +        return;
  20.571 +    s = consoles[index];
  20.572 +    if (s) {
  20.573 +        active_console = s;
  20.574 +        if (s->text_console) {
  20.575 +            if (s->g_width != s->ds->width ||
  20.576 +                s->g_height != s->ds->height) {
  20.577 +		s->g_width = s->ds->width;
  20.578 +		s->g_height = s->ds->height;
  20.579 +                text_console_resize(s);
  20.580 +	    }
  20.581 +            console_refresh(s);
  20.582 +        }
  20.583 +    }
  20.584 +}
  20.585 +
  20.586 +static int console_puts(CharDriverState *chr, const uint8_t *buf, int len)
  20.587 +{
  20.588 +    TextConsole *s = chr->opaque;
  20.589 +    int i;
  20.590 +
  20.591 +    console_show_cursor(s, 0);
  20.592 +    for(i = 0; i < len; i++) {
  20.593 +        console_putchar(s, buf[i]);
  20.594 +    }
  20.595 +    console_show_cursor(s, 1);
  20.596 +    return len;
  20.597 +}
  20.598 +
  20.599 +static void console_chr_add_read_handler(CharDriverState *chr, 
  20.600 +                                         IOCanRWHandler *fd_can_read, 
  20.601 +                                         IOReadHandler *fd_read, void *opaque)
  20.602 +{
  20.603 +    TextConsole *s = chr->opaque;
  20.604 +    s->fd_read = fd_read;
  20.605 +    s->fd_opaque = opaque;
  20.606 +}
  20.607 +
  20.608 +static void console_send_event(CharDriverState *chr, int event)
  20.609 +{
  20.610 +    TextConsole *s = chr->opaque;
  20.611 +    int i;
  20.612 +
  20.613 +    if (event == CHR_EVENT_FOCUS) {
  20.614 +        for(i = 0; i < nb_consoles; i++) {
  20.615 +            if (consoles[i] == s) {
  20.616 +                console_select(i);
  20.617 +                break;
  20.618 +            }
  20.619 +        }
  20.620 +    }
  20.621 +}
  20.622 +
  20.623 +/* called when an ascii key is pressed */
  20.624 +void kbd_put_keysym(int keysym)
  20.625 +{
  20.626 +    TextConsole *s;
  20.627 +    uint8_t buf[16], *q;
  20.628 +    int c;
  20.629 +
  20.630 +    s = active_console;
  20.631 +    if (!s || !s->text_console)
  20.632 +        return;
  20.633 +
  20.634 +    switch(keysym) {
  20.635 +    case QEMU_KEY_CTRL_UP:
  20.636 +        console_scroll(-1);
  20.637 +        break;
  20.638 +    case QEMU_KEY_CTRL_DOWN:
  20.639 +        console_scroll(1);
  20.640 +        break;
  20.641 +    case QEMU_KEY_CTRL_PAGEUP:
  20.642 +        console_scroll(-10);
  20.643 +        break;
  20.644 +    case QEMU_KEY_CTRL_PAGEDOWN:
  20.645 +        console_scroll(10);
  20.646 +        break;
  20.647 +    default:
  20.648 +        if (s->fd_read) {
  20.649 +            /* convert the QEMU keysym to VT100 key string */
  20.650 +            q = buf;
  20.651 +            if (keysym >= 0xe100 && keysym <= 0xe11f) {
  20.652 +                *q++ = '\033';
  20.653 +                *q++ = '[';
  20.654 +                c = keysym - 0xe100;
  20.655 +                if (c >= 10)
  20.656 +                    *q++ = '0' + (c / 10);
  20.657 +                *q++ = '0' + (c % 10);
  20.658 +                *q++ = '~';
  20.659 +            } else if (keysym >= 0xe120 && keysym <= 0xe17f) {
  20.660 +                *q++ = '\033';
  20.661 +                *q++ = '[';
  20.662 +                *q++ = keysym & 0xff;
  20.663 +            } else {
  20.664 +                *q++ = keysym;
  20.665 +            }
  20.666 +            s->fd_read(s->fd_opaque, buf, q - buf);
  20.667 +        }
  20.668 +        break;
  20.669 +    }
  20.670 +}
  20.671 +
  20.672 +TextConsole *graphic_console_init(DisplayState *ds)
  20.673 +{
  20.674 +    TextConsole *s;
  20.675 +
  20.676 +    if (nb_consoles >= MAX_CONSOLES)
  20.677 +        return NULL;
  20.678 +    s = qemu_mallocz(sizeof(TextConsole));
  20.679 +    if (!s) {
  20.680 +        return NULL;
  20.681 +    }
  20.682 +    if (!active_console)
  20.683 +        active_console = s;
  20.684 +    s->ds = ds;
  20.685 +    consoles[nb_consoles++] = s;
  20.686 +    return s;
  20.687 +}
  20.688 +
  20.689 +int is_active_console(TextConsole *s)
  20.690 +{
  20.691 +    return s == active_console;
  20.692 +}
  20.693 +
  20.694 +CharDriverState *text_console_init(DisplayState *ds)
  20.695 +{
  20.696 +    CharDriverState *chr;
  20.697 +    TextConsole *s;
  20.698 +    int i;
  20.699 +    static int color_inited;
  20.700 +    
  20.701 +    chr = qemu_mallocz(sizeof(CharDriverState));
  20.702 +    if (!chr)
  20.703 +        return NULL;
  20.704 +    s = graphic_console_init(ds);
  20.705 +    if (!s) {
  20.706 +        free(chr);
  20.707 +        return NULL;
  20.708 +    }
  20.709 +    s->text_console = 1;
  20.710 +    chr->opaque = s;
  20.711 +    chr->chr_write = console_puts;
  20.712 +    chr->chr_add_read_handler = console_chr_add_read_handler;
  20.713 +    chr->chr_send_event = console_send_event;
  20.714 +
  20.715 +    if (!color_inited) {
  20.716 +        color_inited = 1;
  20.717 +        for(i = 0; i < 8; i++) {
  20.718 +            color_table[i] = col_expand(s->ds, 
  20.719 +                                        vga_get_color(s->ds, color_table_rgb[i]));
  20.720 +        }
  20.721 +    }
  20.722 +    s->y_displayed = 0;
  20.723 +    s->y_base = 0;
  20.724 +    s->total_height = DEFAULT_BACKSCROLL;
  20.725 +    s->x = 0;
  20.726 +    s->y = 0;
  20.727 +    s->fgcol = 7;
  20.728 +    s->bgcol = 0;
  20.729 +    s->g_width = s->ds->width;
  20.730 +    s->g_height = s->ds->height;
  20.731 +    text_console_resize(s);
  20.732 +
  20.733 +    return chr;
  20.734 +}
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/tools/ioemu/cpu-all.h	Thu May 19 22:05:02 2005 +0000
    21.3 @@ -0,0 +1,688 @@
    21.4 +/*
    21.5 + * defines common to all virtual CPUs
    21.6 + * 
    21.7 + *  Copyright (c) 2003 Fabrice Bellard
    21.8 + *
    21.9 + * This library is free software; you can redistribute it and/or
   21.10 + * modify it under the terms of the GNU Lesser General Public
   21.11 + * License as published by the Free Software Foundation; either
   21.12 + * version 2 of the License, or (at your option) any later version.
   21.13 + *
   21.14 + * This library is distributed in the hope that it will be useful,
   21.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   21.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   21.17 + * Lesser General Public License for more details.
   21.18 + *
   21.19 + * You should have received a copy of the GNU Lesser General Public
   21.20 + * License along with this library; if not, write to the Free Software
   21.21 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   21.22 + */
   21.23 +#ifndef CPU_ALL_H
   21.24 +#define CPU_ALL_H
   21.25 +
   21.26 +#if defined(__arm__) || defined(__sparc__)
   21.27 +#define WORDS_ALIGNED
   21.28 +#endif
   21.29 +
   21.30 +/* some important defines: 
   21.31 + * 
   21.32 + * WORDS_ALIGNED : if defined, the host cpu can only make word aligned
   21.33 + * memory accesses.
   21.34 + * 
   21.35 + * WORDS_BIGENDIAN : if defined, the host cpu is big endian and
   21.36 + * otherwise little endian.
   21.37 + * 
   21.38 + * (TARGET_WORDS_ALIGNED : same for target cpu (not supported yet))
   21.39 + * 
   21.40 + * TARGET_WORDS_BIGENDIAN : same for target cpu
   21.41 + */
   21.42 +
   21.43 +#include "bswap.h"
   21.44 +
   21.45 +#if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
   21.46 +#define BSWAP_NEEDED
   21.47 +#endif
   21.48 +
   21.49 +#ifdef BSWAP_NEEDED
   21.50 +
   21.51 +static inline uint16_t tswap16(uint16_t s)
   21.52 +{
   21.53 +    return bswap16(s);
   21.54 +}
   21.55 +
   21.56 +static inline uint32_t tswap32(uint32_t s)
   21.57 +{
   21.58 +    return bswap32(s);
   21.59 +}
   21.60 +
   21.61 +static inline uint64_t tswap64(uint64_t s)
   21.62 +{
   21.63 +    return bswap64(s);
   21.64 +}
   21.65 +
   21.66 +static inline void tswap16s(uint16_t *s)
   21.67 +{
   21.68 +    *s = bswap16(*s);
   21.69 +}
   21.70 +
   21.71 +static inline void tswap32s(uint32_t *s)
   21.72 +{
   21.73 +    *s = bswap32(*s);
   21.74 +}
   21.75 +
   21.76 +static inline void tswap64s(uint64_t *s)
   21.77 +{
   21.78 +    *s = bswap64(*s);
   21.79 +}
   21.80 +
   21.81 +#else
   21.82 +
   21.83 +static inline uint16_t tswap16(uint16_t s)
   21.84 +{
   21.85 +    return s;
   21.86 +}
   21.87 +
   21.88 +static inline uint32_t tswap32(uint32_t s)
   21.89 +{
   21.90 +    return s;
   21.91 +}
   21.92 +
   21.93 +static inline uint64_t tswap64(uint64_t s)
   21.94 +{
   21.95 +    return s;
   21.96 +}
   21.97 +
   21.98 +static inline void tswap16s(uint16_t *s)
   21.99 +{
  21.100 +}
  21.101 +
  21.102 +static inline void tswap32s(uint32_t *s)
  21.103 +{
  21.104 +}
  21.105 +
  21.106 +static inline void tswap64s(uint64_t *s)
  21.107 +{
  21.108 +}
  21.109 +
  21.110 +#endif
  21.111 +
  21.112 +#if TARGET_LONG_SIZE == 4
  21.113 +#define tswapl(s) tswap32(s)
  21.114 +#define tswapls(s) tswap32s((uint32_t *)(s))
  21.115 +#else
  21.116 +#define tswapl(s) tswap64(s)
  21.117 +#define tswapls(s) tswap64s((uint64_t *)(s))
  21.118 +#endif
  21.119 +
  21.120 +/* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */
  21.121 +typedef union {
  21.122 +    double d;
  21.123 +#if !defined(WORDS_BIGENDIAN) && !defined(__arm__)
  21.124 +    struct {
  21.125 +        uint32_t lower;
  21.126 +        uint32_t upper;
  21.127 +    } l;
  21.128 +#else
  21.129 +    struct {
  21.130 +        uint32_t upper;
  21.131 +        uint32_t lower;
  21.132 +    } l;
  21.133 +#endif
  21.134 +    uint64_t ll;
  21.135 +} CPU_DoubleU;
  21.136 +
  21.137 +/* CPU memory access without any memory or io remapping */
  21.138 +
  21.139 +/*
  21.140 + * the generic syntax for the memory accesses is:
  21.141 + *
  21.142 + * load: ld{type}{sign}{size}{endian}_{access_type}(ptr)
  21.143 + *
  21.144 + * store: st{type}{size}{endian}_{access_type}(ptr, val)
  21.145 + *
  21.146 + * type is:
  21.147 + * (empty): integer access
  21.148 + *   f    : float access
  21.149 + * 
  21.150 + * sign is:
  21.151 + * (empty): for floats or 32 bit size
  21.152 + *   u    : unsigned
  21.153 + *   s    : signed
  21.154 + *
  21.155 + * size is:
  21.156 + *   b: 8 bits
  21.157 + *   w: 16 bits
  21.158 + *   l: 32 bits
  21.159 + *   q: 64 bits
  21.160 + * 
  21.161 + * endian is:
  21.162 + * (empty): target cpu endianness or 8 bit access
  21.163 + *   r    : reversed target cpu endianness (not implemented yet)
  21.164 + *   be   : big endian (not implemented yet)
  21.165 + *   le   : little endian (not implemented yet)
  21.166 + *
  21.167 + * access_type is:
  21.168 + *   raw    : host memory access
  21.169 + *   user   : user mode access using soft MMU
  21.170 + *   kernel : kernel mode access using soft MMU
  21.171 + */
  21.172 +static inline int ldub_raw(void *ptr)
  21.173 +{
  21.174 +    return *(uint8_t *)ptr;
  21.175 +}
  21.176 +
  21.177 +static inline int ldsb_raw(void *ptr)
  21.178 +{
  21.179 +    return *(int8_t *)ptr;
  21.180 +}
  21.181 +
  21.182 +static inline void stb_raw(void *ptr, int v)
  21.183 +{
  21.184 +    *(uint8_t *)ptr = v;
  21.185 +}
  21.186 +
  21.187 +/* NOTE: on arm, putting 2 in /proc/sys/debug/alignment so that the
  21.188 +   kernel handles unaligned load/stores may give better results, but
  21.189 +   it is a system wide setting : bad */
  21.190 +#if !defined(TARGET_WORDS_BIGENDIAN) && (defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED))
  21.191 +
  21.192 +/* conservative code for little endian unaligned accesses */
  21.193 +static inline int lduw_raw(void *ptr)
  21.194 +{
  21.195 +#ifdef __powerpc__
  21.196 +    int val;
  21.197 +    __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr));
  21.198 +    return val;
  21.199 +#else
  21.200 +    uint8_t *p = ptr;
  21.201 +    return p[0] | (p[1] << 8);
  21.202 +#endif
  21.203 +}
  21.204 +
  21.205 +static inline int ldsw_raw(void *ptr)
  21.206 +{
  21.207 +#ifdef __powerpc__
  21.208 +    int val;
  21.209 +    __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr));
  21.210 +    return (int16_t)val;
  21.211 +#else
  21.212 +    uint8_t *p = ptr;
  21.213 +    return (int16_t)(p[0] | (p[1] << 8));
  21.214 +#endif
  21.215 +}
  21.216 +
  21.217 +static inline int ldl_raw(void *ptr)
  21.218 +{
  21.219 +#ifdef __powerpc__
  21.220 +    int val;
  21.221 +    __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (ptr));
  21.222 +    return val;
  21.223 +#else
  21.224 +    uint8_t *p = ptr;
  21.225 +    return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
  21.226 +#endif
  21.227 +}
  21.228 +
  21.229 +static inline uint64_t ldq_raw(void *ptr)
  21.230 +{
  21.231 +    uint8_t *p = ptr;
  21.232 +    uint32_t v1, v2;
  21.233 +    v1 = ldl_raw(p);
  21.234 +    v2 = ldl_raw(p + 4);
  21.235 +    return v1 | ((uint64_t)v2 << 32);
  21.236 +}
  21.237 +
  21.238 +static inline void stw_raw(void *ptr, int v)
  21.239 +{
  21.240 +#ifdef __powerpc__
  21.241 +    __asm__ __volatile__ ("sthbrx %1,0,%2" : "=m" (*(uint16_t *)ptr) : "r" (v), "r" (ptr));
  21.242 +#else
  21.243 +    uint8_t *p = ptr;
  21.244 +    p[0] = v;
  21.245 +    p[1] = v >> 8;
  21.246 +#endif
  21.247 +}
  21.248 +
  21.249 +static inline void stl_raw(void *ptr, int v)
  21.250 +{
  21.251 +#ifdef __powerpc__
  21.252 +    __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr));
  21.253 +#else
  21.254 +    uint8_t *p = ptr;
  21.255 +    p[0] = v;
  21.256 +    p[1] = v >> 8;
  21.257 +    p[2] = v >> 16;
  21.258 +    p[3] = v >> 24;
  21.259 +#endif
  21.260 +}
  21.261 +
  21.262 +static inline void stq_raw(void *ptr, uint64_t v)
  21.263 +{
  21.264 +    uint8_t *p = ptr;
  21.265 +    stl_raw(p, (uint32_t)v);
  21.266 +    stl_raw(p + 4, v >> 32);
  21.267 +}
  21.268 +
  21.269 +/* float access */
  21.270 +
  21.271 +static inline float ldfl_raw(void *ptr)
  21.272 +{
  21.273 +    union {
  21.274 +        float f;
  21.275 +        uint32_t i;
  21.276 +    } u;
  21.277 +    u.i = ldl_raw(ptr);
  21.278 +    return u.f;
  21.279 +}
  21.280 +
  21.281 +static inline void stfl_raw(void *ptr, float v)
  21.282 +{
  21.283 +    union {
  21.284 +        float f;
  21.285 +        uint32_t i;
  21.286 +    } u;
  21.287 +    u.f = v;
  21.288 +    stl_raw(ptr, u.i);
  21.289 +}
  21.290 +
  21.291 +static inline double ldfq_raw(void *ptr)
  21.292 +{
  21.293 +    CPU_DoubleU u;
  21.294 +    u.l.lower = ldl_raw(ptr);
  21.295 +    u.l.upper = ldl_raw(ptr + 4);
  21.296 +    return u.d;
  21.297 +}
  21.298 +
  21.299 +static inline void stfq_raw(void *ptr, double v)
  21.300 +{
  21.301 +    CPU_DoubleU u;
  21.302 +    u.d = v;
  21.303 +    stl_raw(ptr, u.l.lower);
  21.304 +    stl_raw(ptr + 4, u.l.upper);
  21.305 +}
  21.306 +
  21.307 +#elif defined(TARGET_WORDS_BIGENDIAN) && (!defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED))
  21.308 +
  21.309 +static inline int lduw_raw(void *ptr)
  21.310 +{
  21.311 +#if defined(__i386__)
  21.312 +    int val;
  21.313 +    asm volatile ("movzwl %1, %0\n"
  21.314 +                  "xchgb %b0, %h0\n"
  21.315 +                  : "=q" (val)
  21.316 +                  : "m" (*(uint16_t *)ptr));
  21.317 +    return val;
  21.318 +#else
  21.319 +    uint8_t *b = (uint8_t *) ptr;
  21.320 +    return ((b[0] << 8) | b[1]);
  21.321 +#endif
  21.322 +}
  21.323 +
  21.324 +static inline int ldsw_raw(void *ptr)
  21.325 +{
  21.326 +#if defined(__i386__)
  21.327 +    int val;
  21.328 +    asm volatile ("movzwl %1, %0\n"
  21.329 +                  "xchgb %b0, %h0\n"
  21.330 +                  : "=q" (val)
  21.331 +                  : "m" (*(uint16_t *)ptr));
  21.332 +    return (int16_t)val;
  21.333 +#else
  21.334 +    uint8_t *b = (uint8_t *) ptr;
  21.335 +    return (int16_t)((b[0] << 8) | b[1]);
  21.336 +#endif
  21.337 +}
  21.338 +
  21.339 +static inline int ldl_raw(void *ptr)
  21.340 +{
  21.341 +#if defined(__i386__) || defined(__x86_64__)
  21.342 +    int val;
  21.343 +    asm volatile ("movl %1, %0\n"
  21.344 +                  "bswap %0\n"
  21.345 +                  : "=r" (val)
  21.346 +                  : "m" (*(uint32_t *)ptr));
  21.347 +    return val;
  21.348 +#else
  21.349 +    uint8_t *b = (uint8_t *) ptr;
  21.350 +    return (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | b[3];
  21.351 +#endif
  21.352 +}
  21.353 +
  21.354 +static inline uint64_t ldq_raw(void *ptr)
  21.355 +{
  21.356 +    uint32_t a,b;
  21.357 +    a = ldl_raw(ptr);
  21.358 +    b = ldl_raw(ptr+4);
  21.359 +    return (((uint64_t)a<<32)|b);
  21.360 +}
  21.361 +
  21.362 +static inline void stw_raw(void *ptr, int v)
  21.363 +{
  21.364 +#if defined(__i386__)
  21.365 +    asm volatile ("xchgb %b0, %h0\n"
  21.366 +                  "movw %w0, %1\n"
  21.367 +                  : "=q" (v)
  21.368 +                  : "m" (*(uint16_t *)ptr), "0" (v));
  21.369 +#else
  21.370 +    uint8_t *d = (uint8_t *) ptr;
  21.371 +    d[0] = v >> 8;
  21.372 +    d[1] = v;
  21.373 +#endif
  21.374 +}
  21.375 +
  21.376 +static inline void stl_raw(void *ptr, int v)
  21.377 +{
  21.378 +#if defined(__i386__) || defined(__x86_64__)
  21.379 +    asm volatile ("bswap %0\n"
  21.380 +                  "movl %0, %1\n"
  21.381 +                  : "=r" (v)
  21.382 +                  : "m" (*(uint32_t *)ptr), "0" (v));
  21.383 +#else
  21.384 +    uint8_t *d = (uint8_t *) ptr;
  21.385 +    d[0] = v >> 24;
  21.386 +    d[1] = v >> 16;
  21.387 +    d[2] = v >> 8;
  21.388 +    d[3] = v;
  21.389 +#endif
  21.390 +}
  21.391 +
  21.392 +static inline void stq_raw(void *ptr, uint64_t v)
  21.393 +{
  21.394 +    stl_raw(ptr, v >> 32);
  21.395 +    stl_raw(ptr + 4, v);
  21.396 +}
  21.397 +
  21.398 +/* float access */
  21.399 +
  21.400 +static inline float ldfl_raw(void *ptr)
  21.401 +{
  21.402 +    union {
  21.403 +        float f;
  21.404 +        uint32_t i;
  21.405 +    } u;
  21.406 +    u.i = ldl_raw(ptr);
  21.407 +    return u.f;
  21.408 +}
  21.409 +
  21.410 +static inline void stfl_raw(void *ptr, float v)
  21.411 +{
  21.412 +    union {
  21.413 +        float f;
  21.414 +        uint32_t i;
  21.415 +    } u;
  21.416 +    u.f = v;
  21.417 +    stl_raw(ptr, u.i);
  21.418 +}
  21.419 +
  21.420 +static inline double ldfq_raw(void *ptr)
  21.421 +{
  21.422 +    CPU_DoubleU u;
  21.423 +    u.l.upper = ldl_raw(ptr);
  21.424 +    u.l.lower = ldl_raw(ptr + 4);
  21.425 +    return u.d;
  21.426 +}
  21.427 +
  21.428 +static inline void stfq_raw(void *ptr, double v)
  21.429 +{
  21.430 +    CPU_DoubleU u;
  21.431 +    u.d = v;
  21.432 +    stl_raw(ptr, u.l.upper);
  21.433 +    stl_raw(ptr + 4, u.l.lower);
  21.434 +}
  21.435 +
  21.436 +#else
  21.437 +
  21.438 +static inline int lduw_raw(void *ptr)
  21.439 +{
  21.440 +    return *(uint16_t *)ptr;
  21.441 +}
  21.442 +
  21.443 +static inline int ldsw_raw(void *ptr)
  21.444 +{
  21.445 +    return *(int16_t *)ptr;
  21.446 +}
  21.447 +
  21.448 +static inline int ldl_raw(void *ptr)
  21.449 +{
  21.450 +    return *(uint32_t *)ptr;
  21.451 +}
  21.452 +
  21.453 +static inline uint64_t ldq_raw(void *ptr)
  21.454 +{
  21.455 +    return *(uint64_t *)ptr;
  21.456 +}
  21.457 +
  21.458 +static inline void stw_raw(void *ptr, int v)
  21.459 +{
  21.460 +    *(uint16_t *)ptr = v;
  21.461 +}
  21.462 +
  21.463 +static inline void stl_raw(void *ptr, int v)
  21.464 +{
  21.465 +    *(uint32_t *)ptr = v;
  21.466 +}
  21.467 +
  21.468 +static inline void stq_raw(void *ptr, uint64_t v)
  21.469 +{
  21.470 +    *(uint64_t *)ptr = v;
  21.471 +}
  21.472 +
  21.473 +/* float access */
  21.474 +
  21.475 +static inline float ldfl_raw(void *ptr)
  21.476 +{
  21.477 +    return *(float *)ptr;
  21.478 +}
  21.479 +
  21.480 +static inline double ldfq_raw(void *ptr)
  21.481 +{
  21.482 +    return *(double *)ptr;
  21.483 +}
  21.484 +
  21.485 +static inline void stfl_raw(void *ptr, float v)
  21.486 +{
  21.487 +    *(float *)ptr = v;
  21.488 +}
  21.489 +
  21.490 +static inline void stfq_raw(void *ptr, double v)
  21.491 +{
  21.492 +    *(double *)ptr = v;
  21.493 +}
  21.494 +#endif
  21.495 +
  21.496 +/* MMU memory access macros */
  21.497 +
  21.498 +#if defined(CONFIG_USER_ONLY) 
  21.499 +
  21.500 +/* if user mode, no other memory access functions */
  21.501 +#define ldub(p) ldub_raw(p)
  21.502 +#define ldsb(p) ldsb_raw(p)
  21.503 +#define lduw(p) lduw_raw(p)
  21.504 +#define ldsw(p) ldsw_raw(p)
  21.505 +#define ldl(p) ldl_raw(p)
  21.506 +#define ldq(p) ldq_raw(p)
  21.507 +#define ldfl(p) ldfl_raw(p)
  21.508 +#define ldfq(p) ldfq_raw(p)
  21.509 +#define stb(p, v) stb_raw(p, v)
  21.510 +#define stw(p, v) stw_raw(p, v)
  21.511 +#define stl(p, v) stl_raw(p, v)
  21.512 +#define stq(p, v) stq_raw(p, v)
  21.513 +#define stfl(p, v) stfl_raw(p, v)
  21.514 +#define stfq(p, v) stfq_raw(p, v)
  21.515 +
  21.516 +#define ldub_code(p) ldub_raw(p)
  21.517 +#define ldsb_code(p) ldsb_raw(p)
  21.518 +#define lduw_code(p) lduw_raw(p)
  21.519 +#define ldsw_code(p) ldsw_raw(p)
  21.520 +#define ldl_code(p) ldl_raw(p)
  21.521 +
  21.522 +#define ldub_kernel(p) ldub_raw(p)
  21.523 +#define ldsb_kernel(p) ldsb_raw(p)
  21.524 +#define lduw_kernel(p) lduw_raw(p)
  21.525 +#define ldsw_kernel(p) ldsw_raw(p)
  21.526 +#define ldl_kernel(p) ldl_raw(p)
  21.527 +#define ldfl_kernel(p) ldfl_raw(p)
  21.528 +#define ldfq_kernel(p) ldfq_raw(p)
  21.529 +#define stb_kernel(p, v) stb_raw(p, v)
  21.530 +#define stw_kernel(p, v) stw_raw(p, v)
  21.531 +#define stl_kernel(p, v) stl_raw(p, v)
  21.532 +#define stq_kernel(p, v) stq_raw(p, v)
  21.533 +#define stfl_kernel(p, v) stfl_raw(p, v)
  21.534 +#define stfq_kernel(p, vt) stfq_raw(p, v)
  21.535 +
  21.536 +#endif /* defined(CONFIG_USER_ONLY) */
  21.537 +
  21.538 +/* page related stuff */
  21.539 +
  21.540 +#define TARGET_PAGE_SIZE (1 << TARGET_PAGE_BITS)
  21.541 +#define TARGET_PAGE_MASK ~(TARGET_PAGE_SIZE - 1)
  21.542 +#define TARGET_PAGE_ALIGN(addr) (((addr) + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK)
  21.543 +
  21.544 +extern unsigned long qemu_real_host_page_size;
  21.545 +extern unsigned long qemu_host_page_bits;
  21.546 +extern unsigned long qemu_host_page_size;
  21.547 +extern unsigned long qemu_host_page_mask;
  21.548 +
  21.549 +#define HOST_PAGE_ALIGN(addr) (((addr) + qemu_host_page_size - 1) & qemu_host_page_mask)
  21.550 +
  21.551 +/* same as PROT_xxx */
  21.552 +#define PAGE_READ      0x0001
  21.553 +#define PAGE_WRITE     0x0002
  21.554 +#define PAGE_EXEC      0x0004
  21.555 +#define PAGE_BITS      (PAGE_READ | PAGE_WRITE | PAGE_EXEC)
  21.556 +#define PAGE_VALID     0x0008
  21.557 +/* original state of the write flag (used when tracking self-modifying
  21.558 +   code */
  21.559 +#define PAGE_WRITE_ORG 0x0010 
  21.560 +
  21.561 +void page_dump(FILE *f);
  21.562 +int page_get_flags(unsigned long address);
  21.563 +void page_set_flags(unsigned long start, unsigned long end, int flags);
  21.564 +void page_unprotect_range(uint8_t *data, unsigned long data_size);
  21.565 +
  21.566 +#define CPUState CPUX86State
  21.567 +
  21.568 +void cpu_dump_state(CPUState *env, FILE *f, 
  21.569 +                    int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
  21.570 +                    int flags);
  21.571 +
  21.572 +void cpu_abort(CPUState *env, const char *fmt, ...);
  21.573 +extern CPUState *cpu_single_env;
  21.574 +extern int code_copy_enabled;
  21.575 +
  21.576 +#define CPU_INTERRUPT_EXIT   0x01 /* wants exit from main loop */
  21.577 +#define CPU_INTERRUPT_HARD   0x02 /* hardware interrupt pending */
  21.578 +#define CPU_INTERRUPT_EXITTB 0x04 /* exit the current TB (use for x86 a20 case) */
  21.579 +#define CPU_INTERRUPT_TIMER  0x08 /* internal timer exception pending */
  21.580 +void cpu_interrupt(CPUState *s, int mask);
  21.581 +void cpu_reset_interrupt(CPUState *env, int mask);
  21.582 +
  21.583 +int cpu_breakpoint_insert(CPUState *env, target_ulong pc);
  21.584 +int cpu_breakpoint_remove(CPUState *env, target_ulong pc);
  21.585 +void cpu_single_step(CPUState *env, int enabled);
  21.586 +void cpu_reset(CPUState *s);
  21.587 +CPUState *cpu_init(void);
  21.588 +int main_loop(void);
  21.589 +
  21.590 +/* Return the physical page corresponding to a virtual one. Use it
  21.591 +   only for debugging because no protection checks are done. Return -1
  21.592 +   if no page found. */
  21.593 +target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr);
  21.594 +
  21.595 +#define CPU_LOG_TB_OUT_ASM (1 << 0) 
  21.596 +#define CPU_LOG_TB_IN_ASM  (1 << 1)
  21.597 +#define CPU_LOG_TB_OP      (1 << 2)
  21.598 +#define CPU_LOG_TB_OP_OPT  (1 << 3)
  21.599 +#define CPU_LOG_INT        (1 << 4)
  21.600 +#define CPU_LOG_EXEC       (1 << 5)
  21.601 +#define CPU_LOG_PCALL      (1 << 6)
  21.602 +#define CPU_LOG_IOPORT     (1 << 7)
  21.603 +#define CPU_LOG_TB_CPU     (1 << 8)
  21.604 +
  21.605 +/* define log items */
  21.606 +typedef struct CPULogItem {
  21.607 +    int mask;
  21.608 +    const char *name;
  21.609 +    const char *help;
  21.610 +} CPULogItem;
  21.611 +
  21.612 +extern CPULogItem cpu_log_items[];
  21.613 +
  21.614 +void cpu_set_log(int log_flags);
  21.615 +void cpu_set_log_filename(const char *filename);
  21.616 +int cpu_str_to_log_mask(const char *str);
  21.617 +
  21.618 +/* IO ports API */
  21.619 +
  21.620 +/* NOTE: as these functions may be even used when there is an isa
  21.621 +   brige on non x86 targets, we always defined them */
  21.622 +#ifndef NO_CPU_IO_DEFS
  21.623 +void cpu_outb(CPUState *env, int addr, int val);
  21.624 +void cpu_outw(CPUState *env, int addr, int val);
  21.625 +void cpu_outl(CPUState *env, int addr, int val);
  21.626 +int cpu_inb(CPUState *env, int addr);
  21.627 +int cpu_inw(CPUState *env, int addr);
  21.628 +int cpu_inl(CPUState *env, int addr);
  21.629 +#endif
  21.630 +
  21.631 +/* memory API */
  21.632 +
  21.633 +extern int phys_ram_size;
  21.634 +extern int phys_ram_fd;
  21.635 +extern uint8_t *phys_ram_base;
  21.636 +extern uint8_t *phys_ram_dirty;
  21.637 +
  21.638 +/* physical memory access */
  21.639 +#define IO_MEM_NB_ENTRIES  256
  21.640 +#define TLB_INVALID_MASK   (1 << 3)
  21.641 +#define IO_MEM_SHIFT       4
  21.642 +
  21.643 +#define IO_MEM_RAM         (0 << IO_MEM_SHIFT) /* hardcoded offset */
  21.644 +#define IO_MEM_ROM         (1 << IO_MEM_SHIFT) /* hardcoded offset */
  21.645 +#define IO_MEM_UNASSIGNED  (2 << IO_MEM_SHIFT)
  21.646 +#define IO_MEM_CODE        (3 << IO_MEM_SHIFT) /* used internally, never use directly */
  21.647 +#define IO_MEM_NOTDIRTY    (4 << IO_MEM_SHIFT) /* used internally, never use directly */
  21.648 +
  21.649 +typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value);
  21.650 +typedef uint32_t CPUReadMemoryFunc(void *opaque, target_phys_addr_t addr);
  21.651 +
  21.652 +void cpu_register_physical_memory(target_phys_addr_t start_addr, 
  21.653 +                                  unsigned long size,
  21.654 +                                  unsigned long phys_offset);
  21.655 +int cpu_register_io_memory(int io_index,
  21.656 +                           CPUReadMemoryFunc **mem_read,
  21.657 +                           CPUWriteMemoryFunc **mem_write,
  21.658 +                           void *opaque);
  21.659 +CPUWriteMemoryFunc **cpu_get_io_memory_write(int io_index);
  21.660 +CPUReadMemoryFunc **cpu_get_io_memory_read(int io_index);
  21.661 +
  21.662 +void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
  21.663 +                            int len, int is_write);
  21.664 +static inline void cpu_physical_memory_read(target_phys_addr_t addr, 
  21.665 +                                            uint8_t *buf, int len)
  21.666 +{
  21.667 +    cpu_physical_memory_rw(addr, buf, len, 0);
  21.668 +}
  21.669 +static inline void cpu_physical_memory_write(target_phys_addr_t addr, 
  21.670 +                                             const uint8_t *buf, int len)
  21.671 +{
  21.672 +    cpu_physical_memory_rw(addr, (uint8_t *)buf, len, 1);
  21.673 +}
  21.674 +
  21.675 +int cpu_memory_rw_debug(CPUState *env, target_ulong addr, 
  21.676 +                        uint8_t *buf, int len, int is_write);
  21.677 +
  21.678 +/* read dirty bit (return 0 or 1) */
  21.679 +static inline int cpu_physical_memory_is_dirty(target_ulong addr)
  21.680 +{
  21.681 +    return phys_ram_dirty[addr >> TARGET_PAGE_BITS];
  21.682 +}
  21.683 +
  21.684 +static inline void cpu_physical_memory_set_dirty(target_ulong addr)
  21.685 +{
  21.686 +    phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 1;
  21.687 +}
  21.688 +
  21.689 +void cpu_physical_memory_reset_dirty(target_ulong start, target_ulong end);
  21.690 +
  21.691 +#endif /* CPU_ALL_H */
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/tools/ioemu/cpu-defs.h	Thu May 19 22:05:02 2005 +0000
    22.3 @@ -0,0 +1,95 @@
    22.4 +/*
    22.5 + * common defines for all CPUs
    22.6 + * 
    22.7 + * Copyright (c) 2003 Fabrice Bellard
    22.8 + *
    22.9 + * This library is free software; you can redistribute it and/or
   22.10 + * modify it under the terms of the GNU Lesser General Public
   22.11 + * License as published by the Free Software Foundation; either
   22.12 + * version 2 of the License, or (at your option) any later version.
   22.13 + *
   22.14 + * This library is distributed in the hope that it will be useful,
   22.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   22.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   22.17 + * Lesser General Public License for more details.
   22.18 + *
   22.19 + * You should have received a copy of the GNU Lesser General Public
   22.20 + * License along with this library; if not, write to the Free Software
   22.21 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   22.22 + */
   22.23 +#ifndef CPU_DEFS_H
   22.24 +#define CPU_DEFS_H
   22.25 +
   22.26 +#include "config.h"
   22.27 +#include <setjmp.h>
   22.28 +#include <inttypes.h>
   22.29 +#include "osdep.h"
   22.30 +
   22.31 +#ifndef TARGET_LONG_BITS
   22.32 +#error TARGET_LONG_BITS must be defined before including this header
   22.33 +#endif
   22.34 +
   22.35 +#if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__)
   22.36 +#define HOST_LONG_BITS 64
   22.37 +#else
   22.38 +#define HOST_LONG_BITS 32
   22.39 +#endif
   22.40 +
   22.41 +#ifndef TARGET_PHYS_ADDR_BITS 
   22.42 +#if TARGET_LONG_BITS >= HOST_LONG_BITS
   22.43 +#define TARGET_PHYS_ADDR_BITS TARGET_LONG_BITS
   22.44 +#else
   22.45 +#define TARGET_PHYS_ADDR_BITS HOST_LONG_BITS
   22.46 +#endif
   22.47 +#endif
   22.48 +
   22.49 +#define TARGET_LONG_SIZE (TARGET_LONG_BITS / 8)
   22.50 +
   22.51 +/* target_ulong is the type of a virtual address */
   22.52 +#if TARGET_LONG_SIZE == 4
   22.53 +typedef int32_t target_long;
   22.54 +typedef uint32_t target_ulong;
   22.55 +#elif TARGET_LONG_SIZE == 8
   22.56 +typedef int64_t target_long;
   22.57 +typedef uint64_t target_ulong;
   22.58 +#else
   22.59 +#error TARGET_LONG_SIZE undefined
   22.60 +#endif
   22.61 +
   22.62 +/* target_phys_addr_t is the type of a physical address (its size can
   22.63 +   be different from 'target_ulong'). We have sizeof(target_phys_addr)
   22.64 +   = max(sizeof(unsigned long),
   22.65 +   sizeof(size_of_target_physical_address)) because we must pass a
   22.66 +   host pointer to memory operations in some cases */
   22.67 +
   22.68 +#if TARGET_PHYS_ADDR_BITS == 32
   22.69 +typedef uint32_t target_phys_addr_t;
   22.70 +#elif TARGET_PHYS_ADDR_BITS == 64
   22.71 +typedef uint64_t target_phys_addr_t;
   22.72 +#else
   22.73 +#error TARGET_PHYS_ADDR_BITS undefined
   22.74 +#endif
   22.75 +
   22.76 +#define HOST_LONG_SIZE (HOST_LONG_BITS / 8)
   22.77 +
   22.78 +#define EXCP_INTERRUPT 	256 /* async interruption */
   22.79 +#define EXCP_HLT        257 /* hlt instruction reached */
   22.80 +#define EXCP_DEBUG      258 /* cpu stopped after a breakpoint or singlestep */
   22.81 +
   22.82 +#define MAX_BREAKPOINTS 32
   22.83 +
   22.84 +#define CPU_TLB_SIZE 256
   22.85 +
   22.86 +typedef struct CPUTLBEntry {
   22.87 +    /* bit 31 to TARGET_PAGE_BITS : virtual address 
   22.88 +       bit TARGET_PAGE_BITS-1..IO_MEM_SHIFT : if non zero, memory io
   22.89 +                                              zone number
   22.90 +       bit 3                      : indicates that the entry is invalid
   22.91 +       bit 2..0                   : zero
   22.92 +    */
   22.93 +    target_ulong address; 
   22.94 +    /* addend to virtual address to get physical address */
   22.95 +    target_phys_addr_t addend; 
   22.96 +} CPUTLBEntry;
   22.97 +
   22.98 +#endif
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/tools/ioemu/cpu.h	Thu May 19 22:05:02 2005 +0000
    23.3 @@ -0,0 +1,69 @@
    23.4 +/*
    23.5 + * i386 virtual CPU header
    23.6 + * 
    23.7 + *  Copyright (c) 2003 Fabrice Bellard
    23.8 + *
    23.9 + * This library is free software; you can redistribute it and/or
   23.10 + * modify it under the terms of the GNU Lesser General Public
   23.11 + * License as published by the Free Software Foundation; either
   23.12 + * version 2 of the License, or (at your option) any later version.
   23.13 + *
   23.14 + * This library is distributed in the hope that it will be useful,
   23.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   23.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   23.17 + * Lesser General Public License for more details.
   23.18 + *
   23.19 + * You should have received a copy of the GNU Lesser General Public
   23.20 + * License along with this library; if not, write to the Free Software
   23.21 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   23.22 + */
   23.23 +#ifndef CPU_I386_H
   23.24 +#define CPU_I386_H
   23.25 +
   23.26 +#include "config.h"
   23.27 +
   23.28 +#ifdef TARGET_X86_64
   23.29 +#define TARGET_LONG_BITS 64
   23.30 +#else
   23.31 +#define TARGET_LONG_BITS 32
   23.32 +#endif
   23.33 +
   23.34 +/* target supports implicit self modifying code */
   23.35 +#define TARGET_HAS_SMC
   23.36 +/* support for self modifying code even if the modified instruction is
   23.37 +   close to the modifying instruction */
   23.38 +#define TARGET_HAS_PRECISE_SMC
   23.39 +
   23.40 +#include "cpu-defs.h"
   23.41 +
   23.42 +#if defined(__i386__) && !defined(CONFIG_SOFTMMU)
   23.43 +#define USE_CODE_COPY
   23.44 +#endif
   23.45 +
   23.46 +/* Empty for now */
   23.47 +typedef struct CPUX86State {
   23.48 +    uint32_t a20_mask;
   23.49 +    int interrupt_request;
   23.50 +    int send_event;
   23.51 +} CPUX86State;
   23.52 +
   23.53 +#ifndef IN_OP_I386
   23.54 +void cpu_x86_outb(CPUX86State *env, int addr, int val);
   23.55 +void cpu_x86_outw(CPUX86State *env, int addr, int val);
   23.56 +void cpu_x86_outl(CPUX86State *env, int addr, int val);
   23.57 +int cpu_x86_inb(CPUX86State *env, int addr);
   23.58 +int cpu_x86_inw(CPUX86State *env, int addr);
   23.59 +int cpu_x86_inl(CPUX86State *env, int addr);
   23.60 +#endif
   23.61 +
   23.62 +CPUX86State *cpu_x86_init(void);
   23.63 +int cpu_x86_exec(CPUX86State *s);
   23.64 +void cpu_x86_close(CPUX86State *s);
   23.65 +int cpu_get_pic_interrupt(CPUX86State *s);
   23.66 +/* MSDOS compatibility mode FPU exception support */
   23.67 +void cpu_set_ferr(CPUX86State *s);
   23.68 +
   23.69 +#define TARGET_PAGE_BITS 12
   23.70 +#include "cpu-all.h"
   23.71 +
   23.72 +#endif /* CPU_I386_H */
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/tools/ioemu/create_keysym_header.sh	Thu May 19 22:05:02 2005 +0000
    24.3 @@ -0,0 +1,77 @@
    24.4 +#!/bin/sh
    24.5 +
    24.6 +# QEMU keysym adapter: create a header file to link the name to its keysym
    24.7 +#
    24.8 +# Copyright (c) 2004,2005 Johannes E. Schindelin
    24.9 +#
   24.10 +# Permission is hereby granted, free of charge, to any person obtaining a copy
   24.11 +# of this software and associated documentation files (the "Software"), to deal
   24.12 +# in the Software without restriction, including without limitation the rights
   24.13 +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   24.14 +# copies of the Software, and to permit persons to whom the Software is
   24.15 +# furnished to do so, subject to the following conditions:
   24.16 +#
   24.17 +# The above copyright notice and this permission notice shall be included in
   24.18 +# all copies or substantial portions of the Software.
   24.19 +#
   24.20 +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   24.21 +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   24.22 +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
   24.23 +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   24.24 +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   24.25 +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   24.26 +# THE SOFTWARE.
   24.27 +
   24.28 +type="$1"
   24.29 +cflags="$2"
   24.30 +if [ -z "$cflags" ]; then
   24.31 +	echo "Usage: $0 vnc|sdl cflags"
   24.32 +	exit 1
   24.33 +fi
   24.34 +
   24.35 +
   24.36 +case "$type" in
   24.37 +vnc)
   24.38 +	ignore_case=''
   24.39 +	header=rfb/keysym.h
   24.40 +	keysym_t=rfbKeySym
   24.41 +	pattern='^#define[ 	]*XK_\([^ 	]*\)[ 	].*$'
   24.42 +	replacement='#ifdef XK_\1\n{\"\1\", XK_\1},\n#endif'
   24.43 +	extra_replace='cat'
   24.44 +	extra_sort='cat'
   24.45 +	;;
   24.46 +sdl)
   24.47 +	ignore_case='-f'
   24.48 +	header=SDL_keysym.h
   24.49 +	keysym_t=int
   24.50 +	pattern='^[ 	]*SDLK_\([^ 	]*\)[ 	]*=.*$'
   24.51 +	replacement='{\"\1\", SDLK_\1},'
   24.52 +	extra_replace='sed -e s/{"\([RL]\)\(SUPER\|META\|ALT\|CONTROL\|SHIFT\)/{"\2_\1/ -e s/{"\([RL]\)CTRL/{"CONTROL_\1/ -e s/{"\(PAGE\)\(UP\|DOWN\)/{"\1_\2/ -e s/{"\(KP\)\([0-9]\)/{"\1_\2/ -e s/{"KP_MINUS/{"KP_SUBTRACT/ -e s/{"KP_PLUS/{"KP_ADD/ -e s/{"KP_PERIOD/{"KP_DECIMAL/ -e s/{"\(LEFT\|RIGHT\)\(PAREN\|BRACKET\)/{"\2\1/ -e s/{"EXCLAIM/{"EXCLAM/ -e s/{"\(CAPS\|NUM\)\(LOCK\)/{"\1_\2/ -e s/{"SCROLLOCK/{"SCROLL_LOCK/ -e s/{"KP_EQUALS/{"KP_EQUAL/ -e s/{"SYSREQ/{"SYS_REQ/ -e s/{"QUOTE"/{"APOSTROPHE"/ -e s/{"BACKQUOTE/{"GRAVE/ -e s/{"EQUALS/{"EQUAL/ -e s/{"EURO/{"EUROSIGN/ -e s/{"COMPOSE/{"MULTI_KEY/ -e s/{"MODE/{"MODE_SWITCH/ -e s/{"HASH/{"NUMBERSIGN/ -e s/{"WORLD_68/{"ADIAERESIS/ -e s/{"WORLD_86/{"ODIAERESIS/ -e s/{"WORLD_92/{"UDIAERESIS/ -e s/{"WORLD_63/{"SSHARP/ -e s/{"WORLD_20/{"ACUTE/ -e s/{"CARET/{"ASCIICIRCUM/'
   24.53 +	extra_sort='sort -f'
   24.54 +	;;
   24.55 +*) echo "Unknown type: $type is neither vnc nor sdl"; exit 1;;
   24.56 +esac
   24.57 +
   24.58 +outfile=keysym_adapter_"$type".h
   24.59 +
   24.60 +echo "typedef struct {" > $outfile
   24.61 +echo "	const char* name;" >> $outfile
   24.62 +echo "	$keysym_t keysym;" >> $outfile
   24.63 +echo "} name2keysym_t;" >> $outfile
   24.64 +echo "static name2keysym_t name2keysym[]={" >> $outfile
   24.65 +
   24.66 +for path in $(echo "$cflags" | sed "s/-I/ /g"); do
   24.67 +	if [ -f $path/$header ]; then
   24.68 +		cat $path/$header
   24.69 +	fi
   24.70 +done | tr "\011" " " | LC_ALL=C sort $ignore_case | uniq | \
   24.71 +sed -n -e "s/$pattern/$replacement/p" | $extra_replace | \
   24.72 +LC_ALL=C $extra_sort >> $outfile
   24.73 +
   24.74 +echo "{0,0}};" >> $outfile
   24.75 +
   24.76 +if [ -n "$ignore_case" ]; then
   24.77 +echo "#define KEYBOARD_IGNORE_CASE" >> $outfile
   24.78 +fi
   24.79 +
   24.80 +
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/tools/ioemu/exec-all.h	Thu May 19 22:05:02 2005 +0000
    25.3 @@ -0,0 +1,579 @@
    25.4 +/*
    25.5 + * internal execution defines for qemu
    25.6 + * 
    25.7 + *  Copyright (c) 2003 Fabrice Bellard
    25.8 + *
    25.9 + * This library is free software; you can redistribute it and/or
   25.10 + * modify it under the terms of the GNU Lesser General Public
   25.11 + * License as published by the Free Software Foundation; either
   25.12 + * version 2 of the License, or (at your option) any later version.
   25.13 + *
   25.14 + * This library is distributed in the hope that it will be useful,
   25.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   25.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   25.17 + * Lesser General Public License for more details.
   25.18 + *
   25.19 + * You should have received a copy of the GNU Lesser General Public
   25.20 + * License along with this library; if not, write to the Free Software
   25.21 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   25.22 + */
   25.23 +
   25.24 +/* allow to see translation results - the slowdown should be negligible, so we leave it */
   25.25 +#define DEBUG_DISAS
   25.26 +
   25.27 +#ifndef glue
   25.28 +#define xglue(x, y) x ## y
   25.29 +#define glue(x, y) xglue(x, y)
   25.30 +#define stringify(s)	tostring(s)
   25.31 +#define tostring(s)	#s
   25.32 +#endif
   25.33 +
   25.34 +#if GCC_MAJOR < 3
   25.35 +#define __builtin_expect(x, n) (x)
   25.36 +#endif
   25.37 +
   25.38 +#ifdef __i386__
   25.39 +#define REGPARM(n) __attribute((regparm(n)))
   25.40 +#else
   25.41 +#define REGPARM(n)
   25.42 +#endif
   25.43 +
   25.44 +/* is_jmp field values */
   25.45 +#define DISAS_NEXT    0 /* next instruction can be analyzed */
   25.46 +#define DISAS_JUMP    1 /* only pc was modified dynamically */
   25.47 +#define DISAS_UPDATE  2 /* cpu state was modified dynamically */
   25.48 +#define DISAS_TB_JUMP 3 /* only pc was modified statically */
   25.49 +
   25.50 +struct TranslationBlock;
   25.51 +
   25.52 +/* XXX: make safe guess about sizes */
   25.53 +#define MAX_OP_PER_INSTR 32
   25.54 +#define OPC_BUF_SIZE 512
   25.55 +#define OPC_MAX_SIZE (OPC_BUF_SIZE - MAX_OP_PER_INSTR)
   25.56 +
   25.57 +#define OPPARAM_BUF_SIZE (OPC_BUF_SIZE * 3)
   25.58 +
   25.59 +extern uint16_t gen_opc_buf[OPC_BUF_SIZE];
   25.60 +extern uint32_t gen_opparam_buf[OPPARAM_BUF_SIZE];
   25.61 +extern uint32_t gen_opc_pc[OPC_BUF_SIZE];
   25.62 +extern uint32_t gen_opc_npc[OPC_BUF_SIZE];
   25.63 +extern uint8_t gen_opc_cc_op[OPC_BUF_SIZE];
   25.64 +extern uint8_t gen_opc_instr_start[OPC_BUF_SIZE];
   25.65 +
   25.66 +typedef void (GenOpFunc)(void);
   25.67 +typedef void (GenOpFunc1)(long);
   25.68 +typedef void (GenOpFunc2)(long, long);
   25.69 +typedef void (GenOpFunc3)(long, long, long);
   25.70 +                    
   25.71 +#if defined(TARGET_I386)
   25.72 +
   25.73 +void optimize_flags_init(void);
   25.74 +
   25.75 +#endif
   25.76 +
   25.77 +extern FILE *logfile;
   25.78 +extern int loglevel;
   25.79 +
   25.80 +int gen_intermediate_code(CPUState *env, struct TranslationBlock *tb);
   25.81 +int gen_intermediate_code_pc(CPUState *env, struct TranslationBlock *tb);
   25.82 +void dump_ops(const uint16_t *opc_buf, const uint32_t *opparam_buf);
   25.83 +int cpu_gen_code(CPUState *env, struct TranslationBlock *tb,
   25.84 +                 int max_code_size, int *gen_code_size_ptr);
   25.85 +int cpu_restore_state(struct TranslationBlock *tb, 
   25.86 +                      CPUState *env, unsigned long searched_pc,
   25.87 +                      void *puc);
   25.88 +int cpu_gen_code_copy(CPUState *env, struct TranslationBlock *tb,
   25.89 +                      int max_code_size, int *gen_code_size_ptr);
   25.90 +int cpu_restore_state_copy(struct TranslationBlock *tb, 
   25.91 +                           CPUState *env, unsigned long searched_pc,
   25.92 +                           void *puc);
   25.93 +void cpu_resume_from_signal(CPUState *env1, void *puc);
   25.94 +void cpu_exec_init(void);
   25.95 +int page_unprotect(unsigned long address, unsigned long pc, void *puc);
   25.96 +void tb_invalidate_phys_page_range(target_ulong start, target_ulong end, 
   25.97 +                                   int is_cpu_write_access);
   25.98 +void tb_invalidate_page_range(target_ulong start, target_ulong end);
   25.99 +void tlb_flush_page(CPUState *env, target_ulong addr);
  25.100 +void tlb_flush(CPUState *env, int flush_global);
  25.101 +int tlb_set_page(CPUState *env, target_ulong vaddr, 
  25.102 +                 target_phys_addr_t paddr, int prot, 
  25.103 +                 int is_user, int is_softmmu);
  25.104 +
  25.105 +#define CODE_GEN_MAX_SIZE        65536
  25.106 +#define CODE_GEN_ALIGN           16 /* must be >= of the size of a icache line */
  25.107 +
  25.108 +#define CODE_GEN_HASH_BITS     15
  25.109 +#define CODE_GEN_HASH_SIZE     (1 << CODE_GEN_HASH_BITS)
  25.110 +
  25.111 +#define CODE_GEN_PHYS_HASH_BITS     15
  25.112 +#define CODE_GEN_PHYS_HASH_SIZE     (1 << CODE_GEN_PHYS_HASH_BITS)
  25.113 +
  25.114 +/* maximum total translate dcode allocated */
  25.115 +
  25.116 +/* NOTE: the translated code area cannot be too big because on some
  25.117 +   archs the range of "fast" function calls is limited. Here is a
  25.118 +   summary of the ranges:
  25.119 +
  25.120 +   i386  : signed 32 bits
  25.121 +   arm   : signed 26 bits
  25.122 +   ppc   : signed 24 bits
  25.123 +   sparc : signed 32 bits
  25.124 +   alpha : signed 23 bits
  25.125 +*/
  25.126 +
  25.127 +#if defined(__alpha__)
  25.128 +#define CODE_GEN_BUFFER_SIZE     (2 * 1024 * 1024)
  25.129 +#elif defined(__powerpc__)
  25.130 +#define CODE_GEN_BUFFER_SIZE     (6 * 1024 * 1024)
  25.131 +#else
  25.132 +#define CODE_GEN_BUFFER_SIZE     (8 * 1024 * 1024)
  25.133 +#endif
  25.134 +
  25.135 +//#define CODE_GEN_BUFFER_SIZE     (128 * 1024)
  25.136 +
  25.137 +/* estimated block size for TB allocation */
  25.138 +/* XXX: use a per code average code fragment size and modulate it
  25.139 +   according to the host CPU */
  25.140 +#if defined(CONFIG_SOFTMMU)
  25.141 +#define CODE_GEN_AVG_BLOCK_SIZE 128
  25.142 +#else
  25.143 +#define CODE_GEN_AVG_BLOCK_SIZE 64
  25.144 +#endif
  25.145 +
  25.146 +#define CODE_GEN_MAX_BLOCKS    (CODE_GEN_BUFFER_SIZE / CODE_GEN_AVG_BLOCK_SIZE)
  25.147 +
  25.148 +#if defined(__powerpc__) 
  25.149 +#define USE_DIRECT_JUMP
  25.150 +#endif
  25.151 +#if defined(__i386__) && !defined(_WIN32)
  25.152 +#define USE_DIRECT_JUMP
  25.153 +#endif
  25.154 +
  25.155 +typedef struct TranslationBlock {
  25.156 +    target_ulong pc;   /* simulated PC corresponding to this block (EIP + CS base) */
  25.157 +    target_ulong cs_base; /* CS base for this block */
  25.158 +    unsigned int flags; /* flags defining in which context the code was generated */
  25.159 +    uint16_t size;      /* size of target code for this block (1 <=
  25.160 +                           size <= TARGET_PAGE_SIZE) */
  25.161 +    uint16_t cflags;    /* compile flags */
  25.162 +#define CF_CODE_COPY   0x0001 /* block was generated in code copy mode */
  25.163 +#define CF_TB_FP_USED  0x0002 /* fp ops are used in the TB */
  25.164 +#define CF_FP_USED     0x0004 /* fp ops are used in the TB or in a chained TB */
  25.165 +#define CF_SINGLE_INSN 0x0008 /* compile only a single instruction */
  25.166 +
  25.167 +    uint8_t *tc_ptr;    /* pointer to the translated code */
  25.168 +    struct TranslationBlock *hash_next; /* next matching tb for virtual address */
  25.169 +    /* next matching tb for physical address. */
  25.170 +    struct TranslationBlock *phys_hash_next; 
  25.171 +    /* first and second physical page containing code. The lower bit
  25.172 +       of the pointer tells the index in page_next[] */
  25.173 +    struct TranslationBlock *page_next[2]; 
  25.174 +    target_ulong page_addr[2]; 
  25.175 +
  25.176 +    /* the following data are used to directly call another TB from
  25.177 +       the code of this one. */
  25.178 +    uint16_t tb_next_offset[2]; /* offset of original jump target */
  25.179 +#ifdef USE_DIRECT_JUMP
  25.180 +    uint16_t tb_jmp_offset[4]; /* offset of jump instruction */
  25.181 +#else
  25.182 +    uint32_t tb_next[2]; /* address of jump generated code */
  25.183 +#endif
  25.184 +    /* list of TBs jumping to this one. This is a circular list using
  25.185 +       the two least significant bits of the pointers to tell what is
  25.186 +       the next pointer: 0 = jmp_next[0], 1 = jmp_next[1], 2 =
  25.187 +       jmp_first */
  25.188 +    struct TranslationBlock *jmp_next[2]; 
  25.189 +    struct TranslationBlock *jmp_first;
  25.190 +} TranslationBlock;
  25.191 +
  25.192 +static inline unsigned int tb_hash_func(unsigned long pc)
  25.193 +{
  25.194 +    return pc & (CODE_GEN_HASH_SIZE - 1);
  25.195 +}
  25.196 +
  25.197 +static inline unsigned int tb_phys_hash_func(unsigned long pc)
  25.198 +{
  25.199 +    return pc & (CODE_GEN_PHYS_HASH_SIZE - 1);
  25.200 +}
  25.201 +
  25.202 +TranslationBlock *tb_alloc(unsigned long pc);
  25.203 +void tb_flush(CPUState *env);
  25.204 +void tb_link(TranslationBlock *tb);
  25.205 +void tb_link_phys(TranslationBlock *tb, 
  25.206 +                  target_ulong phys_pc, target_ulong phys_page2);
  25.207 +
  25.208 +extern TranslationBlock *tb_hash[CODE_GEN_HASH_SIZE];
  25.209 +extern TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
  25.210 +
  25.211 +extern uint8_t code_gen_buffer[CODE_GEN_BUFFER_SIZE];
  25.212 +extern uint8_t *code_gen_ptr;
  25.213 +
  25.214 +/* find a translation block in the translation cache. If not found,
  25.215 +   return NULL and the pointer to the last element of the list in pptb */
  25.216 +static inline TranslationBlock *tb_find(TranslationBlock ***pptb,
  25.217 +                                        target_ulong pc, 
  25.218 +                                        target_ulong cs_base,
  25.219 +                                        unsigned int flags)
  25.220 +{
  25.221 +    TranslationBlock **ptb, *tb;
  25.222 +    unsigned int h;
  25.223 + 
  25.224 +    h = tb_hash_func(pc);
  25.225 +    ptb = &tb_hash[h];
  25.226 +    for(;;) {
  25.227 +        tb = *ptb;
  25.228 +        if (!tb)
  25.229 +            break;
  25.230 +        if (tb->pc == pc && tb->cs_base == cs_base && tb->flags == flags)
  25.231 +            return tb;
  25.232 +        ptb = &tb->hash_next;
  25.233 +    }
  25.234 +    *pptb = ptb;
  25.235 +    return NULL;
  25.236 +}
  25.237 +
  25.238 +
  25.239 +#if defined(USE_DIRECT_JUMP)
  25.240 +
  25.241 +#if defined(__powerpc__)
  25.242 +static inline void tb_set_jmp_target1(unsigned long jmp_addr, unsigned long addr)
  25.243 +{
  25.244 +    uint32_t val, *ptr;
  25.245 +
  25.246 +    /* patch the branch destination */
  25.247 +    ptr = (uint32_t *)jmp_addr;
  25.248 +    val = *ptr;
  25.249 +    val = (val & ~0x03fffffc) | ((addr - jmp_addr) & 0x03fffffc);
  25.250 +    *ptr = val;
  25.251 +    /* flush icache */
  25.252 +    asm volatile ("dcbst 0,%0" : : "r"(ptr) : "memory");
  25.253 +    asm volatile ("sync" : : : "memory");
  25.254 +    asm volatile ("icbi 0,%0" : : "r"(ptr) : "memory");
  25.255 +    asm volatile ("sync" : : : "memory");
  25.256 +    asm volatile ("isync" : : : "memory");
  25.257 +}
  25.258 +#elif defined(__i386__)
  25.259 +static inline void tb_set_jmp_target1(unsigned long jmp_addr, unsigned long addr)
  25.260 +{
  25.261 +    /* patch the branch destination */
  25.262 +    *(uint32_t *)jmp_addr = addr - (jmp_addr + 4);
  25.263 +    /* no need to flush icache explicitely */
  25.264 +}
  25.265 +#endif
  25.266 +
  25.267 +static inline void tb_set_jmp_target(TranslationBlock *tb, 
  25.268 +                                     int n, unsigned long addr)
  25.269 +{
  25.270 +    unsigned long offset;
  25.271 +
  25.272 +    offset = tb->tb_jmp_offset[n];
  25.273 +    tb_set_jmp_target1((unsigned long)(tb->tc_ptr + offset), addr);
  25.274 +    offset = tb->tb_jmp_offset[n + 2];
  25.275 +    if (offset != 0xffff)
  25.276 +        tb_set_jmp_target1((unsigned long)(tb->tc_ptr + offset), addr);
  25.277 +}
  25.278 +
  25.279 +#else
  25.280 +
  25.281 +/* set the jump target */
  25.282 +static inline void tb_set_jmp_target(TranslationBlock *tb, 
  25.283 +                                     int n, unsigned long addr)
  25.284 +{
  25.285 +    tb->tb_next[n] = addr;
  25.286 +}
  25.287 +
  25.288 +#endif
  25.289 +
  25.290 +static inline void tb_add_jump(TranslationBlock *tb, int n, 
  25.291 +                               TranslationBlock *tb_next)
  25.292 +{
  25.293 +    /* NOTE: this test is only needed for thread safety */
  25.294 +    if (!tb->jmp_next[n]) {
  25.295 +        /* patch the native jump address */
  25.296 +        tb_set_jmp_target(tb, n, (unsigned long)tb_next->tc_ptr);
  25.297 +        
  25.298 +        /* add in TB jmp circular list */
  25.299 +        tb->jmp_next[n] = tb_next->jmp_first;
  25.300 +        tb_next->jmp_first = (TranslationBlock *)((long)(tb) | (n));
  25.301 +    }
  25.302 +}
  25.303 +
  25.304 +TranslationBlock *tb_find_pc(unsigned long pc_ptr);
  25.305 +
  25.306 +#ifndef offsetof
  25.307 +#define offsetof(type, field) ((size_t) &((type *)0)->field)
  25.308 +#endif
  25.309 +
  25.310 +#if defined(_WIN32)
  25.311 +#define ASM_DATA_SECTION ".section \".data\"\n"
  25.312 +#define ASM_PREVIOUS_SECTION ".section .text\n"
  25.313 +#elif defined(__APPLE__)
  25.314 +#define ASM_DATA_SECTION ".data\n"
  25.315 +#define ASM_PREVIOUS_SECTION ".text\n"
  25.316 +#define ASM_NAME(x) "_" #x
  25.317 +#else
  25.318 +#define ASM_DATA_SECTION ".section \".data\"\n"
  25.319 +#define ASM_PREVIOUS_SECTION ".previous\n"
  25.320 +#define ASM_NAME(x) stringify(x)
  25.321 +#endif
  25.322 +
  25.323 +#if defined(__powerpc__)
  25.324 +
  25.325 +/* we patch the jump instruction directly */
  25.326 +#define JUMP_TB(opname, tbparam, n, eip)\
  25.327 +do {\
  25.328 +    asm volatile (ASM_DATA_SECTION\
  25.329 +		  ASM_NAME(__op_label) #n "." ASM_NAME(opname) ":\n"\
  25.330 +		  ".long 1f\n"\
  25.331 +		  ASM_PREVIOUS_SECTION \
  25.332 +                  "b " ASM_NAME(__op_jmp) #n "\n"\
  25.333 +		  "1:\n");\
  25.334 +    T0 = (long)(tbparam) + (n);\
  25.335 +    EIP = eip;\
  25.336 +    EXIT_TB();\
  25.337 +} while (0)
  25.338 +
  25.339 +#define JUMP_TB2(opname, tbparam, n)\
  25.340 +do {\
  25.341 +    asm volatile ("b " ASM_NAME(__op_jmp) #n "\n");\
  25.342 +} while (0)
  25.343 +
  25.344 +#elif defined(__i386__) && defined(USE_DIRECT_JUMP)
  25.345 +
  25.346 +/* we patch the jump instruction directly */
  25.347 +#define JUMP_TB(opname, tbparam, n, eip)\
  25.348 +do {\
  25.349 +    asm volatile (".section .data\n"\
  25.350 +		  ASM_NAME(__op_label) #n "." ASM_NAME(opname) ":\n"\
  25.351 +		  ".long 1f\n"\
  25.352 +		  ASM_PREVIOUS_SECTION \
  25.353 +                  "jmp " ASM_NAME(__op_jmp) #n "\n"\
  25.354 +		  "1:\n");\
  25.355 +    T0 = (long)(tbparam) + (n);\
  25.356 +    EIP = eip;\
  25.357 +    EXIT_TB();\
  25.358 +} while (0)
  25.359 +
  25.360 +#define JUMP_TB2(opname, tbparam, n)\
  25.361 +do {\
  25.362 +    asm volatile ("jmp " ASM_NAME(__op_jmp) #n "\n");\
  25.363 +} while (0)
  25.364 +
  25.365 +#else
  25.366 +
  25.367 +/* jump to next block operations (more portable code, does not need
  25.368 +   cache flushing, but slower because of indirect jump) */
  25.369 +#define JUMP_TB(opname, tbparam, n, eip)\
  25.370 +do {\
  25.371 +    static void __attribute__((unused)) *__op_label ## n = &&label ## n;\
  25.372 +    static void __attribute__((unused)) *dummy ## n = &&dummy_label ## n;\
  25.373 +    goto *(void *)(((TranslationBlock *)tbparam)->tb_next[n]);\
  25.374 +label ## n:\
  25.375 +    T0 = (long)(tbparam) + (n);\
  25.376 +    EIP = eip;\
  25.377 +dummy_label ## n:\
  25.378 +    EXIT_TB();\
  25.379 +} while (0)
  25.380 +
  25.381 +/* second jump to same destination 'n' */
  25.382 +#define JUMP_TB2(opname, tbparam, n)\
  25.383 +do {\
  25.384 +    goto *(void *)(((TranslationBlock *)tbparam)->tb_next[n - 2]);\
  25.385 +} while (0)
  25.386 +
  25.387 +#endif
  25.388 +
  25.389 +extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4];
  25.390 +extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
  25.391 +extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
  25.392 +
  25.393 +#ifdef __powerpc__
  25.394 +static inline int testandset (int *p)
  25.395 +{
  25.396 +    int ret;
  25.397 +    __asm__ __volatile__ (
  25.398 +                          "0:    lwarx %0,0,%1\n"
  25.399 +                          "      xor. %0,%3,%0\n"
  25.400 +                          "      bne 1f\n"
  25.401 +                          "      stwcx. %2,0,%1\n"
  25.402 +                          "      bne- 0b\n"
  25.403 +                          "1:    "
  25.404 +                          : "=&r" (ret)
  25.405 +                          : "r" (p), "r" (1), "r" (0)
  25.406 +                          : "cr0", "memory");
  25.407 +    return ret;
  25.408 +}
  25.409 +#endif
  25.410 +
  25.411 +#ifdef __i386__
  25.412 +static inline int testandset (int *p)
  25.413 +{
  25.414 +    char ret;
  25.415 +    long int readval;
  25.416 +    
  25.417 +    __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
  25.418 +                          : "=q" (ret), "=m" (*p), "=a" (readval)
  25.419 +                          : "r" (1), "m" (*p), "a" (0)
  25.420 +                          : "memory");
  25.421 +    return ret;
  25.422 +}
  25.423 +#endif
  25.424 +
  25.425 +#ifdef __x86_64__
  25.426 +static inline int testandset (int *p)
  25.427 +{
  25.428 +    char ret;
  25.429 +    int readval;
  25.430 +    
  25.431 +    __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
  25.432 +                          : "=q" (ret), "=m" (*p), "=a" (readval)
  25.433 +                          : "r" (1), "m" (*p), "a" (0)
  25.434 +                          : "memory");
  25.435 +    return ret;
  25.436 +}
  25.437 +#endif
  25.438 +
  25.439 +#ifdef __s390__
  25.440 +static inline int testandset (int *p)
  25.441 +{
  25.442 +    int ret;
  25.443 +
  25.444 +    __asm__ __volatile__ ("0: cs    %0,%1,0(%2)\n"
  25.445 +			  "   jl    0b"
  25.446 +			  : "=&d" (ret)
  25.447 +			  : "r" (1), "a" (p), "0" (*p) 
  25.448 +			  : "cc", "memory" );
  25.449 +    return ret;
  25.450 +}
  25.451 +#endif
  25.452 +
  25.453 +#ifdef __alpha__
  25.454 +static inline int testandset (int *p)
  25.455 +{
  25.456 +    int ret;
  25.457 +    unsigned long one;
  25.458 +
  25.459 +    __asm__ __volatile__ ("0:	mov 1,%2\n"
  25.460 +			  "	ldl_l %0,%1\n"
  25.461 +			  "	stl_c %2,%1\n"
  25.462 +			  "	beq %2,1f\n"
  25.463 +			  ".subsection 2\n"
  25.464 +			  "1:	br 0b\n"
  25.465 +			  ".previous"
  25.466 +			  : "=r" (ret), "=m" (*p), "=r" (one)
  25.467 +			  : "m" (*p));
  25.468 +    return ret;
  25.469 +}
  25.470 +#endif
  25.471 +
  25.472 +#ifdef __sparc__
  25.473 +static inline int testandset (int *p)
  25.474 +{
  25.475 +	int ret;
  25.476 +
  25.477 +	__asm__ __volatile__("ldstub	[%1], %0"
  25.478 +			     : "=r" (ret)
  25.479 +			     : "r" (p)
  25.480 +			     : "memory");
  25.481 +
  25.482 +	return (ret ? 1 : 0);
  25.483 +}
  25.484 +#endif
  25.485 +
  25.486 +#ifdef __arm__
  25.487 +static inline int testandset (int *spinlock)
  25.488 +{
  25.489 +    register unsigned int ret;
  25.490 +    __asm__ __volatile__("swp %0, %1, [%2]"
  25.491 +                         : "=r"(ret)
  25.492 +                         : "0"(1), "r"(spinlock));
  25.493 +    
  25.494 +    return ret;
  25.495 +}
  25.496 +#endif
  25.497 +
  25.498 +#ifdef __mc68000
  25.499 +static inline int testandset (int *p)
  25.500 +{
  25.501 +    char ret;
  25.502 +    __asm__ __volatile__("tas %1; sne %0"
  25.503 +                         : "=r" (ret)
  25.504 +                         : "m" (p)
  25.505 +                         : "cc","memory");
  25.506 +    return ret == 0;
  25.507 +}
  25.508 +#endif
  25.509 +
  25.510 +typedef int spinlock_t;
  25.511 +
  25.512 +#define SPIN_LOCK_UNLOCKED 0
  25.513 +
  25.514 +#if defined(CONFIG_USER_ONLY)
  25.515 +static inline void spin_lock(spinlock_t *lock)
  25.516 +{
  25.517 +    while (testandset(lock));
  25.518 +}
  25.519 +
  25.520 +static inline void spin_unlock(spinlock_t *lock)
  25.521 +{
  25.522 +    *lock = 0;
  25.523 +}
  25.524 +
  25.525 +static inline int spin_trylock(spinlock_t *lock)
  25.526 +{
  25.527 +    return !testandset(lock);
  25.528 +}
  25.529 +#else
  25.530 +static inline void spin_lock(spinlock_t *lock)
  25.531 +{
  25.532 +}
  25.533 +
  25.534 +static inline void spin_unlock(spinlock_t *lock)
  25.535 +{
  25.536 +}
  25.537 +
  25.538 +static inline int spin_trylock(spinlock_t *lock)
  25.539 +{
  25.540 +    return 1;
  25.541 +}
  25.542 +#endif
  25.543 +
  25.544 +extern spinlock_t tb_lock;
  25.545 +
  25.546 +extern int tb_invalidated_flag;
  25.547 +
  25.548 +#if !defined(CONFIG_USER_ONLY)
  25.549 +
  25.550 +void tlb_fill(unsigned long addr, int is_write, int is_user, 
  25.551 +              void *retaddr);
  25.552 +
  25.553 +#define ACCESS_TYPE 3
  25.554 +#define MEMSUFFIX _code
  25.555 +#define env cpu_single_env
  25.556 +
  25.557 +#undef ACCESS_TYPE
  25.558 +#undef MEMSUFFIX
  25.559 +#undef env
  25.560 +
  25.561 +#endif
  25.562 +
  25.563 +#if defined(CONFIG_USER_ONLY)
  25.564 +static inline target_ulong get_phys_addr_code(CPUState *env, target_ulong addr)
  25.565 +{
  25.566 +    return addr;
  25.567 +}
  25.568 +#else
  25.569 +/* NOTE: this function can trigger an exception */
  25.570 +/* NOTE2: the returned address is not exactly the physical address: it
  25.571 +   is the offset relative to phys_ram_base */
  25.572 +/* XXX: i386 target specific */
  25.573 +static inline target_ulong get_phys_addr_code(CPUState *env, target_ulong addr)
  25.574 +{
  25.575 +	return addr;
  25.576 +}
  25.577 +#endif
  25.578 +
  25.579 +//#define DEBUG_UNUSED_IOPORT
  25.580 +//#define DEBUG_IOPORT
  25.581 +#define TARGET_VMX
  25.582 +
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/tools/ioemu/exec.c	Thu May 19 22:05:02 2005 +0000
    26.3 @@ -0,0 +1,461 @@
    26.4 +/*
    26.5 + *  virtual page mapping and translated block handling
    26.6 + * 
    26.7 + *  Copyright (c) 2003 Fabrice Bellard
    26.8 + *
    26.9 + * This library is free software; you can redistribute it and/or
   26.10 + * modify it under the terms of the GNU Lesser General Public
   26.11 + * License as published by the Free Software Foundation; either
   26.12 + * version 2 of the License, or (at your option) any later version.
   26.13 + *
   26.14 + * This library is distributed in the hope that it will be useful,
   26.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   26.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   26.17 + * Lesser General Public License for more details.
   26.18 + *
   26.19 + * You should have received a copy of the GNU Lesser General Public
   26.20 + * License along with this library; if not, write to the Free Software
   26.21 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   26.22 + */
   26.23 +#include "config.h"
   26.24 +#ifdef _WIN32
   26.25 +#include <windows.h>
   26.26 +#else
   26.27 +#include <sys/types.h>
   26.28 +#include <sys/mman.h>
   26.29 +#endif
   26.30 +#include <stdlib.h>
   26.31 +#include <stdio.h>
   26.32 +#include <stdarg.h>
   26.33 +#include <string.h>
   26.34 +#include <errno.h>
   26.35 +#include <unistd.h>
   26.36 +#include <inttypes.h>
   26.37 +
   26.38 +#include "cpu.h"
   26.39 +#include "exec-all.h"
   26.40 +
   26.41 +//#define DEBUG_TB_INVALIDATE
   26.42 +//#define DEBUG_FLUSH
   26.43 +//#define DEBUG_TLB
   26.44 +
   26.45 +/* make various TB consistency checks */
   26.46 +//#define DEBUG_TB_CHECK 
   26.47 +//#define DEBUG_TLB_CHECK 
   26.48 +
   26.49 +/* threshold to flush the translated code buffer */
   26.50 +#define CODE_GEN_BUFFER_MAX_SIZE (CODE_GEN_BUFFER_SIZE - CODE_GEN_MAX_SIZE)
   26.51 +
   26.52 +#define SMC_BITMAP_USE_THRESHOLD 10
   26.53 +
   26.54 +#define MMAP_AREA_START        0x00000000
   26.55 +#define MMAP_AREA_END          0xa8000000
   26.56 +
   26.57 +TranslationBlock tbs[CODE_GEN_MAX_BLOCKS];
   26.58 +TranslationBlock *tb_hash[CODE_GEN_HASH_SIZE];
   26.59 +TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
   26.60 +int nb_tbs;
   26.61 +/* any access to the tbs or the page table must use this lock */
   26.62 +spinlock_t tb_lock = SPIN_LOCK_UNLOCKED;
   26.63 +
   26.64 +uint8_t code_gen_buffer[CODE_GEN_BUFFER_SIZE];
   26.65 +uint8_t *code_gen_ptr;
   26.66 +
   26.67 +int phys_ram_size;
   26.68 +int phys_ram_fd;
   26.69 +uint8_t *phys_ram_base;
   26.70 +uint8_t *phys_ram_dirty;
   26.71 +
   26.72 +typedef struct PageDesc {
   26.73 +    /* list of TBs intersecting this ram page */
   26.74 +    TranslationBlock *first_tb;
   26.75 +    /* in order to optimize self modifying code, we count the number
   26.76 +       of lookups we do to a given page to use a bitmap */
   26.77 +    unsigned int code_write_count;
   26.78 +    uint8_t *code_bitmap;
   26.79 +#if defined(CONFIG_USER_ONLY)
   26.80 +    unsigned long flags;
   26.81 +#endif
   26.82 +} PageDesc;
   26.83 +
   26.84 +typedef struct PhysPageDesc {
   26.85 +    /* offset in host memory of the page + io_index in the low 12 bits */
   26.86 +    unsigned long phys_offset;
   26.87 +} PhysPageDesc;
   26.88 +
   26.89 +typedef struct VirtPageDesc {
   26.90 +    /* physical address of code page. It is valid only if 'valid_tag'
   26.91 +       matches 'virt_valid_tag' */ 
   26.92 +    target_ulong phys_addr; 
   26.93 +    unsigned int valid_tag;
   26.94 +#if !defined(CONFIG_SOFTMMU)
   26.95 +    /* original page access rights. It is valid only if 'valid_tag'
   26.96 +       matches 'virt_valid_tag' */
   26.97 +    unsigned int prot;
   26.98 +#endif
   26.99 +} VirtPageDesc;
  26.100 +
  26.101 +#define L2_BITS 10
  26.102 +#define L1_BITS (32 - L2_BITS - TARGET_PAGE_BITS)
  26.103 +
  26.104 +#define L1_SIZE (1 << L1_BITS)
  26.105 +#define L2_SIZE (1 << L2_BITS)
  26.106 +
  26.107 +unsigned long qemu_real_host_page_size;
  26.108 +unsigned long qemu_host_page_bits;
  26.109 +unsigned long qemu_host_page_size;
  26.110 +unsigned long qemu_host_page_mask;
  26.111 +
  26.112 +/* io memory support */
  26.113 +CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4];
  26.114 +CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
  26.115 +void *io_mem_opaque[IO_MEM_NB_ENTRIES];
  26.116 +static int io_mem_nb = 1;
  26.117 +
  26.118 +/* log support */
  26.119 +char *logfilename = "/tmp/qemu.log";
  26.120 +FILE *logfile;
  26.121 +int loglevel;
  26.122 +
  26.123 +void cpu_exec_init(void)
  26.124 +{
  26.125 +    /* alloc dirty bits array */
  26.126 +    phys_ram_dirty = qemu_malloc(phys_ram_size >> TARGET_PAGE_BITS);
  26.127 +}
  26.128 +
  26.129 +/* enable or disable low levels log */
  26.130 +void cpu_set_log(int log_flags)
  26.131 +{
  26.132 +    loglevel = log_flags;
  26.133 +    if (loglevel && !logfile) {
  26.134 +        logfile = fopen(logfilename, "w");
  26.135 +        if (!logfile) {
  26.136 +            perror(logfilename);
  26.137 +            _exit(1);
  26.138 +        }
  26.139 +#if !defined(CONFIG_SOFTMMU)
  26.140 +        /* must avoid mmap() usage of glibc by setting a buffer "by hand" */
  26.141 +        {
  26.142 +            static uint8_t logfile_buf[4096];
  26.143 +            setvbuf(logfile, logfile_buf, _IOLBF, sizeof(logfile_buf));
  26.144 +        }
  26.145 +#else
  26.146 +        setvbuf(logfile, NULL, _IOLBF, 0);
  26.147 +#endif
  26.148 +    }
  26.149 +}
  26.150 +
  26.151 +void cpu_set_log_filename(const char *filename)
  26.152 +{
  26.153 +    logfilename = strdup(filename);
  26.154 +}
  26.155 +
  26.156 +/* mask must never be zero, except for A20 change call */
  26.157 +void cpu_interrupt(CPUState *env, int mask)
  26.158 +{
  26.159 +    env->interrupt_request |= mask;
  26.160 +}
  26.161 +
  26.162 +void cpu_reset_interrupt(CPUState *env, int mask)
  26.163 +{
  26.164 +    env->interrupt_request &= ~mask;
  26.165 +}
  26.166 +
  26.167 +CPULogItem cpu_log_items[] = {
  26.168 +    { CPU_LOG_TB_OUT_ASM, "out_asm", 
  26.169 +      "show generated host assembly code for each compiled TB" },
  26.170 +    { CPU_LOG_TB_IN_ASM, "in_asm",
  26.171 +      "show target assembly code for each compiled TB" },
  26.172 +    { CPU_LOG_TB_OP, "op", 
  26.173 +      "show micro ops for each compiled TB (only usable if 'in_asm' used)" },
  26.174 +#ifdef TARGET_I386
  26.175 +    { CPU_LOG_TB_OP_OPT, "op_opt",
  26.176 +      "show micro ops after optimization for each compiled TB" },
  26.177 +#endif
  26.178 +    { CPU_LOG_INT, "int",
  26.179 +      "show interrupts/exceptions in short format" },
  26.180 +    { CPU_LOG_EXEC, "exec",
  26.181 +      "show trace before each executed TB (lots of logs)" },
  26.182 +    { CPU_LOG_TB_CPU, "cpu",
  26.183 +      "show CPU state before bloc translation" },
  26.184 +#ifdef TARGET_I386
  26.185 +    { CPU_LOG_PCALL, "pcall",
  26.186 +      "show protected mode far calls/returns/exceptions" },
  26.187 +#endif
  26.188 +#ifdef DEBUG_IOPORT
  26.189 +    { CPU_LOG_IOPORT, "ioport",
  26.190 +      "show all i/o ports accesses" },
  26.191 +#endif
  26.192 +    { 0, NULL, NULL },
  26.193 +};
  26.194 +
  26.195 +static int cmp1(const char *s1, int n, const char *s2)
  26.196 +{
  26.197 +    if (strlen(s2) != n)
  26.198 +        return 0;
  26.199 +    return memcmp(s1, s2, n) == 0;
  26.200 +}
  26.201 +      
  26.202 +/* takes a comma separated list of log masks. Return 0 if error. */
  26.203 +int cpu_str_to_log_mask(const char *str)
  26.204 +{
  26.205 +    CPULogItem *item;
  26.206 +    int mask;
  26.207 +    const char *p, *p1;
  26.208 +
  26.209 +    p = str;
  26.210 +    mask = 0;
  26.211 +    for(;;) {
  26.212 +        p1 = strchr(p, ',');
  26.213 +        if (!p1)
  26.214 +            p1 = p + strlen(p);
  26.215 +	if(cmp1(p,p1-p,"all")) {
  26.216 +		for(item = cpu_log_items; item->mask != 0; item++) {
  26.217 +			mask |= item->mask;
  26.218 +		}
  26.219 +	} else {
  26.220 +        for(item = cpu_log_items; item->mask != 0; item++) {
  26.221 +            if (cmp1(p, p1 - p, item->name))
  26.222 +                goto found;
  26.223 +        }
  26.224 +        return 0;
  26.225 +	}
  26.226 +    found:
  26.227 +        mask |= item->mask;
  26.228 +        if (*p1 != ',')
  26.229 +            break;
  26.230 +        p = p1 + 1;
  26.231 +    }
  26.232 +    return mask;
  26.233 +}
  26.234 +
  26.235 +void cpu_abort(CPUState *env, const char *fmt, ...)
  26.236 +{
  26.237 +    va_list ap;
  26.238 +
  26.239 +    va_start(ap, fmt);
  26.240 +    fprintf(stderr, "qemu: fatal: ");
  26.241 +    vfprintf(stderr, fmt, ap);
  26.242 +    fprintf(stderr, "\n");
  26.243 +    va_end(ap);
  26.244 +    abort();
  26.245 +}
  26.246 +
  26.247 +
  26.248 +/* XXX: Simple implementation. Fix later */
  26.249 +#define MAX_MMIO 32
  26.250 +struct mmio_space {
  26.251 +        target_phys_addr_t start;
  26.252 +        unsigned long size;
  26.253 +        unsigned long io_index;
  26.254 +} mmio[MAX_MMIO];
  26.255 +unsigned long mmio_cnt;
  26.256 +
  26.257 +/* register physical memory. 'size' must be a multiple of the target
  26.258 +   page size. If (phys_offset & ~TARGET_PAGE_MASK) != 0, then it is an
  26.259 +   io memory page */
  26.260 +void cpu_register_physical_memory(target_phys_addr_t start_addr, 
  26.261 +                                  unsigned long size,
  26.262 +                                  unsigned long phys_offset)
  26.263 +{
  26.264 +        if (mmio_cnt == MAX_MMIO) {
  26.265 +                fprintf(logfile, "too many mmio regions\n");
  26.266 +                exit(-1);
  26.267 +        }
  26.268 +        mmio[mmio_cnt].io_index = phys_offset;
  26.269 +        mmio[mmio_cnt].start = start_addr;
  26.270 +        mmio[mmio_cnt++].size = size;
  26.271 +}
  26.272 +
  26.273 +/* mem_read and mem_write are arrays of functions containing the
  26.274 +   function to access byte (index 0), word (index 1) and dword (index
  26.275 +   2). All functions must be supplied. If io_index is non zero, the
  26.276 +   corresponding io zone is modified. If it is zero, a new io zone is
  26.277 +   allocated. The return value can be used with
  26.278 +   cpu_register_physical_memory(). (-1) is returned if error. */
  26.279 +int cpu_register_io_memory(int io_index,
  26.280 +                           CPUReadMemoryFunc **mem_read,
  26.281 +                           CPUWriteMemoryFunc **mem_write,
  26.282 +                           void *opaque)
  26.283 +{
  26.284 +    int i;
  26.285 +
  26.286 +    if (io_index <= 0) {
  26.287 +        if (io_index >= IO_MEM_NB_ENTRIES)
  26.288 +            return -1;
  26.289 +        io_index = io_mem_nb++;
  26.290 +    } else {
  26.291 +        if (io_index >= IO_MEM_NB_ENTRIES)
  26.292 +            return -1;
  26.293 +    }
  26.294 +
  26.295 +    for(i = 0;i < 3; i++) {
  26.296 +        io_mem_read[io_index][i] = mem_read[i];
  26.297 +        io_mem_write[io_index][i] = mem_write[i];
  26.298 +    }
  26.299 +    io_mem_opaque[io_index] = opaque;
  26.300 +    return io_index << IO_MEM_SHIFT;
  26.301 +}
  26.302 +
  26.303 +CPUWriteMemoryFunc **cpu_get_io_memory_write(int io_index)
  26.304 +{
  26.305 +    return io_mem_write[io_index >> IO_MEM_SHIFT];
  26.306 +}
  26.307 +
  26.308 +CPUReadMemoryFunc **cpu_get_io_memory_read(int io_index)
  26.309 +{
  26.310 +    return io_mem_read[io_index >> IO_MEM_SHIFT];
  26.311 +}
  26.312 +
  26.313 +/* physical memory access (slow version, mainly for debug) */
  26.314 +#if defined(CONFIG_USER_ONLY)
  26.315 +void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, 
  26.316 +                            int len, int is_write)
  26.317 +{
  26.318 +    int l, flags;
  26.319 +    target_ulong page;
  26.320 +
  26.321 +    while (len > 0) {
  26.322 +        page = addr & TARGET_PAGE_MASK;
  26.323 +        l = (page + TARGET_PAGE_SIZE) - addr;
  26.324 +        if (l > len)
  26.325 +            l = len;
  26.326 +        flags = page_get_flags(page);
  26.327 +        if (!(flags & PAGE_VALID))
  26.328 +            return;
  26.329 +        if (is_write) {
  26.330 +            if (!(flags & PAGE_WRITE))
  26.331 +                return;
  26.332 +            memcpy((uint8_t *)addr, buf, len);
  26.333 +        } else {
  26.334 +            if (!(flags & PAGE_READ))
  26.335 +                return;
  26.336 +            memcpy(buf, (uint8_t *)addr, len);
  26.337 +        }
  26.338 +        len -= l;
  26.339 +        buf += l;
  26.340 +        addr += l;
  26.341 +    }
  26.342 +}
  26.343 +#else
  26.344 +
  26.345 +int iomem_index(target_phys_addr_t addr)
  26.346 +{
  26.347 +        int i;
  26.348 +
  26.349 +        for (i = 0; i < mmio_cnt; i++) {
  26.350 +                unsigned long start, end;
  26.351 +
  26.352 +                start = mmio[i].start;
  26.353 +                end = mmio[i].start + mmio[i].size;
  26.354 +
  26.355 +                if ((addr >= start) && (addr <= end)){
  26.356 +                        return (mmio[i].io_index >> IO_MEM_SHIFT) & (IO_MEM_NB_ENTRIES - 1);
  26.357 +                }
  26.358 +        }
  26.359 +        return 0;
  26.360 +}
  26.361 +
  26.362 +void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, 
  26.363 +                            int len, int is_write)
  26.364 +{
  26.365 +    int l, io_index;
  26.366 +    uint8_t *ptr;
  26.367 +    uint32_t val;
  26.368 +    target_phys_addr_t page;
  26.369 +    unsigned long pd;
  26.370 +    
  26.371 +    while (len > 0) {
  26.372 +        page = addr & TARGET_PAGE_MASK;
  26.373 +        l = (page + TARGET_PAGE_SIZE) - addr;
  26.374 +        if (l > len)
  26.375 +            l = len;
  26.376 +	
  26.377 +        pd = page;
  26.378 +        io_index = iomem_index(page);
  26.379 +        if (is_write) {
  26.380 +            if (io_index) {
  26.381 +                if (l >= 4 && ((addr & 3) == 0)) {
  26.382 +                    /* 32 bit read access */
  26.383 +                    val = ldl_raw(buf);
  26.384 +                    io_mem_write[io_index][2](io_mem_opaque[io_index], addr, val);
  26.385 +                    l = 4;
  26.386 +                } else if (l >= 2 && ((addr & 1) == 0)) {
  26.387 +                    /* 16 bit read access */
  26.388 +                    val = lduw_raw(buf);
  26.389 +                    io_mem_write[io_index][1](io_mem_opaque[io_index], addr, val);
  26.390 +                    l = 2;
  26.391 +                } else {
  26.392 +                    /* 8 bit access */
  26.393 +                    val = ldub_raw(buf);
  26.394 +                    io_mem_write[io_index][0](io_mem_opaque[io_index], addr, val);
  26.395 +                    l = 1;
  26.396 +                }
  26.397 +            } else {
  26.398 +                unsigned long addr1;
  26.399 +
  26.400 +                addr1 = (pd & TARGET_PAGE_MASK) + (addr & ~TARGET_PAGE_MASK);
  26.401 +                /* RAM case */
  26.402 +                ptr = phys_ram_base + addr1;
  26.403 +                memcpy(ptr, buf, l);
  26.404 +            }
  26.405 +        } else {
  26.406 +            if (io_index) {
  26.407 +                if (l >= 4 && ((addr & 3) == 0)) {
  26.408 +                    /* 32 bit read access */
  26.409 +                    val = io_mem_read[io_index][2](io_mem_opaque[io_index], addr);
  26.410 +                    stl_raw(buf, val);
  26.411 +                    l = 4;
  26.412 +                } else if (l >= 2 && ((addr & 1) == 0)) {
  26.413 +                    /* 16 bit read access */
  26.414 +                    val = io_mem_read[io_index][1](io_mem_opaque[io_index], addr);
  26.415 +                    stw_raw(buf, val);
  26.416 +                    l = 2;
  26.417 +                } else {
  26.418 +                    /* 8 bit access */
  26.419 +                    val = io_mem_read[io_index][0](io_mem_opaque[io_index], addr);
  26.420 +                    stb_raw(buf, val);
  26.421 +                    l = 1;
  26.422 +                }
  26.423 +            } else {
  26.424 +                /* RAM case */
  26.425 +                ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) + 
  26.426 +                    (addr & ~TARGET_PAGE_MASK);
  26.427 +                memcpy(buf, ptr, l);
  26.428 +            }
  26.429 +        }
  26.430 +        len -= l;
  26.431 +        buf += l;
  26.432 +        addr += l;
  26.433 +    }
  26.434 +}
  26.435 +#endif
  26.436 +
  26.437 +/* virtual memory access for debug */
  26.438 +int cpu_memory_rw_debug(CPUState *env, target_ulong addr, 
  26.439 +                        uint8_t *buf, int len, int is_write)
  26.440 +{
  26.441 +    int l;
  26.442 +    target_ulong page, phys_addr;
  26.443 +
  26.444 +    while (len > 0) {
  26.445 +        page = addr & TARGET_PAGE_MASK;
  26.446 +        phys_addr = cpu_get_phys_page_debug(env, page);
  26.447 +        /* if no physical page mapped, return an error */
  26.448 +        if (phys_addr == -1)
  26.449 +            return -1;
  26.450 +        l = (page + TARGET_PAGE_SIZE) - addr;
  26.451 +        if (l > len)
  26.452 +            l = len;
  26.453 +        cpu_physical_memory_rw(phys_addr + (addr & ~TARGET_PAGE_MASK), 
  26.454 +                               buf, l, is_write);
  26.455 +        len -= l;
  26.456 +        buf += l;
  26.457 +        addr += l;
  26.458 +    }
  26.459 +    return 0;
  26.460 +}
  26.461 +
  26.462 +void cpu_physical_memory_reset_dirty(target_ulong start, target_ulong end)
  26.463 +{
  26.464 +}
    27.1 --- a/tools/ioemu/font/vga.bitmap.h	Thu May 19 21:53:44 2005 +0000
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,288 +0,0 @@
    27.4 -/////////////////////////////////////////////////////////////////////////
    27.5 -// $Id: vga.bitmap.h,v 1.4 2002/05/25 14:22:53 vruppert Exp $
    27.6 -/////////////////////////////////////////////////////////////////////////
    27.7 -//
    27.8 -//  Copyright (C) 2002  MandrakeSoft S.A.
    27.9 -//
   27.10 -//    MandrakeSoft S.A.
   27.11 -//    43, rue d'Aboukir
   27.12 -//    75002 Paris - France
   27.13 -//    http://www.linux-mandrake.com/
   27.14 -//    http://www.mandrakesoft.com/
   27.15 -//
   27.16 -//  This library is free software; you can redistribute it and/or
   27.17 -//  modify it under the terms of the GNU Lesser General Public
   27.18 -//  License as published by the Free Software Foundation; either
   27.19 -//  version 2 of the License, or (at your option) any later version.
   27.20 -//
   27.21 -//  This library is distributed in the hope that it will be useful,
   27.22 -//  but WITHOUT ANY WARRANTY; without even the implied warranty of
   27.23 -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   27.24 -//  Lesser General Public License for more details.
   27.25 -//
   27.26 -//  You should have received a copy of the GNU Lesser General Public
   27.27 -//  License along with this library; if not, write to the Free Software
   27.28 -//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
   27.29 -
   27.30 -typedef struct {
   27.31 -  unsigned char data[16];
   27.32 -  } bx_fontcharbitmap_t;
   27.33 -
   27.34 -static const bx_fontcharbitmap_t bx_vgafont[256] = {
   27.35 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.36 -{{ 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xa5, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00 }},
   27.37 -{{ 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xdb, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00 }},
   27.38 -{{ 0x00, 0x00, 0x00, 0x00, 0x36, 0x7f, 0x7f, 0x7f, 0x7f, 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x00, 0x00 }},
   27.39 -{{ 0x00, 0x00, 0x00, 0x00, 0x08, 0x1c, 0x3e, 0x7f, 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.40 -{{ 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0xe7, 0xe7, 0xe7, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
   27.41 -{{ 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
   27.42 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.43 -{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
   27.44 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.45 -{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff }},
   27.46 -{{ 0x00, 0x00, 0x78, 0x60, 0x70, 0x58, 0x1e, 0x33, 0x33, 0x33, 0x33, 0x1e, 0x00, 0x00, 0x00, 0x00 }},
   27.47 -{{ 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 }},
   27.48 -{{ 0x00, 0x00, 0xfc, 0xcc, 0xfc, 0x0c, 0x0c, 0x0c, 0x0c, 0x0e, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00 }},
   27.49 -{{ 0x00, 0x00, 0xfe, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xe6, 0xe7, 0x67, 0x03, 0x00, 0x00, 0x00 }},
   27.50 -{{ 0x00, 0x00, 0x00, 0x18, 0x18, 0xdb, 0x3c, 0xe7, 0x3c, 0xdb, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 }},
   27.51 -{{ 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x7f, 0x1f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00 }},
   27.52 -{{ 0x00, 0x40, 0x60, 0x70, 0x78, 0x7c, 0x7f, 0x7c, 0x78, 0x70, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00 }},
   27.53 -{{ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.54 -{{ 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00 }},
   27.55 -{{ 0x00, 0x00, 0xfe, 0xdb, 0xdb, 0xdb, 0xde, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00 }},
   27.56 -{{ 0x00, 0x3e, 0x63, 0x06, 0x1c, 0x36, 0x63, 0x63, 0x36, 0x1c, 0x30, 0x63, 0x3e, 0x00, 0x00, 0x00 }},
   27.57 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00 }},
   27.58 -{{ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00 }},
   27.59 -{{ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 }},
   27.60 -{{ 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00 }},
   27.61 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x7f, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.62 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0x7f, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.63 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.64 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x36, 0x7f, 0x36, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.65 -{{ 0x00, 0x00, 0x00, 0x00, 0x08, 0x1c, 0x1c, 0x3e, 0x3e, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.66 -{{ 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3e, 0x3e, 0x1c, 0x1c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.67 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.68 -{{ 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 }},
   27.69 -{{ 0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.70 -{{ 0x00, 0x00, 0x00, 0x36, 0x36, 0x7f, 0x36, 0x36, 0x36, 0x7f, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00 }},
   27.71 -{{ 0x18, 0x18, 0x3e, 0x63, 0x43, 0x03, 0x3e, 0x60, 0x60, 0x61, 0x63, 0x3e, 0x18, 0x18, 0x00, 0x00 }},
   27.72 -{{ 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x30, 0x18, 0x0c, 0x06, 0x63, 0x61, 0x00, 0x00, 0x00, 0x00 }},
   27.73 -{{ 0x00, 0x00, 0x1c, 0x36, 0x36, 0x1c, 0x6e, 0x3b, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
   27.74 -{{ 0x00, 0x0c, 0x0c, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.75 -{{ 0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00 }},
   27.76 -{{ 0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00 }},
   27.77 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.78 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.79 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x0c, 0x00, 0x00, 0x00 }},
   27.80 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.81 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 }},
   27.82 -{{ 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00 }},
   27.83 -{{ 0x00, 0x00, 0x1c, 0x36, 0x63, 0x63, 0x6b, 0x6b, 0x63, 0x63, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00 }},
   27.84 -{{ 0x00, 0x00, 0x18, 0x1c, 0x1e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00 }},
   27.85 -{{ 0x00, 0x00, 0x3e, 0x63, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x03, 0x63, 0x7f, 0x00, 0x00, 0x00, 0x00 }},
   27.86 -{{ 0x00, 0x00, 0x3e, 0x63, 0x60, 0x60, 0x3c, 0x60, 0x60, 0x60, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
   27.87 -{{ 0x00, 0x00, 0x30, 0x38, 0x3c, 0x36, 0x33, 0x7f, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00 }},
   27.88 -{{ 0x00, 0x00, 0x7f, 0x03, 0x03, 0x03, 0x3f, 0x60, 0x60, 0x60, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
   27.89 -{{ 0x00, 0x00, 0x1c, 0x06, 0x03, 0x03, 0x3f, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
   27.90 -{{ 0x00, 0x00, 0x7f, 0x63, 0x60, 0x60, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00 }},
   27.91 -{{ 0x00, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
   27.92 -{{ 0x00, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x7e, 0x60, 0x60, 0x60, 0x30, 0x1e, 0x00, 0x00, 0x00, 0x00 }},
   27.93 -{{ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.94 -{{ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00 }},
   27.95 -{{ 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00 }},
   27.96 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
   27.97 -{{ 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00 }},
   27.98 -{{ 0x00, 0x00, 0x3e, 0x63, 0x63, 0x30, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 }},
   27.99 -{{ 0x00, 0x00, 0x00, 0x3e, 0x63, 0x63, 0x7b, 0x7b, 0x7b, 0x3b, 0x03, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.100 -{{ 0x00, 0x00, 0x08, 0x1c, 0x36, 0x63, 0x63, 0x7f, 0x63, 0x63, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.101 -{{ 0x00, 0x00, 0x3f, 0x66, 0x66, 0x66, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x3f, 0x00, 0x00, 0x00, 0x00 }},
  27.102 -{{ 0x00, 0x00, 0x3c, 0x66, 0x43, 0x03, 0x03, 0x03, 0x03, 0x43, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.103 -{{ 0x00, 0x00, 0x1f, 0x36, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x36, 0x1f, 0x00, 0x00, 0x00, 0x00 }},
  27.104 -{{ 0x00, 0x00, 0x7f, 0x66, 0x46, 0x16, 0x1e, 0x16, 0x06, 0x46, 0x66, 0x7f, 0x00, 0x00, 0x00, 0x00 }},
  27.105 -{{ 0x00, 0x00, 0x7f, 0x66, 0x46, 0x16, 0x1e, 0x16, 0x06, 0x06, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x00 }},
  27.106 -{{ 0x00, 0x00, 0x3c, 0x66, 0x43, 0x03, 0x03, 0x7b, 0x63, 0x63, 0x66, 0x5c, 0x00, 0x00, 0x00, 0x00 }},
  27.107 -{{ 0x00, 0x00, 0x63, 0x63, 0x63, 0x63, 0x7f, 0x63, 0x63, 0x63, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.108 -{{ 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.109 -{{ 0x00, 0x00, 0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x33, 0x33, 0x33, 0x1e, 0x00, 0x00, 0x00, 0x00 }},
  27.110 -{{ 0x00, 0x00, 0x67, 0x66, 0x66, 0x36, 0x1e, 0x1e, 0x36, 0x66, 0x66, 0x67, 0x00, 0x00, 0x00, 0x00 }},
  27.111 -{{ 0x00, 0x00, 0x0f, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x46, 0x66, 0x7f, 0x00, 0x00, 0x00, 0x00 }},
  27.112 -{{ 0x00, 0x00, 0x63, 0x77, 0x7f, 0x7f, 0x6b, 0x63, 0x63, 0x63, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.113 -{{ 0x00, 0x00, 0x63, 0x67, 0x6f, 0x7f, 0x7b, 0x73, 0x63, 0x63, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.114 -{{ 0x00, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.115 -{{ 0x00, 0x00, 0x3f, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x00 }},
  27.116 -{{ 0x00, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x6b, 0x7b, 0x3e, 0x30, 0x70, 0x00, 0x00 }},
  27.117 -{{ 0x00, 0x00, 0x3f, 0x66, 0x66, 0x66, 0x3e, 0x36, 0x66, 0x66, 0x66, 0x67, 0x00, 0x00, 0x00, 0x00 }},
  27.118 -{{ 0x00, 0x00, 0x3e, 0x63, 0x63, 0x06, 0x1c, 0x30, 0x60, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.119 -{{ 0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.120 -{{ 0x00, 0x00, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.121 -{{ 0x00, 0x00, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x36, 0x1c, 0x08, 0x00, 0x00, 0x00, 0x00 }},
  27.122 -{{ 0x00, 0x00, 0x63, 0x63, 0x63, 0x63, 0x6b, 0x6b, 0x6b, 0x7f, 0x77, 0x36, 0x00, 0x00, 0x00, 0x00 }},
  27.123 -{{ 0x00, 0x00, 0x63, 0x63, 0x36, 0x3e, 0x1c, 0x1c, 0x3e, 0x36, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.124 -{{ 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.125 -{{ 0x00, 0x00, 0x7f, 0x63, 0x61, 0x30, 0x18, 0x0c, 0x06, 0x43, 0x63, 0x7f, 0x00, 0x00, 0x00, 0x00 }},
  27.126 -{{ 0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.127 -{{ 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00 }},
  27.128 -{{ 0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.129 -{{ 0x08, 0x1c, 0x36, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.130 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00 }},
  27.131 -{{ 0x0c, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.132 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x30, 0x3e, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.133 -{{ 0x00, 0x00, 0x07, 0x06, 0x06, 0x1e, 0x36, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.134 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x63, 0x03, 0x03, 0x03, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.135 -{{ 0x00, 0x00, 0x38, 0x30, 0x30, 0x3c, 0x36, 0x33, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.136 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x63, 0x7f, 0x03, 0x03, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.137 -{{ 0x00, 0x00, 0x1c, 0x36, 0x26, 0x06, 0x0f, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x00 }},
  27.138 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3e, 0x30, 0x33, 0x1e, 0x00 }},
  27.139 -{{ 0x00, 0x00, 0x07, 0x06, 0x06, 0x36, 0x6e, 0x66, 0x66, 0x66, 0x66, 0x67, 0x00, 0x00, 0x00, 0x00 }},
  27.140 -{{ 0x00, 0x00, 0x18, 0x18, 0x00, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.141 -{{ 0x00, 0x00, 0x60, 0x60, 0x00, 0x70, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x66, 0x66, 0x3c, 0x00 }},
  27.142 -{{ 0x00, 0x00, 0x07, 0x06, 0x06, 0x66, 0x36, 0x1e, 0x1e, 0x36, 0x66, 0x67, 0x00, 0x00, 0x00, 0x00 }},
  27.143 -{{ 0x00, 0x00, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.144 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x7f, 0x6b, 0x6b, 0x6b, 0x6b, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.145 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00 }},
  27.146 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.147 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x06, 0x0f, 0x00 }},
  27.148 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3e, 0x30, 0x30, 0x78, 0x00 }},
  27.149 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x6e, 0x66, 0x06, 0x06, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x00 }},
  27.150 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x63, 0x06, 0x1c, 0x30, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.151 -{{ 0x00, 0x00, 0x08, 0x0c, 0x0c, 0x3f, 0x0c, 0x0c, 0x0c, 0x0c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00 }},
  27.152 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.153 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00 }},
  27.154 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x63, 0x6b, 0x6b, 0x6b, 0x7f, 0x36, 0x00, 0x00, 0x00, 0x00 }},
  27.155 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x36, 0x1c, 0x1c, 0x1c, 0x36, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.156 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x7e, 0x60, 0x30, 0x1f, 0x00 }},
  27.157 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x33, 0x18, 0x0c, 0x06, 0x63, 0x7f, 0x00, 0x00, 0x00, 0x00 }},
  27.158 -{{ 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00 }},
  27.159 -{{ 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 }},
  27.160 -{{ 0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00 }},
  27.161 -{{ 0x00, 0x00, 0x6e, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.162 -{{ 0x00, 0x00, 0x00, 0x00, 0x08, 0x1c, 0x36, 0x63, 0x63, 0x63, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.163 -{{ 0x00, 0x00, 0x3c, 0x66, 0x43, 0x03, 0x03, 0x03, 0x43, 0x66, 0x3c, 0x30, 0x60, 0x3e, 0x00, 0x00 }},
  27.164 -{{ 0x00, 0x00, 0x33, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.165 -{{ 0x00, 0x30, 0x18, 0x0c, 0x00, 0x3e, 0x63, 0x7f, 0x03, 0x03, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.166 -{{ 0x00, 0x08, 0x1c, 0x36, 0x00, 0x1e, 0x30, 0x3e, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.167 -{{ 0x00, 0x00, 0x33, 0x00, 0x00, 0x1e, 0x30, 0x3e, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.168 -{{ 0x00, 0x06, 0x0c, 0x18, 0x00, 0x1e, 0x30, 0x3e, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.169 -{{ 0x00, 0x1c, 0x36, 0x1c, 0x00, 0x1e, 0x30, 0x3e, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.170 -{{ 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x06, 0x06, 0x66, 0x3c, 0x30, 0x60, 0x3c, 0x00, 0x00, 0x00 }},
  27.171 -{{ 0x00, 0x08, 0x1c, 0x36, 0x00, 0x3e, 0x63, 0x7f, 0x03, 0x03, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.172 -{{ 0x00, 0x00, 0x63, 0x00, 0x00, 0x3e, 0x63, 0x7f, 0x03, 0x03, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.173 -{{ 0x00, 0x06, 0x0c, 0x18, 0x00, 0x3e, 0x63, 0x7f, 0x03, 0x03, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.174 -{{ 0x00, 0x00, 0x66, 0x00, 0x00, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.175 -{{ 0x00, 0x18, 0x3c, 0x66, 0x00, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.176 -{{ 0x00, 0x06, 0x0c, 0x18, 0x00, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.177 -{{ 0x00, 0x63, 0x00, 0x08, 0x1c, 0x36, 0x63, 0x63, 0x7f, 0x63, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.178 -{{ 0x1c, 0x36, 0x1c, 0x00, 0x1c, 0x36, 0x63, 0x63, 0x7f, 0x63, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.179 -{{ 0x18, 0x0c, 0x06, 0x00, 0x7f, 0x66, 0x06, 0x3e, 0x06, 0x06, 0x66, 0x7f, 0x00, 0x00, 0x00, 0x00 }},
  27.180 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x6e, 0x6c, 0x7e, 0x1b, 0x1b, 0x76, 0x00, 0x00, 0x00, 0x00 }},
  27.181 -{{ 0x00, 0x00, 0x7c, 0x36, 0x33, 0x33, 0x7f, 0x33, 0x33, 0x33, 0x33, 0x73, 0x00, 0x00, 0x00, 0x00 }},
  27.182 -{{ 0x00, 0x08, 0x1c, 0x36, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.183 -{{ 0x00, 0x00, 0x63, 0x00, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.184 -{{ 0x00, 0x06, 0x0c, 0x18, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.185 -{{ 0x00, 0x0c, 0x1e, 0x33, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.186 -{{ 0x00, 0x06, 0x0c, 0x18, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.187 -{{ 0x00, 0x00, 0x63, 0x00, 0x00, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x7e, 0x60, 0x30, 0x1e, 0x00 }},
  27.188 -{{ 0x00, 0x63, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.189 -{{ 0x00, 0x63, 0x00, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.190 -{{ 0x00, 0x18, 0x18, 0x3c, 0x66, 0x06, 0x06, 0x06, 0x66, 0x3c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 }},
  27.191 -{{ 0x00, 0x1c, 0x36, 0x26, 0x06, 0x0f, 0x06, 0x06, 0x06, 0x06, 0x67, 0x3f, 0x00, 0x00, 0x00, 0x00 }},
  27.192 -{{ 0x00, 0x00, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 }},
  27.193 -{{ 0x00, 0x1f, 0x33, 0x33, 0x1f, 0x23, 0x33, 0x7b, 0x33, 0x33, 0x33, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.194 -{{ 0x00, 0x70, 0xd8, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1b, 0x0e, 0x00, 0x00 }},
  27.195 -{{ 0x00, 0x18, 0x0c, 0x06, 0x00, 0x1e, 0x30, 0x3e, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.196 -{{ 0x00, 0x30, 0x18, 0x0c, 0x00, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.197 -{{ 0x00, 0x18, 0x0c, 0x06, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.198 -{{ 0x00, 0x18, 0x0c, 0x06, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.199 -{{ 0x00, 0x00, 0x6e, 0x3b, 0x00, 0x3b, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00 }},
  27.200 -{{ 0x6e, 0x3b, 0x00, 0x63, 0x67, 0x6f, 0x7f, 0x7b, 0x73, 0x63, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.201 -{{ 0x00, 0x3c, 0x36, 0x36, 0x7c, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.202 -{{ 0x00, 0x1c, 0x36, 0x36, 0x1c, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.203 -{{ 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x06, 0x03, 0x63, 0x63, 0x3e, 0x00, 0x00, 0x00, 0x00 }},
  27.204 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.205 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.206 -{{ 0x00, 0x03, 0x03, 0x43, 0x63, 0x33, 0x18, 0x0c, 0x06, 0x3b, 0x61, 0x30, 0x18, 0x7c, 0x00, 0x00 }},
  27.207 -{{ 0x00, 0x03, 0x03, 0x43, 0x63, 0x33, 0x18, 0x0c, 0x66, 0x73, 0x79, 0x7c, 0x60, 0x60, 0x00, 0x00 }},
  27.208 -{{ 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00 }},
  27.209 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x36, 0x1b, 0x36, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.210 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x36, 0x6c, 0x36, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.211 -{{ 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22 }},
  27.212 -{{ 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55 }},
  27.213 -{{ 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee }},
  27.214 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.215 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.216 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.217 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6f, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.218 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.219 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.220 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6f, 0x60, 0x6f, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.221 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.222 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x60, 0x6f, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.223 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6f, 0x60, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.224 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.225 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.226 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.227 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.228 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.229 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.230 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.231 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.232 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.233 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.234 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xec, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.235 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xec, 0x0c, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.236 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0c, 0xec, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.237 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xef, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.238 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xef, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.239 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xec, 0x0c, 0xec, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.240 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.241 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xef, 0x00, 0xef, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.242 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.243 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.244 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.245 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.246 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.247 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.248 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.249 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.250 -{{ 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xff, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c }},
  27.251 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.252 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.253 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.254 -{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
  27.255 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
  27.256 -{{ 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f }},
  27.257 -{{ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0 }},
  27.258 -{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.259 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x3b, 0x1b, 0x1b, 0x1b, 0x3b, 0x6e, 0x00, 0x00, 0x00, 0x00 }},
  27.260 -{{ 0x00, 0x00, 0x1e, 0x33, 0x33, 0x33, 0x1b, 0x33, 0x63, 0x63, 0x63, 0x33, 0x00, 0x00, 0x00, 0x00 }},
  27.261 -{{ 0x00, 0x00, 0x7f, 0x63, 0x63, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00 }},
  27.262 -{{ 0x00, 0x00, 0x00, 0x00, 0x7f, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00 }},
  27.263 -{{ 0x00, 0x00, 0x00, 0x7f, 0x63, 0x06, 0x0c, 0x18, 0x0c, 0x06, 0x63, 0x7f, 0x00, 0x00, 0x00, 0x00 }},
  27.264 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00 }},
  27.265 -{{ 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x06, 0x03, 0x00, 0x00, 0x00 }},
  27.266 -{{ 0x00, 0x00, 0x00, 0x00, 0x6e, 0x3b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 }},
  27.267 -{{ 0x00, 0x00, 0x00, 0x7e, 0x18, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00 }},
  27.268 -{{ 0x00, 0x00, 0x00, 0x1c, 0x36, 0x63, 0x63, 0x7f, 0x63, 0x63, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00 }},
  27.269 -{{ 0x00, 0x00, 0x1c, 0x36, 0x63, 0x63, 0x63, 0x36, 0x36, 0x36, 0x36, 0x77, 0x00, 0x00, 0x00, 0x00 }},
  27.270 -{{ 0x00, 0x00, 0x78, 0x0c, 0x18, 0x30, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00 }},
  27.271 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xdb, 0xdb, 0xdb, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.272 -{{ 0x00, 0x00, 0x00, 0xc0, 0x60, 0x7e, 0xdb, 0xdb, 0xcf, 0x7e, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00 }},
  27.273 -{{ 0x00, 0x00, 0x38, 0x0c, 0x06, 0x06, 0x3e, 0x06, 0x06, 0x06, 0x0c, 0x38, 0x00, 0x00, 0x00, 0x00 }},
  27.274 -{{ 0x00, 0x00, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00 }},
  27.275 -{{ 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.276 -{{ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00 }},
  27.277 -{{ 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00 }},
  27.278 -{{ 0x00, 0x00, 0x00, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00 }},
  27.279 -{{ 0x00, 0x00, 0x70, 0xd8, 0xd8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 }},
  27.280 -{{ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1b, 0x1b, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00 }},
  27.281 -{{ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.282 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x3b, 0x00, 0x6e, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.283 -{{ 0x00, 0x1c, 0x36, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.284 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.285 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.286 -{{ 0x00, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x37, 0x36, 0x36, 0x3c, 0x38, 0x00, 0x00, 0x00, 0x00 }},
  27.287 -{{ 0x00, 0x1b, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.288 -{{ 0x00, 0x0e, 0x1b, 0x0c, 0x06, 0x13, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.289 -{{ 0x00, 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x3e, 0x3e, 0x3e, 0x3e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.290 -{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }},
  27.291 -};
    28.1 --- a/tools/ioemu/gui/Makefile	Thu May 19 21:53:44 2005 +0000
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,12 +0,0 @@
    28.4 -TOPDIR= ..
    28.5 -CXXFLAGS=-I. -I../include -I..
    28.6 -OBJS= gui.o keymap.o siminterface.o textconfig.o x.o rfb.o term.o
    28.7 -
    28.8 -all: libgui.a
    28.9 -
   28.10 -libgui.a: $(OBJS)
   28.11 -	$(AR) $(ARFLAGS) $@ $(OBJS)
   28.12 -
   28.13 -include $(TOPDIR)/mk/helix.mk
   28.14 -
   28.15 -install:: all
    29.1 --- a/tools/ioemu/gui/Makefile.in	Thu May 19 21:53:44 2005 +0000
    29.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.3 @@ -1,561 +0,0 @@
    29.4 -# Copyright (C) 2002  MandrakeSoft S.A.
    29.5 -#
    29.6 -#   MandrakeSoft S.A.
    29.7 -#   43, rue d'Aboukir
    29.8 -#   75002 Paris - France
    29.9 -#   http://www.linux-mandrake.com/
   29.10 -#   http://www.mandrakesoft.com/
   29.11 -#
   29.12 -# This library is free software; you can redistribute it and/or
   29.13 -# modify it under the terms of the GNU Lesser General Public
   29.14 -# License as published by the Free Software Foundation; either
   29.15 -# version 2 of the License, or (at your option) any later version.
   29.16 -#
   29.17 -# This library is distributed in the hope that it will be useful,
   29.18 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
   29.19 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   29.20 -# Lesser General Public License for more details.
   29.21 -#
   29.22 -# You should have received a copy of the GNU Lesser General Public
   29.23 -# License along with this library; if not, write to the Free Software
   29.24 -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
   29.25 -
   29.26 -# Makefile for the gui component of bochs
   29.27 -
   29.28 -
   29.29 -@SUFFIX_LINE@
   29.30 -
   29.31 -prefix          = @prefix@
   29.32 -exec_prefix     = @exec_prefix@
   29.33 -srcdir          = @srcdir@
   29.34 -VPATH = @srcdir@
   29.35 -bindir          = @bindir@
   29.36 -libdir          = @libdir@
   29.37 -mandir          = @mandir@
   29.38 -man1dir         = $(mandir)/man1
   29.39 -man5dir         = $(mandir)/man5
   29.40 -docdir          = $(prefix)/share/doc/bochs
   29.41 -sharedir        = $(prefix)/share/bochs
   29.42 -top_builddir    = ..
   29.43 -top_srcdir      = @top_srcdir@
   29.44 -
   29.45 -SHELL = /bin/sh
   29.46 -
   29.47 -@SET_MAKE@
   29.48 -
   29.49 -CXX = @CXX@
   29.50 -CXXFLAGS = $(BX_INCDIRS) @CXXFLAGS@  @GUI_CXXFLAGS@
   29.51 -LOCAL_CXXFLAGS =
   29.52 -LDFLAGS = @LDFLAGS@
   29.53 -LIBS = @LIBS@
   29.54 -X_CFLAGS = @X_CFLAGS@
   29.55 -RANLIB = @RANLIB@
   29.56 -PLUGIN_PATH=@libdir@
   29.57 -top_builddir    = ..
   29.58 -LIBTOOL=@LIBTOOL@
   29.59 -WIN32_DLL_IMPORT_LIBRARY=../dllexports.a
   29.60 -BX_INCDIRS = -I.. -I$(srcdir)/.. -I../iodev -I$(srcdir)/../iodev -I../@INSTRUMENT_DIR@ -I$(srcdir)/../@INSTRUMENT_DIR@
   29.61 -
   29.62 -GUI_OBJS_X11  = x.o
   29.63 -GUI_OBJS_SDL = sdl.o
   29.64 -GUI_OBJS_SVGA = svga.o
   29.65 -GUI_OBJS_BEOS = beos.o
   29.66 -GUI_OBJS_WIN32 = win32.o
   29.67 -GUI_OBJS_MACOS = macintosh.o
   29.68 -GUI_OBJS_CARBON = carbon.o
   29.69 -GUI_OBJS_NOGUI = nogui.o
   29.70 -GUI_OBJS_TERM  = term.o
   29.71 -GUI_OBJS_RFB = rfb.o
   29.72 -GUI_OBJS_AMIGAOS = amigaos.o
   29.73 -GUI_OBJS_WX = wx.o
   29.74 -GUI_OBJS_WX_SUPPORT = wxmain.o wxdialog.o
   29.75 -OBJS_THAT_CANNOT_BE_PLUGINS = keymap.o gui.o siminterface.o textconfig.o @DIALOG_OBJS@
   29.76 -OBJS_THAT_CAN_BE_PLUGINS = @GUI_OBJS@
   29.77 -
   29.78 -X_LIBS = @X_LIBS@
   29.79 -X_PRE_LIBS = @X_PRE_LIBS@
   29.80 -GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS) -lX11 -lXpm
   29.81 -GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs`
   29.82 -GUI_LINK_OPTS_SVGA =  -lvga -lvgagl
   29.83 -GUI_LINK_OPTS_BEOS = -lbe
   29.84 -GUI_LINK_OPTS_RFB = @RFB_LIBS@
   29.85 -GUI_LINK_OPTS_AMIGAOS = 
   29.86 -GUI_LINK_OPTS_WIN32 = -luser32 -lgdi32 -lcomdlg32 -lcomctl32
   29.87 -GUI_LINK_OPTS_WIN32_VCPP = user32.lib gdi32.lib winmm.lib \
   29.88 -  comdlg32.lib comctl32.lib wsock32.lib
   29.89 -GUI_LINK_OPTS_MACOS =
   29.90 -GUI_LINK_OPTS_CARBON = -framework Carbon
   29.91 -GUI_LINK_OPTS_NOGUI =
   29.92 -GUI_LINK_OPTS_TERM = @GUI_LINK_OPTS_TERM@
   29.93 -GUI_LINK_OPTS_WX = @GUI_LINK_OPTS_WX@
   29.94 -GUI_LINK_OPTS = @GUI_LINK_OPTS@  @DEVICE_LINK_OPTS@
   29.95 -
   29.96 -NONPLUGIN_OBJS = @GUI_NON_PLUGIN_OBJS@
   29.97 -PLUGIN_OBJS = @GUI_PLUGIN_OBJS@
   29.98 -
   29.99 -#
  29.100 -# -------- end configurable options --------------------------
  29.101 -#
  29.102 -
  29.103 -all: libgui.a 
  29.104 -
  29.105 -plugins: $(PLUGIN_OBJS:@PLUGIN_LIBNAME_TRANSFORMATION@)
  29.106 -
  29.107 -libgui.a: $(NONPLUGIN_OBJS)
  29.108 -	@RMCOMMAND@ libgui.a
  29.109 -	@MAKELIB@ $(NONPLUGIN_OBJS)
  29.110 -	@RANLIB@ libgui.a
  29.111 -
  29.112 -# standard compile rule for C++ files
  29.113 -.@CPP_SUFFIX@.o:
  29.114 -	$(CXX) @DASH@c  $(CXXFLAGS) $(LOCAL_CXXFLAGS) @CXXFP@$< @OFP@$@
  29.115 -
  29.116 -##### building plugins with libtool
  29.117 -%.lo: %.@CPP_SUFFIX@
  29.118 -	$(LIBTOOL) --mode=compile $(CXX) -c $(CXXFLAGS) $(LOCAL_CXXFLAGS) $< -o $@
  29.119 -
  29.120 -libbx_%.la: %.lo
  29.121 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH)
  29.122 -
  29.123 -libbx_x.la: x.lo
  29.124 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_X)
  29.125 -
  29.126 -libbx_sdl.la: sdl.lo
  29.127 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_SDL)
  29.128 -
  29.129 -libbx_svga.la: svga.lo
  29.130 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_SVGA)
  29.131 -
  29.132 -libbx_beos.la: beos.lo
  29.133 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_BEOS)
  29.134 -
  29.135 -libbx_rfb.la: rfb.lo
  29.136 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_RFB)
  29.137 -
  29.138 -libbx_amigaos.la: amigaos.lo
  29.139 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_AMIGAOS)
  29.140 -
  29.141 -libbx_win32.la: win32.lo
  29.142 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_WIN32)
  29.143 -
  29.144 -libbx_macos.la: macos.lo
  29.145 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_MACOS)
  29.146 -
  29.147 -libbx_carbon.la: carbon.lo
  29.148 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_CARBON)
  29.149 -
  29.150 -libbx_nogui.la: nogui.lo
  29.151 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_NOGUI)
  29.152 -
  29.153 -libbx_term.la: term.lo
  29.154 -	$(LIBTOOL) --mode=link $(CXX) -module $< -o $@ -rpath $(PLUGIN_PATH) $(GUI_LINK_OPTS_TERM)
  29.155 -
  29.156 -# special link rules for plugins that require more than one object file
  29.157 -libbx_wx.la: $(GUI_OBJS_WX:.o=.lo) $(GUI_OBJS_WX_SUPPORT:.o=.lo)
  29.158 -	$(LIBTOOL) --mode=link $(CXX) -module $(GUI_OBJS_WX:.o=.lo) $(GUI_OBJS_WX_SUPPORT:.o=.lo) -o libbx_wx.la -rpath $(PLUGIN_PATH)  $(GUI_LINK_OPTS_WX)
  29.159 -
  29.160 -#### building DLLs for win32  (tested on cygwin only)
  29.161 -bx_%.dll: %.o
  29.162 -	$(CXX) $(CXXFLAGS) -shared -o $@ $< $(WIN32_DLL_IMPORT_LIBRARY)  $(GUI_LINK_OPTS_WIN32)
  29.163 -
  29.164 -bx_wx.dll: $(GUI_OBJS_WX) $(GUI_OBJS_WX_SUPPORT)
  29.165 -	$(CXX) $(CXXFLAGS) -shared -o bx_wx.dll $(GUI_OBJS_WX) $(GUI_OBJS_WX_SUPPORT) $(WIN32_DLL_IMPORT_LIBRARY) `wx-config --libs` -luser32 -lgdi32 -lcomdlg32 -lcomctl32
  29.166 -
  29.167 -bx_sdl.dll: $(GUI_OBJS_SDL) 
  29.168 -	$(CXX) $(CXXFLAGS) -shared -o bx_sdl.dll $(GUI_OBJS_SDL) $(WIN32_DLL_IMPORT_LIBRARY) $(GUI_LINK_OPTS_SDL)
  29.169 -
  29.170 -bx_rfb.dll: $(GUI_OBJS_RFB) 
  29.171 -	$(CXX) $(CXXFLAGS) -shared -o bx_rfb.dll $(GUI_OBJS_RFB) $(WIN32_DLL_IMPORT_LIBRARY) $(GUI_LINK_OPTS_RFB)
  29.172 -
  29.173 -# no need to build DLLs for beos.o
  29.174 -# no need to build DLLs for x.o
  29.175 -
  29.176 -##### end DLL section
  29.177 -
  29.178 -clean:
  29.179 -	@RMCOMMAND@ -rf .libs *.la *.a *.lo *.o *.dll
  29.180 -
  29.181 -dist-clean: clean
  29.182 -	@RMCOMMAND@ Makefile
  29.183 -
  29.184 -###########################################
  29.185 -# all other dependencies generated by
  29.186 -#  gcc -MM -I.. -I../instrument/stubs `wx-config --cxxflags` *.cc | 
  29.187 -#     sed -e 's/\.cc/.@CPP_SUFFIX@/g'
  29.188 -#  gcc -MM -I.. -I../instrument/stubs `wx-config --cxxflags` *.cc | \
  29.189 -#     sed -e 's/\.cc/.@CPP_SUFFIX@/g' -e 's/\.o:/.lo:/g'
  29.190 -#
  29.191 -# This means that every source file is listed twice, once with a .o rule
  29.192 -# and then again with an identical .lo rule.  The .lo rules are used when
  29.193 -# building plugins.
  29.194 -###########################################
  29.195 -amigaos.o: amigaos.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h \
  29.196 - ../bx_debug/debug.h ../bxversion.h ../gui/siminterface.h ../state_file.h \
  29.197 - ../cpu/cpu.h ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h \
  29.198 - ../pc_system.h ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h \
  29.199 - ../gui/textconfig.h ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h \
  29.200 - ../iodev/biosdev.h ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h \
  29.201 - ../iodev/harddrv.h ../iodev/cdrom.h ../iodev/keyboard.h \
  29.202 - ../iodev/parallel.h ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h \
  29.203 - ../iodev/pit82c54.h ../iodev/serial.h ../iodev/unmapped.h \
  29.204 - ../iodev/eth.h ../iodev/ne2k.h ../iodev/guest2host.h \
  29.205 - ../iodev/slowdown_timer.h ../instrument/stubs/instrument.h \
  29.206 - icon_bochs.h amigagui.h
  29.207 -beos.o: beos.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.208 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.209 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.210 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.211 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.212 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.213 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.214 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.215 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.216 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.217 - ../instrument/stubs/instrument.h ../font/vga.bitmap.h
  29.218 -carbon.o: carbon.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.219 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.220 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.221 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.222 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.223 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.224 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.225 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.226 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.227 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.228 - ../instrument/stubs/instrument.h icon_bochs.h ../font/vga.bitmap.h
  29.229 -gui.o: gui.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.230 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.231 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.232 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.233 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.234 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.235 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.236 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.237 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.238 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.239 - ../instrument/stubs/instrument.h ../gui/bitmaps/floppya.h \
  29.240 - ../gui/bitmaps/floppyb.h ../gui/bitmaps/mouse.h \
  29.241 - ../gui/bitmaps/reset.h ../gui/bitmaps/power.h \
  29.242 - ../gui/bitmaps/snapshot.h ../gui/bitmaps/copy.h \
  29.243 - ../gui/bitmaps/paste.h ../gui/bitmaps/configbutton.h \
  29.244 - ../gui/bitmaps/cdromd.h ../gui/bitmaps/userbutton.h
  29.245 -keymap.o: keymap.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.246 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.247 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.248 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.249 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.250 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.251 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.252 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.253 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.254 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.255 - ../instrument/stubs/instrument.h
  29.256 -macintosh.o: macintosh.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h \
  29.257 - ../bx_debug/debug.h ../bxversion.h ../gui/siminterface.h ../state_file.h \
  29.258 - ../cpu/cpu.h ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h \
  29.259 - ../pc_system.h ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h \
  29.260 - ../gui/textconfig.h ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h \
  29.261 - ../iodev/biosdev.h ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h \
  29.262 - ../iodev/harddrv.h ../iodev/cdrom.h ../iodev/keyboard.h \
  29.263 - ../iodev/parallel.h ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h \
  29.264 - ../iodev/pit82c54.h ../iodev/serial.h ../iodev/unmapped.h \
  29.265 - ../iodev/eth.h ../iodev/ne2k.h ../iodev/guest2host.h \
  29.266 - ../iodev/slowdown_timer.h ../instrument/stubs/instrument.h \
  29.267 - icon_bochs.h ../font/vga.bitmap.h
  29.268 -nogui.o: nogui.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.269 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.270 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.271 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.272 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.273 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.274 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.275 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.276 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.277 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.278 - ../instrument/stubs/instrument.h icon_bochs.h
  29.279 -rfb.o: rfb.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.280 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.281 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.282 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.283 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.284 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.285 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.286 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.287 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.288 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.289 - ../instrument/stubs/instrument.h icon_bochs.h ../font/vga.bitmap.h \
  29.290 - rfbproto.h
  29.291 -sdl.o: sdl.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.292 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.293 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.294 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.295 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.296 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.297 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.298 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.299 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.300 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.301 - ../instrument/stubs/instrument.h icon_bochs.h sdl.h sdlkeys.h
  29.302 -siminterface.o: siminterface.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h \
  29.303 - ../bx_debug/debug.h ../bxversion.h ../gui/siminterface.h ../state_file.h \
  29.304 - ../cpu/cpu.h ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h \
  29.305 - ../pc_system.h ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h \
  29.306 - ../gui/textconfig.h ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h \
  29.307 - ../iodev/biosdev.h ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h \
  29.308 - ../iodev/harddrv.h ../iodev/cdrom.h ../iodev/keyboard.h \
  29.309 - ../iodev/parallel.h ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h \
  29.310 - ../iodev/pit82c54.h ../iodev/serial.h ../iodev/unmapped.h \
  29.311 - ../iodev/eth.h ../iodev/ne2k.h ../iodev/guest2host.h \
  29.312 - ../iodev/slowdown_timer.h ../instrument/stubs/instrument.h
  29.313 -svga.o: svga.@CPP_SUFFIX@ ../font/vga.bitmap.h ../bochs.h ../config.h ../osdep.h \
  29.314 - ../bx_debug/debug.h ../bxversion.h ../gui/siminterface.h ../state_file.h \
  29.315 - ../cpu/cpu.h ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h \
  29.316 - ../pc_system.h ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h \
  29.317 - ../gui/textconfig.h ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h \
  29.318 - ../iodev/biosdev.h ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h \
  29.319 - ../iodev/harddrv.h ../iodev/cdrom.h ../iodev/keyboard.h \
  29.320 - ../iodev/parallel.h ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h \
  29.321 - ../iodev/pit82c54.h ../iodev/serial.h ../iodev/unmapped.h \
  29.322 - ../iodev/eth.h ../iodev/ne2k.h ../iodev/guest2host.h \
  29.323 - ../iodev/slowdown_timer.h ../instrument/stubs/instrument.h \
  29.324 - icon_bochs.h
  29.325 -term.o: term.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.326 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.327 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.328 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.329 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.330 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.331 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.332 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.333 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.334 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.335 - ../instrument/stubs/instrument.h icon_bochs.h
  29.336 -textconfig.o: textconfig.@CPP_SUFFIX@ ../config.h ../osdep.h textconfig.h \
  29.337 - siminterface.h ../extplugin.h ../ltdl.h
  29.338 -win32.o: win32.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.339 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.340 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.341 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.342 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.343 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.344 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.345 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.346 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.347 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.348 - ../instrument/stubs/instrument.h icon_bochs.h ../font/vga.bitmap.h
  29.349 -wx.o: wx.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.350 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.351 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.352 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.353 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.354 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.355 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.356 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.357 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.358 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.359 - ../instrument/stubs/instrument.h ../gui/icon_bochs.h \
  29.360 - ../font/vga.bitmap.h wxmain.h
  29.361 -wxdialog.o: wxdialog.@CPP_SUFFIX@ ../config.h ../osdep.h ../gui/siminterface.h \
  29.362 - ../bxversion.h wxdialog.h wxmain.h
  29.363 -wxmain.o: wxmain.@CPP_SUFFIX@ ../config.h ../osdep.h ../gui/siminterface.h \
  29.364 - ../bxversion.h wxdialog.h wxmain.h ../extplugin.h ../ltdl.h \
  29.365 - bitmaps/cdromd.xpm bitmaps/copy.xpm bitmaps/floppya.xpm \
  29.366 - bitmaps/floppyb.xpm bitmaps/paste.xpm bitmaps/power.xpm \
  29.367 - bitmaps/reset.xpm bitmaps/snapshot.xpm bitmaps/mouse.xpm \
  29.368 - bitmaps/userbutton.xpm
  29.369 -x.o: x.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.370 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.371 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.372 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.373 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.374 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.375 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.376 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.377 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.378 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.379 - ../instrument/stubs/instrument.h icon_bochs.h
  29.380 -amigaos.lo: amigaos.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h \
  29.381 - ../bx_debug/debug.h ../bxversion.h ../gui/siminterface.h ../state_file.h \
  29.382 - ../cpu/cpu.h ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h \
  29.383 - ../pc_system.h ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h \
  29.384 - ../gui/textconfig.h ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h \
  29.385 - ../iodev/biosdev.h ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h \
  29.386 - ../iodev/harddrv.h ../iodev/cdrom.h ../iodev/keyboard.h \
  29.387 - ../iodev/parallel.h ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h \
  29.388 - ../iodev/pit82c54.h ../iodev/serial.h ../iodev/unmapped.h \
  29.389 - ../iodev/eth.h ../iodev/ne2k.h ../iodev/guest2host.h \
  29.390 - ../iodev/slowdown_timer.h ../instrument/stubs/instrument.h \
  29.391 - icon_bochs.h amigagui.h
  29.392 -beos.lo: beos.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.393 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.394 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.395 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.396 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.397 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.398 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.399 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.400 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.401 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.402 - ../instrument/stubs/instrument.h ../font/vga.bitmap.h
  29.403 -carbon.lo: carbon.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.404 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.405 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.406 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.407 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.408 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.409 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.410 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.411 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.412 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.413 - ../instrument/stubs/instrument.h icon_bochs.h ../font/vga.bitmap.h
  29.414 -gui.lo: gui.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.415 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.416 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.417 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.418 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.419 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.420 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.421 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.422 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.423 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.424 - ../instrument/stubs/instrument.h ../gui/bitmaps/floppya.h \
  29.425 - ../gui/bitmaps/floppyb.h ../gui/bitmaps/mouse.h \
  29.426 - ../gui/bitmaps/reset.h ../gui/bitmaps/power.h \
  29.427 - ../gui/bitmaps/snapshot.h ../gui/bitmaps/copy.h \
  29.428 - ../gui/bitmaps/paste.h ../gui/bitmaps/configbutton.h \
  29.429 - ../gui/bitmaps/cdromd.h ../gui/bitmaps/userbutton.h
  29.430 -keymap.lo: keymap.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.431 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.432 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.433 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.434 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.435 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.436 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.437 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.438 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.439 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.440 - ../instrument/stubs/instrument.h
  29.441 -macintosh.lo: macintosh.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h \
  29.442 - ../bx_debug/debug.h ../bxversion.h ../gui/siminterface.h ../state_file.h \
  29.443 - ../cpu/cpu.h ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h \
  29.444 - ../pc_system.h ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h \
  29.445 - ../gui/textconfig.h ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h \
  29.446 - ../iodev/biosdev.h ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h \
  29.447 - ../iodev/harddrv.h ../iodev/cdrom.h ../iodev/keyboard.h \
  29.448 - ../iodev/parallel.h ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h \
  29.449 - ../iodev/pit82c54.h ../iodev/serial.h ../iodev/unmapped.h \
  29.450 - ../iodev/eth.h ../iodev/ne2k.h ../iodev/guest2host.h \
  29.451 - ../iodev/slowdown_timer.h ../instrument/stubs/instrument.h \
  29.452 - icon_bochs.h ../font/vga.bitmap.h
  29.453 -nogui.lo: nogui.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.454 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.455 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.456 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.457 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.458 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.459 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.460 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.461 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.462 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.463 - ../instrument/stubs/instrument.h icon_bochs.h
  29.464 -rfb.lo: rfb.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.465 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.466 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.467 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.468 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.469 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.470 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.471 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.472 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.473 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.474 - ../instrument/stubs/instrument.h icon_bochs.h ../font/vga.bitmap.h \
  29.475 - rfbproto.h
  29.476 -sdl.lo: sdl.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.477 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.478 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.479 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.480 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.481 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.482 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.483 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.484 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.485 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.486 - ../instrument/stubs/instrument.h icon_bochs.h sdl.h sdlkeys.h
  29.487 -siminterface.lo: siminterface.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h \
  29.488 - ../bx_debug/debug.h ../bxversion.h ../gui/siminterface.h ../state_file.h \
  29.489 - ../cpu/cpu.h ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h \
  29.490 - ../pc_system.h ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h \
  29.491 - ../gui/textconfig.h ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h \
  29.492 - ../iodev/biosdev.h ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h \
  29.493 - ../iodev/harddrv.h ../iodev/cdrom.h ../iodev/keyboard.h \
  29.494 - ../iodev/parallel.h ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h \
  29.495 - ../iodev/pit82c54.h ../iodev/serial.h ../iodev/unmapped.h \
  29.496 - ../iodev/eth.h ../iodev/ne2k.h ../iodev/guest2host.h \
  29.497 - ../iodev/slowdown_timer.h ../instrument/stubs/instrument.h
  29.498 -svga.lo: svga.@CPP_SUFFIX@ ../font/vga.bitmap.h ../bochs.h ../config.h ../osdep.h \
  29.499 - ../bx_debug/debug.h ../bxversion.h ../gui/siminterface.h ../state_file.h \
  29.500 - ../cpu/cpu.h ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h \
  29.501 - ../pc_system.h ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h \
  29.502 - ../gui/textconfig.h ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h \
  29.503 - ../iodev/biosdev.h ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h \
  29.504 - ../iodev/harddrv.h ../iodev/cdrom.h ../iodev/keyboard.h \
  29.505 - ../iodev/parallel.h ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h \
  29.506 - ../iodev/pit82c54.h ../iodev/serial.h ../iodev/unmapped.h \
  29.507 - ../iodev/eth.h ../iodev/ne2k.h ../iodev/guest2host.h \
  29.508 - ../iodev/slowdown_timer.h ../instrument/stubs/instrument.h \
  29.509 - icon_bochs.h
  29.510 -term.lo: term.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.511 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.512 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.513 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.514 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.515 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.516 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.517 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.518 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.519 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.520 - ../instrument/stubs/instrument.h icon_bochs.h
  29.521 -textconfig.lo: textconfig.@CPP_SUFFIX@ ../config.h ../osdep.h textconfig.h \
  29.522 - siminterface.h ../extplugin.h ../ltdl.h
  29.523 -win32.lo: win32.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.524 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.525 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.526 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.527 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.528 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.529 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.530 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.531 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.532 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.533 - ../instrument/stubs/instrument.h icon_bochs.h ../font/vga.bitmap.h
  29.534 -wx.lo: wx.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.535 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.536 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.537 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.538 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.539 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.540 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.541 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.542 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.543 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.544 - ../instrument/stubs/instrument.h ../gui/icon_bochs.h \
  29.545 - ../font/vga.bitmap.h wxdialog.h wxmain.h
  29.546 -wxdialog.lo: wxdialog.@CPP_SUFFIX@ ../config.h ../osdep.h ../gui/siminterface.h \
  29.547 - ../bxversion.h wxdialog.h wxmain.h
  29.548 -wxmain.lo: wxmain.@CPP_SUFFIX@ ../config.h ../osdep.h ../gui/siminterface.h \
  29.549 - ../bxversion.h wxdialog.h wxmain.h ../extplugin.h ../ltdl.h \
  29.550 - bitmaps/cdromd.xpm bitmaps/copy.xpm bitmaps/floppya.xpm \
  29.551 - bitmaps/floppyb.xpm bitmaps/paste.xpm bitmaps/power.xpm \
  29.552 - bitmaps/reset.xpm bitmaps/snapshot.xpm bitmaps/mouse.xpm \
  29.553 - bitmaps/userbutton.xpm
  29.554 -x.lo: x.@CPP_SUFFIX@ ../bochs.h ../config.h ../osdep.h ../bx_debug/debug.h \
  29.555 - ../bxversion.h ../gui/siminterface.h ../state_file.h ../cpu/cpu.h \
  29.556 - ../cpu/lazy_flags.h ../cpu/i387.h ../memory/memory.h ../pc_system.h \
  29.557 - ../plugin.h ../extplugin.h ../ltdl.h ../gui/gui.h ../gui/textconfig.h \
  29.558 - ../gui/keymap.h ../iodev/iodev.h ../iodev/vga.h ../iodev/biosdev.h \
  29.559 - ../iodev/cmos.h ../iodev/dma.h ../iodev/floppy.h ../iodev/harddrv.h \
  29.560 - ../iodev/cdrom.h ../iodev/keyboard.h ../iodev/parallel.h \
  29.561 - ../iodev/pic.h ../iodev/pit.h ../iodev/pit_wrap.h ../iodev/pit82c54.h \
  29.562 - ../iodev/serial.h ../iodev/unmapped.h ../iodev/eth.h ../iodev/ne2k.h \
  29.563 - ../iodev/guest2host.h ../iodev/slowdown_timer.h \
  29.564 - ../instrument/stubs/instrument.h icon_bochs.h
    30.1 --- a/tools/ioemu/gui/bitmaps/cdromd.h	Thu May 19 21:53:44 2005 +0000
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,34 +0,0 @@
    30.4 -/////////////////////////////////////////////////////////////////////////
    30.5 -// $Id: cdromd.h,v 1.1 2002/01/31 21:16:52 vruppert Exp $
    30.6 -/////////////////////////////////////////////////////////////////////////
    30.7 -//
    30.8 -#define BX_CDROMD_BMAP_X 32
    30.9 -#define BX_CDROMD_BMAP_Y 32
   30.10 -
   30.11 -static const unsigned char bx_cdromd_bmap[(BX_CONFIG_BMAP_X * BX_CONFIG_BMAP_Y)/8] = {
   30.12 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0e, 0x00, 0x00, 0x10, 0x12, 0x00, 
   30.13 -  0x00, 0x10, 0x12, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x60, 0x0e, 0x00, 
   30.14 -  0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x0c, 0x30, 0x00, 
   30.15 -  0x00, 0xe2, 0x47, 0x00, 0x00, 0x19, 0x98, 0x00, 0x80, 0xe6, 0x67, 0x01, 
   30.16 -  0x40, 0x19, 0x98, 0x02, 0x20, 0xe5, 0xa7, 0x04, 0xa0, 0x12, 0x48, 0x05, 
   30.17 -  0x90, 0xca, 0x53, 0x09, 0x50, 0x25, 0xa4, 0x0a, 0x50, 0x15, 0xa8, 0x0a, 
   30.18 -  0x50, 0x15, 0xa8, 0x0a, 0x50, 0x15, 0xa8, 0x0a, 0x50, 0x15, 0xa8, 0x0a, 
   30.19 -  0x50, 0x25, 0xa4, 0x0a, 0x90, 0xca, 0x53, 0x09, 0xa0, 0x12, 0x48, 0x05, 
   30.20 -  0x20, 0xe5, 0xa7, 0x04, 0x40, 0x19, 0x98, 0x02, 0x80, 0xe6, 0x67, 0x01, 
   30.21 -  0x00, 0x19, 0x98, 0x00, 0x00, 0xe2, 0x47, 0x00, 0x00, 0x0c, 0x30, 0x00, 
   30.22 -  0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00
   30.23 -  };
   30.24 -
   30.25 -static const unsigned char bx_cdromd_eject_bmap[(BX_CONFIG_BMAP_X * BX_CONFIG_BMAP_Y)/8] = {
   30.26 -  0x01, 0x00, 0x00, 0x80, 0x02, 0x60, 0x0e, 0x40, 0x04, 0x10, 0x12, 0x20, 
   30.27 -  0x08, 0x10, 0x12, 0x10, 0x10, 0x10, 0x12, 0x08, 0x20, 0x60, 0x0e, 0x04, 
   30.28 -  0x40, 0x00, 0x00, 0x02, 0x80, 0xf0, 0x0f, 0x01, 0x00, 0x0d, 0xb0, 0x00, 
   30.29 -  0x00, 0xe2, 0x47, 0x00, 0x00, 0x1d, 0xb8, 0x00, 0x80, 0xee, 0x77, 0x01, 
   30.30 -  0x40, 0x19, 0x98, 0x02, 0x20, 0xe5, 0xa7, 0x04, 0xa0, 0x52, 0x4a, 0x05, 
   30.31 -  0x90, 0xca, 0x53, 0x09, 0x50, 0xa5, 0xa5, 0x0a, 0x50, 0x55, 0xaa, 0x0a, 
   30.32 -  0x50, 0x35, 0xac, 0x0a, 0x50, 0x15, 0xa8, 0x0a, 0x50, 0x1d, 0xb8, 0x0a, 
   30.33 -  0x50, 0x25, 0xa4, 0x0a, 0x90, 0xca, 0x53, 0x09, 0xa0, 0x13, 0xc8, 0x05, 
   30.34 -  0xa0, 0xe5, 0xa7, 0x05, 0x40, 0x19, 0x98, 0x02, 0xa0, 0xe6, 0x67, 0x05, 
   30.35 -  0x10, 0x19, 0x98, 0x08, 0x08, 0xe2, 0x47, 0x10, 0x04, 0x0c, 0x30, 0x20, 
   30.36 -  0x02, 0xf0, 0x0f, 0x40, 0x01, 0x00, 0x00, 0x80
   30.37 -  };
    31.1 --- a/tools/ioemu/gui/bitmaps/cdromd.xpm	Thu May 19 21:53:44 2005 +0000
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,41 +0,0 @@
    31.4 -/* XPM */
    31.5 -static char *cdromd_xpm[] = {
    31.6 -/* width height num_colors chars_per_pixel */
    31.7 -"    32    32        2            1",
    31.8 -/* colors */
    31.9 -". c None",
   31.10 -"# c #000000",
   31.11 -/* pixels */
   31.12 -"................................",
   31.13 -".............##..###............",
   31.14 -"............#....#..#...........",
   31.15 -"............#....#..#...........",
   31.16 -"............#....#..#...........",
   31.17 -".............##..###............",
   31.18 -"................................",
   31.19 -"............########............",
   31.20 -"..........##........##..........",
   31.21 -".........#...######...#.........",
   31.22 -"........#..##......##..#........",
   31.23 -".......#.##..######..##.#.......",
   31.24 -"......#.#..##......##..#.#......",
   31.25 -".....#..#.#..######..#.#..#.....",
   31.26 -".....#.#.#..#......#..#.#.#.....",
   31.27 -"....#..#.#.#..####..#.#.#..#....",
   31.28 -"....#.#.#.#..#....#..#.#.#.#....",
   31.29 -"....#.#.#.#.#......#.#.#.#.#....",
   31.30 -"....#.#.#.#.#......#.#.#.#.#....",
   31.31 -"....#.#.#.#.#......#.#.#.#.#....",
   31.32 -"....#.#.#.#.#......#.#.#.#.#....",
   31.33 -"....#.#.#.#..#....#..#.#.#.#....",
   31.34 -"....#..#.#.#..####..#.#.#..#....",
   31.35 -".....#.#.#..#......#..#.#.#.....",
   31.36 -".....#..#.#..######..#.#..#.....",
   31.37 -"......#.#..##......##..#.#......",
   31.38 -".......#.##..######..##.#.......",
   31.39 -"........#..##......##..#........",
   31.40 -".........#...######...#.........",
   31.41 -"..........##........##..........",
   31.42 -"............########............",
   31.43 -"................................"
   31.44 -};
    32.1 --- a/tools/ioemu/gui/bitmaps/configbutton.h	Thu May 19 21:53:44 2005 +0000
    32.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.3 @@ -1,16 +0,0 @@
    32.4 -#define BX_CONFIG_BMAP_X 32
    32.5 -#define BX_CONFIG_BMAP_Y 32
    32.6 -
    32.7 -static const unsigned char bx_config_bmap[(BX_CONFIG_BMAP_X * BX_CONFIG_BMAP_Y)/8] = {
    32.8 -  0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x80, 0x01, 0xfc, 0x7f, 0xc0, 0x03, 
    32.9 -  0xfc, 0xff, 0xc1, 0x03, 0xfc, 0xff, 0xc1, 0x03, 0xfc, 0x7f, 0xc0, 0x03, 
   32.10 -  0x84, 0x07, 0xc0, 0x03, 0x80, 0x07, 0xc0, 0x03, 0x80, 0x07, 0xc0, 0x03, 
   32.11 -  0x80, 0x07, 0xc0, 0x03, 0x80, 0x07, 0xc0, 0x03, 0x80, 0x07, 0xc0, 0x03, 
   32.12 -  0x80, 0x07, 0xc0, 0x03, 0x80, 0x07, 0xc0, 0x03, 0x80, 0x07, 0xc0, 0x03, 
   32.13 -  0x80, 0x07, 0xc0, 0x03, 0x80, 0x07, 0xc0, 0x03, 0x80, 0x07, 0xc0, 0x03, 
   32.14 -  0x80, 0x07, 0xc0, 0x03, 0x80, 0x07, 0xe0, 0x07, 0x80, 0x07, 0xf0, 0x0f, 
   32.15 -  0x80, 0x07, 0x70, 0x0e, 0x80, 0x07, 0x30, 0x0c, 0x80, 0x07, 0x30, 0x0c, 
   32.16 -  0x80, 0x07, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00, 0x38, 0x27, 0xba, 0x1c, 
   32.17 -  0x84, 0x68, 0x8a, 0x02, 0x84, 0xa8, 0xba, 0x32, 0x84, 0x28, 0x8b, 0x22, 
   32.18 -  0x38, 0x27, 0x8a, 0x1c, 0x00, 0x00, 0x00, 0x00
   32.19 -  };
    33.1 --- a/tools/ioemu/gui/bitmaps/configbutton.xpm	Thu May 19 21:53:44 2005 +0000
    33.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.3 @@ -1,41 +0,0 @@
    33.4 -/* XPM */
    33.5 -static char *configbutton_xpm[] = {
    33.6 -/* width height num_colors chars_per_pixel */
    33.7 -"    32    32        2            1",
    33.8 -/* colors */
    33.9 -". c None",
   33.10 -"# c #000000",
   33.11 -/* pixels */
   33.12 -"................................",
   33.13 -"..#....................##.......",
   33.14 -"..#############.......####......",
   33.15 -"..###############.....####......",
   33.16 -"..###############.....####......",
   33.17 -"..#############.......####......",
   33.18 -"..#....####...........####......",
   33.19 -".......####...........####......",
   33.20 -".......####...........####......",
   33.21 -".......####...........####......",
   33.22 -".......####...........####......",
   33.23 -".......####...........####......",
   33.24 -".......####...........####......",
   33.25 -".......####...........####......",
   33.26 -".......####...........####......",
   33.27 -".......####...........####......",
   33.28 -".......####...........####......",
   33.29 -".......####...........####......",
   33.30 -".......####...........####......",
   33.31 -".......####..........######.....",
   33.32 -".......####.........########....",
   33.33 -".......####.........###..###....",
   33.34 -".......####.........##....##....",
   33.35 -".......####.........##....##....",
   33.36 -".......####..........#....#.....",
   33.37 -"................................",
   33.38 -"...###..###..#...#.###.#..###...",
   33.39 -"..#....#...#.##..#.#...#.#......",
   33.40 -"..#....#...#.#.#.#.###.#.#..##..",
   33.41 -"..#....#...#.#..##.#...#.#...#..",
   33.42 -"...###..###..#...#.#...#..###...",
   33.43 -"................................"
   33.44 -};
    34.1 --- a/tools/ioemu/gui/bitmaps/copy.h	Thu May 19 21:53:44 2005 +0000
    34.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.3 @@ -1,18 +0,0 @@
    34.4 -/////////////////////////////////////////////////////////////////////////
    34.5 -// $Id: copy.h,v 1.1 2002/03/11 15:04:58 bdenney Exp $
    34.6 -/////////////////////////////////////////////////////////////////////////
    34.7 -#define BX_COPY_BMAP_X 32
    34.8 -#define BX_COPY_BMAP_Y 32
    34.9 -
   34.10 -static unsigned char bx_copy_bmap[(BX_COPY_BMAP_X*BX_COPY_BMAP_Y)] = {
   34.11 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
   34.12 -  0x80, 0x60, 0x4e, 0x02, 0x80, 0x90, 0x52, 0x02, 0x80, 0x90, 0x52, 0x02,
   34.13 -  0x00, 0x6f, 0x8e, 0x03, 0x00, 0x00, 0x02, 0x02, 0xf8, 0x3f, 0x02, 0x02,
   34.14 -  0x08, 0x20, 0xc0, 0x01, 0xe8, 0x2b, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00,
   34.15 -  0xe8, 0x2e, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0xe8, 0x39, 0x00, 0x00,
   34.16 -  0x08, 0x24, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0xe8, 0xaf, 0xff, 0x03,
   34.17 -  0x08, 0xa0, 0x00, 0x02, 0xf8, 0xbf, 0xbe, 0x02, 0x00, 0x80, 0x00, 0x02,
   34.18 -  0x80, 0x88, 0xee, 0x02, 0x80, 0x90, 0x00, 0x02, 0x00, 0xbf, 0x9e, 0x03,
   34.19 -  0x00, 0x90, 0x40, 0x02, 0x00, 0x88, 0x08, 0x02, 0x00, 0x80, 0xfe, 0x02,
   34.20 -  0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00,
   34.21 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
    35.1 --- a/tools/ioemu/gui/bitmaps/copy.xpm	Thu May 19 21:53:44 2005 +0000
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,41 +0,0 @@
    35.4 -/* XPM */
    35.5 -static char *copy_xpm[] = {
    35.6 -/* width height num_colors chars_per_pixel */
    35.7 -"    32    32        2            1",
    35.8 -/* colors */
    35.9 -". c None",
   35.10 -"# c #000000",
   35.11 -/* pixels */
   35.12 -"................................",
   35.13 -"........####....................",
   35.14 -".......#........................",
   35.15 -".......#.....##..###..#..#......",
   35.16 -".......#....#..#.#..#.#..#......",
   35.17 -".......#....#..#.#..#.#..#......",
   35.18 -"........####.##..###...###......",
   35.19 -".................#.......#......",
   35.20 -"...###########...#.......#......",
   35.21 -"...#.........#........###.......",
   35.22 -"...#.#####.#.#..................",
   35.23 -"...#.........#..................",
   35.24 -"...#.###.###.#..................",
   35.25 -"...#.........#..................",
   35.26 -"...#.####..###..................",
   35.27 -"...#......#..#..................",
   35.28 -"...#...#.....#..................",
   35.29 -"...#.#######.#.###########......",
   35.30 -"...#.........#.#.........#......",
   35.31 -"...###########.#.#####.#.#......",
   35.32 -"...............#.........#......",
   35.33 -".......#...#...#.###.###.#......",
   35.34 -".......#....#..#.........#......",
   35.35 -"........######.#.####..###......",
   35.36 -"............#..#......#..#......",
   35.37 -"...........#...#...#.....#......",
   35.38 -"...............#.#######.#......",
   35.39 -"...............#.........#......",
   35.40 -"...............###########......",
   35.41 -"................................",
   35.42 -"................................",
   35.43 -"................................"
   35.44 -};
    36.1 --- a/tools/ioemu/gui/bitmaps/floppya.h	Thu May 19 21:53:44 2005 +0000
    36.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.3 @@ -1,34 +0,0 @@
    36.4 -/////////////////////////////////////////////////////////////////////////
    36.5 -// $Id: floppya.h,v 1.2 2001/10/03 13:10:37 bdenney Exp $
    36.6 -/////////////////////////////////////////////////////////////////////////
    36.7 -//
    36.8 -#define BX_FLOPPYA_BMAP_X 32
    36.9 -#define BX_FLOPPYA_BMAP_Y 32
   36.10 -
   36.11 -static const unsigned char bx_floppya_bmap[(BX_FLOPPYA_BMAP_X * BX_FLOPPYA_BMAP_Y)/8] = {
   36.12 -   0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40, 0x11, 0x00,
   36.13 -   0x00, 0xc0, 0x01, 0x00, 0x00, 0x60, 0x13, 0x00, 0x00, 0x60, 0x03, 0x00,
   36.14 -   0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0x01, 0x80, 0x07,
   36.15 -   0x20, 0xfd, 0xbf, 0x04, 0x20, 0x01, 0x80, 0x04, 0xe0, 0xfd, 0xbf, 0x07,
   36.16 -   0xe0, 0x01, 0x80, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x01, 0x80, 0x07,
   36.17 -   0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x01, 0x80, 0x07, 0xe0, 0xfd, 0xbf, 0x07,
   36.18 -   0xe0, 0x01, 0x80, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x01, 0x80, 0x07,
   36.19 -   0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07,
   36.20 -   0xe0, 0xff, 0xff, 0x07, 0xe0, 0xaf, 0xea, 0x07, 0xe0, 0xf7, 0xd5, 0x07,
   36.21 -   0xe0, 0xef, 0xea, 0x07, 0xe0, 0xf7, 0xd5, 0x07, 0xc0, 0xef, 0xea, 0x07,
   36.22 -   0x80, 0x57, 0xd5, 0x07, 0x00, 0xaf, 0xea, 0x07
   36.23 -  };
   36.24 -
   36.25 -static const unsigned char bx_floppya_eject_bmap[(BX_FLOPPYA_BMAP_X * BX_FLOPPYA_BMAP_Y)/8] = {
   36.26 -   0x01, 0x80, 0x00, 0x80, 0x02, 0x40, 0x01, 0x40, 0x04, 0x40, 0x11, 0x20,
   36.27 -   0x08, 0xc0, 0x01, 0x10, 0x10, 0x60, 0x13, 0x08, 0x20, 0x60, 0x03, 0x04,
   36.28 -   0x40, 0x00, 0x00, 0x02, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0x01, 0x80, 0x07,
   36.29 -   0x20, 0xff, 0xff, 0x04, 0x20, 0x05, 0xa0, 0x04, 0xe0, 0xfd, 0xbf, 0x07,
   36.30 -   0xe0, 0x11, 0x88, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x41, 0x82, 0x07,
   36.31 -   0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x81, 0x81, 0x07, 0xe0, 0xfd, 0xbf, 0x07,
   36.32 -   0xe0, 0x21, 0x84, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x09, 0x90, 0x07,
   36.33 -   0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07,
   36.34 -   0xe0, 0xff, 0xff, 0x07, 0xe0, 0xaf, 0xea, 0x07, 0xe0, 0xf7, 0xd5, 0x07,
   36.35 -   0xf0, 0xef, 0xea, 0x0f, 0xe8, 0xf7, 0xd5, 0x17, 0xc4, 0xef, 0xea, 0x27,
   36.36 -   0x82, 0x57, 0xd5, 0x47, 0x01, 0xaf, 0xea, 0x87
   36.37 -  };
    37.1 --- a/tools/ioemu/gui/bitmaps/floppya.xpm	Thu May 19 21:53:44 2005 +0000
    37.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.3 @@ -1,41 +0,0 @@
    37.4 -/* XPM */
    37.5 -static char *floppya_xpm[] = {
    37.6 -/* width height num_colors chars_per_pixel */
    37.7 -"    32    32        2            1",
    37.8 -/* colors */
    37.9 -". c None",
   37.10 -"# c #000000",
   37.11 -/* pixels */
   37.12 -"...............#................",
   37.13 -"..............#.#...............",
   37.14 -"..............#.#...#...........",
   37.15 -"..............###...............",
   37.16 -".............##.##..#...........",
   37.17 -".............##.##..............",
   37.18 -"................................",
   37.19 -".....######################.....",
   37.20 -".....####..............####.....",
   37.21 -".....#..#.############.#..#.....",
   37.22 -".....#..#..............#..#.....",
   37.23 -".....####.############.####.....",
   37.24 -".....####..............####.....",
   37.25 -".....####.############.####.....",
   37.26 -".....####..............####.....",
   37.27 -".....####.############.####.....",
   37.28 -".....####..............####.....",
   37.29 -".....####.############.####.....",
   37.30 -".....####..............####.....",
   37.31 -".....####.############.####.....",
   37.32 -".....####..............####.....",
   37.33 -".....######################.....",
   37.34 -".....######################.....",
   37.35 -".....######################.....",
   37.36 -".....######################.....",
   37.37 -".....#######.#.#.#.#.######.....",
   37.38 -".....######.#####.#.#.#####.....",
   37.39 -".....#######.###.#.#.######.....",
   37.40 -".....######.#####.#.#.#####.....",
   37.41 -"......######.###.#.#.######.....",
   37.42 -".......####.#.#.#.#.#.#####.....",
   37.43 -"........####.#.#.#.#.######....."
   37.44 -};
    38.1 --- a/tools/ioemu/gui/bitmaps/floppyb.h	Thu May 19 21:53:44 2005 +0000
    38.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.3 @@ -1,34 +0,0 @@
    38.4 -/////////////////////////////////////////////////////////////////////////
    38.5 -// $Id: floppyb.h,v 1.2 2001/10/03 13:10:37 bdenney Exp $
    38.6 -/////////////////////////////////////////////////////////////////////////
    38.7 -//
    38.8 -#define BX_FLOPPYB_BMAP_X 32
    38.9 -#define BX_FLOPPYB_BMAP_Y 32
   38.10 -
   38.11 -static const unsigned char bx_floppyb_bmap[(BX_FLOPPYB_BMAP_X * BX_FLOPPYB_BMAP_Y)/8] = {
   38.12 -   0x00, 0xe0, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0xe0, 0x08, 0x00,
   38.13 -   0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x09, 0x00, 0x00, 0xe0, 0x00, 0x00,
   38.14 -   0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0x01, 0x80, 0x07,
   38.15 -   0x20, 0xfd, 0xbf, 0x04, 0x20, 0x01, 0x80, 0x04, 0xe0, 0xfd, 0xbf, 0x07,
   38.16 -   0xe0, 0x01, 0x80, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x01, 0x80, 0x07,
   38.17 -   0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x01, 0x80, 0x07, 0xe0, 0xfd, 0xbf, 0x07,
   38.18 -   0xe0, 0x01, 0x80, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x01, 0x80, 0x07,
   38.19 -   0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07,
   38.20 -   0xe0, 0xff, 0xff, 0x07, 0xe0, 0xaf, 0xea, 0x07, 0xe0, 0xf7, 0xd5, 0x07,
   38.21 -   0xe0, 0xef, 0xea, 0x07, 0xe0, 0xf7, 0xd5, 0x07, 0xc0, 0xef, 0xea, 0x07,
   38.22 -   0x80, 0x57, 0xd5, 0x07, 0x00, 0xaf, 0xea, 0x07
   38.23 -  };
   38.24 -
   38.25 -static const unsigned char bx_floppyb_eject_bmap[(BX_FLOPPYB_BMAP_X * BX_FLOPPYB_BMAP_Y)/8] = {
   38.26 -   0x01, 0xe0, 0x00, 0x80, 0x02, 0x20, 0x01, 0x40, 0x04, 0xe0, 0x08, 0x20,
   38.27 -   0x08, 0x20, 0x01, 0x10, 0x10, 0x20, 0x09, 0x08, 0x20, 0xe0, 0x00, 0x04,
   38.28 -   0x40, 0x00, 0x00, 0x02, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0x01, 0x80, 0x07,
   38.29 -   0x20, 0xff, 0xff, 0x04, 0x20, 0x05, 0xa0, 0x04, 0xe0, 0xfd, 0xbf, 0x07,
   38.30 -   0xe0, 0x11, 0x88, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x41, 0x82, 0x07,
   38.31 -   0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x81, 0x81, 0x07, 0xe0, 0xfd, 0xbf, 0x07,
   38.32 -   0xe0, 0x21, 0x84, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x09, 0x90, 0x07,
   38.33 -   0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07,
   38.34 -   0xe0, 0xff, 0xff, 0x07, 0xe0, 0xaf, 0xea, 0x07, 0xe0, 0xf7, 0xd5, 0x07,
   38.35 -   0xf0, 0xef, 0xea, 0x0f, 0xe8, 0xf7, 0xd5, 0x17, 0xc4, 0xef, 0xea, 0x27,
   38.36 -   0x82, 0x57, 0xd5, 0x47, 0x01, 0xaf, 0xea, 0x87
   38.37 -  };
    39.1 --- a/tools/ioemu/gui/bitmaps/floppyb.xpm	Thu May 19 21:53:44 2005 +0000
    39.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.3 @@ -1,41 +0,0 @@
    39.4 -/* XPM */
    39.5 -static char *floppyb_xpm[] = {
    39.6 -/* width height num_colors chars_per_pixel */
    39.7 -"    32    32        2            1",
    39.8 -/* colors */
    39.9 -". c None",
   39.10 -"# c #000000",
   39.11 -/* pixels */
   39.12 -".............###................",
   39.13 -".............#..#...............",
   39.14 -".............###...#............",
   39.15 -".............#..#...............",
   39.16 -".............#..#..#............",
   39.17 -".............###................",
   39.18 -"................................",
   39.19 -".....######################.....",
   39.20 -".....####..............####.....",
   39.21 -".....#..#.############.#..#.....",
   39.22 -".....#..#..............#..#.....",
   39.23 -".....####.############.####.....",
   39.24 -".....####..............####.....",
   39.25 -".....####.############.####.....",
   39.26 -".....####..............####.....",
   39.27 -".....####.############.####.....",
   39.28 -".....####..............####.....",
   39.29 -".....####.############.####.....",
   39.30 -".....####..............####.....",
   39.31 -".....####.############.####.....",
   39.32 -".....####..............####.....",
   39.33 -".....######################.....",
   39.34 -".....######################.....",
   39.35 -".....######################.....",
   39.36 -".....######################.....",
   39.37 -".....#######.#.#.#.#.######.....",
   39.38 -".....######.#####.#.#.#####.....",
   39.39 -".....#######.###.#.#.######.....",
   39.40 -".....######.#####.#.#.#####.....",
   39.41 -"......######.###.#.#.######.....",
   39.42 -".......####.#.#.#.#.#.#####.....",
   39.43 -"........####.#.#.#.#.######....."
   39.44 -};
    40.1 --- a/tools/ioemu/gui/bitmaps/mouse.h	Thu May 19 21:53:44 2005 +0000
    40.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.3 @@ -1,34 +0,0 @@
    40.4 -/////////////////////////////////////////////////////////////////////////
    40.5 -// $Id: mouse.h,v 1.2 2001/10/03 13:10:37 bdenney Exp $
    40.6 -/////////////////////////////////////////////////////////////////////////
    40.7 -//
    40.8 -#define BX_MOUSE_BMAP_X 32
    40.9 -#define BX_MOUSE_BMAP_Y 32
   40.10 -
   40.11 -static unsigned char bx_mouse_bmap[(BX_MOUSE_BMAP_X * BX_MOUSE_BMAP_Y)/8] = {
   40.12 -   0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xf8, 0x1f, 0x00,
   40.13 -   0x00, 0x0c, 0x30, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, 0x40, 0x00,
   40.14 -   0xf8, 0xff, 0xc0, 0x00, 0x0c, 0x80, 0xc1, 0x00, 0x24, 0x22, 0xc1, 0x00,
   40.15 -   0x74, 0x77, 0x81, 0x00, 0x74, 0x77, 0x81, 0x01, 0x74, 0x77, 0x81, 0x01,
   40.16 -   0x74, 0x77, 0x01, 0x01, 0x74, 0x77, 0x01, 0x03, 0x74, 0x77, 0x01, 0x06,
   40.17 -   0x24, 0x22, 0x01, 0x0c, 0x0c, 0x80, 0x01, 0x38, 0x04, 0x00, 0x01, 0x00,
   40.18 -   0x0c, 0x80, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00,
   40.19 -   0x04, 0x00, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00,
   40.20 -   0x0c, 0x80, 0x01, 0x00, 0x14, 0x40, 0x01, 0x00, 0x2c, 0xa0, 0x01, 0x00,
   40.21 -   0x54, 0x55, 0x01, 0x00, 0xac, 0xaa, 0x01, 0x00, 0xf8, 0xff, 0x00, 0x00,
   40.22 -   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
   40.23 -   };
   40.24 -
   40.25 -static unsigned char bx_nomouse_bmap[(BX_MOUSE_BMAP_X * BX_MOUSE_BMAP_Y)/8] = {
   40.26 -   0x01, 0x00, 0x00, 0x80, 0x02, 0xe0, 0x07, 0x40, 0x04, 0xf8, 0x1f, 0x20,
   40.27 -   0x08, 0x0c, 0x30, 0x10, 0x10, 0x06, 0x60, 0x08, 0x20, 0x06, 0x40, 0x04,
   40.28 -   0xf8, 0xff, 0xc0, 0x02, 0x8c, 0x80, 0xc1, 0x01, 0x24, 0x23, 0xc1, 0x00,
   40.29 -   0x74, 0x77, 0xc1, 0x00, 0x74, 0x77, 0xa1, 0x01, 0x74, 0x7f, 0x91, 0x01,
   40.30 -   0x74, 0x77, 0x09, 0x01, 0x74, 0x77, 0x05, 0x03, 0x74, 0x77, 0x03, 0x06,
   40.31 -   0x24, 0xa2, 0x01, 0x0c, 0x0c, 0x80, 0x01, 0x38, 0x04, 0x40, 0x03, 0x00,
   40.32 -   0x0c, 0xa0, 0x05, 0x00, 0x04, 0x10, 0x09, 0x00, 0x0c, 0x88, 0x11, 0x00,
   40.33 -   0x04, 0x04, 0x21, 0x00, 0x0c, 0x82, 0x41, 0x00, 0x04, 0x01, 0x81, 0x00,
   40.34 -   0x8c, 0x80, 0x01, 0x01, 0x54, 0x40, 0x01, 0x02, 0x2c, 0xa0, 0x01, 0x04,
   40.35 -   0x54, 0x55, 0x01, 0x08, 0xac, 0xaa, 0x01, 0x10, 0xfc, 0xff, 0x00, 0x20,
   40.36 -   0x02, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x80
   40.37 -   };
    41.1 --- a/tools/ioemu/gui/bitmaps/mouse.xpm	Thu May 19 21:53:44 2005 +0000
    41.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.3 @@ -1,41 +0,0 @@
    41.4 -/* XPM */
    41.5 -static char *mouse_xpm[] = {
    41.6 -/* width height num_colors chars_per_pixel */
    41.7 -"    32    32        2            1",
    41.8 -/* colors */
    41.9 -". c None",
   41.10 -"# c #000000",
   41.11 -/* pixels */
   41.12 -"................................",
   41.13 -".............######.............",
   41.14 -"...........##########...........",
   41.15 -"..........##........##..........",
   41.16 -".........##..........##.........",
   41.17 -".........##...........#.........",
   41.18 -"...#############......##........",
   41.19 -"..##...........##.....##........",
   41.20 -"..#..#...#...#..#.....##........",
   41.21 -"..#.###.###.###.#......#........",
   41.22 -"..#.###.###.###.#......##.......",
   41.23 -"..#.###.###.###.#......##.......",
   41.24 -"..#.###.###.###.#.......#.......",
   41.25 -"..#.###.###.###.#.......##......",
   41.26 -"..#.###.###.###.#........##.....",
   41.27 -"..#..#...#...#..#.........##....",
   41.28 -"..##...........##..........###..",
   41.29 -"..#.............#...............",
   41.30 -"..##...........##...............",
   41.31 -"..#.............#...............",
   41.32 -"..##...........##...............",
   41.33 -"..#.............#...............",
   41.34 -"..##...........##...............",
   41.35 -"..#.............#...............",
   41.36 -"..##...........##...............",
   41.37 -"..#.#.........#.#...............",
   41.38 -"..##.#.......#.##...............",
   41.39 -"..#.#.#.#.#.#.#.#...............",
   41.40 -"..##.#.#.#.#.#.##...............",
   41.41 -"...#############................",
   41.42 -"................................",
   41.43 -"................................"
   41.44 -};
    42.1 --- a/tools/ioemu/gui/bitmaps/paste.h	Thu May 19 21:53:44 2005 +0000
    42.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.3 @@ -1,18 +0,0 @@
    42.4 -/////////////////////////////////////////////////////////////////////////
    42.5 -// $Id: paste.h,v 1.1 2002/03/11 15:04:58 bdenney Exp $