HAOUAS Elyes (ehaouas@noos.fr) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15161
-gerrit
commit f8043655306706f2aefa0cbe5637e387d2774f18 Author: Elyes HAOUAS ehaouas@noos.fr Date: Sun Jun 12 18:48:23 2016 +0200
Remove trailing whitespace
Remove trailing whitespace and blank lines at EOF
Change-Id: I4fedd378f6f593faf3a147c1f9a7fc12ab8a7202 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- Makefile | 2 +- SerialICE/Makefile | 2 - qemu-0.15.x/QMP/qmp-shell | 2 +- qemu-0.15.x/QMP/qmp.py | 2 +- qemu-0.15.x/block.c | 2 +- qemu-0.15.x/block/curl.c | 6 +- qemu-0.15.x/block/qcow2.c | 2 +- qemu-0.15.x/buffered_file.c | 4 +- qemu-0.15.x/check-qjson.c | 18 +- qemu-0.15.x/console.c | 2 +- qemu-0.15.x/console.h | 2 +- qemu-0.15.x/cpu-all.h | 2 +- qemu-0.15.x/cpu-defs.h | 6 +- qemu-0.15.x/cpu-exec.c | 8 +- qemu-0.15.x/cris-dis.c | 2 +- qemu-0.15.x/cutils.c | 2 +- qemu-0.15.x/darwin-user/main.c | 2 +- qemu-0.15.x/docs/specs/qed_spec.txt | 12 +- qemu-0.15.x/docs/tracing.txt | 2 +- qemu-0.15.x/error_int.h | 2 +- qemu-0.15.x/exec-all.h | 2 +- qemu-0.15.x/exec.c | 20 +- qemu-0.15.x/gdb-xml/cf-fp.xml | 2 +- qemu-0.15.x/gdbstub.c | 4 +- qemu-0.15.x/hw/acpi.c | 4 +- qemu-0.15.x/hw/armv7m.c | 2 +- qemu-0.15.x/hw/axis_dev88.c | 2 +- qemu-0.15.x/hw/bitbang_i2c.c | 2 +- qemu-0.15.x/hw/bt.h | 6 +- qemu-0.15.x/hw/cris-boot.c | 2 +- qemu-0.15.x/hw/e1000.c | 2 +- qemu-0.15.x/hw/etraxfs.c | 6 +- qemu-0.15.x/hw/etraxfs_dma.c | 32 +- qemu-0.15.x/hw/etraxfs_dma.h | 4 +- qemu-0.15.x/hw/etraxfs_eth.c | 24 +- qemu-0.15.x/hw/etraxfs_pic.c | 10 +- qemu-0.15.x/hw/etraxfs_ser.c | 2 +- qemu-0.15.x/hw/etraxfs_timer.c | 2 +- qemu-0.15.x/hw/framebuffer.c | 2 +- qemu-0.15.x/hw/gumstix.c | 6 +- qemu-0.15.x/hw/ide/core.c | 12 +- qemu-0.15.x/hw/lan9118.c | 2 +- qemu-0.15.x/hw/mc146818rtc.c | 2 +- qemu-0.15.x/hw/mips_mipssim.c | 2 +- qemu-0.15.x/hw/omap1.c | 2 +- qemu-0.15.x/hw/omap_mmc.c | 2 +- qemu-0.15.x/hw/onenand.c | 4 +- qemu-0.15.x/hw/pcie.c | 2 +- qemu-0.15.x/hw/petalogix_s3adsp1800_mmu.c | 2 +- qemu-0.15.x/hw/ptimer.c | 4 +- qemu-0.15.x/hw/pxa2xx.c | 2 +- qemu-0.15.x/hw/qxl.c | 2 +- qemu-0.15.x/hw/sh_intc.c | 12 +- qemu-0.15.x/hw/shix.c | 2 +- qemu-0.15.x/hw/stellaris.c | 2 +- qemu-0.15.x/hw/tsc2005.c | 2 +- qemu-0.15.x/hw/tsc210x.c | 2 +- qemu-0.15.x/hw/usb-musb.c | 10 +- qemu-0.15.x/hw/usb-ohci.c | 14 +- qemu-0.15.x/hw/usb-uhci.c | 16 +- qemu-0.15.x/hw/usb.c | 6 +- qemu-0.15.x/hw/vga.c | 6 +- qemu-0.15.x/hw/virtio-blk.c | 4 +- qemu-0.15.x/hw/virtio-net.c | 2 +- qemu-0.15.x/hw/wm8750.c | 2 +- qemu-0.15.x/hw/xilinx_ethlite.c | 2 +- qemu-0.15.x/hw/xilinx_intc.c | 2 +- qemu-0.15.x/hw/xilinx_timer.c | 4 +- qemu-0.15.x/input.c | 2 +- qemu-0.15.x/json-lexer.c | 2 +- qemu-0.15.x/json-parser.c | 10 +- qemu-0.15.x/json-parser.h | 2 +- qemu-0.15.x/linux-user/main.c | 72 +- qemu-0.15.x/linux-user/mmap.c | 10 +- qemu-0.15.x/linux-user/signal.c | 38 +- qemu-0.15.x/linux-user/syscall.c | 38 +- qemu-0.15.x/linux-user/syscall_defs.h | 2 +- qemu-0.15.x/linux-user/uaccess.c | 2 +- qemu-0.15.x/microblaze-dis.c | 96 +- qemu-0.15.x/migration.c | 6 +- qemu-0.15.x/monitor.c | 14 +- qemu-0.15.x/qemu-img.c | 2 +- qemu-0.15.x/qemu-log.h | 2 +- qemu-0.15.x/qemu-tech.texi | 2 +- qemu-0.15.x/qemu-timer.c | 4 +- qemu-0.15.x/qerror.c | 2 +- qemu-0.15.x/qjson.c | 2 +- qemu-0.15.x/qlist.c | 2 +- qemu-0.15.x/qmp-commands.hx | 8 +- qemu-0.15.x/readline.c | 2 +- qemu-0.15.x/roms/SLOF/INSTALL | 10 +- qemu-0.15.x/roms/SLOF/LICENSE | 2 +- qemu-0.15.x/roms/SLOF/Makefile.gen | 8 +- qemu-0.15.x/roms/SLOF/README | 32 +- qemu-0.15.x/roms/SLOF/board-js2x/Makefile | 6 +- qemu-0.15.x/roms/SLOF/board-js2x/llfw/Makefile | 2 +- qemu-0.15.x/roms/SLOF/board-js2x/llfw/board_io.S | 4 +- qemu-0.15.x/roms/SLOF/board-js2x/llfw/stage2.lds | 2 +- qemu-0.15.x/roms/SLOF/board-js2x/llfw/stage_s.lds | 2 +- qemu-0.15.x/roms/SLOF/board-js2x/llfw/startup.S | 14 +- qemu-0.15.x/roms/SLOF/board-js2x/rtas/Makefile | 6 +- qemu-0.15.x/roms/SLOF/board-js2x/slof/OF.fs | 20 +- qemu-0.15.x/roms/SLOF/board-js2x/slof/attu.fs | 8 +- .../roms/SLOF/board-js2x/slof/citrine-disk.fs | 18 +- qemu-0.15.x/roms/SLOF/board-js2x/slof/citrine.fs | 14 +- qemu-0.15.x/roms/SLOF/board-js2x/slof/ht.fs | 20 +- qemu-0.15.x/roms/SLOF/board-js2x/slof/ipmi-vpd.fs | 4 +- .../roms/SLOF/board-js2x/slof/pci-aliases.fs | 18 +- .../SLOF/board-js2x/slof/pci-bridge_1022_7460.fs | 4 +- .../roms/SLOF/board-js2x/slof/pci-class_03.fs | 2 +- .../roms/SLOF/board-js2x/slof/pci-interrupts.fs | 36 +- qemu-0.15.x/roms/SLOF/board-js2x/slof/rtas.fs | 10 +- qemu-0.15.x/roms/SLOF/board-js2x/slof/serial.fs | 2 +- qemu-0.15.x/roms/SLOF/board-js2x/slof/tpm.fs | 2 +- qemu-0.15.x/roms/SLOF/board-js2x/slof/u4-mem.fs | 2 +- .../roms/SLOF/board-js2x/slof/vga-display.fs | 70 +- qemu-0.15.x/roms/SLOF/board-qemu/Makefile | 6 +- qemu-0.15.x/roms/SLOF/board-qemu/llfw/Makefile | 2 +- qemu-0.15.x/roms/SLOF/board-qemu/llfw/startup.S | 4 +- qemu-0.15.x/roms/SLOF/board-qemu/slof/fdt.fs | 10 +- qemu-0.15.x/roms/SLOF/board-qemu/slof/helper.fs | 2 +- .../roms/SLOF/board-qemu/slof/qemu-bootlist.fs | 4 +- qemu-0.15.x/roms/SLOF/board-qemu/slof/tree.fs | 2 +- .../roms/SLOF/board-qemu/slof/vio-hvterm.fs | 2 +- qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-veth.fs | 4 +- .../roms/SLOF/board-qemu/slof/vio-vscsi-device.fs | 8 +- qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-vscsi.fs | 32 +- qemu-0.15.x/roms/SLOF/board-qemu/veth/Makefile | 2 +- .../roms/SLOF/board-qemu/veth/module_entry.c | 2 +- qemu-0.15.x/roms/SLOF/board-qemu/veth/veth.c | 4 +- qemu-0.15.x/roms/SLOF/board-qemu/veth/veth.lds | 10 +- qemu-0.15.x/roms/SLOF/clients/net-snk/Makefile | 8 +- qemu-0.15.x/roms/SLOF/clients/net-snk/app/Makefile | 6 +- .../roms/SLOF/clients/net-snk/app/biosemu/Makefile | 2 +- .../roms/SLOF/clients/net-snk/app/netapps/Makefile | 6 +- .../SLOF/clients/net-snk/app/netapps/netboot.c | 10 +- .../SLOF/clients/net-snk/app/netapps/netflash.c | 4 +- .../roms/SLOF/clients/net-snk/app/netlib/Makefile | 4 +- .../roms/SLOF/clients/net-snk/app/netlib/bootp.c | 52 +- .../roms/SLOF/clients/net-snk/app/netlib/dhcp.c | 36 +- .../roms/SLOF/clients/net-snk/app/netlib/dns.c | 16 +- .../SLOF/clients/net-snk/app/netlib/ethernet.c | 6 +- .../roms/SLOF/clients/net-snk/app/netlib/ipv4.c | 2 +- .../roms/SLOF/clients/net-snk/app/netlib/tftp.c | 18 +- qemu-0.15.x/roms/SLOF/clients/net-snk/client.lds | 2 +- qemu-0.15.x/roms/SLOF/clients/net-snk/include/of.h | 2 +- .../roms/SLOF/clients/net-snk/include/systemcall.h | 60 +- .../roms/SLOF/clients/net-snk/kernel/Makefile | 4 +- .../roms/SLOF/clients/net-snk/kernel/endian.c | 4 +- .../roms/SLOF/clients/net-snk/kernel/entry.S | 36 +- .../roms/SLOF/clients/net-snk/kernel/lowmem.S | 61 +- .../roms/SLOF/clients/net-snk/kernel/modules.c | 2 +- .../roms/SLOF/clients/net-snk/kernel/systemcall.c | 4 +- .../roms/SLOF/clients/net-snk/kernel/timer.c | 2 +- .../roms/SLOF/clients/net-snk/oflib/Makefile | 4 +- .../roms/SLOF/clients/net-snk/sec-client.lds | 6 +- qemu-0.15.x/roms/SLOF/clients/takeover/Makefile | 4 +- qemu-0.15.x/roms/SLOF/clients/takeover/client.lds | 2 +- qemu-0.15.x/roms/SLOF/lib/libbootmsg/Makefile | 6 +- qemu-0.15.x/roms/SLOF/lib/libc/README.txt | 8 +- qemu-0.15.x/roms/SLOF/lib/libc/ctype/Makefile.inc | 2 +- qemu-0.15.x/roms/SLOF/lib/libc/ctype/isxdigit.c | 2 +- qemu-0.15.x/roms/SLOF/lib/libc/ctype/tolower.c | 2 +- qemu-0.15.x/roms/SLOF/lib/libc/stdio/Makefile.inc | 2 +- qemu-0.15.x/roms/SLOF/lib/libc/stdio/fprintf.c | 4 +- qemu-0.15.x/roms/SLOF/lib/libc/stdio/printf.c | 4 +- qemu-0.15.x/roms/SLOF/lib/libc/stdio/vsnprintf.c | 10 +- qemu-0.15.x/roms/SLOF/lib/libc/stdio/vsscanf.c | 27 +- qemu-0.15.x/roms/SLOF/lib/libc/stdlib/Makefile.inc | 4 +- qemu-0.15.x/roms/SLOF/lib/libc/string/Makefile.inc | 2 +- qemu-0.15.x/roms/SLOF/lib/libnvram/envvar.c | 4 +- qemu-0.15.x/roms/SLOF/lib/libnvram/libnvram.code | 2 +- qemu-0.15.x/roms/SLOF/lib/libnvram/nvram.c | 28 +- qemu-0.15.x/roms/SLOF/llfw/boot_abort.S | 4 +- qemu-0.15.x/roms/SLOF/llfw/io_generic/Makefile.inc | 2 +- qemu-0.15.x/roms/SLOF/llfw/nvramlog.S | 80 +- qemu-0.15.x/roms/SLOF/llfw/romfs.S | 38 +- qemu-0.15.x/roms/SLOF/other-licence/Makefile | 6 +- qemu-0.15.x/roms/SLOF/other-licence/bcm/Makefile | 6 +- qemu-0.15.x/roms/SLOF/other-licence/bcm/bcm57xx.c | 49 +- .../roms/SLOF/other-licence/common/module.lds | 12 +- .../roms/SLOF/other-licence/common/module_entry.c | 2 +- .../roms/SLOF/other-licence/x86emu/Makefile | 6 +- qemu-0.15.x/roms/SLOF/romfs/tools/Makefile | 2 +- qemu-0.15.x/roms/SLOF/romfs/tools/cfg_parse.c | 2 +- qemu-0.15.x/roms/SLOF/rtas/reloc.S | 61 +- qemu-0.15.x/roms/SLOF/rtas/rtas_call.c | 4 +- qemu-0.15.x/roms/SLOF/rtas/rtas_entry.S | 22 +- qemu-0.15.x/roms/SLOF/slof/Makefile.inc | 6 +- qemu-0.15.x/roms/SLOF/slof/OF.lds | 6 +- qemu-0.15.x/roms/SLOF/slof/entry.S | 10 +- qemu-0.15.x/roms/SLOF/slof/fs/claim.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/client.fs | 18 +- qemu-0.15.x/roms/SLOF/slof/fs/debug.fs | 4 +- .../SLOF/slof/fs/devices/pci-device_10de_0141.fs | 4 +- qemu-0.15.x/roms/SLOF/slof/fs/elf.fs | 10 +- qemu-0.15.x/roms/SLOF/slof/fs/envvar.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/fcode/1275.fs | 56 +- qemu-0.15.x/roms/SLOF/slof/fs/fcode/core.fs | 30 +- qemu-0.15.x/roms/SLOF/slof/fs/fcode/evaluator.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/fcode/tokens.fs | 328 +++--- qemu-0.15.x/roms/SLOF/slof/fs/generic-disk.fs | 12 +- qemu-0.15.x/roms/SLOF/slof/fs/history.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/ide.fs | 80 +- qemu-0.15.x/roms/SLOF/slof/fs/logging.fs | 4 +- .../roms/SLOF/slof/fs/packages/fat-files.fs | 4 +- qemu-0.15.x/roms/SLOF/slof/fs/packages/obp-tftp.fs | 10 +- .../roms/SLOF/slof/fs/packages/rom-files.fs | 8 +- qemu-0.15.x/roms/SLOF/slof/fs/pci-config-bridge.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/pci-device.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/pci-properties.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/preprocessor.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/root.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/scsi-support.fs | 4 +- qemu-0.15.x/roms/SLOF/slof/fs/term-io.fs | 12 +- qemu-0.15.x/roms/SLOF/slof/fs/translate.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-enumerate.fs | 16 +- qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-hub.fs | 103 +- .../SLOF/slof/fs/usb/usb-kbd-device-support.fs | 22 +- qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-keyboard.fs | 172 +-- qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-ohci.fs | 2 +- qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-static.fs | 6 +- qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-storage.fs | 10 +- qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-support.fs | 38 +- qemu-0.15.x/roms/SLOF/slof/fs/vpd-bootlist.fs | 4 +- qemu-0.15.x/roms/SLOF/slof/prim.code | 2 +- qemu-0.15.x/roms/SLOF/tools/gen_reloc_table.c | 4 +- qemu-0.15.x/roms/ipxe/src/Makefile.housekeeping | 8 +- .../roms/ipxe/src/arch/i386/core/freebsd_loader.c | 84 +- .../roms/ipxe/src/arch/i386/core/nulltrap.c | 2 +- .../roms/ipxe/src/arch/i386/core/relocate.c | 4 +- qemu-0.15.x/roms/ipxe/src/arch/i386/core/timer2.c | 2 +- .../roms/ipxe/src/arch/i386/core/wince_loader.c | 84 +- .../roms/ipxe/src/arch/i386/drivers/net/undinet.c | 2 +- .../roms/ipxe/src/arch/i386/drivers/net/undirom.c | 2 +- qemu-0.15.x/roms/ipxe/src/arch/i386/image/com32.c | 4 +- .../roms/ipxe/src/arch/i386/image/comboot.c | 8 +- .../ipxe/src/arch/i386/include/bits/byteswap.h | 2 +- .../roms/ipxe/src/arch/i386/include/comboot.h | 4 +- .../roms/ipxe/src/arch/i386/include/int13.h | 2 +- .../roms/ipxe/src/arch/i386/include/pxe_api.h | 4 +- qemu-0.15.x/roms/ipxe/src/arch/i386/include/undi.h | 2 +- qemu-0.15.x/roms/ipxe/src/arch/i386/include/vga.h | 10 +- .../ipxe/src/arch/i386/interface/pcbios/int13.c | 10 +- .../ipxe/src/arch/i386/interface/pxe/pxe_entry.S | 2 +- .../ipxe/src/arch/i386/interface/pxe/pxe_tftp.c | 4 +- .../ipxe/src/arch/i386/interface/pxe/pxe_undi.c | 2 +- .../src/arch/i386/interface/syslinux/com32_call.c | 8 +- .../arch/i386/interface/syslinux/comboot_call.c | 2 +- qemu-0.15.x/roms/ipxe/src/arch/i386/kir-Makefile | 2 +- .../roms/ipxe/src/arch/i386/prefix/dskprefix.S | 44 +- .../roms/ipxe/src/arch/i386/prefix/libprefix.S | 2 +- .../roms/ipxe/src/arch/i386/prefix/lkrnprefix.S | 24 +- .../roms/ipxe/src/arch/i386/prefix/romprefix.S | 2 +- .../roms/ipxe/src/arch/i386/prefix/unnrv2b.S | 2 +- .../roms/ipxe/src/arch/i386/scripts/i386-kir.lds | 4 +- .../roms/ipxe/src/arch/i386/transitions/libkir.S | 2 +- .../roms/ipxe/src/arch/i386/transitions/librm.S | 8 +- .../roms/ipxe/src/arch/x86/include/bits/string.h | 2 +- .../ipxe/src/arch/x86/include/valgrind/memcheck.h | 20 +- .../ipxe/src/arch/x86/include/valgrind/valgrind.h | 48 +- qemu-0.15.x/roms/ipxe/src/core/ansiesc.c | 2 +- qemu-0.15.x/roms/ipxe/src/core/btext.c | 6 +- qemu-0.15.x/roms/ipxe/src/core/i82365.c | 28 +- qemu-0.15.x/roms/ipxe/src/core/malloc.c | 4 +- qemu-0.15.x/roms/ipxe/src/core/pcmcia.c | 2 +- qemu-0.15.x/roms/ipxe/src/core/serial.c | 2 +- qemu-0.15.x/roms/ipxe/src/core/settings.c | 4 +- qemu-0.15.x/roms/ipxe/src/core/string.c | 2 +- qemu-0.15.x/roms/ipxe/src/core/stringextra.c | 2 +- qemu-0.15.x/roms/ipxe/src/core/vsprintf.c | 2 +- qemu-0.15.x/roms/ipxe/src/crypto/axtls/aes.c | 26 +- qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint.c | 120 +- qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint.h | 4 +- .../roms/ipxe/src/crypto/axtls/bigint_impl.h | 8 +- qemu-0.15.x/roms/ipxe/src/crypto/axtls/crypto.h | 50 +- qemu-0.15.x/roms/ipxe/src/crypto/axtls/os_port.h | 2 +- qemu-0.15.x/roms/ipxe/src/crypto/axtls/rsa.c | 20 +- qemu-0.15.x/roms/ipxe/src/crypto/axtls/sha1.c | 2 +- qemu-0.15.x/roms/ipxe/src/crypto/md5.c | 6 +- qemu-0.15.x/roms/ipxe/src/doxygen.cfg | 1242 ++++++++++---------- .../roms/ipxe/src/drivers/bitbash/bitbash.c | 2 +- .../roms/ipxe/src/drivers/bitbash/spi_bit.c | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/bus/isa_ids.c | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/bus/pci.c | 2 +- .../roms/ipxe/src/drivers/infiniband/MT25218_PRM.h | 344 +++--- .../roms/ipxe/src/drivers/infiniband/MT25408_PRM.h | 264 ++--- .../roms/ipxe/src/drivers/infiniband/arbel.c | 4 +- qemu-0.15.x/roms/ipxe/src/drivers/net/3c509-eisa.c | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/net/3c509.c | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/net/3c595.c | 14 +- qemu-0.15.x/roms/ipxe/src/drivers/net/3c595.h | 10 +- qemu-0.15.x/roms/ipxe/src/drivers/net/3c5x9.c | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/net/3c90x.c | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/net/amd8111e.c | 36 +- qemu-0.15.x/roms/ipxe/src/drivers/net/amd8111e.h | 26 +- qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2.c | 34 +- qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2.h | 80 +- qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2_fw.h | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.c | 12 +- qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.h | 4 +- qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.txt | 4 +- qemu-0.15.x/roms/ipxe/src/drivers/net/davicom.c | 20 +- qemu-0.15.x/roms/ipxe/src/drivers/net/depca.c | 50 +- qemu-0.15.x/roms/ipxe/src/drivers/net/dmfe.c | 8 +- qemu-0.15.x/roms/ipxe/src/drivers/net/eepro.c | 8 +- qemu-0.15.x/roms/ipxe/src/drivers/net/eepro100.c | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/net/epic100.c | 4 +- .../roms/ipxe/src/drivers/net/etherfabric.c | 52 +- qemu-0.15.x/roms/ipxe/src/drivers/net/hfa384x.h | 192 +-- qemu-0.15.x/roms/ipxe/src/drivers/net/natsemi.c | 102 +- qemu-0.15.x/roms/ipxe/src/drivers/net/natsemi.h | 74 +- qemu-0.15.x/roms/ipxe/src/drivers/net/ns83820.c | 20 +- qemu-0.15.x/roms/ipxe/src/drivers/net/ns8390.c | 8 +- qemu-0.15.x/roms/ipxe/src/drivers/net/p80211hdr.h | 12 +- .../src/drivers/net/phantom/nxhal_nic_interface.h | 36 +- .../roms/ipxe/src/drivers/net/phantom/phantom.c | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/net/pnic.c | 4 +- qemu-0.15.x/roms/ipxe/src/drivers/net/pnic_api.h | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/net/prism2.c | 52 +- qemu-0.15.x/roms/ipxe/src/drivers/net/prism2_plx.c | 4 +- qemu-0.15.x/roms/ipxe/src/drivers/net/rtl8139.c | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/net/sis900.c | 142 +-- qemu-0.15.x/roms/ipxe/src/drivers/net/sis900.h | 100 +- qemu-0.15.x/roms/ipxe/src/drivers/net/smc9000.c | 4 +- qemu-0.15.x/roms/ipxe/src/drivers/net/sundance.c | 6 +- qemu-0.15.x/roms/ipxe/src/drivers/net/tg3.c | 40 +- qemu-0.15.x/roms/ipxe/src/drivers/net/tlan.c | 32 +- qemu-0.15.x/roms/ipxe/src/drivers/net/tulip.c | 52 +- qemu-0.15.x/roms/ipxe/src/drivers/net/tulip.txt | 4 +- qemu-0.15.x/roms/ipxe/src/drivers/net/via-rhine.c | 12 +- .../roms/ipxe/src/drivers/net/via-velocity.c | 34 +- .../roms/ipxe/src/drivers/net/via-velocity.h | 2 +- qemu-0.15.x/roms/ipxe/src/drivers/net/w89c840.c | 10 +- .../roms/ipxe/src/drivers/net/wlan_compat.h | 20 +- qemu-0.15.x/roms/ipxe/src/hci/editstring.c | 2 +- qemu-0.15.x/roms/ipxe/src/hci/mucurses/kb.c | 2 +- qemu-0.15.x/roms/ipxe/src/hci/mucurses/slk.c | 22 +- qemu-0.15.x/roms/ipxe/src/hci/mucurses/winattrs.c | 10 +- qemu-0.15.x/roms/ipxe/src/hci/mucurses/windows.c | 2 +- qemu-0.15.x/roms/ipxe/src/hci/strerror.c | 2 +- qemu-0.15.x/roms/ipxe/src/include/assert.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/bootp.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/btext.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/coff.h | 4 +- qemu-0.15.x/roms/ipxe/src/include/compiler.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/curses.h | 4 +- qemu-0.15.x/roms/ipxe/src/include/i82365.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/ansiesc.h | 4 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/aoe.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/bitbash.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/dhcp.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/dhcppkt.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/ibft.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/isa_ids.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/keys.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/pci.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/spi_bit.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/tcpip.h | 4 +- qemu-0.15.x/roms/ipxe/src/include/ipxe/tftp.h | 2 +- qemu-0.15.x/roms/ipxe/src/include/sys_info.h | 2 +- qemu-0.15.x/roms/ipxe/src/net/ethernet.c | 2 +- qemu-0.15.x/roms/ipxe/src/net/ipv4.c | 12 +- qemu-0.15.x/roms/ipxe/src/net/ipv6.c | 18 +- qemu-0.15.x/roms/ipxe/src/net/ndp.c | 8 +- qemu-0.15.x/roms/ipxe/src/net/retry.c | 2 +- qemu-0.15.x/roms/ipxe/src/net/tcp.c | 2 +- qemu-0.15.x/roms/ipxe/src/net/tcp/ftp.c | 2 +- qemu-0.15.x/roms/ipxe/src/net/tcp/http.c | 2 +- qemu-0.15.x/roms/ipxe/src/net/tcp/iscsi.c | 6 +- qemu-0.15.x/roms/ipxe/src/net/tcpip.c | 2 +- qemu-0.15.x/roms/ipxe/src/net/udp/dns.c | 2 +- qemu-0.15.x/roms/ipxe/src/net/udp/slam.c | 4 +- qemu-0.15.x/roms/ipxe/src/net/udp/tftp.c | 2 +- qemu-0.15.x/roms/ipxe/src/tests/linebuf_test.c | 2 +- qemu-0.15.x/roms/ipxe/src/util/Option/ROM.pm | 4 +- qemu-0.15.x/roms/ipxe/src/util/catrom.pl | 2 +- qemu-0.15.x/roms/ipxe/src/util/nrv2b.c | 8 +- qemu-0.15.x/roms/seabios/COPYING.LESSER | 4 +- qemu-0.15.x/roms/seabios/src/acpi-dsdt.hex | 6 +- qemu-0.15.x/roms/seabios/src/jpeg.c | 12 +- qemu-0.15.x/roms/seabios/src/lzmadecode.c | 40 +- qemu-0.15.x/roms/seabios/src/lzmadecode.h | 12 +- qemu-0.15.x/roms/seabios/src/pci_ids.h | 12 +- qemu-0.15.x/roms/seabios/src/vgahooks.c | 2 +- .../roms/seabios/tools/kconfig/lex.zconf.c_shipped | 84 +- .../seabios/tools/kconfig/lxdialog/BIG.FAT.WARNING | 2 +- .../roms/seabios/tools/kconfig/lxdialog/menubox.c | 2 +- .../roms/seabios/tools/kconfig/zconf.tab.c_shipped | 10 +- qemu-0.15.x/roms/vgabios/COPYING | 2 +- qemu-0.15.x/roms/vgabios/Makefile | 6 +- qemu-0.15.x/roms/vgabios/README | 4 +- qemu-0.15.x/roms/vgabios/clext.c | 4 +- qemu-0.15.x/roms/vgabios/vbe.c | 58 +- qemu-0.15.x/roms/vgabios/vbe.h | 4 +- qemu-0.15.x/roms/vgabios/vbe_display_api.txt | 6 +- qemu-0.15.x/roms/vgabios/vbetables-gen.c | 24 +- qemu-0.15.x/roms/vgabios/vgabios.c | 144 +-- qemu-0.15.x/roms/vgabios/vgafonts.h | 2 +- qemu-0.15.x/roms/vgabios/vgatables.h | 10 +- qemu-0.15.x/savevm.c | 20 +- qemu-0.15.x/serialice.c | 2 +- qemu-0.15.x/slirp/slirp.c | 2 +- qemu-0.15.x/softmmu_template.h | 2 +- qemu-0.15.x/target-cris/helper.c | 12 +- qemu-0.15.x/target-cris/mmu.c | 18 +- qemu-0.15.x/target-cris/op_helper.c | 22 +- qemu-0.15.x/target-cris/translate.c | 64 +- qemu-0.15.x/target-cris/translate_v10.c | 8 +- qemu-0.15.x/target-i386/TODO | 4 +- qemu-0.15.x/target-i386/cpu.h | 4 +- qemu-0.15.x/target-i386/helper.c | 2 +- qemu-0.15.x/target-i386/op_helper.c | 82 +- qemu-0.15.x/target-i386/translate.c | 136 +-- qemu-0.15.x/target-microblaze/mmu.c | 2 +- qemu-0.15.x/target-microblaze/translate.c | 8 +- qemu-0.15.x/target-mips/op_helper.c | 2 +- qemu-0.15.x/target-ppc/translate_init.c | 2 +- qemu-0.15.x/target-sh4/helper.c | 2 +- qemu-0.15.x/target-sh4/op_helper.c | 4 +- qemu-0.15.x/target-sh4/translate.c | 2 +- qemu-0.15.x/tcg/README | 10 +- qemu-0.15.x/tcg/TODO | 2 +- qemu-0.15.x/tcg/i386/tcg-target.h | 2 +- qemu-0.15.x/tcg/tcg-op.h | 20 +- qemu-0.15.x/tcg/tcg.c | 120 +- qemu-0.15.x/tcg/tcg.h | 12 +- qemu-0.15.x/tests/test-mmap.c | 72 +- qemu-0.15.x/translate-all.c | 2 +- qemu-0.15.x/ui/curses.c | 4 +- qemu-0.15.x/ui/curses_keys.h | 4 +- qemu-0.15.x/ui/sdl.c | 4 +- qemu-0.15.x/ui/sdl_zoom.c | 2 +- qemu-0.15.x/ui/sdl_zoom.h | 2 +- qemu-0.15.x/ui/sdl_zoom_template.h | 20 +- qemu-0.15.x/ui/vnc.c | 6 +- qemu-0.15.x/vl.c | 2 +- 437 files changed, 4024 insertions(+), 4033 deletions(-)
diff --git a/Makefile b/Makefile index 95d2bb1..ffde0b0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ## -## SerialICE +## SerialICE ## ## Copyright (C) 2009 coresystems GmbH ## diff --git a/SerialICE/Makefile b/SerialICE/Makefile index e764992..a862bf2 100644 --- a/SerialICE/Makefile +++ b/SerialICE/Makefile @@ -177,5 +177,3 @@ $(obj)/%.o: $(obj)/%.S
dongle: $(TARGET-y) dongle.py -v -c /dev/cu.usbserial-00* $(TARGET-y) EOF - - diff --git a/qemu-0.15.x/QMP/qmp-shell b/qemu-0.15.x/QMP/qmp-shell index 42dabc8..e2b4539 100755 --- a/qemu-0.15.x/QMP/qmp-shell +++ b/qemu-0.15.x/QMP/qmp-shell @@ -89,7 +89,7 @@ class QMPShell(qmp.QEMUMonitorProtocol): """ Build a QMP input object from a user provided command-line in the following format: - + < command-name > [ arg-name1=arg1 ] ... [ arg-nameN=argN ] """ cmdargs = cmdline.split() diff --git a/qemu-0.15.x/QMP/qmp.py b/qemu-0.15.x/QMP/qmp.py index c7dbea0..62c8dcb 100644 --- a/qemu-0.15.x/QMP/qmp.py +++ b/qemu-0.15.x/QMP/qmp.py @@ -1,5 +1,5 @@ # QEMU Monitor Protocol Python class -# +# # Copyright (C) 2009, 2010 Red Hat Inc. # # Authors: diff --git a/qemu-0.15.x/block.c b/qemu-0.15.x/block.c index 9549b9e..4394307 100644 --- a/qemu-0.15.x/block.c +++ b/qemu-0.15.x/block.c @@ -770,7 +770,7 @@ int bdrv_commit(BlockDriverState *bs)
if (!drv) return -ENOMEDIUM; - + if (!bs->backing_hd) { return -ENOTSUP; } diff --git a/qemu-0.15.x/block/curl.c b/qemu-0.15.x/block/curl.c index 407f095..0429939 100644 --- a/qemu-0.15.x/block/curl.c +++ b/qemu-0.15.x/block/curl.c @@ -277,7 +277,7 @@ static CURLState *curl_init_state(BDRVCURLState *s) curl_easy_setopt(state->curl, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(state->curl, CURLOPT_NOSIGNAL, 1); curl_easy_setopt(state->curl, CURLOPT_ERRORBUFFER, state->errmsg); - + #ifdef DEBUG_VERBOSE curl_easy_setopt(state->curl, CURLOPT_VERBOSE, 1); #endif @@ -379,8 +379,8 @@ static int curl_open(BlockDriverState *bs, const char *filename, int flags) // initialize the multi interface!
s->multi = curl_multi_init(); - curl_multi_setopt( s->multi, CURLMOPT_SOCKETDATA, s); - curl_multi_setopt( s->multi, CURLMOPT_SOCKETFUNCTION, curl_sock_cb ); + curl_multi_setopt( s->multi, CURLMOPT_SOCKETDATA, s); + curl_multi_setopt( s->multi, CURLMOPT_SOCKETFUNCTION, curl_sock_cb ); curl_multi_do(s);
return 0; diff --git a/qemu-0.15.x/block/qcow2.c b/qemu-0.15.x/block/qcow2.c index 48e1b95..278497e 100644 --- a/qemu-0.15.x/block/qcow2.c +++ b/qemu-0.15.x/block/qcow2.c @@ -67,7 +67,7 @@ static int qcow2_probe(const uint8_t *buf, int buf_size, const char *filename) }
-/* +/* * read qcow2 extension and fill bs * start reading from start_offset * finish reading upon magic of value 0 or when end_offset reached diff --git a/qemu-0.15.x/buffered_file.c b/qemu-0.15.x/buffered_file.c index 41b42c3..a661570 100644 --- a/qemu-0.15.x/buffered_file.c +++ b/qemu-0.15.x/buffered_file.c @@ -216,7 +216,7 @@ static int64_t buffered_set_rate_limit(void *opaque, int64_t new_rate) }
s->xfer_limit = new_rate / 10; - + out: return s->xfer_limit; } @@ -224,7 +224,7 @@ out: static int64_t buffered_get_rate_limit(void *opaque) { QEMUFileBuffered *s = opaque; - + return s->xfer_limit; }
diff --git a/qemu-0.15.x/check-qjson.c b/qemu-0.15.x/check-qjson.c index 36d4ac2..7c9c22b 100644 --- a/qemu-0.15.x/check-qjson.c +++ b/qemu-0.15.x/check-qjson.c @@ -54,7 +54,7 @@ START_TEST(escaped_string)
fail_unless(obj != NULL); fail_unless(qobject_type(obj) == QTYPE_QSTRING); - + str = qobject_to_qstring(obj); fail_unless(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0, "%s != %s\n", qstring_get_str(str), test_cases[i].decoded); @@ -94,7 +94,7 @@ START_TEST(simple_string)
fail_unless(obj != NULL); fail_unless(qobject_type(obj) == QTYPE_QSTRING); - + str = qobject_to_qstring(obj); fail_unless(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);
@@ -102,7 +102,7 @@ START_TEST(simple_string) fail_unless(strcmp(qstring_get_str(str), test_cases[i].encoded) == 0);
qobject_decref(obj); - + QDECREF(str); } } @@ -129,7 +129,7 @@ START_TEST(single_quote_string)
fail_unless(obj != NULL); fail_unless(qobject_type(obj) == QTYPE_QSTRING); - + str = qobject_to_qstring(obj); fail_unless(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);
@@ -157,7 +157,7 @@ START_TEST(vararg_string)
fail_unless(obj != NULL); fail_unless(qobject_type(obj) == QTYPE_QSTRING); - + str = qobject_to_qstring(obj); fail_unless(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);
@@ -322,7 +322,7 @@ START_TEST(keyword_literal) fail_unless(qbool_get_int(qbool) == 0);
QDECREF(qbool); - + obj = qobject_from_jsonf("%i", true); fail_unless(obj != NULL); fail_unless(qobject_type(obj) == QTYPE_QBOOL); @@ -414,7 +414,7 @@ static int compare_litqobj_to_qobj(LiteralQObject *lhs, QObject *rhs) helper.index = 0; helper.objs = lhs->value.qlist; helper.result = 1; - + qlist_iter(qobject_to_qlist(rhs), compare_helper, &helper);
return helper.result; @@ -786,10 +786,10 @@ int main(void)
s = qjson_suite(); sr = srunner_create(s); - + srunner_run_all(sr, CK_NORMAL); nf = srunner_ntests_failed(sr); srunner_free(sr); - + return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/qemu-0.15.x/console.c b/qemu-0.15.x/console.c index 242086c..b8e3113 100644 --- a/qemu-0.15.x/console.c +++ b/qemu-0.15.x/console.c @@ -1404,7 +1404,7 @@ DisplayState *graphic_console_init(vga_hw_update_ptr update, DisplayState *ds;
ds = (DisplayState *) qemu_mallocz(sizeof(DisplayState)); - ds->allocator = &default_allocator; + ds->allocator = &default_allocator; ds->surface = qemu_create_displaysurface(ds, 640, 480);
s = new_console(ds, GRAPHIC_CONSOLE); diff --git a/qemu-0.15.x/console.h b/qemu-0.15.x/console.h index 3e34577..830648d 100644 --- a/qemu-0.15.x/console.h +++ b/qemu-0.15.x/console.h @@ -200,7 +200,7 @@ DisplayAllocator *register_displayallocator(DisplayState *ds, DisplayAllocator *
static inline DisplaySurface* qemu_create_displaysurface(DisplayState *ds, int width, int height) { - return ds->allocator->create_displaysurface(width, height); + return ds->allocator->create_displaysurface(width, height); }
static inline DisplaySurface* qemu_resize_displaysurface(DisplayState *ds, int width, int height) diff --git a/qemu-0.15.x/cpu-all.h b/qemu-0.15.x/cpu-all.h index e839100..33651f1 100644 --- a/qemu-0.15.x/cpu-all.h +++ b/qemu-0.15.x/cpu-all.h @@ -942,7 +942,7 @@ extern int mem_prealloc; /* physical memory access */
/* MMIO pages are identified by a combination of an IO device index and - 3 flags. The ROMD code stores the page ram offset in iotlb entry, + 3 flags. The ROMD code stores the page ram offset in iotlb entry, so only a limited number of ids are avaiable. */
#define IO_MEM_NB_ENTRIES (1 << (TARGET_PAGE_BITS - IO_MEM_SHIFT)) diff --git a/qemu-0.15.x/cpu-defs.h b/qemu-0.15.x/cpu-defs.h index db48a7a..4cfd3f6 100644 --- a/qemu-0.15.x/cpu-defs.h +++ b/qemu-0.15.x/cpu-defs.h @@ -102,9 +102,9 @@ typedef struct CPUTLBEntry { use the corresponding iotlb value. */ unsigned long addend; /* padding to get a power of two size */ - uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - - (sizeof(target_ulong) * 3 + - ((-sizeof(target_ulong) * 3) & (sizeof(unsigned long) - 1)) + + uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - + (sizeof(target_ulong) * 3 + + ((-sizeof(target_ulong) * 3) & (sizeof(unsigned long) - 1)) + sizeof(unsigned long))]; } CPUTLBEntry;
diff --git a/qemu-0.15.x/cpu-exec.c b/qemu-0.15.x/cpu-exec.c index de0d716..36dbb40 100644 --- a/qemu-0.15.x/cpu-exec.c +++ b/qemu-0.15.x/cpu-exec.c @@ -306,10 +306,10 @@ int cpu_exec(CPUState *env) do_interrupt_x86_hardirq(env, EXCP12_MCHK, 0); next_tb = 0; } else if ((interrupt_request & CPU_INTERRUPT_HARD) && - (((env->hflags2 & HF2_VINTR_MASK) && + (((env->hflags2 & HF2_VINTR_MASK) && (env->hflags2 & HF2_HIF_MASK)) || - (!(env->hflags2 & HF2_VINTR_MASK) && - (env->eflags & IF_MASK && + (!(env->hflags2 & HF2_VINTR_MASK) && + (env->eflags & IF_MASK && !(env->hflags & HF_INHIBIT_IRQ_MASK))))) { int intno; svm_check_intercept(env, SVM_EXIT_INTR); @@ -322,7 +322,7 @@ int cpu_exec(CPUState *env) next_tb = 0; #if !defined(CONFIG_USER_ONLY) } else if ((interrupt_request & CPU_INTERRUPT_VIRQ) && - (env->eflags & IF_MASK) && + (env->eflags & IF_MASK) && !(env->hflags & HF_INHIBIT_IRQ_MASK)) { int intno; /* FIXME: this should respect TPR */ diff --git a/qemu-0.15.x/cris-dis.c b/qemu-0.15.x/cris-dis.c index 5fa67d9..9f2ce3e 100644 --- a/qemu-0.15.x/cris-dis.c +++ b/qemu-0.15.x/cris-dis.c @@ -2611,7 +2611,7 @@ print_insn_cris_generic (bfd_vma memaddr, nbytes = info->buffer_length; if (nbytes > MAX_BYTES_PER_CRIS_INSN) nbytes = MAX_BYTES_PER_CRIS_INSN; - status = (*info->read_memory_func) (memaddr, buffer, nbytes, info); + status = (*info->read_memory_func) (memaddr, buffer, nbytes, info);
/* If we did not get all we asked for, then clear the rest. Hopefully this makes a reproducible result in case of errors. */ diff --git a/qemu-0.15.x/cutils.c b/qemu-0.15.x/cutils.c index f9a7e36..956065e 100644 --- a/qemu-0.15.x/cutils.c +++ b/qemu-0.15.x/cutils.c @@ -105,7 +105,7 @@ time_t mktimegm(struct tm *tm) m += 12; y--; } - t = 86400 * (d + (153 * m - 457) / 5 + 365 * y + y / 4 - y / 100 + + t = 86400 * (d + (153 * m - 457) / 5 + 365 * y + y / 4 - y / 100 + y / 400 - 719469); t += 3600 * tm->tm_hour + 60 * tm->tm_min + tm->tm_sec; return t; diff --git a/qemu-0.15.x/darwin-user/main.c b/qemu-0.15.x/darwin-user/main.c index 72307ad..8653dd1 100644 --- a/qemu-0.15.x/darwin-user/main.c +++ b/qemu-0.15.x/darwin-user/main.c @@ -852,7 +852,7 @@ int main(int argc, char **argv) #error unsupported CPU #endif } - + cpu_exec_init_all(0); /* NOTE: we need to init the CPU at this stage to get qemu_host_page_size */ diff --git a/qemu-0.15.x/docs/specs/qed_spec.txt b/qemu-0.15.x/docs/specs/qed_spec.txt index 7982e05..9fbaf69 100644 --- a/qemu-0.15.x/docs/specs/qed_spec.txt +++ b/qemu-0.15.x/docs/specs/qed_spec.txt @@ -15,18 +15,18 @@ All fields are little-endian. ==Header== Header { uint32_t magic; /* QED\0 */ - + uint32_t cluster_size; /* in bytes */ uint32_t table_size; /* for L1 and L2 tables, in clusters */ uint32_t header_size; /* in clusters */ - + uint64_t features; /* format feature bits */ uint64_t compat_features; /* compat feature bits */ uint64_t autoclear_features; /* self-resetting feature bits */
uint64_t l1_table_offset; /* in bytes */ uint64_t image_size; /* total logical image size, in bytes */ - + /* if (features & QED_F_BACKING_FILE) */ uint32_t backing_filename_offset; /* in bytes from start of header */ uint32_t backing_filename_size; /* in bytes */ @@ -58,7 +58,7 @@ Fields predicated on a feature bit are only used when that feature is set. The Tables provide the translation from logical offsets in the block device to cluster offsets in the file.
#define TABLE_NOFFSETS (table_size * cluster_size / sizeof(uint64_t)) - + Table { uint64_t offsets[TABLE_NOFFSETS]; } @@ -113,11 +113,11 @@ Logical offsets are translated into cluster offsets as follows: +----------+----------+-----------------+ | L1 index | L2 index | byte offset | +----------+----------+-----------------+ - + Structure of a logical offset
offset_mask = ~(cluster_size - 1) # mask for the image file byte offset - + def logical_to_cluster_offset(l1_index, l2_index, byte_offset): l2_offset = l1_table[l1_index] l2_table = load_table(l2_offset) diff --git a/qemu-0.15.x/docs/tracing.txt b/qemu-0.15.x/docs/tracing.txt index c99a0f2..acfdbac 100644 --- a/qemu-0.15.x/docs/tracing.txt +++ b/qemu-0.15.x/docs/tracing.txt @@ -173,7 +173,7 @@ The st_change_trace_event_state() function can be used to enable or disable trac events at runtime inside QEMU:
#include "trace.h" - + st_change_trace_event_state("virtio_irq", true); /* enable */ [...] st_change_trace_event_state("virtio_irq", false); /* disable */ diff --git a/qemu-0.15.x/error_int.h b/qemu-0.15.x/error_int.h index 5e39424..c0ff1dc 100644 --- a/qemu-0.15.x/error_int.h +++ b/qemu-0.15.x/error_int.h @@ -25,5 +25,5 @@ QDict *error_get_data(Error *err); QObject *error_get_qobject(Error *err); void error_set_qobject(Error **errp, QObject *obj); - + #endif diff --git a/qemu-0.15.x/exec-all.h b/qemu-0.15.x/exec-all.h index 3ac2883..e384998 100644 --- a/qemu-0.15.x/exec-all.h +++ b/qemu-0.15.x/exec-all.h @@ -89,7 +89,7 @@ int cpu_restore_state(struct TranslationBlock *tb, CPUState *env, unsigned long searched_pc); void cpu_resume_from_signal(CPUState *env1, void *puc); void cpu_io_recompile(CPUState *env, void *retaddr); -TranslationBlock *tb_gen_code(CPUState *env, +TranslationBlock *tb_gen_code(CPUState *env, target_ulong pc, target_ulong cs_base, int flags, int cflags); void cpu_exec_init(CPUState *env); diff --git a/qemu-0.15.x/exec.c b/qemu-0.15.x/exec.c index 2160ded..5407f77 100644 --- a/qemu-0.15.x/exec.c +++ b/qemu-0.15.x/exec.c @@ -229,21 +229,21 @@ static void map_exec(void *addr, long size) DWORD old_protect; VirtualProtect(addr, size, PAGE_EXECUTE_READWRITE, &old_protect); - + } #else static void map_exec(void *addr, long size) { unsigned long start, end, page_size; - + page_size = getpagesize(); start = (unsigned long)addr; start &= ~(page_size - 1); - + end = (unsigned long)addr + size; end += page_size - 1; end &= ~(page_size - 1); - + mprotect((void *)start, end - start, PROT_READ | PROT_WRITE | PROT_EXEC); } @@ -480,7 +480,7 @@ static void code_gen_alloc(unsigned long tb_size) code_gen_buffer_size = MIN_CODE_GEN_BUFFER_SIZE; /* The code gen buffer location may have constraints depending on the host cpu and OS */ -#if defined(__linux__) +#if defined(__linux__) { int flags; void *start = NULL; @@ -542,7 +542,7 @@ static void code_gen_alloc(unsigned long tb_size) } #endif code_gen_buffer = mmap(addr, code_gen_buffer_size, - PROT_WRITE | PROT_READ | PROT_EXEC, + PROT_WRITE | PROT_READ | PROT_EXEC, flags, -1, 0); if (code_gen_buffer == MAP_FAILED) { fprintf(stderr, "Could not allocate dynamic translator buffer\n"); @@ -1959,11 +1959,11 @@ static inline void tlb_flush_jmp_cache(CPUState *env, target_ulong addr) /* Discard jump cache entries for any tb which might potentially overlap the flushed page. */ i = tb_jmp_cache_hash_page(addr - TARGET_PAGE_SIZE); - memset (&env->tb_jmp_cache[i], 0, + memset (&env->tb_jmp_cache[i], 0, TB_JMP_PAGE_SIZE * sizeof(TranslationBlock *));
i = tb_jmp_cache_hash_page(addr); - memset (&env->tb_jmp_cache[i], 0, + memset (&env->tb_jmp_cache[i], 0, TB_JMP_PAGE_SIZE * sizeof(TranslationBlock *)); }
@@ -4624,7 +4624,7 @@ void cpu_io_recompile(CPUState *env, void *retaddr)
tb = tb_find_pc((unsigned long)retaddr); if (!tb) { - cpu_abort(env, "cpu_io_recompile: could not find TB for pc=%p", + cpu_abort(env, "cpu_io_recompile: could not find TB for pc=%p", retaddr); } n = env->icount_decr.u16.low + tb->icount; @@ -4703,7 +4703,7 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf) cpu_fprintf(f, "Translation buffer state:\n"); cpu_fprintf(f, "gen code size %td/%ld\n", code_gen_ptr - code_gen_buffer, code_gen_buffer_max_size); - cpu_fprintf(f, "TB count %d/%d\n", + cpu_fprintf(f, "TB count %d/%d\n", nb_tbs, code_gen_max_blocks); cpu_fprintf(f, "TB avg target size %d max=%d bytes\n", nb_tbs ? target_code_size / nb_tbs : 0, diff --git a/qemu-0.15.x/gdb-xml/cf-fp.xml b/qemu-0.15.x/gdb-xml/cf-fp.xml index bf71c32..d0a34e2 100644 --- a/qemu-0.15.x/gdb-xml/cf-fp.xml +++ b/qemu-0.15.x/gdb-xml/cf-fp.xml @@ -15,7 +15,7 @@ <reg name="fp6" bitsize="64" type="float" group="float"/> <reg name="fp7" bitsize="64" type="float" group="float"/>
- + <reg name="fpcontrol" bitsize="32" group="float"/> <reg name="fpstatus" bitsize="32" group="float"/>, <reg name="fpiaddr" bitsize="32" type="code_ptr" group="float"/> diff --git a/qemu-0.15.x/gdbstub.c b/qemu-0.15.x/gdbstub.c index 27b0cfa..7511d4d 100644 --- a/qemu-0.15.x/gdbstub.c +++ b/qemu-0.15.x/gdbstub.c @@ -1125,7 +1125,7 @@ static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n) } break; case 72: /* fp, ignored */ break; - default: + default: if (n > 89) return 0; /* Other registers are readonly. Ignore writes. */ @@ -2538,7 +2538,7 @@ gdb_handlesig (CPUState *env, int sig) snprintf(buf, sizeof(buf), "S%02x", target_signal_to_gdb (sig)); put_packet(s, buf); } - /* put_packet() might have detected that the peer terminated the + /* put_packet() might have detected that the peer terminated the connection. */ if (s->fd < 0) return sig; diff --git a/qemu-0.15.x/hw/acpi.c b/qemu-0.15.x/hw/acpi.c index ad40fb4..5b322b0 100644 --- a/qemu-0.15.x/hw/acpi.c +++ b/qemu-0.15.x/hw/acpi.c @@ -56,7 +56,7 @@ int acpi_table_add(const char *t) size_t off;
memset(&acpi_hdr, 0, sizeof(acpi_hdr)); - + if (get_param_value(buf, sizeof(buf), "sig", t)) { strncpy(acpi_hdr.signature, buf, 4); } else { @@ -106,7 +106,7 @@ int acpi_table_add(const char *t) val = 1; } acpi_hdr.asl_compiler_revision = cpu_to_le32(val); - + if (!get_param_value(buf, sizeof(buf), "data", t)) { buf[0] = '\0'; } diff --git a/qemu-0.15.x/hw/armv7m.c b/qemu-0.15.x/hw/armv7m.c index 83f3393..b61eda3 100644 --- a/qemu-0.15.x/hw/armv7m.c +++ b/qemu-0.15.x/hw/armv7m.c @@ -237,7 +237,7 @@ qemu_irq *armv7m_init(int flash_size, int sram_size, space. This stops qemu complaining about executing code outside RAM when returning from an exception. */ cpu_register_physical_memory(0xfffff000, 0x1000, - qemu_ram_alloc(NULL, "armv7m.hack", + qemu_ram_alloc(NULL, "armv7m.hack", 0x1000) | IO_MEM_RAM);
qemu_register_reset(armv7m_reset, env); diff --git a/qemu-0.15.x/hw/axis_dev88.c b/qemu-0.15.x/hw/axis_dev88.c index 0e2135a..605357d 100644 --- a/qemu-0.15.x/hw/axis_dev88.c +++ b/qemu-0.15.x/hw/axis_dev88.c @@ -270,7 +270,7 @@ void axisdev88_init (ram_addr_t ram_size, phys_ram = qemu_ram_alloc(NULL, "axisdev88.ram", ram_size); cpu_register_physical_memory(0x40000000, ram_size, phys_ram | IO_MEM_RAM);
- /* The ETRAX-FS has 128Kb on chip ram, the docs refer to it as the + /* The ETRAX-FS has 128Kb on chip ram, the docs refer to it as the internal memory. */ phys_intmem = qemu_ram_alloc(NULL, "axisdev88.chipram", INTMEM_SIZE); cpu_register_physical_memory(0x38000000, INTMEM_SIZE, diff --git a/qemu-0.15.x/hw/bitbang_i2c.c b/qemu-0.15.x/hw/bitbang_i2c.c index 53e9c5c..f6b0e54 100644 --- a/qemu-0.15.x/hw/bitbang_i2c.c +++ b/qemu-0.15.x/hw/bitbang_i2c.c @@ -122,7 +122,7 @@ int bitbang_i2c_set(bitbang_i2c_interface *i2c, int line, int level) case SENDING_BIT7 ... SENDING_BIT0: i2c->buffer = (i2c->buffer << 1) | data; /* will end up in WAITING_FOR_ACK */ - i2c->state++; + i2c->state++; return bitbang_i2c_ret(i2c, 1);
case WAITING_FOR_ACK: diff --git a/qemu-0.15.x/hw/bt.h b/qemu-0.15.x/hw/bt.h index 3797254..9412324 100644 --- a/qemu-0.15.x/hw/bt.h +++ b/qemu-0.15.x/hw/bt.h @@ -886,14 +886,14 @@ typedef struct { typedef struct { char name[248]; } __attribute__ ((packed)) change_local_name_cp; -#define CHANGE_LOCAL_NAME_CP_SIZE 248 +#define CHANGE_LOCAL_NAME_CP_SIZE 248
#define OCF_READ_LOCAL_NAME 0x0014 typedef struct { uint8_t status; char name[248]; } __attribute__ ((packed)) read_local_name_rp; -#define READ_LOCAL_NAME_RP_SIZE 249 +#define READ_LOCAL_NAME_RP_SIZE 249
#define OCF_READ_CONN_ACCEPT_TIMEOUT 0x0015 typedef struct { @@ -990,7 +990,7 @@ typedef struct { uint8_t status; uint8_t dev_class[3]; } __attribute__ ((packed)) read_class_of_dev_rp; -#define READ_CLASS_OF_DEV_RP_SIZE 4 +#define READ_CLASS_OF_DEV_RP_SIZE 4
#define OCF_WRITE_CLASS_OF_DEV 0x0024 typedef struct { diff --git a/qemu-0.15.x/hw/cris-boot.c b/qemu-0.15.x/hw/cris-boot.c index 37894f8..a96e890 100644 --- a/qemu-0.15.x/hw/cris-boot.c +++ b/qemu-0.15.x/hw/cris-boot.c @@ -67,7 +67,7 @@ void cris_load_image(CPUState *env, struct cris_load_info *li) int image_size;
env->load_info = li; - /* Boots a kernel elf binary, os/linux-2.6/vmlinux from the axis + /* Boots a kernel elf binary, os/linux-2.6/vmlinux from the axis devboard SDK. */ image_size = load_elf(li->image_filename, translate_kernel_address, NULL, &entry, NULL, &high, 0, ELF_MACHINE, 0); diff --git a/qemu-0.15.x/hw/e1000.c b/qemu-0.15.x/hw/e1000.c index 96d84f9..4c876fb 100644 --- a/qemu-0.15.x/hw/e1000.c +++ b/qemu-0.15.x/hw/e1000.c @@ -463,7 +463,7 @@ process_tx_desc(E1000State *s, struct e1000_tx_desc *dp) cpu_to_be16wu((uint16_t *)(tp->vlan_header + 2), le16_to_cpu(dp->upper.fields.special)); } - + addr = le64_to_cpu(dp->buffer_addr); if (tp->tse && tp->cptse) { hdr = tp->hdr_len; diff --git a/qemu-0.15.x/hw/etraxfs.c b/qemu-0.15.x/hw/etraxfs.c index b84d74a..18e9320 100644 --- a/qemu-0.15.x/hw/etraxfs.c +++ b/qemu-0.15.x/hw/etraxfs.c @@ -52,7 +52,7 @@ void bareetraxfs_init (ram_addr_t ram_size, DeviceState *dev; SysBusDevice *s; CPUState *env; - qemu_irq irq[30], nmi[2], *cpu_irq; + qemu_irq irq[30], nmi[2], *cpu_irq; void *etraxfs_dmac; struct etraxfs_dma_client *eth[2] = {NULL, NULL}; DriveInfo *dinfo; @@ -71,7 +71,7 @@ void bareetraxfs_init (ram_addr_t ram_size, phys_ram = qemu_ram_alloc(NULL, "etraxfs.ram", ram_size); cpu_register_physical_memory(0x40000000, ram_size, phys_ram | IO_MEM_RAM);
- /* The ETRAX-FS has 128Kb on chip ram, the docs refer to it as the + /* The ETRAX-FS has 128Kb on chip ram, the docs refer to it as the internal memory. */ phys_intmem = qemu_ram_alloc(NULL, "etraxfs.chipram", INTMEM_SIZE); cpu_register_physical_memory(0x38000000, INTMEM_SIZE, @@ -125,7 +125,7 @@ void bareetraxfs_init (ram_addr_t ram_size,
for (i = 0; i < 4; i++) { sysbus_create_simple("etraxfs,serial", 0x30026000 + i * 0x2000, - irq[0x14 + i]); + irq[0x14 + i]); }
if (kernel_filename) { diff --git a/qemu-0.15.x/hw/etraxfs_dma.c b/qemu-0.15.x/hw/etraxfs_dma.c index c205ec1..d7aca01 100644 --- a/qemu-0.15.x/hw/etraxfs_dma.c +++ b/qemu-0.15.x/hw/etraxfs_dma.c @@ -223,8 +223,8 @@ static void channel_load_g(struct fs_dma_ctrl *ctrl, int c) target_phys_addr_t addr = channel_reg(ctrl, c, RW_GROUP);
/* Load and decode. FIXME: handle endianness. */ - cpu_physical_memory_read (addr, - (void *) &ctrl->channels[c].current_g, + cpu_physical_memory_read (addr, + (void *) &ctrl->channels[c].current_g, sizeof ctrl->channels[c].current_g); }
@@ -255,8 +255,8 @@ static void channel_load_c(struct fs_dma_ctrl *ctrl, int c) target_phys_addr_t addr = channel_reg(ctrl, c, RW_GROUP_DOWN);
/* Load and decode. FIXME: handle endianness. */ - cpu_physical_memory_read (addr, - (void *) &ctrl->channels[c].current_c, + cpu_physical_memory_read (addr, + (void *) &ctrl->channels[c].current_c, sizeof ctrl->channels[c].current_c);
D(dump_c(c, &ctrl->channels[c].current_c)); @@ -274,7 +274,7 @@ static void channel_load_d(struct fs_dma_ctrl *ctrl, int c) /* Load and decode. FIXME: handle endianness. */ D(printf("%s ch=%d addr=" TARGET_FMT_plx "\n", __func__, c, addr)); cpu_physical_memory_read (addr, - (void *) &ctrl->channels[c].current_d, + (void *) &ctrl->channels[c].current_d, sizeof ctrl->channels[c].current_d);
D(dump_d(c, &ctrl->channels[c].current_d)); @@ -300,7 +300,7 @@ static void channel_store_d(struct fs_dma_ctrl *ctrl, int c) /* Encode and store. FIXME: handle endianness. */ D(printf("%s ch=%d addr=" TARGET_FMT_plx "\n", __func__, c, addr)); cpu_physical_memory_write (addr, - (void *) &ctrl->channels[c].current_d, + (void *) &ctrl->channels[c].current_d, sizeof ctrl->channels[c].current_d); }
@@ -325,12 +325,12 @@ static inline void channel_start(struct fs_dma_ctrl *ctrl, int c)
static void channel_continue(struct fs_dma_ctrl *ctrl, int c) { - if (!channel_en(ctrl, c) + if (!channel_en(ctrl, c) || channel_stopped(ctrl, c) || ctrl->channels[c].state != RUNNING /* Only reload the current data descriptor if it has eol set. */ || !ctrl->channels[c].current_d.eol) { - D(printf("continue failed ch=%d state=%d stopped=%d en=%d eol=%d\n", + D(printf("continue failed ch=%d state=%d stopped=%d en=%d eol=%d\n", c, ctrl->channels[c].state, channel_stopped(ctrl, c), channel_en(ctrl,c), @@ -386,7 +386,7 @@ static void channel_update_irq(struct fs_dma_ctrl *ctrl, int c) ctrl->channels[c].regs[R_INTR] & ctrl->channels[c].regs[RW_INTR_MASK];
- D(printf("%s: chan=%d masked_intr=%x\n", __func__, + D(printf("%s: chan=%d masked_intr=%x\n", __func__, c, ctrl->channels[c].regs[R_MASKED_INTR]));
@@ -419,7 +419,7 @@ static int channel_out_run(struct fs_dma_ctrl *ctrl, int c) len = sizeof buf; cpu_physical_memory_read (saved_data_buf, buf, len);
- D(printf("channel %d pushes %x %u bytes\n", c, + D(printf("channel %d pushes %x %u bytes\n", c, saved_data_buf, len));
if (ctrl->channels[c].client->client.push) @@ -476,7 +476,7 @@ static int channel_out_run(struct fs_dma_ctrl *ctrl, int c) return 1; }
-static int channel_in_process(struct fs_dma_ctrl *ctrl, int c, +static int channel_in_process(struct fs_dma_ctrl *ctrl, int c, unsigned char *buf, int buflen, int eop) { uint32_t len; @@ -501,7 +501,7 @@ static int channel_in_process(struct fs_dma_ctrl *ctrl, int c, || eop) { uint32_t r_intr = ctrl->channels[c].regs[R_INTR];
- D(printf("in dscr end len=%d\n", + D(printf("in dscr end len=%d\n", ctrl->channels[c].current_d.after - ctrl->channels[c].current_d.buf)); ctrl->channels[c].current_d.after = saved_data_buf; @@ -686,7 +686,7 @@ static int etraxfs_dmac_run(void *opaque) int i; int p = 0;
- for (i = 0; + for (i = 0; i < ctrl->nr_channels; i++) { @@ -702,10 +702,10 @@ static int etraxfs_dmac_run(void *opaque) return p; }
-int etraxfs_dmac_input(struct etraxfs_dma_client *client, +int etraxfs_dmac_input(struct etraxfs_dma_client *client, void *buf, int len, int eop) { - return channel_in_process(client->ctrl, client->channel, + return channel_in_process(client->ctrl, client->channel, buf, len, eop); }
@@ -717,7 +717,7 @@ void etraxfs_dmac_connect(void *opaque, int c, qemu_irq *line, int input) ctrl->channels[c].input = input; }
-void etraxfs_dmac_connect_client(void *opaque, int c, +void etraxfs_dmac_connect_client(void *opaque, int c, struct etraxfs_dma_client *cl) { struct fs_dma_ctrl *ctrl = opaque; diff --git a/qemu-0.15.x/hw/etraxfs_dma.h b/qemu-0.15.x/hw/etraxfs_dma.h index 96408ab..c6dad90 100644 --- a/qemu-0.15.x/hw/etraxfs_dma.h +++ b/qemu-0.15.x/hw/etraxfs_dma.h @@ -16,7 +16,7 @@ struct etraxfs_dma_client void *etraxfs_dmac_init(target_phys_addr_t base, int nr_channels); void etraxfs_dmac_connect(void *opaque, int channel, qemu_irq *line, int input); -void etraxfs_dmac_connect_client(void *opaque, int c, +void etraxfs_dmac_connect_client(void *opaque, int c, struct etraxfs_dma_client *cl); -int etraxfs_dmac_input(struct etraxfs_dma_client *client, +int etraxfs_dmac_input(struct etraxfs_dma_client *client, void *buf, int len, int eop); diff --git a/qemu-0.15.x/hw/etraxfs_eth.c b/qemu-0.15.x/hw/etraxfs_eth.c index dff5f55..6623bce 100644 --- a/qemu-0.15.x/hw/etraxfs_eth.c +++ b/qemu-0.15.x/hw/etraxfs_eth.c @@ -35,8 +35,8 @@ #define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ #define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */
-/* - * The MDIO extensions in the TDK PHY model were reversed engineered from the +/* + * The MDIO extensions in the TDK PHY model were reversed engineered from the * linux driver (PHYID and Diagnostics reg). * TODO: Add friendly names for the register nums. */ @@ -47,7 +47,7 @@ struct qemu_phy int link;
unsigned int (*read)(struct qemu_phy *phy, unsigned int req); - void (*write)(struct qemu_phy *phy, unsigned int req, + void (*write)(struct qemu_phy *phy, unsigned int req, unsigned int data); };
@@ -108,7 +108,7 @@ static unsigned int tdk_read(struct qemu_phy *phy, unsigned int req) return r; }
-static void +static void tdk_write(struct qemu_phy *phy, unsigned int req, unsigned int data) { int regnum; @@ -122,7 +122,7 @@ tdk_write(struct qemu_phy *phy, unsigned int req, unsigned int data) } }
-static void +static void tdk_init(struct qemu_phy *phy) { phy->regs[0] = 0x3100; @@ -164,17 +164,17 @@ struct qemu_mdio struct qemu_phy *devs[32]; };
-static void +static void mdio_attach(struct qemu_mdio *bus, struct qemu_phy *phy, unsigned int addr) { bus->devs[addr & 0x1f] = phy; }
#ifdef USE_THIS_DEAD_CODE -static void +static void mdio_detach(struct qemu_mdio *bus, struct qemu_phy *phy, unsigned int addr) { - bus->devs[addr & 0x1f] = NULL; + bus->devs[addr & 0x1f] = NULL; } #endif
@@ -185,7 +185,7 @@ static void mdio_read_req(struct qemu_mdio *bus) phy = bus->devs[bus->addr]; if (phy && phy->read) bus->data = phy->read(phy, bus->req); - else + else bus->data = 0xffff; }
@@ -276,7 +276,7 @@ static void mdio_cycle(struct qemu_mdio *bus) bus->state = DATA; } break; - case DATA: + case DATA: if (!bus->mdc) { if (bus->drive) { bus->mdio = !!(bus->data & (1 << 15)); @@ -516,7 +516,7 @@ static ssize_t eth_receive(VLANClientState *nc, const uint8_t *buf, size_t size) D(printf("%x.%x.%x.%x.%x.%x ma=%d %d bc=%d\n", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], use_ma0, use_ma1, r_bcast)); - + /* Does the frame get through the address filters? */ if ((!use_ma0 || memcmp(buf, eth->macaddr[0], 6)) && (!use_ma1 || memcmp(buf, eth->macaddr[1], 6)) @@ -577,7 +577,7 @@ static NetClientInfo net_etraxfs_info = {
void *etraxfs_eth_init(NICInfo *nd, target_phys_addr_t base, int phyaddr) { - struct etraxfs_dma_client *dma = NULL; + struct etraxfs_dma_client *dma = NULL; struct fs_eth *eth = NULL;
qemu_check_nic_model(nd, "fseth"); diff --git a/qemu-0.15.x/hw/etraxfs_pic.c b/qemu-0.15.x/hw/etraxfs_pic.c index 4feffda..139a19d 100644 --- a/qemu-0.15.x/hw/etraxfs_pic.c +++ b/qemu-0.15.x/hw/etraxfs_pic.c @@ -46,15 +46,15 @@ struct etrax_pic };
static void pic_update(struct etrax_pic *fs) -{ +{ uint32_t vector = 0; int i;
fs->regs[R_R_MASKED_VECT] = fs->regs[R_R_VECT] & fs->regs[R_RW_MASK];
/* The ETRAX interrupt controller signals interrupts to teh core - through an interrupt request wire and an irq vector bus. If - multiple interrupts are simultaneously active it chooses vector + through an interrupt request wire and an irq vector bus. If + multiple interrupts are simultaneously active it chooses vector 0x30 and lets the sw choose the priorities. */ if (fs->regs[R_R_MASKED_VECT]) { uint32_t mv = fs->regs[R_R_MASKED_VECT]; @@ -110,7 +110,7 @@ static CPUWriteMemoryFunc * const pic_write[] = { };
static void nmi_handler(void *opaque, int irq, int level) -{ +{ struct etrax_pic *fs = (void *)opaque; uint32_t mask;
@@ -124,7 +124,7 @@ static void nmi_handler(void *opaque, int irq, int level) }
static void irq_handler(void *opaque, int irq, int level) -{ +{ struct etrax_pic *fs = (void *)opaque;
if (irq >= 30) diff --git a/qemu-0.15.x/hw/etraxfs_ser.c b/qemu-0.15.x/hw/etraxfs_ser.c index b917d4d..f92d424 100644 --- a/qemu-0.15.x/hw/etraxfs_ser.c +++ b/qemu-0.15.x/hw/etraxfs_ser.c @@ -161,7 +161,7 @@ static void serial_receive(void *opaque, const uint8_t *buf, int size) return; }
- for (i = 0; i < size; i++) { + for (i = 0; i < size; i++) { s->rx_fifo[s->rx_fifo_pos] = buf[i]; s->rx_fifo_pos++; s->rx_fifo_pos &= 15; diff --git a/qemu-0.15.x/hw/etraxfs_timer.c b/qemu-0.15.x/hw/etraxfs_timer.c index b08e574..8fde234 100644 --- a/qemu-0.15.x/hw/etraxfs_timer.c +++ b/qemu-0.15.x/hw/etraxfs_timer.c @@ -218,7 +218,7 @@ static inline void timer_watchdog_update(struct etrax_timer *t, uint32_t value) if (wd_en && wd_key != new_key) return;
- D(printf("en=%d new_key=%x oldkey=%x cmd=%d cnt=%d\n", + D(printf("en=%d new_key=%x oldkey=%x cmd=%d cnt=%d\n", wd_en, new_key, wd_key, new_cmd, wd_cnt));
if (t->wd_hits) diff --git a/qemu-0.15.x/hw/framebuffer.c b/qemu-0.15.x/hw/framebuffer.c index 56cf16e..7b5a51c 100644 --- a/qemu-0.15.x/hw/framebuffer.c +++ b/qemu-0.15.x/hw/framebuffer.c @@ -19,7 +19,7 @@ #include "framebuffer.h"
/* Render an image from a shared memory framebuffer. */ - + void framebuffer_update_display( DisplayState *ds, target_phys_addr_t base, diff --git a/qemu-0.15.x/hw/gumstix.c b/qemu-0.15.x/hw/gumstix.c index 853f7e1..c2021dd 100644 --- a/qemu-0.15.x/hw/gumstix.c +++ b/qemu-0.15.x/hw/gumstix.c @@ -7,10 +7,10 @@ * * This code is licensed under the GNU GPL v2. */ - -/* + +/* * Example usage: - * + * * connex: * ======= * create image: diff --git a/qemu-0.15.x/hw/ide/core.c b/qemu-0.15.x/hw/ide/core.c index d145b19..af9acb2 100644 --- a/qemu-0.15.x/hw/ide/core.c +++ b/qemu-0.15.x/hw/ide/core.c @@ -1316,14 +1316,14 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) s->io_buffer[363] = 0; } else { s->io_buffer[363] = - s->smart_selftest_data[3 + + s->smart_selftest_data[3 + (s->smart_selftest_count - 1) * 24]; } - s->io_buffer[364] = 0x20; - s->io_buffer[365] = 0x01; + s->io_buffer[364] = 0x20; + s->io_buffer[365] = 0x01; /* offline data collection capacity: execute + self-test*/ - s->io_buffer[367] = (1<<4 | 1<<3 | 1); + s->io_buffer[367] = (1<<4 | 1<<3 | 1); s->io_buffer[368] = 0x03; /* smart capability (1) */ s->io_buffer[369] = 0x00; /* smart capability (2) */ s->io_buffer[370] = 0x01; /* error logging supported */ @@ -1331,7 +1331,7 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) s->io_buffer[373] = 0x36; /* minutes for poll ext test */ s->io_buffer[374] = 0x01; /* minutes for poll conveyance */
- for (n=0; n<511; n++) + for (n=0; n<511; n++) s->io_buffer[511] += s->io_buffer[n]; s->io_buffer[511] = 0x100 - s->io_buffer[511]; s->status = READY_STAT | SEEK_STAT; @@ -1358,7 +1358,7 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) s->io_buffer[508] = 0; } else { s->io_buffer[508] = s->smart_selftest_count; - for (n=2; n<506; n++) + for (n=2; n<506; n++) s->io_buffer[n] = s->smart_selftest_data[n]; } for (n=0; n<511; n++) diff --git a/qemu-0.15.x/hw/lan9118.c b/qemu-0.15.x/hw/lan9118.c index 73a8661..28d74ee 100644 --- a/qemu-0.15.x/hw/lan9118.c +++ b/qemu-0.15.x/hw/lan9118.c @@ -899,7 +899,7 @@ static void lan9118_writel(void *opaque, target_phys_addr_t offset, { lan9118_state *s = (lan9118_state *)opaque; offset &= 0xff; - + //DPRINTF("Write reg 0x%02x = 0x%08x\n", (int)offset, val); if (offset >= 0x20 && offset < 0x40) { /* TX FIFO */ diff --git a/qemu-0.15.x/hw/mc146818rtc.c b/qemu-0.15.x/hw/mc146818rtc.c index feb3b25..7e1812c 100644 --- a/qemu-0.15.x/hw/mc146818rtc.c +++ b/qemu-0.15.x/hw/mc146818rtc.c @@ -112,7 +112,7 @@ static void rtc_coalesced_timer_update(RTCState *s) qemu_del_timer(s->coalesced_timer); } else { /* divide each RTC interval to 2 - 8 smaller intervals */ - int c = MIN(s->irq_coalesced, 7) + 1; + int c = MIN(s->irq_coalesced, 7) + 1; int64_t next_clock = qemu_get_clock_ns(rtc_clock) + muldiv64(s->period / c, get_ticks_per_sec(), 32768); qemu_mod_timer(s->coalesced_timer, next_clock); diff --git a/qemu-0.15.x/hw/mips_mipssim.c b/qemu-0.15.x/hw/mips_mipssim.c index 380a7eb..0171bd8 100644 --- a/qemu-0.15.x/hw/mips_mipssim.c +++ b/qemu-0.15.x/hw/mips_mipssim.c @@ -3,7 +3,7 @@ * * Emulates a very simple machine model similiar to the one use by the * proprietary MIPS emulator. - * + * * Copyright (c) 2007 Thiemo Seufer * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/qemu-0.15.x/hw/omap1.c b/qemu-0.15.x/hw/omap1.c index 364c26f..3b737a6 100644 --- a/qemu-0.15.x/hw/omap1.c +++ b/qemu-0.15.x/hw/omap1.c @@ -2784,7 +2784,7 @@ static void omap_rtc_tick(void *opaque)
/* * Every full hour add a rough approximation of the compensation - * register to the 32kHz Timer (which drives the RTC) value. + * register to the 32kHz Timer (which drives the RTC) value. */ if (s->auto_comp && !s->current_tm.tm_sec && !s->current_tm.tm_min) s->tick += s->comp_reg * 1000 / 32768; diff --git a/qemu-0.15.x/hw/omap_mmc.c b/qemu-0.15.x/hw/omap_mmc.c index e9ec2f3..bdcf321 100644 --- a/qemu-0.15.x/hw/omap_mmc.c +++ b/qemu-0.15.x/hw/omap_mmc.c @@ -322,7 +322,7 @@ static uint32_t omap_mmc_read(void *opaque, target_phys_addr_t offset) return s->arg >> 16;
case 0x0c: /* MMC_CON */ - return (s->dw << 15) | (s->mode << 12) | (s->enable << 11) | + return (s->dw << 15) | (s->mode << 12) | (s->enable << 11) | (s->be << 10) | s->clkdiv;
case 0x10: /* MMC_STAT */ diff --git a/qemu-0.15.x/hw/onenand.c b/qemu-0.15.x/hw/onenand.c index 71c1ab4..01cd6a6 100644 --- a/qemu-0.15.x/hw/onenand.c +++ b/qemu-0.15.x/hw/onenand.c @@ -198,7 +198,7 @@ static inline int onenand_load_spare(OneNANDState *s, int sec, int secn, return 1; else memcpy(dest, s->current + (s->secs_cur << 9) + (sec << 4), secn << 4); - + return 0; }
@@ -216,7 +216,7 @@ static inline int onenand_prog_spare(OneNANDState *s, int sec, int secn, return 1;
memcpy(s->current + (s->secs_cur << 9) + (sec << 4), src, secn << 4); - + return 0; }
diff --git a/qemu-0.15.x/hw/pcie.c b/qemu-0.15.x/hw/pcie.c index 39607bf..12e00f6 100644 --- a/qemu-0.15.x/hw/pcie.c +++ b/qemu-0.15.x/hw/pcie.c @@ -335,7 +335,7 @@ void pcie_cap_slot_write_config(PCIDevice *dev,
hotplug_event_notify(dev);
- /* + /* * 6.7.3.2 Command Completed Events * * Software issues a command to a hot-plug capable Downstream Port by diff --git a/qemu-0.15.x/hw/petalogix_s3adsp1800_mmu.c b/qemu-0.15.x/hw/petalogix_s3adsp1800_mmu.c index 4dcdfbd..ab04163 100644 --- a/qemu-0.15.x/hw/petalogix_s3adsp1800_mmu.c +++ b/qemu-0.15.x/hw/petalogix_s3adsp1800_mmu.c @@ -208,7 +208,7 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size, pstrcpy_targphys("cmdline", boot_info.cmdline, 256, kernel_cmdline); } /* Provide a device-tree. */ - boot_info.fdt = boot_info.cmdline + 4096; + boot_info.fdt = boot_info.cmdline + 4096; petalogix_load_device_tree(boot_info.fdt, ram_size, 0, 0, kernel_cmdline); diff --git a/qemu-0.15.x/hw/ptimer.c b/qemu-0.15.x/hw/ptimer.c index 6f13ce9..0fe6560 100644 --- a/qemu-0.15.x/hw/ptimer.c +++ b/qemu-0.15.x/hw/ptimer.c @@ -84,7 +84,7 @@ uint64_t ptimer_get_count(ptimer_state *s) /* We need to divide time by period, where time is stored in rem (64-bit integer) and period is stored in period/period_frac (64.32 fixed point). - + Doing full precision division is hard, so scale values and do a 64-bit division. The result should be rounded down, so that the rounding error never causes the timer to go @@ -105,7 +105,7 @@ uint64_t ptimer_get_count(ptimer_state *s) } else { if (shift != 0) div |= (s->period_frac >> (32 - shift)); - /* Look at remaining bits of period_frac and round div up if + /* Look at remaining bits of period_frac and round div up if necessary. */ if ((uint32_t)(s->period_frac << shift)) div += 1; diff --git a/qemu-0.15.x/hw/pxa2xx.c b/qemu-0.15.x/hw/pxa2xx.c index cf93110..739e71f 100644 --- a/qemu-0.15.x/hw/pxa2xx.c +++ b/qemu-0.15.x/hw/pxa2xx.c @@ -2072,7 +2072,7 @@ PXA2xxState *pxa270_init(unsigned int sdram_size, const char *revision) } if (!revision) revision = "pxa270"; - + s->env = cpu_init(revision); if (!s->env) { fprintf(stderr, "Unable to find CPU definition\n"); diff --git a/qemu-0.15.x/hw/qxl.c b/qemu-0.15.x/hw/qxl.c index a6fb7f0..90f28af 100644 --- a/qemu-0.15.x/hw/qxl.c +++ b/qemu-0.15.x/hw/qxl.c @@ -55,7 +55,7 @@ #undef ALIGN #define ALIGN(a, b) (((a) + ((b) - 1)) & ~((b) - 1))
-#define PIXEL_SIZE 0.2936875 //1280x1024 is 14.8" x 11.9" +#define PIXEL_SIZE 0.2936875 //1280x1024 is 14.8" x 11.9"
#define QXL_MODE(_x, _y, _b, _o) \ { .x_res = _x, \ diff --git a/qemu-0.15.x/hw/sh_intc.c b/qemu-0.15.x/hw/sh_intc.c index c43b99f..ef3fed6 100644 --- a/qemu-0.15.x/hw/sh_intc.c +++ b/qemu-0.15.x/hw/sh_intc.c @@ -232,7 +232,7 @@ static uint32_t sh_intc_read(void *opaque, target_phys_addr_t offset) printf("sh_intc_read 0x%lx\n", (unsigned long) offset); #endif
- sh_intc_locate(desc, (unsigned long)offset, &valuep, + sh_intc_locate(desc, (unsigned long)offset, &valuep, &enum_ids, &first, &width, &mode); return *valuep; } @@ -253,7 +253,7 @@ static void sh_intc_write(void *opaque, target_phys_addr_t offset, printf("sh_intc_write 0x%lx 0x%08x\n", (unsigned long) offset, value); #endif
- sh_intc_locate(desc, (unsigned long)offset, &valuep, + sh_intc_locate(desc, (unsigned long)offset, &valuep, &enum_ids, &first, &width, &mode);
switch (mode) { @@ -269,7 +269,7 @@ static void sh_intc_write(void *opaque, target_phys_addr_t offset, if ((*valuep & mask) == (value & mask)) continue; #if 0 - printf("k = %d, first = %d, enum = %d, mask = 0x%08x\n", + printf("k = %d, first = %d, enum = %d, mask = 0x%08x\n", k, first, enum_ids[k], (unsigned int)mask); #endif sh_intc_toggle_mask(desc, enum_ids[k], value & mask, 0); @@ -302,7 +302,7 @@ struct intc_source *sh_intc_source(struct intc_desc *desc, intc_enum id) return NULL; }
-static void sh_intc_register(struct intc_desc *desc, +static void sh_intc_register(struct intc_desc *desc, unsigned long address) { if (address) { @@ -440,7 +440,7 @@ int sh_intc_init(struct intc_desc *desc, }
desc->irqs = qemu_allocate_irqs(sh_intc_set_irq, desc, nr_sources); - + desc->iomemtype = cpu_register_io_memory(sh_intc_readfn, sh_intc_writefn, desc, DEVICE_NATIVE_ENDIAN); @@ -465,7 +465,7 @@ int sh_intc_init(struct intc_desc *desc, return 0; }
-/* Assert level <n> IRL interrupt. +/* Assert level <n> IRL interrupt. 0:deassert. 1:lowest priority,... 15:highest priority. */ void sh_intc_set_irl(void *opaque, int n, int level) { diff --git a/qemu-0.15.x/hw/shix.c b/qemu-0.15.x/hw/shix.c index 638bf16..2b39656 100644 --- a/qemu-0.15.x/hw/shix.c +++ b/qemu-0.15.x/hw/shix.c @@ -55,7 +55,7 @@ static void shix_init(ram_addr_t ram_size, int ret; CPUState *env; struct SH7750State *s; - + if (!cpu_model) cpu_model = "any";
diff --git a/qemu-0.15.x/hw/stellaris.c b/qemu-0.15.x/hw/stellaris.c index a280930..f4d8484 100644 --- a/qemu-0.15.x/hw/stellaris.c +++ b/qemu-0.15.x/hw/stellaris.c @@ -878,7 +878,7 @@ static void stellaris_adc_fifo_write(stellaris_adc_state *s, int n, { int head;
- /* TODO: Real hardware has limited size FIFOs. We have a full 16 entry + /* TODO: Real hardware has limited size FIFOs. We have a full 16 entry FIFO fir each sequencer. */ head = (s->fifo[n].state >> 4) & 0xf; if (s->fifo[n].state & STELLARIS_ADC_FIFO_FULL) { diff --git a/qemu-0.15.x/hw/tsc2005.c b/qemu-0.15.x/hw/tsc2005.c index c95dcf0..71fa7c0 100644 --- a/qemu-0.15.x/hw/tsc2005.c +++ b/qemu-0.15.x/hw/tsc2005.c @@ -163,7 +163,7 @@ static uint16_t tsc2005_read(TSC2005State *s, int reg)
case 0xc: /* CFR0 */ return (s->pressure << 15) | ((!s->busy) << 14) | - (s->nextprecision << 13) | s->timing[0]; + (s->nextprecision << 13) | s->timing[0]; case 0xd: /* CFR1 */ return s->timing[1]; case 0xe: /* CFR2 */ diff --git a/qemu-0.15.x/hw/tsc210x.c b/qemu-0.15.x/hw/tsc210x.c index 96446dd..e3867ef 100644 --- a/qemu-0.15.x/hw/tsc210x.c +++ b/qemu-0.15.x/hw/tsc210x.c @@ -436,7 +436,7 @@ static uint16_t tsc2102_control_register_read( switch (reg) { case 0x00: /* TSC ADC */ return (s->pressure << 15) | ((!s->busy) << 14) | - (s->nextfunction << 10) | (s->nextprecision << 8) | s->filter; + (s->nextfunction << 10) | (s->nextprecision << 8) | s->filter;
case 0x01: /* Status / Keypad Control */ if ((s->model & 0xff00) == 0x2100) diff --git a/qemu-0.15.x/hw/usb-musb.c b/qemu-0.15.x/hw/usb-musb.c index 035dda8..478f953 100644 --- a/qemu-0.15.x/hw/usb-musb.c +++ b/qemu-0.15.x/hw/usb-musb.c @@ -32,8 +32,8 @@
#define MUSB_HDRC_INTRTX 0x02 /* 16-bit */ #define MUSB_HDRC_INTRRX 0x04 -#define MUSB_HDRC_INTRTXE 0x06 -#define MUSB_HDRC_INTRRXE 0x08 +#define MUSB_HDRC_INTRTXE 0x06 +#define MUSB_HDRC_INTRRXE 0x08 #define MUSB_HDRC_INTRUSB 0x0a /* 8 bit */ #define MUSB_HDRC_INTRUSBE 0x0b /* 8 bit */ #define MUSB_HDRC_FRAME 0x0c /* 16-bit */ @@ -112,7 +112,7 @@ */
/* POWER */ -#define MGC_M_POWER_ISOUPDATE 0x80 +#define MGC_M_POWER_ISOUPDATE 0x80 #define MGC_M_POWER_SOFTCONN 0x40 #define MGC_M_POWER_HSENAB 0x20 #define MGC_M_POWER_HSMODE 0x10 @@ -126,7 +126,7 @@ #define MGC_M_INTR_RESUME 0x02 #define MGC_M_INTR_RESET 0x04 #define MGC_M_INTR_BABBLE 0x04 -#define MGC_M_INTR_SOF 0x08 +#define MGC_M_INTR_SOF 0x08 #define MGC_M_INTR_CONNECT 0x10 #define MGC_M_INTR_DISCONNECT 0x20 #define MGC_M_INTR_SESSREQ 0x40 @@ -134,7 +134,7 @@ #define MGC_M_INTR_EP0 0x01 /* FOR EP0 INTERRUPT */
/* DEVCTL */ -#define MGC_M_DEVCTL_BDEVICE 0x80 +#define MGC_M_DEVCTL_BDEVICE 0x80 #define MGC_M_DEVCTL_FSDEV 0x40 #define MGC_M_DEVCTL_LSDEV 0x20 #define MGC_M_DEVCTL_VBUS 0x18 diff --git a/qemu-0.15.x/hw/usb-ohci.c b/qemu-0.15.x/hw/usb-ohci.c index 8491d59..337ac7c 100644 --- a/qemu-0.15.x/hw/usb-ohci.c +++ b/qemu-0.15.x/hw/usb-ohci.c @@ -657,7 +657,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed,
starting_frame = OHCI_BM(iso_td.flags, TD_SF); frame_count = OHCI_BM(iso_td.flags, TD_FC); - relative_frame_number = USUB(ohci->frame_number, starting_frame); + relative_frame_number = USUB(ohci->frame_number, starting_frame);
#ifdef DEBUG_ISOCH printf("--- ISO_TD ED head 0x%.8x tailp 0x%.8x\n" @@ -671,8 +671,8 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, iso_td.flags, iso_td.bp, iso_td.next, iso_td.be, iso_td.offset[0], iso_td.offset[1], iso_td.offset[2], iso_td.offset[3], iso_td.offset[4], iso_td.offset[5], iso_td.offset[6], iso_td.offset[7], - ohci->frame_number, starting_frame, - frame_count, relative_frame_number, + ohci->frame_number, starting_frame, + frame_count, relative_frame_number, OHCI_BM(iso_td.flags, TD_DI), OHCI_BM(iso_td.flags, TD_CC)); #endif
@@ -682,7 +682,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, } else if (relative_frame_number > frame_count) { /* ISO TD expired - retire the TD to the Done Queue and continue with the next ISO TD of the same ED */ - DPRINTF("usb-ohci: ISO_TD R=%d > FC=%d\n", relative_frame_number, + DPRINTF("usb-ohci: ISO_TD R=%d > FC=%d\n", relative_frame_number, frame_count); OHCI_SET_BM(iso_td.flags, TD_CC, OHCI_CC_DATAOVERRUN); ed->head &= ~OHCI_DPTR_MASK; @@ -729,8 +729,8 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, start_offset = iso_td.offset[relative_frame_number]; next_offset = iso_td.offset[relative_frame_number + 1];
- if (!(OHCI_BM(start_offset, TD_PSW_CC) & 0xe) || - ((relative_frame_number < frame_count) && + if (!(OHCI_BM(start_offset, TD_PSW_CC) & 0xe) || + ((relative_frame_number < frame_count) && !(OHCI_BM(next_offset, TD_PSW_CC) & 0xe))) { printf("usb-ohci: ISO_TD cc != not accessed 0x%.8x 0x%.8x\n", start_offset, next_offset); @@ -793,7 +793,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ret != USB_RET_NODEV) break; } - + if (ret == USB_RET_ASYNC) { return 1; } diff --git a/qemu-0.15.x/hw/usb-uhci.c b/qemu-0.15.x/hw/usb-uhci.c index da74c57..a0fadf1 100644 --- a/qemu-0.15.x/hw/usb-uhci.c +++ b/qemu-0.15.x/hw/usb-uhci.c @@ -108,7 +108,7 @@ static void dump_data(const uint8_t *data, int len) {}
typedef struct UHCIState UHCIState;
-/* +/* * Pending async transaction. * 'packet' must be the first field because completion * handler does "(UHCIAsync *) pkt" cast. @@ -789,7 +789,7 @@ static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td, uint32_t *in return 1;
/* token field is not unique for isochronous requests, - * so use the destination buffer + * so use the destination buffer */ if (td->ctrl & TD_CTRL_IOS) { token = td->buffer; @@ -853,7 +853,7 @@ static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td, uint32_t *in uhci_update_irq(s); return -1; } - + if (len == USB_RET_ASYNC) { uhci_async_link(s, async); return 2; @@ -970,9 +970,9 @@ static void uhci_process_frame(UHCIState *s) if (qhdb_insert(&qhdb, link)) { /* * We're going in circles. Which is not a bug because - * HCD is allowed to do that as part of the BW management. - * In our case though it makes no sense to spin here. Sync transations - * are already done, and async completion handler will re-process + * HCD is allowed to do that as part of the BW management. + * In our case though it makes no sense to spin here. Sync transations + * are already done, and async completion handler will re-process * the frame when something is ready. */ DPRINTF("uhci: detected loop. qh 0x%x\n", link); @@ -1005,7 +1005,7 @@ static void uhci_process_frame(UHCIState *s) le32_to_cpus(&td.token); le32_to_cpus(&td.buffer);
- DPRINTF("uhci: TD 0x%x load. link 0x%x ctrl 0x%x token 0x%x qh 0x%x\n", + DPRINTF("uhci: TD 0x%x load. link 0x%x ctrl 0x%x token 0x%x qh 0x%x\n", link, td.link, td.ctrl, td.token, curr_qh);
old_td_ctrl = td.ctrl; @@ -1033,7 +1033,7 @@ static void uhci_process_frame(UHCIState *s)
/* completed TD */
- DPRINTF("uhci: TD 0x%x done. link 0x%x ctrl 0x%x token 0x%x qh 0x%x\n", + DPRINTF("uhci: TD 0x%x done. link 0x%x ctrl 0x%x token 0x%x qh 0x%x\n", link, td.link, td.ctrl, td.token, curr_qh);
link = td.link; diff --git a/qemu-0.15.x/hw/usb.c b/qemu-0.15.x/hw/usb.c index 27a983c..639f8c4 100644 --- a/qemu-0.15.x/hw/usb.c +++ b/qemu-0.15.x/hw/usb.c @@ -74,7 +74,7 @@ static int do_token_setup(USBDevice *s, USBPacket *p)
if (p->len != 8) return USB_RET_STALL; - + memcpy(s->setup_buf, p->data, 8); s->setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; s->setup_index = 0; @@ -123,7 +123,7 @@ static int do_token_in(USBDevice *s, USBPacket *p) request = (s->setup_buf[0] << 8) | s->setup_buf[1]; value = (s->setup_buf[3] << 8) | s->setup_buf[2]; index = (s->setup_buf[5] << 8) | s->setup_buf[4]; - + switch(s->setup_state) { case SETUP_STATE_ACK: if (!(s->setup_buf[0] & USB_DIR_IN)) { @@ -239,7 +239,7 @@ int usb_generic_handle_packet(USBDevice *s, USBPacket *p)
case USB_TOKEN_OUT: return do_token_out(s, p); - + default: return USB_RET_STALL; } diff --git a/qemu-0.15.x/hw/vga.c b/qemu-0.15.x/hw/vga.c index 0f54734..3310a53 100644 --- a/qemu-0.15.x/hw/vga.c +++ b/qemu-0.15.x/hw/vga.c @@ -2022,8 +2022,8 @@ static void vga_update_text(void *opaque, console_ch_t *chardata) /* ugly hack for CGA 160x100x16 - explain me the logic */ height = 100; } else { - height = s->cr[0x12] | - ((s->cr[0x07] & 0x02) << 7) | + height = s->cr[0x12] | + ((s->cr[0x07] & 0x02) << 7) | ((s->cr[0x07] & 0x40) << 3); height = (height + 1) / cheight; } @@ -2317,7 +2317,7 @@ void vga_init_vbe(VGACommonState *s) cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS, VGA_RAM_SIZE, s->vram_offset); s->vbe_mapped = 1; -#endif +#endif } /********************************************************/ /* vga screen dump */ diff --git a/qemu-0.15.x/hw/virtio-blk.c b/qemu-0.15.x/hw/virtio-blk.c index 6471ac8..c04291a 100644 --- a/qemu-0.15.x/hw/virtio-blk.c +++ b/qemu-0.15.x/hw/virtio-blk.c @@ -482,7 +482,7 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev, uint32_t features)
if (bdrv_enable_write_cache(s->bs)) features |= (1 << VIRTIO_BLK_F_WCACHE); - + if (bdrv_is_read_only(s->bs)) features |= 1 << VIRTIO_BLK_F_RO;
@@ -495,7 +495,7 @@ static void virtio_blk_save(QEMUFile *f, void *opaque) VirtIOBlockReq *req = s->rq;
virtio_save(&s->vdev, f); - + while (req) { qemu_put_sbyte(f, 1); qemu_put_buffer(f, (unsigned char*)&req->elem, sizeof(req->elem)); diff --git a/qemu-0.15.x/hw/virtio-net.c b/qemu-0.15.x/hw/virtio-net.c index a32cc01..8ac2a7a 100644 --- a/qemu-0.15.x/hw/virtio-net.c +++ b/qemu-0.15.x/hw/virtio-net.c @@ -926,7 +926,7 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) n->mac_table.in_use = 0; } } - + if (version_id >= 6) qemu_get_buffer(f, (uint8_t *)n->vlans, MAX_VLAN >> 3);
diff --git a/qemu-0.15.x/hw/wm8750.c b/qemu-0.15.x/hw/wm8750.c index c9c6744..935357d 100644 --- a/qemu-0.15.x/hw/wm8750.c +++ b/qemu-0.15.x/hw/wm8750.c @@ -95,7 +95,7 @@ static void wm8750_audio_out_cb(void *opaque, int free_b) wm8750_out_flush(s); } else s->req_out = free_b - s->idx_out; - + s->data_req(s->opaque, s->req_out >> 2, s->req_in >> 2); }
diff --git a/qemu-0.15.x/hw/xilinx_ethlite.c b/qemu-0.15.x/hw/xilinx_ethlite.c index f35ba84..5005d87 100644 --- a/qemu-0.15.x/hw/xilinx_ethlite.c +++ b/qemu-0.15.x/hw/xilinx_ethlite.c @@ -104,7 +104,7 @@ eth_writel (void *opaque, target_phys_addr_t addr, uint32_t value) unsigned int base = 0;
addr >>= 2; - switch (addr) + switch (addr) { case R_TX_CTRL0: case R_TX_CTRL1: diff --git a/qemu-0.15.x/hw/xilinx_intc.c b/qemu-0.15.x/hw/xilinx_intc.c index cb72d5a..9fff807 100644 --- a/qemu-0.15.x/hw/xilinx_intc.c +++ b/qemu-0.15.x/hw/xilinx_intc.c @@ -97,7 +97,7 @@ pic_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
addr >>= 2; D(qemu_log("%s addr=%x val=%x\n", __func__, addr * 4, value)); - switch (addr) + switch (addr) { case R_IAR: p->regs[R_ISR] &= ~value; /* ACK. */ diff --git a/qemu-0.15.x/hw/xilinx_timer.c b/qemu-0.15.x/hw/xilinx_timer.c index d398c18..1f182c9 100644 --- a/qemu-0.15.x/hw/xilinx_timer.c +++ b/qemu-0.15.x/hw/xilinx_timer.c @@ -147,7 +147,7 @@ timer_writel (void *opaque, target_phys_addr_t addr, uint32_t value) __func__, addr * 4, value, timer, addr & 3)); /* Further decoding to address a specific timers reg. */ addr &= 3; - switch (addr) + switch (addr) { case R_TCSR: if (value & TCSR_TINT) @@ -157,7 +157,7 @@ timer_writel (void *opaque, target_phys_addr_t addr, uint32_t value) if (value & TCSR_ENT) timer_enable(xt); break; - + default: if (addr < ARRAY_SIZE(xt->regs)) xt->regs[addr] = value; diff --git a/qemu-0.15.x/input.c b/qemu-0.15.x/input.c index 310bad5..0492a02 100644 --- a/qemu-0.15.x/input.c +++ b/qemu-0.15.x/input.c @@ -33,7 +33,7 @@ static void *qemu_put_kbd_event_opaque; static QTAILQ_HEAD(, QEMUPutLEDEntry) led_handlers = QTAILQ_HEAD_INITIALIZER(led_handlers); static QTAILQ_HEAD(, QEMUPutMouseEntry) mouse_handlers = QTAILQ_HEAD_INITIALIZER(mouse_handlers); -static NotifierList mouse_mode_notifiers = +static NotifierList mouse_mode_notifiers = NOTIFIER_LIST_INITIALIZER(mouse_mode_notifiers);
void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque) diff --git a/qemu-0.15.x/json-lexer.c b/qemu-0.15.x/json-lexer.c index c21338f..ec8418f 100644 --- a/qemu-0.15.x/json-lexer.c +++ b/qemu-0.15.x/json-lexer.c @@ -212,7 +212,7 @@ static const uint8_t json_lexer[][256] = { ['\t'] = IN_WHITESPACE, ['\r'] = IN_WHITESPACE, ['\n'] = IN_WHITESPACE, - }, + },
/* escape */ [IN_ESCAPE_LL] = { diff --git a/qemu-0.15.x/json-parser.c b/qemu-0.15.x/json-parser.c index 849e215..c220fcc 100644 --- a/qemu-0.15.x/json-parser.c +++ b/qemu-0.15.x/json-parser.c @@ -1,5 +1,5 @@ /* - * JSON Parser + * JSON Parser * * Copyright IBM, Corp. 2009 * @@ -170,7 +170,7 @@ static int hex2decimal(char ch) * \n * \r * \t - * \u four-hex-digits + * \u four-hex-digits */ static QString *qstring_from_escaped_str(JSONParserContext *ctxt, QObject *token) { @@ -186,7 +186,7 @@ static QString *qstring_from_escaped_str(JSONParserContext *ctxt, QObject *token ptr++;
str = qstring_new(); - while (*ptr && + while (*ptr && ((double_quote && *ptr != '"') || (!double_quote && *ptr != '''))) { if (*ptr == '\') { ptr++; @@ -513,7 +513,7 @@ static QObject *parse_keyword(JSONParserContext *ctxt, QList **tokens)
return ret;
-out: +out: qobject_decref(token); QDECREF(working);
@@ -617,7 +617,7 @@ static QObject *parse_value(JSONParserContext *ctxt, QList **tokens, va_list *ap } if (obj == NULL) { obj = parse_keyword(ctxt, tokens); - } + } if (obj == NULL) { obj = parse_literal(ctxt, tokens); } diff --git a/qemu-0.15.x/json-parser.h b/qemu-0.15.x/json-parser.h index 8f2b5ec..dc7747b 100644 --- a/qemu-0.15.x/json-parser.h +++ b/qemu-0.15.x/json-parser.h @@ -1,5 +1,5 @@ /* - * JSON Parser + * JSON Parser * * Copyright IBM, Corp. 2009 * diff --git a/qemu-0.15.x/linux-user/main.c b/qemu-0.15.x/linux-user/main.c index 6a8f4bd..0738ccc 100644 --- a/qemu-0.15.x/linux-user/main.c +++ b/qemu-0.15.x/linux-user/main.c @@ -2238,7 +2238,7 @@ void cpu_loop (CPUState *env) { int trapnr, ret; target_siginfo_t info; - + while (1) { trapnr = cpu_cris_exec (env); switch (trapnr) { @@ -2256,13 +2256,13 @@ void cpu_loop (CPUState *env) /* just indicate that signals should be handled asap */ break; case EXCP_BREAK: - ret = do_syscall(env, - env->regs[9], - env->regs[10], - env->regs[11], - env->regs[12], - env->regs[13], - env->pregs[7], + ret = do_syscall(env, + env->regs[9], + env->regs[10], + env->regs[11], + env->regs[12], + env->regs[13], + env->pregs[7], env->pregs[11], 0, 0); env->regs[10] = ret; @@ -2296,7 +2296,7 @@ void cpu_loop (CPUState *env) { int trapnr, ret; target_siginfo_t info; - + while (1) { trapnr = cpu_mb_exec (env); switch (trapnr) { @@ -2316,13 +2316,13 @@ void cpu_loop (CPUState *env) case EXCP_BREAK: /* Return address is 4 bytes after the call. */ env->regs[14] += 4; - ret = do_syscall(env, - env->regs[12], - env->regs[5], - env->regs[6], - env->regs[7], - env->regs[8], - env->regs[9], + ret = do_syscall(env, + env->regs[12], + env->regs[5], + env->regs[6], + env->regs[7], + env->regs[8], + env->regs[9], env->regs[10], 0, 0); env->regs[3] = ret; @@ -2858,7 +2858,7 @@ void stop_all_tasks(void) void init_task_state(TaskState *ts) { int i; - + ts->used = 1; ts->first_free = ts->sigqueue_table; for (i = 0; i < MAX_SIGQUEUE_SIZE - 1; i++) { @@ -2866,7 +2866,7 @@ void init_task_state(TaskState *ts) } ts->sigqueue_table[i].next = NULL; } - + int main(int argc, char **argv, char **envp) { const char *filename; @@ -3469,23 +3469,23 @@ int main(int argc, char **argv, char **envp) env->regs[12] = regs->r12; env->regs[13] = regs->r13; env->regs[14] = regs->r14; - env->regs[15] = regs->r15; - env->regs[16] = regs->r16; - env->regs[17] = regs->r17; - env->regs[18] = regs->r18; - env->regs[19] = regs->r19; - env->regs[20] = regs->r20; - env->regs[21] = regs->r21; - env->regs[22] = regs->r22; - env->regs[23] = regs->r23; - env->regs[24] = regs->r24; - env->regs[25] = regs->r25; - env->regs[26] = regs->r26; - env->regs[27] = regs->r27; - env->regs[28] = regs->r28; - env->regs[29] = regs->r29; - env->regs[30] = regs->r30; - env->regs[31] = regs->r31; + env->regs[15] = regs->r15; + env->regs[16] = regs->r16; + env->regs[17] = regs->r17; + env->regs[18] = regs->r18; + env->regs[19] = regs->r19; + env->regs[20] = regs->r20; + env->regs[21] = regs->r21; + env->regs[22] = regs->r22; + env->regs[23] = regs->r23; + env->regs[24] = regs->r24; + env->regs[25] = regs->r25; + env->regs[26] = regs->r26; + env->regs[27] = regs->r27; + env->regs[28] = regs->r28; + env->regs[29] = regs->r29; + env->regs[30] = regs->r30; + env->regs[31] = regs->r31; env->sregs[SR_PC] = regs->pc; } #elif defined(TARGET_MIPS) @@ -3536,7 +3536,7 @@ int main(int argc, char **argv, char **envp) env->regs[12] = regs->r12; env->regs[13] = regs->r13; env->regs[14] = info->start_stack; - env->regs[15] = regs->acr; + env->regs[15] = regs->acr; env->pc = regs->erp; } #elif defined(TARGET_S390X) diff --git a/qemu-0.15.x/linux-user/mmap.c b/qemu-0.15.x/linux-user/mmap.c index 994c02b..b8bae3d 100644 --- a/qemu-0.15.x/linux-user/mmap.c +++ b/qemu-0.15.x/linux-user/mmap.c @@ -410,12 +410,12 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, real_start = start & qemu_host_page_mask;
/* When mapping files into a memory area larger than the file, accesses - to pages beyond the file size will cause a SIGBUS. + to pages beyond the file size will cause a SIGBUS.
For example, if mmaping a file of 100 bytes on a host with 4K pages emulating a target with 8K pages, the target expects to be able to access the first 8K. But the host will trap us on any access beyond - 4K. + 4K.
When emulating a target with a larger page-size than the hosts, we may need to truncate file maps at EOF and add extra anonymous pages @@ -430,7 +430,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
/* Are we trying to create a map beyond EOF?. */ if (offset + len > sb.st_size) { - /* If so, truncate the file map at eof aligned with + /* If so, truncate the file map at eof aligned with the hosts real pagesize. Additional anonymous maps will be created beyond EOF. */ len = (sb.st_size - offset); @@ -460,7 +460,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, /* update start so that it points to the file position at 'offset' */ host_start = (unsigned long)p; if (!(flags & MAP_ANONYMOUS)) { - p = mmap(g2h(mmap_start), len, prot, + p = mmap(g2h(mmap_start), len, prot, flags | MAP_FIXED, fd, host_offset); host_start += offset - host_offset; } @@ -510,7 +510,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, } goto the_end; } - + /* handle the start of the mapping */ if (start > real_start) { if (real_end == real_start + qemu_host_page_size) { diff --git a/qemu-0.15.x/linux-user/signal.c b/qemu-0.15.x/linux-user/signal.c index 07ad07a..51a0102 100644 --- a/qemu-0.15.x/linux-user/signal.c +++ b/qemu-0.15.x/linux-user/signal.c @@ -914,7 +914,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, err |= __put_user(target_sigaltstack_used.ss_size, &frame->uc.tuc_stack.ss_size); err |= setup_sigcontext(&frame->uc.tuc_mcontext, &frame->fpstate, - env, set->sig[0], + env, set->sig[0], frame_addr + offsetof(struct rt_sigframe, fpstate)); for(i = 0; i < TARGET_NSIG_WORDS; i++) { if (__put_user(set->sig[i], &frame->uc.tuc_sigmask.sig[i])) @@ -990,7 +990,7 @@ restore_sigcontext(CPUX86State *env, struct target_sigcontext *sc, int *peax)
fpstate_addr = tswapl(sc->fpstate); if (fpstate_addr != 0) { - if (!access_ok(VERIFY_READ, fpstate_addr, + if (!access_ok(VERIFY_READ, fpstate_addr, sizeof(struct target_fpstate))) goto badframe; cpu_x86_frstor(env, fpstate_addr, 1); @@ -1054,7 +1054,7 @@ long do_rt_sigreturn(CPUX86State *env) if (restore_sigcontext(env, &frame->uc.tuc_mcontext, &eax)) goto badframe;
- if (do_sigaltstack(frame_addr + offsetof(struct rt_sigframe, uc.tuc_stack), 0, + if (do_sigaltstack(frame_addr + offsetof(struct rt_sigframe, uc.tuc_stack), 0, get_sp_from_cpustate(env)) == -EFAULT) goto badframe;
@@ -1882,7 +1882,7 @@ struct target_rt_signal_frame { #define UREG_FP UREG_I6 #define UREG_SP UREG_O6
-static inline abi_ulong get_sigframe(struct target_sigaction *sa, +static inline abi_ulong get_sigframe(struct target_sigaction *sa, CPUState *env, unsigned long framesize) { abi_ulong sp; @@ -1950,11 +1950,11 @@ static void setup_frame(int sig, struct target_sigaction *ka, sigframe_size = NF_ALIGNEDSZ; sf_addr = get_sigframe(ka, env, sigframe_size);
- sf = lock_user(VERIFY_WRITE, sf_addr, + sf = lock_user(VERIFY_WRITE, sf_addr, sizeof(struct target_signal_frame), 0); if (!sf) goto sigsegv; - + //fprintf(stderr, "sf: %x pc %x fp %x sp %x\n", sf, env->pc, env->regwptr[UREG_FP], env->regwptr[UREG_SP]); #if 0 if (invalid_frame_pointer(sf, sigframe_size)) @@ -1984,9 +1984,9 @@ static void setup_frame(int sig, struct target_sigaction *ka, /* 3. signal handler back-trampoline and parameters */ env->regwptr[UREG_FP] = sf_addr; env->regwptr[UREG_I0] = sig; - env->regwptr[UREG_I1] = sf_addr + + env->regwptr[UREG_I1] = sf_addr + offsetof(struct target_signal_frame, info); - env->regwptr[UREG_I2] = sf_addr + + env->regwptr[UREG_I2] = sf_addr + offsetof(struct target_signal_frame, info);
/* 4. signal handler */ @@ -1998,7 +1998,7 @@ static void setup_frame(int sig, struct target_sigaction *ka, else { uint32_t val32;
- env->regwptr[UREG_I7] = sf_addr + + env->regwptr[UREG_I7] = sf_addr + offsetof(struct target_signal_frame, insns) - 2 * 4;
/* mov __NR_sigreturn, %g1 */ @@ -2286,10 +2286,10 @@ void sparc64_set_context(CPUSPARCState *env) err |= __get_user(i7, &(ucp->tuc_mcontext.mc_i7));
w_addr = TARGET_STACK_BIAS+env->regwptr[UREG_I6]; - if (put_user(fp, w_addr + offsetof(struct target_reg_window, ins[6]), + if (put_user(fp, w_addr + offsetof(struct target_reg_window, ins[6]), abi_ulong) != 0) goto do_sigsegv; - if (put_user(i7, w_addr + offsetof(struct target_reg_window, ins[7]), + if (put_user(i7, w_addr + offsetof(struct target_reg_window, ins[7]), abi_ulong) != 0) goto do_sigsegv; /* FIXME this does not match how the kernel handles the FPU in @@ -2334,7 +2334,7 @@ void sparc64_get_context(CPUSPARCState *env) ucp_addr = env->regwptr[UREG_I0]; if (!lock_user_struct(VERIFY_WRITE, ucp, ucp_addr, 0)) goto do_sigsegv; - + mcp = &ucp->tuc_mcontext; grp = &mcp->mc_gregs;
@@ -2383,10 +2383,10 @@ void sparc64_get_context(CPUSPARCState *env)
w_addr = TARGET_STACK_BIAS+env->regwptr[UREG_I6]; fp = i7 = 0; - if (get_user(fp, w_addr + offsetof(struct target_reg_window, ins[6]), + if (get_user(fp, w_addr + offsetof(struct target_reg_window, ins[6]), abi_ulong) != 0) goto do_sigsegv; - if (get_user(i7, w_addr + offsetof(struct target_reg_window, ins[7]), + if (get_user(i7, w_addr + offsetof(struct target_reg_window, ins[7]), abi_ulong) != 0) goto do_sigsegv; err |= __put_user(fp, &(mcp->mc_fp)); @@ -3431,7 +3431,7 @@ long do_sigreturn(CPUState *env) /* We got here through a sigreturn syscall, our path back is via an rtb insn so setup r14 for that. */ env->regs[14] = env->sregs[SR_PC]; - + unlock_user_struct(frame, frame_addr, 0); return env->regs[10]; badframe: @@ -3542,7 +3542,7 @@ static void setup_frame(int sig, struct target_sigaction *ka, * This is movu.w __NR_sigreturn, r9; break 13; */ err |= __put_user(0x9c5f, frame->retcode+0); - err |= __put_user(TARGET_NR_sigreturn, + err |= __put_user(TARGET_NR_sigreturn, frame->retcode+2); err |= __put_user(0xe93d, frame->retcode+4);
@@ -4568,7 +4568,7 @@ struct target_sigframe abi_ulong extramask[TARGET_NSIG_WORDS-1]; struct target_sigcontext sc; }; - + typedef int target_greg_t; #define TARGET_NGREG 18 typedef target_greg_t target_gregset_t[TARGET_NGREG]; @@ -4742,7 +4742,7 @@ static inline int target_rt_setup_ucontext(struct target_ucontext *uc,
return err; } - + static inline int target_rt_restore_ucontext(CPUState *env, struct target_ucontext *uc, int *pd0) @@ -4750,7 +4750,7 @@ static inline int target_rt_restore_ucontext(CPUState *env, int temp; int err; target_greg_t *gregs = uc->tuc_mcontext.gregs; - + err = __get_user(temp, &uc->tuc_mcontext.version); if (temp != TARGET_MCONTEXT_VERSION) goto badframe; diff --git a/qemu-0.15.x/linux-user/syscall.c b/qemu-0.15.x/linux-user/syscall.c index 73f9baa..0b92b9f 100644 --- a/qemu-0.15.x/linux-user/syscall.c +++ b/qemu-0.15.x/linux-user/syscall.c @@ -581,7 +581,7 @@ extern int setfsgid(int); extern int setgroups(int, gid_t *);
/* ARM EABI and MIPS expect 64bit types aligned even on pairs or registers */ -#ifdef TARGET_ARM +#ifdef TARGET_ARM static inline int regpairs_aligned(void *cpu_env) { return ((((CPUARMState *)cpu_env)->eabi) == 1) ; } @@ -947,13 +947,13 @@ static inline rlim_t target_to_host_rlim(target_ulong target_rlim) { target_ulong target_rlim_swap; rlim_t result; - + target_rlim_swap = tswapl(target_rlim); if (target_rlim_swap == TARGET_RLIM_INFINITY || target_rlim_swap != (rlim_t)target_rlim_swap) result = RLIM_INFINITY; else result = target_rlim_swap; - + return result; }
@@ -961,13 +961,13 @@ static inline target_ulong host_to_target_rlim(rlim_t rlim) { target_ulong target_rlim_swap; target_ulong result; - + if (rlim == RLIM_INFINITY || rlim != (target_long)rlim) target_rlim_swap = TARGET_RLIM_INFINITY; else target_rlim_swap = rlim; result = tswapl(target_rlim_swap); - + return result; }
@@ -1256,9 +1256,9 @@ static inline abi_long target_to_host_cmsg(struct msghdr *msgh, abi_ulong target_cmsg_addr; struct target_cmsghdr *target_cmsg; socklen_t space = 0; - + msg_controllen = tswapl(target_msgh->msg_controllen); - if (msg_controllen < sizeof (struct target_cmsghdr)) + if (msg_controllen < sizeof (struct target_cmsghdr)) goto the_end; target_cmsg_addr = tswapl(target_msgh->msg_control); target_cmsg = lock_user(VERIFY_READ, target_cmsg_addr, msg_controllen, 1); @@ -1315,7 +1315,7 @@ static inline abi_long host_to_target_cmsg(struct target_msghdr *target_msgh, socklen_t space = 0;
msg_controllen = tswapl(target_msgh->msg_controllen); - if (msg_controllen < sizeof (struct target_cmsghdr)) + if (msg_controllen < sizeof (struct target_cmsghdr)) goto the_end; target_cmsg_addr = tswapl(target_msgh->msg_control); target_cmsg = lock_user(VERIFY_WRITE, target_cmsg_addr, msg_controllen, 0); @@ -3767,7 +3767,7 @@ static abi_long do_set_thread_area(CPUX86State *env, abi_ulong ptr) } unlock_user_struct(target_ldt_info, ptr, 1);
- if (ldt_info.entry_number < TARGET_GDT_ENTRY_TLS_MIN || + if (ldt_info.entry_number < TARGET_GDT_ENTRY_TLS_MIN || ldt_info.entry_number > TARGET_GDT_ENTRY_TLS_MAX) return -TARGET_EINVAL; seg_32bit = ldt_info.flags & 1; @@ -3845,7 +3845,7 @@ static abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr) lp = (uint32_t *)(gdt_table + idx); entry_1 = tswap32(lp[0]); entry_2 = tswap32(lp[1]); - + read_exec_only = ((entry_2 >> 9) & 1) ^ 1; contents = (entry_2 >> 10) & 3; seg_not_present = ((entry_2 >> 15) & 1) ^ 1; @@ -3861,8 +3861,8 @@ static abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr) (read_exec_only << 3) | (limit_in_pages << 4) | (seg_not_present << 5) | (useable << 6) | (lm << 7); limit = (entry_1 & 0xffff) | (entry_2 & 0xf0000); - base_addr = (entry_1 >> 16) | - (entry_2 & 0xff000000) | + base_addr = (entry_1 >> 16) | + (entry_2 & 0xff000000) | ((entry_2 & 0xff) << 16); target_ldt_info->base_addr = tswapl(base_addr); target_ldt_info->limit = tswap32(limit); @@ -7080,7 +7080,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, break; #if defined(TARGET_NR_fchownat) && defined(__NR_fchownat) case TARGET_NR_fchownat: - if (!(p = lock_user_string(arg2))) + if (!(p = lock_user_string(arg2))) goto efault; ret = get_errno(sys_fchownat(arg1, p, low2highuid(arg3), low2highgid(arg4), arg5)); unlock_user(p, arg2, 0); @@ -7521,7 +7521,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_F_GETLK64: #ifdef TARGET_ARM if (((CPUARMState *)cpu_env)->eabi) { - if (!lock_user_struct(VERIFY_READ, target_efl, arg3, 1)) + if (!lock_user_struct(VERIFY_READ, target_efl, arg3, 1)) goto efault; fl.l_type = tswap16(target_efl->l_type); fl.l_whence = tswap16(target_efl->l_whence); @@ -7532,7 +7532,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } else #endif { - if (!lock_user_struct(VERIFY_READ, target_fl, arg3, 1)) + if (!lock_user_struct(VERIFY_READ, target_fl, arg3, 1)) goto efault; fl.l_type = tswap16(target_fl->l_type); fl.l_whence = tswap16(target_fl->l_whence); @@ -7545,7 +7545,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, if (ret == 0) { #ifdef TARGET_ARM if (((CPUARMState *)cpu_env)->eabi) { - if (!lock_user_struct(VERIFY_WRITE, target_efl, arg3, 0)) + if (!lock_user_struct(VERIFY_WRITE, target_efl, arg3, 0)) goto efault; target_efl->l_type = tswap16(fl.l_type); target_efl->l_whence = tswap16(fl.l_whence); @@ -7556,7 +7556,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } else #endif { - if (!lock_user_struct(VERIFY_WRITE, target_fl, arg3, 0)) + if (!lock_user_struct(VERIFY_WRITE, target_fl, arg3, 0)) goto efault; target_fl->l_type = tswap16(fl.l_type); target_fl->l_whence = tswap16(fl.l_whence); @@ -7572,7 +7572,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_F_SETLKW64: #ifdef TARGET_ARM if (((CPUARMState *)cpu_env)->eabi) { - if (!lock_user_struct(VERIFY_READ, target_efl, arg3, 1)) + if (!lock_user_struct(VERIFY_READ, target_efl, arg3, 1)) goto efault; fl.l_type = tswap16(target_efl->l_type); fl.l_whence = tswap16(target_efl->l_whence); @@ -7583,7 +7583,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } else #endif { - if (!lock_user_struct(VERIFY_READ, target_fl, arg3, 1)) + if (!lock_user_struct(VERIFY_READ, target_fl, arg3, 1)) goto efault; fl.l_type = tswap16(target_fl->l_type); fl.l_whence = tswap16(target_fl->l_whence); diff --git a/qemu-0.15.x/linux-user/syscall_defs.h b/qemu-0.15.x/linux-user/syscall_defs.h index a117407..7e1daa5 100644 --- a/qemu-0.15.x/linux-user/syscall_defs.h +++ b/qemu-0.15.x/linux-user/syscall_defs.h @@ -1729,7 +1729,7 @@ struct target_stat { abi_long st_blocks; /* Number 512-byte blocks allocated. */
abi_ulong target_st_atime; - abi_ulong target_st_atime_nsec; + abi_ulong target_st_atime_nsec; abi_ulong target_st_mtime; abi_ulong target_st_mtime_nsec; abi_ulong target_st_ctime; diff --git a/qemu-0.15.x/linux-user/uaccess.c b/qemu-0.15.x/linux-user/uaccess.c index a4d108c..6594af7 100644 --- a/qemu-0.15.x/linux-user/uaccess.c +++ b/qemu-0.15.x/linux-user/uaccess.c @@ -55,7 +55,7 @@ abi_long target_strlen(abi_ulong guest_addr1) unlock_user(ptr, guest_addr, 0); guest_addr += len; /* we don't allow wrapping or integer overflow */ - if (guest_addr == 0 || + if (guest_addr == 0 || (guest_addr - guest_addr1) > 0x7fffffff) return -TARGET_EFAULT; if (len != max_len) diff --git a/qemu-0.15.x/microblaze-dis.c b/qemu-0.15.x/microblaze-dis.c index 16c312f..6ff4c25 100644 --- a/qemu-0.15.x/microblaze-dis.c +++ b/qemu-0.15.x/microblaze-dis.c @@ -15,15 +15,15 @@ You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses/. */
/* - * Copyright (c) 2001 Xilinx, Inc. All rights reserved. + * Copyright (c) 2001 Xilinx, Inc. All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed - * by Xilinx, Inc. The name of the Company may not be used to endorse - * or promote products derived from this software without specific prior + * by Xilinx, Inc. The name of the Company may not be used to endorse + * or promote products derived from this software without specific prior * written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED @@ -45,7 +45,7 @@ along with this program; if not, see http://www.gnu.org/licenses/. */ /* Assembler instructions for Xilinx's microblaze processor Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -60,15 +60,15 @@ You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses/. */
/* - * Copyright (c) 2001 Xilinx, Inc. All rights reserved. + * Copyright (c) 2001 Xilinx, Inc. All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed - * by Xilinx, Inc. The name of the Company may not be used to endorse - * or promote products derived from this software without specific prior + * by Xilinx, Inc. The name of the Company may not be used to endorse + * or promote products derived from this software without specific prior * written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED @@ -82,15 +82,15 @@ along with this program; if not, see http://www.gnu.org/licenses/. */ #define MICROBLAZE_OPCM
/* - * Copyright (c) 2001 Xilinx, Inc. All rights reserved. + * Copyright (c) 2001 Xilinx, Inc. All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed - * by Xilinx, Inc. The name of the Company may not be used to endorse - * or promote products derived from this software without specific prior + * by Xilinx, Inc. The name of the Company may not be used to endorse + * or promote products derived from this software without specific prior * written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED @@ -111,8 +111,8 @@ enum microblaze_instr { imm, rtsd, rtid, rtbd, rted, bri, brid, brlid, brai, braid, bralid, brki, beqi, beqid, bnei, bneid, blti, bltid, blei, bleid, bgti, bgtid, bgei, bgeid, lbu, lhu, lw, lwx, sb, sh, sw, swx, lbui, lhui, lwi, - sbi, shi, swi, msrset, msrclr, tuqula, fadd, frsub, fmul, fdiv, - fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt, fint, fsqrt, + sbi, shi, swi, msrset, msrclr, tuqula, fadd, frsub, fmul, fdiv, + fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt, fint, fsqrt, tget, tcget, tnget, tncget, tput, tcput, tnput, tncput, eget, ecget, neget, necget, eput, ecput, neput, necput, teget, tecget, tneget, tnecget, teput, tecput, tneput, tnecput, @@ -186,7 +186,7 @@ enum microblaze_instr_type { /* Assembler Register - Used in Delay Slot Optimization */ #define REG_AS 18 #define REG_ZERO 0 - + #define RD_LOW 21 /* low bit for RD */ #define RA_LOW 16 /* low bit for RA */ #define RB_LOW 11 /* low bit for RB */ @@ -262,7 +262,7 @@ enum microblaze_instr_type { #define OPCODE_MASK_H24 0xFC1F07FF /* High 6, bits 20-16 and low 11 bits */ #define OPCODE_MASK_H124 0xFFFF07FF /* High 16, and low 11 bits */ #define OPCODE_MASK_H1234 0xFFFFFFFF /* All 32 bits */ -#define OPCODE_MASK_H3 0xFC000600 /* High 6 bits and bits 21, 22 */ +#define OPCODE_MASK_H3 0xFC000600 /* High 6 bits and bits 21, 22 */ #define OPCODE_MASK_H32 0xFC00FC00 /* High 6 bits and bit 16-21 */ #define OPCODE_MASK_H34B 0xFC0000FF /* High 6 bits and low 8 bits */ #define OPCODE_MASK_H34C 0xFC0007E0 /* High 6 bits and bits 21-26 */ @@ -281,14 +281,14 @@ struct op_code_struct { short inst_offset_type; /* immediate vals offset from PC? (= 1 for branches) */ short delay_slots; /* info about delay slots needed after this instr. */ short immval_mask; - unsigned long bit_sequence; /* all the fixed bits for the op are set and all the variable bits (reg names, imm vals) are set to 0 */ + unsigned long bit_sequence; /* all the fixed bits for the op are set and all the variable bits (reg names, imm vals) are set to 0 */ unsigned long opcode_mask; /* which bits define the opcode */ enum microblaze_instr instr; enum microblaze_instr_type instr_type; /* more info about output format here */ -} opcodes[MAX_OPCODES] = +} opcodes[MAX_OPCODES] =
-{ +{ {"add", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x00000000, OPCODE_MASK_H4, add, arithmetic_inst }, {"rsub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H4, rsub, arithmetic_inst }, {"addc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x08000000, OPCODE_MASK_H4, addc, arithmetic_inst }, @@ -441,7 +441,7 @@ struct op_code_struct { {"tcput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00B000, OPCODE_MASK_H32, tcput, anyware_inst }, {"tnput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00D000, OPCODE_MASK_H32, tnput, anyware_inst }, {"tncput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00F000, OPCODE_MASK_H32, tncput, anyware_inst }, - + {"eget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C000400, OPCODE_MASK_H32, eget, anyware_inst }, {"ecget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C002400, OPCODE_MASK_H32, ecget, anyware_inst }, {"neget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C004400, OPCODE_MASK_H32, neget, anyware_inst }, @@ -450,7 +450,7 @@ struct op_code_struct { {"ecput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00A400, OPCODE_MASK_H32, ecput, anyware_inst }, {"neput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00C400, OPCODE_MASK_H32, neput, anyware_inst }, {"necput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00E400, OPCODE_MASK_H32, necput, anyware_inst }, - + {"teget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C001400, OPCODE_MASK_H32, teget, anyware_inst }, {"tecget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C003400, OPCODE_MASK_H32, tecget, anyware_inst }, {"tneget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C005400, OPCODE_MASK_H32, tneget, anyware_inst }, @@ -459,7 +459,7 @@ struct op_code_struct { {"tecput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00B400, OPCODE_MASK_H32, tecput, anyware_inst }, {"tneput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00D400, OPCODE_MASK_H32, tneput, anyware_inst }, {"tnecput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00F400, OPCODE_MASK_H32, tnecput, anyware_inst }, - + {"aget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C000800, OPCODE_MASK_H32, aget, anyware_inst }, {"caget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C002800, OPCODE_MASK_H32, caget, anyware_inst }, {"naget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C004800, OPCODE_MASK_H32, naget, anyware_inst }, @@ -468,7 +468,7 @@ struct op_code_struct { {"caput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00A800, OPCODE_MASK_H32, caput, anyware_inst }, {"naput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00C800, OPCODE_MASK_H32, naput, anyware_inst }, {"ncaput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00E800, OPCODE_MASK_H32, ncaput, anyware_inst }, - + {"taget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C001800, OPCODE_MASK_H32, taget, anyware_inst }, {"tcaget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C003800, OPCODE_MASK_H32, tcaget, anyware_inst }, {"tnaget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C005800, OPCODE_MASK_H32, tnaget, anyware_inst }, @@ -477,7 +477,7 @@ struct op_code_struct { {"tcaput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00B800, OPCODE_MASK_H32, tcaput, anyware_inst }, {"tnaput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00D800, OPCODE_MASK_H32, tnaput, anyware_inst }, {"tncaput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00F800, OPCODE_MASK_H32, tncaput, anyware_inst }, - + {"eaget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C000C00, OPCODE_MASK_H32, eget, anyware_inst }, {"ecaget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C002C00, OPCODE_MASK_H32, ecget, anyware_inst }, {"neaget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C004C00, OPCODE_MASK_H32, neget, anyware_inst }, @@ -486,7 +486,7 @@ struct op_code_struct { {"ecaput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00AC00, OPCODE_MASK_H32, ecput, anyware_inst }, {"neaput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00CC00, OPCODE_MASK_H32, neput, anyware_inst }, {"necaput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00EC00, OPCODE_MASK_H32, necput, anyware_inst }, - + {"teaget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C001C00, OPCODE_MASK_H32, teaget, anyware_inst }, {"tecaget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C003C00, OPCODE_MASK_H32, tecaget, anyware_inst }, {"tneaget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C005C00, OPCODE_MASK_H32, tneaget, anyware_inst }, @@ -495,7 +495,7 @@ struct op_code_struct { {"tecaput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00BC00, OPCODE_MASK_H32, tecaput, anyware_inst }, {"tneaput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00DC00, OPCODE_MASK_H32, tneaput, anyware_inst }, {"tnecaput", INST_TYPE_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00FC00, OPCODE_MASK_H32, tnecaput, anyware_inst }, - + {"getd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000000, OPCODE_MASK_H34C, getd, anyware_inst }, {"tgetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000080, OPCODE_MASK_H34C, tgetd, anyware_inst }, {"cgetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000100, OPCODE_MASK_H34C, cgetd, anyware_inst }, @@ -512,7 +512,7 @@ struct op_code_struct { {"tnputd", INST_TYPE_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000680, OPCODE_MASK_H34C, tnputd, anyware_inst }, {"ncputd", INST_TYPE_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000700, OPCODE_MASK_H34C, ncputd, anyware_inst }, {"tncputd", INST_TYPE_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000780, OPCODE_MASK_H34C, tncputd, anyware_inst }, - + {"egetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000020, OPCODE_MASK_H34C, egetd, anyware_inst }, {"tegetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C0000A0, OPCODE_MASK_H34C, tegetd, anyware_inst }, {"ecgetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000120, OPCODE_MASK_H34C, ecgetd, anyware_inst }, @@ -529,7 +529,7 @@ struct op_code_struct { {"tneputd", INST_TYPE_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C0006A0, OPCODE_MASK_H34C, tneputd, anyware_inst }, {"necputd", INST_TYPE_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000720, OPCODE_MASK_H34C, necputd, anyware_inst }, {"tnecputd", INST_TYPE_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C0007A0, OPCODE_MASK_H34C, tnecputd, anyware_inst }, - + {"agetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000040, OPCODE_MASK_H34C, agetd, anyware_inst }, {"tagetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C0000C0, OPCODE_MASK_H34C, tagetd, anyware_inst }, {"cagetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000140, OPCODE_MASK_H34C, cagetd, anyware_inst }, @@ -546,7 +546,7 @@ struct op_code_struct { {"tnaputd", INST_TYPE_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C0006C0, OPCODE_MASK_H34C, tnaputd, anyware_inst }, {"ncaputd", INST_TYPE_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000740, OPCODE_MASK_H34C, ncaputd, anyware_inst }, {"tncaputd", INST_TYPE_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C0007C0, OPCODE_MASK_H34C, tncaputd, anyware_inst }, - + {"eagetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000060, OPCODE_MASK_H34C, eagetd, anyware_inst }, {"teagetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C0000E0, OPCODE_MASK_H34C, teagetd, anyware_inst }, {"ecagetd", INST_TYPE_RD_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x4C000160, OPCODE_MASK_H34C, ecagetd, anyware_inst }, @@ -602,7 +602,7 @@ static char * get_field_imm15 (long instr); static char * get_field_unsigned_imm (long instr); #endif char * get_field_special (long instr, struct op_code_struct * op); -unsigned long read_insn_microblaze (bfd_vma memaddr, +unsigned long read_insn_microblaze (bfd_vma memaddr, struct disassemble_info *info, struct op_code_struct **opr); enum microblaze_instr get_insn_microblaze (long inst, @@ -611,9 +611,9 @@ enum microblaze_instr get_insn_microblaze (long inst, short *delay_slots); short get_delay_slots_microblaze (long inst); enum microblaze_instr microblaze_decode_insn (long insn, - int *rd, - int *ra, - int *rb, + int *rd, + int *ra, + int *rb, int *imm); unsigned long microblaze_get_target_address (long inst, @@ -677,13 +677,13 @@ get_field_unsigned_imm (long instr)
/* char * - get_field_special (instr) + get_field_special (instr) long instr; { char tmpstr[25]; - + sprintf(tmpstr, "%s%s", register_prefix, (((instr & IMM_MASK) >> IMM_LOW) & REG_MSR_MASK) == 0 ? "pc" : "msr"); - + return(strdup(tmpstr)); } */ @@ -713,7 +713,7 @@ get_field_special (long instr, struct op_code_struct * op) break; case REG_BTR_MASK : strcpy(spr, "btr"); - break; + break; case REG_EDR_MASK : strcpy(spr, "edr"); break; @@ -746,13 +746,13 @@ get_field_special (long instr, struct op_code_struct * op) } break; } - + sprintf(tmpstr, "%s%s", register_prefix, spr); return(strdup(tmpstr)); }
unsigned long -read_insn_microblaze (bfd_vma memaddr, +read_insn_microblaze (bfd_vma memaddr, struct disassemble_info *info, struct op_code_struct **opr) { @@ -763,7 +763,7 @@ read_insn_microblaze (bfd_vma memaddr,
status = info->read_memory_func (memaddr, ibytes, 4, info);
- if (status != 0) + if (status != 0) { info->memory_error_func (status, memaddr, info); return 0; @@ -786,7 +786,7 @@ read_insn_microblaze (bfd_vma memaddr, }
-int +int print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) { fprintf_function fprintf_func = info->fprintf_func; @@ -805,7 +805,7 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) if (inst == 0) { return -1; } - + if (prev_insn_vma == curr_insn_vma) { if (memaddr-(info->bytes_per_chunk) == prev_insn_addr) { prev_inst = read_insn_microblaze (prev_insn_addr, info, &pop); @@ -831,7 +831,7 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) else { fprintf_func (stream, "%s", op->name); - + switch (op->inst_type) { case INST_TYPE_RD_R1_R2: @@ -876,7 +876,7 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) break; case INST_TYPE_R1_IMM: fprintf_func(stream, "\t%s, %s", get_field_r1(inst), get_field_imm(inst)); - /* The non-pc relative instructions are returns, which shouldn't + /* The non-pc relative instructions are returns, which shouldn't have a label printed */ if (info->print_address_func && op->inst_offset_type == INST_PC_OFFSET && info->symbol_at_address_func) { if (immfound) @@ -911,7 +911,7 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) if (info->symbol_at_address_func(immval, info)) { fprintf_func (stream, "\t// "); info->print_address_func (immval, info); - } + } } break; case INST_TYPE_IMM: @@ -963,7 +963,7 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) break; } } - + /* Say how many bytes we consumed? */ return 4; } @@ -1003,15 +1003,15 @@ get_delay_slots_microblaze (long inst) op = get_insn_microblaze( inst, &isunsignedimm, &insn_type, &delay_slots); if (op == invalid_inst) return 0; - else + else return delay_slots; }
enum microblaze_instr microblaze_decode_insn (long insn, - int *rd, - int *ra, - int *rb, + int *rd, + int *ra, + int *rb, int *imm) { enum microblaze_instr op; diff --git a/qemu-0.15.x/migration.c b/qemu-0.15.x/migration.c index 2a15b98..4500f54 100644 --- a/qemu-0.15.x/migration.c +++ b/qemu-0.15.x/migration.c @@ -106,7 +106,7 @@ int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data) s = unix_start_outgoing_migration(mon, p, max_throttle, detach, blk, inc); } else if (strstart(uri, "fd:", &p)) { - s = fd_start_outgoing_migration(mon, p, max_throttle, detach, + s = fd_start_outgoing_migration(mon, p, max_throttle, detach, blk, inc); #endif } else { @@ -359,7 +359,7 @@ void migrate_fd_connect(FdMigrationState *s) migrate_fd_error(s); return; } - + migrate_fd_put_ready(s); }
@@ -426,7 +426,7 @@ void migrate_fd_release(MigrationState *mig_state) FdMigrationState *s = migrate_to_fms(mig_state);
DPRINTF("releasing state\n"); - + if (s->state == MIG_STATE_ACTIVE) { s->state = MIG_STATE_CANCELLED; notifier_list_notify(&migration_state_notifiers, NULL); diff --git a/qemu-0.15.x/monitor.c b/qemu-0.15.x/monitor.c index c090bd5..0640e6a 100644 --- a/qemu-0.15.x/monitor.c +++ b/qemu-0.15.x/monitor.c @@ -632,7 +632,7 @@ static void do_trace_file(Monitor *mon, const QDict *qdict)
static void user_monitor_complete(void *opaque, QObject *ret_data) { - MonitorCompletionData *data = (MonitorCompletionData *)opaque; + MonitorCompletionData *data = (MonitorCompletionData *)opaque;
if (ret_data) { data->user_print(data->mon, ret_data); @@ -4083,11 +4083,11 @@ static int default_fmt_size = 4; static int is_valid_option(const char *c, const char *typestr) { char option[3]; - + option[0] = '-'; option[1] = *c; option[2] = '\0'; - + typestr = strstr(typestr, option); return (typestr != NULL); } @@ -4427,7 +4427,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon, p++; if(c != *p) { if(!is_valid_option(p, typestr)) { - + monitor_printf(mon, "%s: unsupported option -%c\n", cmdname, *p); goto fail; @@ -4846,7 +4846,7 @@ static int check_client_args_type(const QDict *client_args, if (qobject_type(client_arg) != QTYPE_QINT) { qerror_report(QERR_INVALID_PARAMETER_TYPE, client_arg_name, "int"); - return -1; + return -1; } break; case 'T': @@ -4854,7 +4854,7 @@ static int check_client_args_type(const QDict *client_args, qobject_type(client_arg) != QTYPE_QFLOAT) { qerror_report(QERR_INVALID_PARAMETER_TYPE, client_arg_name, "number"); - return -1; + return -1; } break; case 'b': @@ -4862,7 +4862,7 @@ static int check_client_args_type(const QDict *client_args, if (qobject_type(client_arg) != QTYPE_QBOOL) { qerror_report(QERR_INVALID_PARAMETER_TYPE, client_arg_name, "bool"); - return -1; + return -1; } break; case 'O': diff --git a/qemu-0.15.x/qemu-img.c b/qemu-0.15.x/qemu-img.c index b205e98..b816ed9 100644 --- a/qemu-0.15.x/qemu-img.c +++ b/qemu-0.15.x/qemu-img.c @@ -709,7 +709,7 @@ static int img_convert(int argc, char **argv) ret = -1; goto out; } - + qemu_progress_init(progress, 2.0); qemu_progress_print(0, 100);
diff --git a/qemu-0.15.x/qemu-log.h b/qemu-0.15.x/qemu-log.h index fccfb11..f019388 100644 --- a/qemu-0.15.x/qemu-log.h +++ b/qemu-0.15.x/qemu-log.h @@ -6,7 +6,7 @@ extern FILE *logfile; extern int loglevel;
-/* +/* * The new API: * */ diff --git a/qemu-0.15.x/qemu-tech.texi b/qemu-0.15.x/qemu-tech.texi index 138e3ce..d693b7d 100644 --- a/qemu-0.15.x/qemu-tech.texi +++ b/qemu-0.15.x/qemu-tech.texi @@ -126,7 +126,7 @@ QEMU full system emulation features: QEMU uses a full software MMU for maximum portability.
@item -QEMU can optionally use an in-kernel accelerator, like kvm. The accelerators +QEMU can optionally use an in-kernel accelerator, like kvm. The accelerators execute some of the guest code natively, while continuing to emulate the rest of the machine.
diff --git a/qemu-0.15.x/qemu-timer.c b/qemu-0.15.x/qemu-timer.c index 30e8f12..da3111e 100644 --- a/qemu-0.15.x/qemu-timer.c +++ b/qemu-0.15.x/qemu-timer.c @@ -580,7 +580,7 @@ static void qemu_run_timers(QEMUClock *clock) { QEMUTimer **ptimer_head, *ts; int64_t current_time; - + if (!clock->enabled) return;
@@ -845,7 +845,7 @@ static int dynticks_start_timer(struct qemu_alarm_timer *t)
sigaction(SIGALRM, &act, NULL);
- /* + /* * Initialize ev struct to 0 to avoid valgrind complaining * about uninitialized data in timer_create call */ diff --git a/qemu-0.15.x/qerror.c b/qemu-0.15.x/qerror.c index 69c1bc9..691b72f 100644 --- a/qemu-0.15.x/qerror.c +++ b/qemu-0.15.x/qerror.c @@ -286,7 +286,7 @@ static void GCC_FMT_ATTR(2, 0) qerror_set_data(QError *qerr, if (qobject_type(obj) != QTYPE_QSTRING) { qerror_abort(qerr, "'class' key value should be a QString"); } - + obj = qdict_get(qerr->error, "data"); if (!obj) { qerror_abort(qerr, "missing 'data' key in '%s'", fmt); diff --git a/qemu-0.15.x/qjson.c b/qemu-0.15.x/qjson.c index f9c8e77..4ef29f3 100644 --- a/qemu-0.15.x/qjson.c +++ b/qemu-0.15.x/qjson.c @@ -254,7 +254,7 @@ static void to_json(const QObject *obj, QString *str, int pretty, int indent) } else { buffer[len] = 0; } - + qstring_append(str, buffer); break; } diff --git a/qemu-0.15.x/qlist.c b/qemu-0.15.x/qlist.c index 5730fb8..b25acf7 100644 --- a/qemu-0.15.x/qlist.c +++ b/qemu-0.15.x/qlist.c @@ -21,7 +21,7 @@ static const QType qlist_type = { .code = QTYPE_QLIST, .destroy = qlist_destroy_obj, }; - + /** * qlist_new(): Create a new QList * diff --git a/qemu-0.15.x/qmp-commands.hx b/qemu-0.15.x/qmp-commands.hx index 54e313c..2b24701 100644 --- a/qemu-0.15.x/qmp-commands.hx +++ b/qemu-0.15.x/qmp-commands.hx @@ -99,7 +99,7 @@ eject
Eject a removable medium.
-Arguments: +Arguments:
- force: force ejection (json-bool, optional) - device: device name (json-string) @@ -986,7 +986,7 @@ human-monitor-command
Execute a Human Monitor command.
-Arguments: +Arguments:
- command-line: the command name and its arguments, just like the Human Monitor's shell (json-string) @@ -1406,7 +1406,7 @@ Example: }, "function":0, "regions":[ - + ] }, { @@ -1423,7 +1423,7 @@ Example: }, "function":0, "regions":[ - + ] }, { diff --git a/qemu-0.15.x/readline.c b/qemu-0.15.x/readline.c index 92f9cd1..346c60c 100644 --- a/qemu-0.15.x/readline.c +++ b/qemu-0.15.x/readline.c @@ -317,7 +317,7 @@ static void readline_completion(ReadLineState *rs) if (len > max_width) max_width = len; } - if (max_prefix > 0) + if (max_prefix > 0) for(i = rs->completion_index; i < max_prefix; i++) { readline_insert_char(rs, rs->completions[0][i]); } diff --git a/qemu-0.15.x/roms/SLOF/INSTALL b/qemu-0.15.x/roms/SLOF/INSTALL index 6fcdd31..365ff30 100644 --- a/qemu-0.15.x/roms/SLOF/INSTALL +++ b/qemu-0.15.x/roms/SLOF/INSTALL @@ -69,25 +69,25 @@ INSTALL UNINSTALL ===============================================================================
- If you want to boot the original firmware again, you need to boot the blade + If you want to boot the original firmware again, you need to boot the blade from the management module. If auto-boot is enabled you have to press "s" to reach the firmware prompt. On the SLOF command line, type:
0 > other-firmware
- and it should get you back to running the original firmware. To permanently + and it should get you back to running the original firmware. To permanently get it back, after booting Linux from there, type
$ update_flash -r $ halt - + You will boot on the PERM side. To boot from the TEMP side again, you need to restart the Blade System MGMT Processor.
Following steps are needed on Management Module -> Blade Tasks -> Power/Restart - + Power Off Blade - Restart Blade System Mgmt Processor + Restart Blade System Mgmt Processor Power On Blade diff --git a/qemu-0.15.x/roms/SLOF/LICENSE b/qemu-0.15.x/roms/SLOF/LICENSE index 4830faf..adeffa8 100644 --- a/qemu-0.15.x/roms/SLOF/LICENSE +++ b/qemu-0.15.x/roms/SLOF/LICENSE @@ -3,6 +3,6 @@ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -Neither the name of IBM nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +Neither the name of IBM nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/qemu-0.15.x/roms/SLOF/Makefile.gen b/qemu-0.15.x/roms/SLOF/Makefile.gen index 3c5d116..099b832 100644 --- a/qemu-0.15.x/roms/SLOF/Makefile.gen +++ b/qemu-0.15.x/roms/SLOF/Makefile.gen @@ -77,20 +77,20 @@ ifeq ($(DO_COMPRESS),1)
@echo "romfs.pack boot_rom.bin.pack.nv 0 0" >> ../.boot_rom.ffs
- cat $(SLOFBRDDIR)/OF.ffs >> ../.boot_rom.pack.ffs + cat $(SLOFBRDDIR)/OF.ffs >> ../.boot_rom.pack.ffs @echo build_info.img build_info.img 0 0 >> ../.boot_rom.pack.ffs @if [ -e ../$(SUBBOARD).dtb ]; then \ echo dtb $(SUBBOARD).dtb $(DTB_ROMFS_FLAG) \ $(DTB_ROMFS_ADDR) >> ../.boot_rom.pack.ffs; \ fi; cd .. && ./romfs/tools/build_romfs $(ROMFS_OPTIONS) .boot_rom.pack.ffs boot_rom.bin.pack - cd .. && ./tools/pknova -q boot_rom.bin.pack boot_rom.bin.pack.nv; - cd .. && ./romfs/tools/build_romfs $(ROMFS_OPTIONS) .boot_rom.ffs $@ + cd .. && ./tools/pknova -q boot_rom.bin.pack boot_rom.bin.pack.nv; + cd .. && ./romfs/tools/build_romfs $(ROMFS_OPTIONS) .boot_rom.ffs $@ if [ "$@" = "boot_rom.bin" ]; then \ rm ../boot_rom.bin.pack; \ rm ../boot_rom.bin.pack.nv; \ fi; -else +else @echo " ====== Building $@ ======" @if [ -e $(ROMFSBRDDIR)/boot_rom.$(SUBBOARD).ffs ]; then \ cat $(ROMFSBRDDIR)/boot_rom.$(SUBBOARD).ffs > ../.boot_rom.ffs; \ diff --git a/qemu-0.15.x/roms/SLOF/README b/qemu-0.15.x/roms/SLOF/README index c4fc677..1f92347 100644 --- a/qemu-0.15.x/roms/SLOF/README +++ b/qemu-0.15.x/roms/SLOF/README @@ -35,15 +35,15 @@ The full documentation of this Standard can be found in [1]. 1.1 Build process ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-Open Firmware (OF) is based on the programming language Forth. +Open Firmware (OF) is based on the programming language Forth. SLOF use Paflof as the Forth engine, which was developed by -Segher Boessenkool. Most parts of the Forth engine are implemented in +Segher Boessenkool. Most parts of the Forth engine are implemented in C, by using GNU extensions of ANSI C, (e.g. assigned goto, often misnamed "computed goto"), -resulting in a very efficient yet still quite portable engine. +resulting in a very efficient yet still quite portable engine.
-The basic Forth words, so-called primitives, are implemented with +The basic Forth words, so-called primitives, are implemented with a set of C macros. A set of .in and .code files are provided, which -define the semantic of the Forth primitives. A Perl script translates +define the semantic of the Forth primitives. A Perl script translates these files into valid C code, which will be compiled into the Forth engine. The complete Forth system composes of the basic Forth primitives and a set of Forth words, which are compiled during the start of the Forth @@ -71,24 +71,24 @@ code_DUP: { asm("#### " "DUP"); void *w = (cfa = (++ip)->a)->a;
Without going into detail, it can be seen, that the data stack is implemented in C as an array of cells, where dp is the pointer to the top of -stack. +stack.
For the implementation of the Open Firmware, most of the -code is added as Forth code and bound to the engine. Also +code is added as Forth code and bound to the engine. Also the system vector for reset and all kinds of exceptions will be part of the image. Additionally a secondary boot-loader -or any other client application can be bound to the code as payload, +or any other client application can be bound to the code as payload, e.g. diagnostics and test programs.
-The Open Firmware image will be put together by the build +The Open Firmware image will be put together by the build process, with a loader at the start of the image. This loader -is called by Low Level Firmware and loads at boot time the Open -Firmware to it's location in memory (see 1.3 Load process). Additionally +is called by Low Level Firmware and loads at boot time the Open +Firmware to it's location in memory (see 1.3 Load process). Additionally a secondary boot loader or any other client application can be bound to the code as payload.
-The Low Level Firmware (LLFW) is responsible for setting up the -system in an initial state. This task includes the setup of the +The Low Level Firmware (LLFW) is responsible for setting up the +system in an initial state. This task includes the setup of the CPUs, the system memory and all the buses as well as the serial port itself.
@@ -104,7 +104,7 @@ the specific needs of different hardware and architectures.
To add primitives: - + For a new primitive, following steps have to be done:
+ Definition of primitive name in <arch>.in @@ -112,7 +112,7 @@ To add primitives:
You can also use the following in a .in file, see existing code for how to use these: - - con(ABC) defines constant ABC + - con(ABC) defines constant ABC - col(ABC) defines colon definition ABC - dfr(ABC) defines defer definition ABC
@@ -120,7 +120,7 @@ To add primitives: - PRIM(ABC) ... MIRP
The code for the primitive body is any C-code. With - the macros of prim.code the data and return stack of + the macros of prim.code the data and return stack of the Forth engine can be appropriately manipulated.
diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/Makefile b/qemu-0.15.x/roms/SLOF/board-js2x/Makefile index cf17f98..b5b5282 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/Makefile +++ b/qemu-0.15.x/roms/SLOF/board-js2x/Makefile @@ -12,7 +12,7 @@
JS2X_TARGETS = tools_build romfs_build clients_build bcm57xx stage1
-SUBDIRS = slof rtas +SUBDIRS = slof rtas COMMON_LIBS = libc libipmi libbootmsg libbases libnvram libelf
all: $(JS2X_TARGETS) subdirs boot_rom.bin @@ -45,7 +45,7 @@ clean: clean_here clean_gen @for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir clean || exit 1; \ done - rm -f ../boot_rom.bin ../js2*.img + rm -f ../boot_rom.bin ../js2*.img make -C ../other-licence/bcm clean @make -C llfw clean @make -C $(TOPCMNDIR)/clients/takeover clean @@ -54,7 +54,7 @@ distclean: clean_here distclean_gen @for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir distclean || exit 1; \ done - rm -f ../boot_rom.bin ../js2*.img + rm -f ../boot_rom.bin ../js2*.img make -C ../other-licence/bcm clean make -C llfw clean make -C $(TOPCMNDIR)/clients/takeover distclean diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/llfw/Makefile b/qemu-0.15.x/roms/SLOF/board-js2x/llfw/Makefile index 41cdc35..e6d6192 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/llfw/Makefile +++ b/qemu-0.15.x/roms/SLOF/board-js2x/llfw/Makefile @@ -20,7 +20,7 @@ ASFLAGS = $(BOOT) $(IOCONF) $(RELEASE)$(CPUARCHDEF) -Wa,-mregnames LDFLAGS1 = -nostdlib -e__start -Tstage2.lds -N -Ttext=0x100
-STG1OBJ = startup.o boot_abort.o romfs.o hw.o io_generic.o board_io.o +STG1OBJ = startup.o boot_abort.o romfs.o hw.o io_generic.o board_io.o STG1OBJ += stage2_head.o stage2.o comlib.o romfs_wrap.o nvramlog.o STG1OBJ += u4mem.o
diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/llfw/board_io.S b/qemu-0.15.x/roms/SLOF/board-js2x/llfw/board_io.S index 2f36588..0214ef0 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/llfw/board_io.S +++ b/qemu-0.15.x/roms/SLOF/board-js2x/llfw/board_io.S @@ -46,7 +46,7 @@ ENTRY(io_putchar) li 4,0x3f8 ; oris 4,4,0xf400
# print one char -0: lbz 0,5(4) ; andi. 0,0,0x20 ; beq 0b ; stb 3,0(4) ; eieio +0: lbz 0,5(4) ; andi. 0,0,0x20 ; beq 0b ; stb 3,0(4) ; eieio
# also print char to serial2 if on a JS21 # read ID register: only if it is a PC87427 (JS21) also use serial2 @@ -54,7 +54,7 @@ ENTRY(io_putchar) li 5,0x20 ; stb 5,0x2e(4) ; lbz 5,0x2f(4) ; cmpdi 5,0xf2 ; bne 1f
addi 4,4,0x2f8 -0: lbz 0,5(4) ; andi. 0,0,0x20 ; beq 0b ; stb 3,0(4) ; eieio +0: lbz 0,5(4) ; andi. 0,0,0x20 ; beq 0b ; stb 3,0(4) ; eieio
1: CLRCI(r0)
diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/llfw/stage2.lds b/qemu-0.15.x/roms/SLOF/board-js2x/llfw/stage2.lds index f91f065..219bd69 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/llfw/stage2.lds +++ b/qemu-0.15.x/roms/SLOF/board-js2x/llfw/stage2.lds @@ -51,6 +51,6 @@ SECTIONS { *(.toc .got) } . = ALIGN(8); - __toc_end = .; + __toc_end = .; __stack_end = . ; } diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/llfw/stage_s.lds b/qemu-0.15.x/roms/SLOF/board-js2x/llfw/stage_s.lds index 200c1b3..15ca3b0 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/llfw/stage_s.lds +++ b/qemu-0.15.x/roms/SLOF/board-js2x/llfw/stage_s.lds @@ -18,5 +18,5 @@ ENTRY( __stage_s_entry ) SECTIONS { .text : { *(.text) - } + } } diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/llfw/startup.S b/qemu-0.15.x/roms/SLOF/board-js2x/llfw/startup.S index 1357d3f..d33d1ef 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/llfw/startup.S +++ b/qemu-0.15.x/roms/SLOF/board-js2x/llfw/startup.S @@ -28,7 +28,7 @@ __start:
bl postHeader .long 0xDEADBEE0 - .long 0x0 /* size */ + .long 0x0 /* size */ .long 0x0 /* crc */ .long relTag - __start postHeader: @@ -166,10 +166,10 @@ putc:
# transfer from running from flash to running from cache return_cacheable: - # find and set address to start running from cache, set msr value - mflr 3 ; rldicl 3,3,0,44 + # find and set address to start running from cache, set msr value + mflr 3 ; rldicl 3,3,0,44 jump_cacheable: - mtsrr0 3 ; + mtsrr0 3 ; mfmsr 3 ; ori 3,3,0x1000 ; mtsrr1 3 # enable MCE, as well
# set cacheable insn fetches, jump to cache @@ -196,7 +196,7 @@ copy_to_cache: bcl 20,31,$+4 ; mflr 31 ; rldicr 31,31,0,43
# copy 1kB from 0x4000 - li 4,0x80 ; mtctr 4 ; + li 4,0x80 ; mtctr 4 ; li 5,0x3ff8 addi 3,31,0x3ff8 0: ldu 4,8(3) ; bl clr_ci_bit ; stdu 4,8(5) ; bl set_ci_bit ; bdnz 0b @@ -207,7 +207,7 @@ copy_to_cache: li 3,'L' ; bl putc
# copy 128kB of flash to cache - li 4,0x800 ; mtctr 4 ; li 5,0x200-64 ; addi 3,31,0x200-64 ; + li 4,0x800 ; mtctr 4 ; li 5,0x200-64 ; addi 3,31,0x200-64 ; 0: ldu 16,64(3) ; ld 17,8(3) ; ld 18,16(3) ; ld 19,24(3) ld 20,32(3) ; ld 21,40(3) ; ld 22,48(3) ; ld 23,56(3) bl clr_ci_bit @@ -554,7 +554,7 @@ intHandler2C: mfsprg r0,0 rfid
-/* Set exception handler for given exception vector. +/* Set exception handler for given exception vector. r3: exception vector offset r4: exception handler */ diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/rtas/Makefile b/qemu-0.15.x/roms/SLOF/board-js2x/rtas/Makefile index 70e506f..bf1e0bc 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/rtas/Makefile +++ b/qemu-0.15.x/roms/SLOF/board-js2x/rtas/Makefile @@ -25,7 +25,7 @@ CFLAGS += -Wall -Wextra -O2 -msoft-float -ffreestanding $(FLAG) # Board specific RTAS files: BOARD_SRC_ASM = BOARD_SRC_C = rtas_flash.c rtas_board.c rtas_pci.c \ - rtas_out.c rtas_table.c + rtas_out.c rtas_table.c BOARD_SRCS = $(BOARD_SRC_ASM) $(BOARD_SRC_C) BOARD_OBJ = $(BOARD_SRC_ASM:%.S=%.o) $(BOARD_SRC_C:%.c=%.o) $(BOARD_OCO:%.oco=%.o) BOARD_OCO = i2c_bmc.oco ipmi_oem.oco @@ -49,10 +49,10 @@ OBJS = $(RTAS_OBJ:%=$(RTASCMNDIR)/%) $(BOARD_OBJ) $(EXTRA_OBJ) \
all: Makefile.dep rtas.bin
-rtas.bin: rtas +rtas.bin: rtas $(OBJCOPY) -O binary $< $@
-rtas: $(RTASCMNDIR)/rtas.lds $(OBJS) reloc_table.o +rtas: $(RTASCMNDIR)/rtas.lds $(OBJS) reloc_table.o $(LD) $(LDFLAGS) -o $@ -T $(RTASCMNDIR)/rtas.lds $(OBJS) reloc_table.o
reloc_table.o: $(TOOLSDIR)/gen_reloc_table $(OBJS) diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/OF.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/OF.fs index 894f43a..258ad1d 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/OF.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/OF.fs @@ -287,11 +287,11 @@ create vpd-bootlist 4 allot ." 0 (permanent)" ELSE ." 1 (temporary)" THEN cr - s" Version = " type + s" Version = " type takeover? IF romfs-base 38 + a type ELSE - slof-build-id here swap rmove + slof-build-id here swap rmove here slof-build-id nip type cr s" Build Date = " type bdate2human type THEN @@ -369,7 +369,7 @@ vga-device-node? 0<> use-biosemu? AND IF \ s" Time after biosemu:" type .date cr s" VGA initialization: detecting displays..." type cr \ try to get info for two monitors - 2 0 DO + 2 0 DO \ setup screen-info struct as input to get_vbe_info s" DDC" 0 char-cat screen-info swap move \ null-terminated "DDC" as signature d# 140 screen-info 4 + w! \ reserved size in bytes (see claim above) @@ -382,7 +382,7 @@ vga-device-node? 0<> use-biosemu? AND IF \ d# 16 screen-info 9 + c! \ requested color depth (16bpp) \ execute get_vbe_info from load-base \ s" Time before client exec:" type .date cr - \ since node>path overwrites strings created with s" + \ since node>path overwrites strings created with s" \ we need to call it before assembling the parameter string vga-device-node? node>path ( pathstr len ) s" get_vbe_info " biosemu-vmem $cathex ( pathstr len paramstr len ) @@ -394,7 +394,7 @@ vga-device-node? 0<> use-biosemu? AND IF screen-info $cathex bios-exec \ s" Time after client exec:" type .date cr screen-info c@ 0<> IF - s" display " type i . s" found..." type + s" display " type i . s" found..." type \ screen found \ create device entry get-node node>name \ get current nodes name (e.g. "vga") ( str len ) @@ -408,7 +408,7 @@ vga-device-node? 0<> use-biosemu? AND IF \ return to where we were before changing to vga device node set-node \ release the claimed memory - screen-info d# 140 release + screen-info d# 140 release biosemu-vmem biosemu-vmem-size release
s" VGA initialization done." type cr @@ -420,8 +420,8 @@ THEN \ vga-device-node? \ we need to open/close the screen device once \ before "ticking" display-emit to emit open-dev close-node - s" display-emit" $find IF - to emit + s" display-emit" $find IF + to emit ELSE 2drop THEN @@ -457,7 +457,7 @@ THEN ;
directserial - + \ on bimini we want to automatically enable screen and keyboard, if they are detected... bimini? IF key? IF @@ -507,7 +507,7 @@ bmc? IF disable-watchdog THEN \ for the blades we read the bootlist from the VPD bimini? takeover? or 0= IF ['] vpd-boot-import to read-bootlist THEN
-\ for the bimini, we try to boot from disk, if it exists, +\ for the bimini, we try to boot from disk, if it exists, \ only if "boot-device" is not set in the nvram : bimini-bootlist \ check nvram diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/attu.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/attu.fs index cc12252..4429f8c 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/attu.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/attu.fs @@ -51,8 +51,8 @@ f1000000 CONSTANT my-puid f1000000 encode-64 1000000 encode-64+ s" reg" property
\ 4MB of I/O space. -01000000 encode-int 00000000 encode-int+ 00000000 encode-int+ -00000000 encode-int+ f0000000 encode-int+ +01000000 encode-int 00000000 encode-int+ 00000000 encode-int+ +00000000 encode-int+ f0000000 encode-int+ 00000000 encode-int+ 00400000 encode-int+
\ 1.75GB of memory space @ c0000000. @@ -88,7 +88,7 @@ my-puid probe-pci-host-bridge log2 7 - 10000 0 DO i 8 lshift dup find-pcie-cap ?dup IF + 2dup (set-ps) THEN drop LOOP drop ; - + : (set-rr) ( rr addr -- ) 8 + >r c lshift r@ config-w@ 8fff and or r> config-w! ; : set-rr ( rr -- ) @@ -96,6 +96,6 @@ my-puid probe-pci-host-bridge 10000 0 DO i 8 lshift dup find-pcie-cap ?dup IF + 2dup (set-rr) THEN drop LOOP drop ;
-80 set-ps 80 set-rr +80 set-ps 80 set-rr
finish-device diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/citrine-disk.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/citrine-disk.fs index 146e7ec..096104c 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/citrine-disk.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/citrine-disk.fs @@ -13,7 +13,7 @@
( max-#blocks rsrc id -- )
-new-device +new-device
lwsplit swap wbsplit rot set-unit
@@ -32,28 +32,28 @@ get-parent CONSTANT ppack \ Requiered interface for deblocker
200 CONSTANT block-size -40000 CONSTANT max-transfer +40000 CONSTANT max-transfer
: read-blocks ( addr block# #blocks -- #read ) \ my-unit s" dev-read-blocks" $call-parent \ check if the read is within max-#blocks - 2dup + max-#blocks 1 + > IF - \ 2drop drop 0 \ return 0 + 2dup + max-#blocks 1 + > IF + \ 2drop drop 0 \ return 0 \ returning 0 would be correct (maybe?) but it confuses the deblocker... \ so i erase whatever would have been read and return the "expected" #read - dup >r + dup >r swap drop \ drop block# (not needed) block-size * erase \ erase at addr #blocks * block-size - r> \ return #read + r> \ return #read ELSE dup >r rot our-disk-read r> THEN -; +;
INSTANCE VARIABLE deblocker
: open ( -- okay? ) - 0 0 s" deblocker" $open-package dup deblocker ! dup IF + 0 0 s" deblocker" $open-package dup deblocker ! dup IF s" disk-label" find-package IF my-args rot interpose THEN @@ -63,7 +63,7 @@ INSTANCE VARIABLE deblocker deblocker @ close-package ;
: seek ( pos.lo pos.hi -- status ) - 2dup lxjoin max-#blocks 1 + block-size * > IF + 2dup lxjoin max-#blocks 1 + block-size * > IF \ illegal seek, return -1 2drop -1 ELSE diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/citrine.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/citrine.fs index ee26c9a..8fd056b 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/citrine.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/citrine.fs @@ -54,7 +54,7 @@ CREATE setsupbuff 2c allot setsupbuff 2c erase 2c setsupbuff w! 1 setsupbuff +
: wait-ready ( -- ) 82800000 214 ioa! - 80000000 BEGIN dup 224 ioa@ cr .s dup 8000000 and IF + 80000000 BEGIN dup 224 ioa@ cr .s dup 8000000 and IF cr ." Unit check on SAS-Controller detected" cr 42c ioa@ . 8 110 ioa! @@ -62,7 +62,7 @@ CREATE setsupbuff 2c allot setsupbuff 2c erase 2c setsupbuff w! 1 setsupbuff + \ ABORT" Unit check on SAS-Controller detected" THEN and - UNTIL drop + UNTIL drop ;
\ wait-ready @@ -70,7 +70,7 @@ CREATE setsupbuff 2c allot setsupbuff 2c erase 2c setsupbuff w! 1 setsupbuff + : wait-ioa ( int-mask -- ) BEGIN dup 224 ioa@ and UNTIL drop ; : init-ioa ( -- ) 82800000 214 ioa! 80000000 wait-ioa ; : do-request ( -- ) ioasa 20 erase ioarcb 404 ioa! - 2 wait-ioa 2 228 ioa! + 2 wait-ioa 2 228 ioa! ;
: setup-ioarcb ( rsrc type addr len -- ) @@ -171,7 +171,7 @@ CREATE cap 8 allot ELSE drop 9 spaces THEN space dup 1c + 8 type space dup 24 + 10 type dup 2 + w@ 8000 and 0= IF - space dup 8 + l@ .cap + space dup 8 + l@ .cap THEN drop ;
@@ -187,9 +187,9 @@ CREATE cap 8 allot ;
: do-read ( hndl lba len addr -- ) \ len is in blocks - over >r rot >r swap 0 -rot 200 * ( 0 hndl addr len* ) - setup-ioarcb r> r> ( lba len ) - setup-read do-request + over >r rot >r swap 0 -rot 200 * ( 0 hndl addr len* ) + setup-ioarcb r> r> ( lba len ) + setup-read do-request ;
: make-subnode ( rsrc-type rsrc-handle id -- ) diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/ht.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/ht.fs index e122a03..c7705e3 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/ht.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/ht.fs @@ -26,7 +26,7 @@ s" U3" encode-string s" model" property s" /mpic" find-node encode-int s" interrupt-parent" property
4000 encode-int 0 encode-int+ 0 encode-int+ -1 encode-int+ s" /mpic" find-node encode-int+ +1 encode-int+ s" /mpic" find-node encode-int+ 10 encode-int+ 0 encode-int+ s" interrupt-map" property
@@ -64,13 +64,13 @@ f2000000 CONSTANT my-puid 00000000 encode-int+ 02000000 encode-int+ s" reg" property
\ 4MB of I/O space. -01000000 encode-int 00000000 encode-int+ 00000000 encode-int+ -00000000 encode-int+ f4000000 encode-int+ +01000000 encode-int 00000000 encode-int+ 00000000 encode-int+ +00000000 encode-int+ f4000000 encode-int+ 00000000 encode-int+ 00400000 encode-int+
\ 1 GB of memory space @ 80000000 -02000000 encode-int+ 00000000 encode-int+ 80000000 encode-int+ -00000000 encode-int+ 80000000 encode-int+ +02000000 encode-int+ 00000000 encode-int+ 80000000 encode-int+ +00000000 encode-int+ 80000000 encode-int+ 00000000 encode-int+ 40000000 encode-int+ s" ranges" property
\ Host bridge, so full bus range. @@ -101,7 +101,7 @@ u3? IF f800 config-l@ 74501022 = IF 41 f8c2 config-w! THEN THEN : assign-buids ( -- ) 1 BEGIN 0 config-l@ ffffffff <> WHILE assign-buid REPEAT drop ;
-assign-buids +assign-buids
: ldtstop f8000840 rl@ 40000 or f8000840 rl! ; : delay 100000 0 DO LOOP ; @@ -112,7 +112,7 @@ assign-buids : warm 400000 f8070300 rl! 0 f8070300 rl! ;
: dumpht cr f8070110 rl@ 8 0.r space 8b4 config-l@ 8 0.r - space f8070122 rb@ 2 0.r space 8bd config-b@ 2 0.r ; + space f8070122 rb@ 2 0.r space 8bd config-b@ 2 0.r ;
: clearht f8070110 dup rl@ swap rl! f8070120 dup rl@ swap rl! @@ -164,7 +164,7 @@ msi-on : find-pcie-cap ( devfn -- offset | 0 ) >r 34 BEGIN r@ + config-b@ dup ff <> over and WHILE dup r@ + config-b@ 10 = IF - r> drop EXIT + r> drop EXIT THEN 1+ REPEAT r> 2drop 0 ; @@ -183,7 +183,7 @@ msi-on 10000 0 DO i 8 lshift dup find-pcie-cap ?dup IF + 2dup (set-rr) THEN drop LOOP drop ;
-100 set-ps 200 set-rr -100 set-ps 200 set-rr +100 set-ps 200 set-rr +100 set-ps 200 set-rr
finish-device diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/ipmi-vpd.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/ipmi-vpd.fs index bfb3e50..7b4d620 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/ipmi-vpd.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/ipmi-vpd.fs @@ -68,12 +68,12 @@ ;
: vpd-read-model ( -- addr len ) - 60 4 vpd-cb rtas-read-vpd drop vpd-cb 4 -leading s" ," $cat + 60 4 vpd-cb rtas-read-vpd drop vpd-cb 4 -leading s" ," $cat e 7 vpd-cb rtas-read-vpd drop vpd-cb 4 $cat s" -" $cat vpd-cb 4 + 3 $cat ;
: .vpd - ." ===================== VPD =====================" + ." ===================== VPD =====================" cr ." Machine Type : " .vpd-machine-type cr ." Machine Serial No. : " .vpd-machine-serial cr ." Hardware Revision : " .vpd-hw-revision diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-aliases.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-aliases.fs index f017e4a..b6b8064 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-aliases.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-aliases.fs @@ -30,10 +30,10 @@ ; : pci-alias-net ( config-addr -- ) u3? IF - pci-device-vec c@ CASE - 2 OF pci-device-vec-len 1 >= IF - pci-device-vec 1+ c@ CASE - 1 OF dup pci-addr2fn 1 >= IF 1 ELSE 0 THEN ENDOF + pci-device-vec c@ CASE + 2 OF pci-device-vec-len 1 >= IF + pci-device-vec 1+ c@ CASE + 1 OF dup pci-addr2fn 1 >= IF 1 ELSE 0 THEN ENDOF dup OF unknown-enet ENDOF ENDCASE ELSE @@ -43,10 +43,10 @@ dup OF unknown-enet ENDOF ENDCASE ELSE - pci-device-vec c@ CASE - 2 OF pci-device-vec-len 1 >= IF - pci-device-vec 1+ c@ CASE - 4 OF dup pci-addr2fn 1 >= IF 1 ELSE 0 THEN ENDOF + pci-device-vec c@ CASE + 2 OF pci-device-vec-len 1 >= IF + pci-device-vec 1+ c@ CASE + 4 OF dup pci-addr2fn 1 >= IF 1 ELSE 0 THEN ENDOF dup OF unknown-enet ENDOF ENDCASE ELSE @@ -76,7 +76,7 @@
\ define the alias for the calling device : pci-alias ( config-addr -- ) - dup pci-class@ + dup pci-class@ 10 rshift CASE 01 OF pci-alias-disk ENDOF 02 OF pci-alias-net ENDOF diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-bridge_1022_7460.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-bridge_1022_7460.fs index c28e0d2..a99c6f2 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-bridge_1022_7460.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-bridge_1022_7460.fs @@ -84,10 +84,10 @@ INCLUDE freq.fs \ this word only works on U4 systems (JS21/Bimini) \ yeah, hardcoded! f2000000 to puid - + \ the PCI scan would assign pci-next-mmio to that device \ let's just take that address - pci-next-mmio @ 100000 #aligned + pci-next-mmio @ 100000 #aligned \ pci-bus-number 10 lshift 210 or could be something like 70210 \ 7: pci-bus-number \ 2: device function diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-class_03.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-class_03.fs index 05c8eb6..c980af4 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-class_03.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-class_03.fs @@ -23,7 +23,7 @@ IF \ "reg" does not exist, create new encode-start ELSE - \ "reg" does exist, copy it + \ "reg" does exist, copy it encode-bytes THEN \ I/O Range 0x3B0-0x3BB diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-interrupts.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-interrupts.fs index 92851cd..eb9a8d2 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-interrupts.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/pci-interrupts.fs @@ -39,7 +39,7 @@ DEFER pci-get-irq-sense ; \ 0c s" /ht/@1/@2" PCI-X INTA & INTC Pnpirq0 -> irq12 \ 0e s" /ht/@1/@2" PCI-X INTB & INTD Pnpirq1 -> irq14 -\ 10 s" /ht/@8,1" ATA +\ 10 s" /ht/@8,1" ATA \ 0f s" /ht/@1/@1" Obsidian Pnpirq2 -> irq15 \ 10 s" /ht/@7/@2" Video / Exar Serial PirqA \ 11 s" /ht/@2/@4" Ethernet PirqB @@ -58,9 +58,9 @@ DEFER pci-get-irq-sense \ Get the interrupt pin for a device on ht u4 : u4-get-irq-line ( config-addr -- irq-line ) \ cr s" u4-get-irq-line " type - pci-device-vec c@ CASE - 1 OF pci-device-vec-len 1 >= IF - pci-device-vec 1+ c@ CASE + pci-device-vec c@ CASE + 1 OF pci-device-vec-len 1 >= IF + pci-device-vec 1+ c@ CASE 1 OF f ENDOF 2 OF dup pci-interrupt@ CASE 1 OF c ENDOF @@ -68,16 +68,16 @@ DEFER pci-get-irq-sense 2 OF c ENDOF 4 OF e ENDOF ENDCASE - ENDOF + ENDOF dup OF unknown-slot ENDOF ENDCASE ELSE unknown-slot THEN ENDOF - 2 OF pci-device-vec-len 1 >= IF + 2 OF pci-device-vec-len 1 >= IF pci-device-vec 1+ c@ CASE - 4 OF dup pci-addr2fn 1 >= IF 12 ELSE 11 THEN ENDOF + 4 OF dup pci-addr2fn 1 >= IF 12 ELSE 11 THEN ENDOF dup OF unknown-slot ENDOF ENDCASE ELSE @@ -88,10 +88,10 @@ DEFER pci-get-irq-sense 4 OF 15 ENDOF 5 OF 16 ENDOF 6 OF 17 ENDOF - 7 OF pci-device-vec-len 1 >= IF - pci-device-vec 1+ c@ CASE - 0 OF 13 ENDOF - 2 OF 10 ENDOF + 7 OF pci-device-vec-len 1 >= IF + pci-device-vec 1+ c@ CASE + 0 OF 13 ENDOF + 2 OF 10 ENDOF dup OF unknown-slot ENDOF ENDCASE ELSE @@ -108,7 +108,7 @@ DEFER pci-get-irq-sense \ Get the interrupt sense type for a device on ht u4 : u4-get-irq-sense ( config-addr -- irq-sense ) \ cr s" u4-get-irq-sense " type - u4-get-irq-line CASE + u4-get-irq-line CASE 0c OF 00 ENDOF 0e OF 00 ENDOF dup OF 01 ENDOF @@ -126,10 +126,10 @@ DEFER pci-get-irq-sense \ Get the interrupt pin for a device on ht u3 : u3-get-irq-line ( config-addr -- irq-line ) \ cr s" u3-get-irq-line " type - pci-device-vec c@ CASE - 2 OF pci-device-vec-len 1 >= IF - pci-device-vec 1+ c@ CASE - 1 OF dup pci-addr2fn 1 >= IF 1d ELSE 1c THEN ENDOF + pci-device-vec c@ CASE + 2 OF pci-device-vec-len 1 >= IF + pci-device-vec 1+ c@ CASE + 1 OF dup pci-addr2fn 1 >= IF 1d ELSE 1c THEN ENDOF dup OF unknown-slot ENDOF ENDCASE ELSE @@ -147,7 +147,7 @@ DEFER pci-get-irq-sense \ Get the interrupt sense type for a device on ht u3 : u3-get-irq-sense ( config-addr -- irq-sense ) \ cr s" u3-get-irq-sense " type - u3-get-irq-line CASE + u3-get-irq-line CASE dup OF 01 ENDOF ENDCASE ; @@ -209,7 +209,7 @@ DEFER pci-get-irq-sense \ Set the interrupt pin for a device : pci-set-irq-line ( config-addr -- ) \ cr pci-vec - dup pci-get-irq-line + dup pci-get-irq-line \ ." ->" dup . swap pci-irq-line! ; diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/rtas.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/rtas.fs index 616184f..47ce8c2 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/rtas.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/rtas.fs @@ -22,7 +22,7 @@ ' (get-flashside) to get-flashside
\ remember the current flashside -get-flashside to flashside? +get-flashside to flashside?
\ for update-flash : (set-flashside) ( flashside -- status ) @@ -127,14 +127,14 @@ blist 50 erase ! \ store it load-base 30 + @ _block_size i * - \ remaining length - dup _block_size > + dup _block_size > IF \ is the remaining length > block size drop _block_size \ then store the block size as length ELSE \ do nothing (store remaining length) THEN blist 10 + \ store the length at - i 10 * + \ correct blist offset + i 10 * + \ correct blist offset 8 + \ + 8 (we have stored address, now the length) ! \ store it loop @@ -175,14 +175,14 @@ blist 50 erase ! \ store it load-base 30 + @ _block_size i * - \ remaining length - dup _block_size > + dup _block_size > IF \ is the remaining length > block size drop _block_size \ then store the block size as length ELSE \ do nothing (store remaining length) THEN blist 8 + \ store the length at - i 10 * + \ correct blist offset + i 10 * + \ correct blist offset 8 + \ + 8 (we have stored address, now the length) ! \ store it loop diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/serial.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/serial.fs index 98b2f29..8fc541b 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/serial.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/serial.fs @@ -27,7 +27,7 @@ CREATE lastser 4 allot 0 lastser l! : serial-init 0 1 serial! 0 2 serial! 80 3 serial! d# 115200 swap / 0 serial! 0 1 serial! 3 3 serial! 3 4 serial! ; -: serial-emit BEGIN 5 serial1@ 20 and UNTIL +: serial-emit BEGIN 5 serial1@ 20 and UNTIL js21? IF BEGIN 5 serial2@ 20 and UNTIL THEN 0 serial! ; : serial1-key? 5 serial1@ 1 and 0<> ; : serial2-key? 5 serial2@ 1 and 0<> ; diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/tpm.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/tpm.fs index 69b9bc4..d56a38c 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/tpm.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/tpm.fs @@ -43,7 +43,7 @@ CREATE startup-cmd : recv-verbose ( -- ) cr ." TPM result: " 500 io-c@ 2 0.r 500 io-c@ 2 0.r space - 500 io-c@ 500 io-c@ 500 io-c@ 500 io-c@ + 500 io-c@ 500 io-c@ 500 io-c@ 500 io-c@ bljoin lbflip 6 - dup 8 0.r space 0 ?DO 500 io-c@ . LOOP ; diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/u4-mem.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/u4-mem.fs index 0f8b1ee..57b60ea 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/u4-mem.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/u4-mem.fs @@ -154,7 +154,7 @@ VARIABLE was-prev-big : assign-dimm-group ( dimm# -- config-value ) dup dimm-valid? 0= IF drop 0 EXIT THEN \ MemMd, enable, single-sided or not - dup spd>memmd c lshift 1 or over spd>ranks 1 = IF 2 or THEN + dup spd>memmd c lshift 1 or over spd>ranks 1 = IF 2 or THEN cr ." ---> " dup .
r
dimm-group-size start-address @ 2dup + rot ( start end size ) diff --git a/qemu-0.15.x/roms/SLOF/board-js2x/slof/vga-display.fs b/qemu-0.15.x/roms/SLOF/board-js2x/slof/vga-display.fs index 0cc9bba..52b2094 100644 --- a/qemu-0.15.x/roms/SLOF/board-js2x/slof/vga-display.fs +++ b/qemu-0.15.x/roms/SLOF/board-js2x/slof/vga-display.fs @@ -28,7 +28,7 @@ CASE screen-info c@ \ ( display-type ) 1 OF s" Analog" ENDOF 2 OF s" Digital" ENDOF ENDCASE -encode-string s" display-type" property +encode-string s" display-type" property
screen-info 8 + l@ value mem-adr screen-info 1 + w@ value width @@ -41,22 +41,22 @@ screen-info c@ IF screen-info 5 + w@ encode-int s" linebytes" property screen-info 7 + c@ encode-int s" depth" property mem-adr encode-int s" address" property - \ the EDID property breaks the boot... so i leave it out for now, + \ the EDID property breaks the boot... so i leave it out for now, \ maybe encode-bytes does s.th. wrong??? \ screen-info c + 80 encode-bytes s" EDID" property s" ISO8859-1" encode-string s" character-set" property \ i hope this is ok... THEN
\ words for installation/removal, needed by is-install/is-remove, see display.fs -: display-remove ( -- ) +: display-remove ( -- ) ; -: display-install ( -- ) - is-installed? NOT IF - mem-adr to frame-buffer-adr - default-font +: display-install ( -- ) + is-installed? NOT IF + mem-adr to frame-buffer-adr + default-font set-font width height width char-width / height char-height / ( width height #lines #cols ) - fb8-install + fb8-install true to is-installed? THEN ; @@ -68,9 +68,9 @@ THEN 0 ?DO 4dup ( adr x y w adr x y w ) drop ( adr x y w adr x y ) - i + screen-width * + \ calculate offset into framebuffer ((y + i) * screen_width + x) - ( adr x y w adr offs ) - frame-buffer-adr + \ add to frame-buffer-adr ( adr x y w adr fb_adr ) + i + screen-width * + \ calculate offset into framebuffer ((y + i) * screen_width + x) + ( adr x y w adr offs ) + frame-buffer-adr + \ add to frame-buffer-adr ( adr x y w adr fb_adr ) 1 pick 3 pick i * + swap 3 pick ( adr x y w adr adr_offs fb_adr w ) rmove \ copy line ( adr x y w adr ) drop ( adr x y w ) @@ -86,9 +86,9 @@ THEN 0 ?DO 4dup ( number x y w number x y w ) drop ( number x y w number x y ) - i + screen-width * + \ calculate offset into framebuffer ((y + i) * screen_width + x) - ( number x y w number offs ) - frame-buffer-adr + \ add to frame-buffer-adr ( number x y w number adr ) + i + screen-width * + \ calculate offset into framebuffer ((y + i) * screen_width + x) + ( number x y w number offs ) + frame-buffer-adr + \ add to frame-buffer-adr ( number x y w number adr ) 2 pick 2 pick ( number x y w number adr w number ) rfill \ draw line ( number x y w number ) drop ( number x y w ) @@ -104,9 +104,9 @@ THEN 0 ?DO 4dup ( adr x y w adr x y w ) drop ( adr x y w adr x y ) - i + screen-width * + \ calculate offset into framebuffer ((y + i) * screen_width + x) - ( adr x y w adr offs ) - frame-buffer-adr + \ add to frame-buffer-adr ( adr x y w adr fb_adr ) + i + screen-width * + \ calculate offset into framebuffer ((y + i) * screen_width + x) + ( adr x y w adr offs ) + frame-buffer-adr + \ add to frame-buffer-adr ( adr x y w adr fb_adr ) 1 pick 3 pick i * + 3 pick ( adr x y w adr fb_adr adr_offs w ) rmove \ copy line ( adr x y w adr ) drop ( adr x y w ) @@ -117,10 +117,10 @@ THEN THEN ;
-: color! ( r g b number -- ) +: color! ( r g b number -- ) \ 3c8 is RAMDAC write mode select palette entry register \ 3c9 is RAMDAC write mode write palette entry register ( 3 consecutive writes set new entry ) - vga-device-node? 3c8 translate-address ( r g b number address ) + vga-device-node? 3c8 translate-address ( r g b number address ) swap 1 pick ( r g b address number address ) rb! \ write palette entry number ( r g b address ) 1 + \ select next register (3c9) @@ -130,10 +130,10 @@ THEN 4drop ;
-: color@ ( number -- r g b ) +: color@ ( number -- r g b ) \ 3c7 is RAMDAC read mode select palette entry register \ 3c9 is RAMDAC read mode read palette entry register ( 3 consecutive reads read entry ) - vga-device-node? 3c7 translate-address ( number address ) + vga-device-node? 3c7 translate-address ( number address ) swap 1 pick ( address number address ) rb! \ write palette entry number ( address ) 2 + >r \ select next register (3c9) ( R: address ) @@ -146,25 +146,25 @@ THEN : set-colors ( adr number #numbers -- ) \ 3c8 is RAMDAC write mode select palette entry register \ 3c9 is RAMDAC write mode write palette entry register ( 3 consecutive writes set new entry ) - \ since after writing 3 entries, the palette entry is automagically incremented, + \ since after writing 3 entries, the palette entry is automagically incremented, \ we can just continue writing... - vga-device-node? 3c8 translate-address ( adr number #numbers ) + vga-device-node? 3c8 translate-address ( adr number #numbers ) dup 3 pick swap ( adr number #numbers address number address ) rb! \ write palette entry number ( adr number #numbers address ) - 1 + \ select next register (3c9) + 1 + \ select next register (3c9) -rot swap drop ( adr address #numbers ) -rot swap rot ( address adr #numbers ) 0 ?DO ( address adr ) dup rb@ \ read red value from adr ( address adr r ) 2 pick rb! \ write to register ( address adr ) - 1 + \ next adr + 1 + \ next adr dup rb@ \ read green value from adr ( address adr g ) 2 pick rb! \ write to register ( address adr ) - 1 + \ next adr + 1 + \ next adr dup rb@ \ read blue value from adr ( address adr r ) 2 pick rb! \ write to register ( address adr ) - 1 + \ next adr + 1 + \ next adr LOOP 2drop ; @@ -172,25 +172,25 @@ THEN : get-colors ( adr number #numbers -- ) \ 3c7 is RAMDAC read mode select palette entry register \ 3c9 is RAMDAC read mode read palette entry register ( 3 consecutive reads get entry ) - \ since after reading 3 entries, the palette entry is automagically incremented, + \ since after reading 3 entries, the palette entry is automagically incremented, \ we can just continue reading... - vga-device-node? 3c7 translate-address ( adr number #numbers ) + vga-device-node? 3c7 translate-address ( adr number #numbers ) dup 3 pick swap ( adr number #numbers address number address ) rb! \ write palette entry number ( adr number #numbers address ) - 2 + \ select next register (3c9) + 2 + \ select next register (3c9) -rot swap drop ( adr address #numbers ) -rot swap rot ( address adr #numbers ) 0 ?DO ( address adr ) 1 pick rb@ \ read red value from register ( address adr r ) 1 pick rb! \ write to adr ( address adr ) - 1 + \ next adr + 1 + \ next adr 1 pick rb@ \ read green value from register ( address adr g ) 1 pick rb! \ write to adr ( address adr ) - 1 + \ next adr + 1 + \ next adr 1 pick rb@ \ read blue value from register ( address adr b ) 1 pick rb! \ write to adr ( address adr ) - 1 + \ next adr + 1 + \ next adr LOOP 2drop ; @@ -199,7 +199,7 @@ THEN width height ;
-\ clear screen +\ clear screen mem-adr width height * 0 rfill
\ call is-install and is-remove @@ -212,4 +212,4 @@ s" screen" find-alias 0= IF s" screen" get-node node>path set-alias ELSE drop -THEN +THEN diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/Makefile b/qemu-0.15.x/roms/SLOF/board-qemu/Makefile index b67ee24..0f519db 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/Makefile +++ b/qemu-0.15.x/roms/SLOF/board-qemu/Makefile @@ -12,7 +12,7 @@
BOARD_TARGETS = tools_build romfs_build clients_build net_veth stage1
-SUBDIRS = slof +SUBDIRS = slof COMMON_LIBS = libc libbootmsg libbases libnvram libelf libhvcall
all: $(BOARD_TARGETS) subdirs boot_rom.bin @@ -46,7 +46,7 @@ clean: clean_here clean_gen @for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir clean || exit 1; \ done - rm -f ../boot_rom.bin + rm -f ../boot_rom.bin @make -C llfw clean make -C veth clean
@@ -54,7 +54,7 @@ distclean: clean_here distclean_gen @for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir distclean || exit 1; \ done - rm -f ../boot_rom.bin + rm -f ../boot_rom.bin make -C llfw clean make -C veth distclean
diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/llfw/Makefile b/qemu-0.15.x/roms/SLOF/board-qemu/llfw/Makefile index f124a3b..b65f671 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/llfw/Makefile +++ b/qemu-0.15.x/roms/SLOF/board-qemu/llfw/Makefile @@ -20,7 +20,7 @@ ASFLAGS = $(BOOT) $(IOCONF) $(RELEASE)$(CPUARCHDEF) -Wa,-mregnames LDFLAGS1 = -nostdlib -e__start -Tstage2.lds -N -Ttext=0x100
-STG1OBJ = startup.o boot_abort.o romfs.o io_generic.o board_io.o +STG1OBJ = startup.o boot_abort.o romfs.o io_generic.o board_io.o STG1OBJ += stage2_head.o stage2.o comlib.o romfs_wrap.o nvramlog.o
all: stage1.bin Cboot.o diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/llfw/startup.S b/qemu-0.15.x/roms/SLOF/board-qemu/llfw/startup.S index 5882164..aadd187 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/llfw/startup.S +++ b/qemu-0.15.x/roms/SLOF/board-qemu/llfw/startup.S @@ -34,7 +34,7 @@ __start: b _start .long 0xDEADBEE0 - .long 0x0 /* size */ + .long 0x0 /* size */ .long 0x0 /* crc */ .long relTag - __start
@@ -241,7 +241,7 @@ intHandler2C: mfsprg r0,0 rfid
-/* Set exception handler for given exception vector. +/* Set exception handler for given exception vector. r3: exception vector offset r4: exception handler */ diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/slof/fdt.fs b/qemu-0.15.x/roms/SLOF/board-qemu/slof/fdt.fs index 43b97fe..5b6ca2e 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/slof/fdt.fs +++ b/qemu-0.15.x/roms/SLOF/board-qemu/slof/fdt.fs @@ -95,7 +95,7 @@ fdt-check-header ;
\ Lookup a string by index -: fdt-fetch-string ( index -- $string) +: fdt-fetch-string ( index -- $string) fdt-strings + dup from-cstring ;
@@ -161,7 +161,7 @@ fdt-check-header decode-int dup fdt-create-dec fdt-create-enc 2drop THEN
- finish-device + finish-device ;
\ Start unflattening @@ -182,7 +182,7 @@ fdt-unflatten-tree \ XXX FIXME Assume one entry only in "reg" property for now decode-phys 2drop decode-phys my-#address-cells 1 > IF 20 << or THEN - + fdt-debug IF dup ." Memory size: " . cr THEN @@ -208,7 +208,7 @@ fdt-parse-memory 10 + REPEAT drop drop drop ; -fdt-claim-reserve +fdt-claim-reserve
\ Remaining bits from root.fs
@@ -240,7 +240,7 @@ new-device s" BootROM" device-type finish-device
-new-device +new-device #include <packages.fs> finish-device
diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/slof/helper.fs b/qemu-0.15.x/roms/SLOF/board-qemu/slof/helper.fs index 96da498..3ec0723 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/slof/helper.fs +++ b/qemu-0.15.x/roms/SLOF/board-qemu/slof/helper.fs @@ -28,7 +28,7 @@ ;
\ Fetch C string -: from-cstring ( addr - len ) +: from-cstring ( addr - len ) dup dup BEGIN c@ 0 <> WHILE 1 + dup REPEAT swap - ; diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/slof/qemu-bootlist.fs b/qemu-0.15.x/roms/SLOF/board-qemu/slof/qemu-bootlist.fs index 6b52b97..056cf72 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/slof/qemu-bootlist.fs +++ b/qemu-0.15.x/roms/SLOF/board-qemu/slof/qemu-bootlist.fs @@ -17,11 +17,11 @@ defer add-boot-device 0 0 set-boot-device
\ check nvram - " boot-device" evaluate swap drop 0 <> IF EXIT THEN + " boot-device" evaluate swap drop 0 <> IF EXIT THEN
\ check qemu boot list " qemu,boot-device" get-chosen not IF EXIT THEN - + 0 ?DO dup i + c@ CASE 0 OF ENDOF diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/slof/tree.fs b/qemu-0.15.x/roms/SLOF/board-qemu/slof/tree.fs index c2ab824..d14e7f4 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/slof/tree.fs +++ b/qemu-0.15.x/roms/SLOF/board-qemu/slof/tree.fs @@ -11,7 +11,7 @@ \ ****************************************************************************/
: strequal ( str1 len1 str2 len2 -- flag ) - rot dup rot = IF comp 0= ELSE 2drop drop 0 THEN ; + rot dup rot = IF comp 0= ELSE 2drop drop 0 THEN ;
400 cp
diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-hvterm.fs b/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-hvterm.fs index 32b2a59..9094816 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-hvterm.fs +++ b/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-hvterm.fs @@ -26,7 +26,7 @@ : setup-alias " hvterm" find-alias 0= IF " hvterm" get-node node>path set-alias - ELSE THEN + ELSE THEN ;
setup-alias diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-veth.fs b/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-veth.fs index 0da0c61..3cae563 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-veth.fs +++ b/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-veth.fs @@ -26,7 +26,7 @@ INSTANCE VARIABLE obp-tftp-package ;
: load ( addr -- len ) - s" load" obp-tftp-package @ $call-method + s" load" obp-tftp-package @ $call-method ;
: ping ( -- ) @@ -36,6 +36,6 @@ INSTANCE VARIABLE obp-tftp-package : setup-alias " net" find-alias 0= IF " net" get-node node>path set-alias - ELSE THEN + ELSE THEN ; setup-alias diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-vscsi-device.fs b/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-vscsi-device.fs index 1c48706..4136efa 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-vscsi-device.fs +++ b/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-vscsi-device.fs @@ -28,9 +28,9 @@ VALUE is_cdrom
2dup find-alias 0= IF get-node node>path set-alias -ELSE 2drop THEN +ELSE 2drop THEN
-s" block" device-type +s" block" device-type
\ Required interface for deblocker
@@ -43,7 +43,7 @@ s" block" device-type not IF ." Read blocks failed !" cr -1 throw THEN -; +;
INSTANCE VARIABLE deblocker
@@ -53,7 +53,7 @@ INSTANCE VARIABLE deblocker " dev-get-capacity" $call-parent to max-block-num to block-size " dev-max-transfer" $call-parent to max-transfer
- 0 0 " deblocker" $open-package dup deblocker ! dup IF + 0 0 " deblocker" $open-package dup deblocker ! dup IF " disk-label" find-package IF my-args rot interpose THEN diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-vscsi.fs b/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-vscsi.fs index 7bf5ae8..2da9c58 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-vscsi.fs +++ b/qemu-0.15.x/roms/SLOF/board-qemu/slof/vio-vscsi.fs @@ -19,7 +19,7 @@ \ ----------------------------------------------------------- \ Direct DMA conversion hack \ ----------------------------------------------------------- -: l2dma ( laddr - dma_addr) +: l2dma ( laddr - dma_addr) ;
\ ----------------------------------------------------------- @@ -262,7 +262,7 @@ CREATE srp 100 allot 1 srp >srp-cmd-tag x! srp >srp-cmd-lun 1 + c! \ lun srp >srp-cmd-lun c! \ id - /srp-cmd to srp-len + /srp-cmd to srp-len ;
: srp-prep-cmd-io ( addr len id lun -- ) @@ -271,7 +271,7 @@ CREATE srp 100 allot srp srp-len + ( len dmaaddr descaddr ) dup >r x! r> 8 + ( len descaddr+8 ) dup 0 swap l! 4 + ( len descaddr+c ) - l! + l! srp-len 10 + to srp-len ;
@@ -305,12 +305,12 @@ CREATE srp 100 allot ." VSCSI: Invalid CRQ response tag, want 1 got " . cr false EXIT THEN drop - + srp >srp-rsp-tag x@ dup 1 <> IF ." VSCSI: Invalid SRP response tag, want 1 got " . cr false EXIT THEN drop - + srp >srp-rsp-status c@ vscsi-debug IF ." VSCSI: Got response status: " @@ -321,7 +321,7 @@ CREATE srp 100 allot srp-rsp-find-sense scsi-get-sense-data vscsi-debug IF - ." VSCSI: Sense key: " dup .sense-text cr + ." VSCSI: Sense key: " dup .sense-text cr THEN false EXIT THEN @@ -361,7 +361,7 @@ CREATE sector d# 512 allot srp >srp-cmd-cdb scsi-build-read-cap-10 srp-send-cmd srp-wait-rsp - dup not IF nip nip nip EXIT THEN \ swallow sense + dup not IF nip nip nip EXIT THEN \ swallow sense ;
: start-stop-unit ( state# -- true | false ) @@ -369,7 +369,7 @@ CREATE sector d# 512 allot srp >srp-cmd-cdb scsi-build-start-stop-unit srp-send-cmd srp-wait-rsp - dup not IF nip nip nip EXIT THEN \ swallow sense + dup not IF nip nip nip EXIT THEN \ swallow sense ;
: get-media-event ( -- true | false ) @@ -377,11 +377,11 @@ CREATE sector d# 512 allot srp >srp-cmd-cdb scsi-build-get-media-event srp-send-cmd srp-wait-rsp - dup not IF nip nip nip EXIT THEN \ swallow sense + dup not IF nip nip nip EXIT THEN \ swallow sense ;
: read-blocks ( -- addr block# #blocks blksz -- [ #read-blocks true ] | false ) - over * ( addr block# #blocks len ) + over * ( addr block# #blocks len ) >r rot r> ( block# #blocks addr len ) 5 0 DO 2dup current-id current-lun @@ -462,7 +462,7 @@ CREATE sector d# 512 allot 0 INSTANCE VALUE target-lun
: set-address ( lun id -- ) - to target-id to target-lun + to target-id to target-lun ;
: dev-max-transfer ( -- n ) @@ -477,7 +477,7 @@ CREATE sector d# 512 allot
: dev-read-blocks ( -- addr block# #blocks blksize -- #read-blocks ) target-id to current-id target-lun to current-lun - read-blocks + read-blocks ;
: initial-test-unit-ready ( -- true | [ ascq asc sense-key false ] ) @@ -485,7 +485,7 @@ CREATE sector d# 512 allot 3 0 DO 2drop 2drop test-unit-ready dup IF UNLOOP EXIT THEN - LOOP + LOOP ;
: compare-sense ( ascq asc key ascq2 asc2 key2 -- true | false ) @@ -537,7 +537,7 @@ CREATE sector d# 512 allot THEN
\ Other error... - 3drop CDROM-TRAY-MAYBE-OPEN + 3drop CDROM-TRAY-MAYBE-OPEN ;
: cdrom-try-close-tray ( -- ) @@ -584,7 +584,7 @@ CREATE sector d# 512 allot ;
8 CONSTANT #dev -: vscsi-find-disks ( -- ) +: vscsi-find-disks ( -- ) ." VSCSI: Looking for disks" cr #dev 0 DO \ check 8 devices (no LUNs) i to current-id 0 to current-lun @@ -610,7 +610,7 @@ scsi-close : setup-alias " scsi" find-alias 0= IF " scsi" get-node node>path set-alias - ELSE THEN + ELSE THEN ;
: vscsi-init-and-scan ( -- ) diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/veth/Makefile b/qemu-0.15.x/roms/SLOF/board-qemu/veth/Makefile index 0032b8e..97d7bfe 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/veth/Makefile +++ b/qemu-0.15.x/roms/SLOF/board-qemu/veth/Makefile @@ -30,7 +30,7 @@ net_veth.o: $(OBJS) $(LD) $(LDFLAGS) $^ -o $@ -T veth.lds -N
net_veth.bin: net_veth.o - $(OBJCOPY) -O binary $^ $@ + $(OBJCOPY) -O binary $^ $@ clean: $(RM) -f *.o *.a *.i *.bin
diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/veth/module_entry.c b/qemu-0.15.x/roms/SLOF/board-qemu/veth/module_entry.c index 30a3508..b74128d 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/veth/module_entry.c +++ b/qemu-0.15.x/roms/SLOF/board-qemu/veth/module_entry.c @@ -32,7 +32,7 @@ snk_module_t* module_init(snk_kernel_t *snk_kernel_int, pci_config_t *pciconf) unsigned long long bss_size = (unsigned long long) &__bss_size; vio_config_t *vioconf = (vio_config_t *)pciconf;
- if (((unsigned long long) bss) + bss_size >= 0xFF00000 + if (((unsigned long long) bss) + bss_size >= 0xFF00000 || bss_size >= 0x2000000) { snk_kernel_int->print("BSS size (%llu bytes) is too big!\n", bss_size); diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/veth/veth.c b/qemu-0.15.x/roms/SLOF/board-qemu/veth/veth.c index 0bbaebe..e73f5b1 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/veth/veth.c +++ b/qemu-0.15.x/roms/SLOF/board-qemu/veth/veth.c @@ -60,8 +60,8 @@ struct ibmveth_rx_q_entry { u64 correlator; };
-static void *buffer_list; -static void *filter_list; +static void *buffer_list; +static void *filter_list; static u64 *rx_bufs; static u64 *rx_bufs_aligned; static u32 cur_rx_toggle; diff --git a/qemu-0.15.x/roms/SLOF/board-qemu/veth/veth.lds b/qemu-0.15.x/roms/SLOF/board-qemu/veth/veth.lds index a0c75d5..fa78802 100644 --- a/qemu-0.15.x/roms/SLOF/board-qemu/veth/veth.lds +++ b/qemu-0.15.x/roms/SLOF/board-qemu/veth/veth.lds @@ -17,23 +17,23 @@ ENTRY(module_init) SECTIONS { .code 0xF800000: { - module_entry.o(.opd) + module_entry.o(.opd) *(.text .stub .text.* .gnu.linkonce.t.*) *(.sfpr .glink) *(.rodata .rodata.* .gnu.linkonce.r.*) *(.data .data.* .gnu.linkonce.d.*) *(.opd) - } - .got : + } + .got : { _got = .; *(.got .toc) - } + } .bss : { __bss_start = .; *(*COM* .bss .gnu.linkonce.b.*) __bss_end = .; - } + } __bss_size = (__bss_end - __bss_start); __end = .; } diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/Makefile b/qemu-0.15.x/roms/SLOF/clients/net-snk/Makefile index f89ef28..abed84a 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/Makefile +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/Makefile @@ -13,7 +13,7 @@ TOP=$(shell pwd) export TOP include $(TOP)/make.rules - + OBJS = kernel/kernel.o oflib/oflib.o libc/libc-glue.o app/app.o .PHONY : subdirs clean depend mrproper
@@ -26,14 +26,14 @@ client : .depend subdirs $(OBJS) $(LIBCMNDIR)/libc.a sec-client : subdirs $(OBJS) $(LIBCMNDIR)/libc.a $(LD) $(LDFLAGS) -o $@ -Tsec-client.lds $(OBJS) $(LIBCMNDIR)/libc.a
-fpga-client : +fpga-client : $(MAKE) -C . fpga-client-int SNK_LJTAG_PROCESS=1
fpga-client-int : subdirs $(OBJS) $(LIBCMNDIR)/libc.a $(LD) $(LDFLAGS) -o fpga-client -Tsec-client.lds $(OBJS) $(LIBCMNDIR)/libc.a $(STRIP) fpga-client
-subdirs : +subdirs : @for dir in $(dir $(OBJS)); do \ $(MAKE) -C $$dir || exit 1; \ done @@ -41,7 +41,7 @@ subdirs : $(LIBCMNDIR)/libc.a: $(MAKE) -C $(LIBCMNDIR) libc
-clean: +clean: @for dir in $(dir $(OBJS)); do \ $(MAKE) -C $$dir clean; \ done diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/Makefile b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/Makefile index 5d02afa..cd4b9ed 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/Makefile +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/Makefile @@ -19,7 +19,7 @@ include $(TOP)/make.rules CFLAGS +=$(ADDCFLAGS)
OBJS = main.o -OBJDIRS = netlib/netlib.o netapps/netboot.o +OBJDIRS = netlib/netlib.o netapps/netboot.o OBJDIRS += netapps/netflash.o OBJDIRS += netapps/ping.o OBJDIRS += netapps/args.o @@ -39,10 +39,10 @@ subdirs: done
app.o: subdirs $(OBJS) - $(LD) $(LDFLAGS) $(OBJDIRS) $(OBJS) -o $@ -r + $(LD) $(LDFLAGS) $(OBJDIRS) $(OBJS) -o $@ -r
clean : - $(RM) -f *.o *.a *.i + $(RM) -f *.o *.a *.i for dir in $(SUBDIRS); do \ $(CLEAN) ; \ $(MAKE) -C $$dir DIRECTORY=$(DIRECTORY)$$dir clean; \ diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/biosemu/Makefile b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/biosemu/Makefile index 3a07ada..d8ea73f 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/biosemu/Makefile +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/biosemu/Makefile @@ -19,7 +19,7 @@ include $(TOP)/make.rules CFLAGS += -I$(ROOTDIR)/other-licence/x86emu -I$(ROOTDIR)/other-licence/x86emu/include
OBJS = biosemu.o debug.o device.o mem.o io.o interrupt.o vbe.o -LIBX86EMU = $(ROOTDIR)/other-licence/x86emu/libx86emu.a +LIBX86EMU = $(ROOTDIR)/other-licence/x86emu/libx86emu.a
.PHONY: $(LIBX86EMU)
diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/Makefile b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/Makefile index a40cb95..5432cc6 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/Makefile +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/Makefile @@ -17,13 +17,13 @@ endif include $(TOP)/make.rules
CFLAGS += -I../ -I../../../../lib/ -Wall -W -OBJS = netboot.o netflash.o +OBJS = netboot.o netflash.o OBJS += ping.o OBJS += args.o
-all: $(OBJS) +all: $(OBJS)
-clean: +clean: $(RM) -f *.o *.a *.i
include $(TOP)/make.depend diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/netboot.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/netboot.c index 13202a7..0757554 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/netboot.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/netboot.c @@ -60,7 +60,7 @@ typedef struct { * @return updated arg_str */ /* -static const char * +static const char * parse_ipv6args (const char *arg_str, unsigned int argc, obp_tftp_args_t *obp_tftp_args) { @@ -148,7 +148,7 @@ parse_ipv6args (const char *arg_str, unsigned int argc, * @param obp_tftp_args structure which contains the result * @return updated arg_str */ -static const char * +static const char * parse_ipv4args (const char *arg_str, unsigned int argc, obp_tftp_args_t *obp_tftp_args) { @@ -326,7 +326,7 @@ netboot(int argc, char *argv[]) /* char null_ip6[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; */ int huge_load = strtol(argv[4], 0, 10); @@ -416,10 +416,10 @@ netboot(int argc, char *argv[]) && memcmp(&obp_tftp_args.si6addr, null_ip6, 16) != 0 && obp_tftp_args.filename[0] != 0) {
- memcpy(&fn_ip.server_ip6.addr[0], + memcpy(&fn_ip.server_ip6.addr[0], &obp_tftp_args.si6addr.addr, 16); obp_tftp_args.ip_init = IP_INIT_IPV6_MANUAL; - } + } else { obp_tftp_args.ip_init = IP_INIT_DHCPV6_STATELESS; } diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/netflash.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/netflash.c index 6865ecb..c561f8e 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/netflash.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netapps/netflash.c @@ -39,7 +39,7 @@ int netflash(int argc, char * argv[])
if (argc == 3 && argv[2][0] == '-' && argv[2][1] == 'c' && argv[2][2] == 0) manage_mode = 1; - else if (argc == 3 && + else if (argc == 3 && argv[2][0] == '-' && argv[2][1] == 'r' && argv[2][2] == 0) manage_mode = 1; else if (argc == 4 && @@ -117,7 +117,7 @@ int netflash(int argc, char * argv[]) }
printf("%d.%d.%d.%d\n", - ((fn_ip.own_ip >> 24) & 0xFF), ((fn_ip.own_ip >> 16) & 0xFF), + ((fn_ip.own_ip >> 24) & 0xFF), ((fn_ip.own_ip >> 16) & 0xFF), ((fn_ip.own_ip >> 8) & 0xFF), (fn_ip.own_ip & 0xFF));
/* Load file via TFTP into buffer provided by OpenFirmware */ diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/Makefile b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/Makefile index 5b91470..a686341 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/Makefile +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/Makefile @@ -33,10 +33,10 @@ endif
all: netlib.o
-netlib.o: $(OBJS) +netlib.o: $(OBJS) $(LD) $(LDFLAGS) $^ -o $@ -r
-clean: +clean: $(RM) -f *.o *.a *.i
include $(TOP)/make.depend diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/bootp.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/bootp.c index b1e97ed..ee0f91d 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/bootp.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/bootp.c @@ -175,37 +175,37 @@ receive_bootp(filename_ip_t * fn_ip) printf(" %02x", packet[j]); } printf(".\n"); - printf("fn_ip->own_mac: %02x:%02x:%02x:%02x:%02x:%02x\n", + printf("fn_ip->own_mac: %02x:%02x:%02x:%02x:%02x:%02x\n", get_mac_address()[0], get_mac_address()[1], get_mac_address()[2], get_mac_address()[3], get_mac_address()[4], get_mac_address()[5]); - printf("Header ethh->dest_mac: %02x:%02x:%02x:%02x:%02x:%02x\n", - ethh->dest_mac[0], ethh->dest_mac[1], ethh->dest_mac[2], + printf("Header ethh->dest_mac: %02x:%02x:%02x:%02x:%02x:%02x\n", + ethh->dest_mac[0], ethh->dest_mac[1], ethh->dest_mac[2], ethh->dest_mac[3], ethh->dest_mac[4], ethh->dest_mac[5]); - printf("Header ethh->src_mac: %02x:%02x:%02x:%02x:%02x:%02x\n", - ethh->src_mac[0], ethh->src_mac[1], ethh->src_mac[2], + printf("Header ethh->src_mac: %02x:%02x:%02x:%02x:%02x:%02x\n", + ethh->src_mac[0], ethh->src_mac[1], ethh->src_mac[2], ethh->src_mac[3], ethh->src_mac[4], ethh->src_mac[5]); - printf("Header ethh->typ: %x\n",ethh->type); - printf("Header iph->ip_hlv: %x\n",iph->ip_hlv); - printf("Header iph->ip_len: %x\n",iph->ip_len); - printf("Header iph->ip_id: %x\n",iph->ip_id); - printf("Header iph->ip_off: %x\n",iph->ip_off); - printf("Header iph->ip_ttl: %x\n",iph->ip_ttl); - printf("Header iph->ip_p: %x\n",iph->ip_p); - printf("Header iph->ip_sum: %x\n",iph->ip_sum); - printf("Header iph->ip_src: %x\n",iph->ip_src); - printf("Header iph->ip_dst: %x\n",iph->ip_dst); - - printf("Header btph->op: %x\n",btph->op); - printf("Header btph->htype: %x\n",btph->htype); - printf("Header btph->hlen: %x\n",btph->hlen); - printf("Header btph->hops: %x\n",btph->hops); - printf("Header btph->xid: %x\n",btph->xid); - printf("Header btph->secs: %x\n",btph->secs); - printf("Header btph->ciaddr: %x\n",btph->ciaddr); - printf("Header btph->yiaddr: %x\n",btph->yiaddr); - printf("Header btph->siaddr: %x\n",btph->siaddr); - printf("Header btph->giaddr: %x\n",btph->giaddr); + printf("Header ethh->typ: %x\n",ethh->type); + printf("Header iph->ip_hlv: %x\n",iph->ip_hlv); + printf("Header iph->ip_len: %x\n",iph->ip_len); + printf("Header iph->ip_id: %x\n",iph->ip_id); + printf("Header iph->ip_off: %x\n",iph->ip_off); + printf("Header iph->ip_ttl: %x\n",iph->ip_ttl); + printf("Header iph->ip_p: %x\n",iph->ip_p); + printf("Header iph->ip_sum: %x\n",iph->ip_sum); + printf("Header iph->ip_src: %x\n",iph->ip_src); + printf("Header iph->ip_dst: %x\n",iph->ip_dst); + + printf("Header btph->op: %x\n",btph->op); + printf("Header btph->htype: %x\n",btph->htype); + printf("Header btph->hlen: %x\n",btph->hlen); + printf("Header btph->hops: %x\n",btph->hops); + printf("Header btph->xid: %x\n",btph->xid); + printf("Header btph->secs: %x\n",btph->secs); + printf("Header btph->ciaddr: %x\n",btph->ciaddr); + printf("Header btph->yiaddr: %x\n",btph->yiaddr); + printf("Header btph->siaddr: %x\n",btph->siaddr); + printf("Header btph->giaddr: %x\n",btph->giaddr);
printf("Header btph->chaddr: %02x:%02x:%02x:%02x:%02x:%02x:\n", btph->chaddr[0], btph->chaddr[1], btph->chaddr[2], diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/dhcp.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/dhcp.c index 8f81bf3..380d6e7 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/dhcp.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/dhcp.c @@ -101,11 +101,11 @@ static uint8_t dhcp_magic[] = {0x63, 0x82, 0x53, 0x63}; * If flag[i] == TRUE then field for i-th option retains valid value and * information from this field may retrived (in case of receiving) or will * be transmitted (in case of transmitting). - * + * */ typedef struct { uint8_t flag[256]; /**< Show if corresponding opt. is valid */ - uint8_t request_list[256]; /**< o.55 If i-th member is TRUE, then i-th + uint8_t request_list[256]; /**< o.55 If i-th member is TRUE, then i-th option will be requested from server */ uint32_t server_ID; /**< o.54 Identifies DHCP-server */ uint32_t requested_IP; /**< o.50 Must be filled in DHCP-Request */ @@ -179,7 +179,7 @@ static char * response_buffer; * * @param boot_device a socket number used to send and recieve packets * @param fn_ip contains the following configuration information: - * client MAC, client IP, TFTP-server MAC, + * client MAC, client IP, TFTP-server MAC, * TFTP-server IP, Boot file name * @return ZERO - IP and configuration info obtained; * NON ZERO - error condition occurs. @@ -233,7 +233,7 @@ dhcp(char *ret_buffer, filename_ip_t * fn_ip, unsigned int retries) { // TFTP server defined by its name if (!strtoip(dhcp_tftp_name, &(dhcp_tftp_ip))) { if (!dns_get_ip(dhcp_tftp_name, &(dhcp_tftp_ip))) { - // DNS error - can't obtain TFTP-server name + // DNS error - can't obtain TFTP-server name // Use TFTP-ip from siaddr field, if presented if (dhcp_siaddr_ip) { dhcp_tftp_ip = dhcp_siaddr_ip; @@ -282,7 +282,7 @@ dhcp_attempt(void) { } while (get_timer() > 0); }
- // timeout + // timeout return 0; }
@@ -290,7 +290,7 @@ dhcp_attempt(void) { * DHCP: Supplements DHCP-message with options stored in structure. * For more information about option coding see dhcp_options_t. * - * @param opt_field Points to the "vend" field of DHCP-message + * @param opt_field Points to the "vend" field of DHCP-message * (destination) * @param opt_struct this structure stores info about the options wich * will be added to DHCP-message (source) @@ -384,7 +384,7 @@ dhcp_encode_options(uint8_t * opt_field, dhcp_options_t * opt_struct) { * DHCP: Extracts encoded options from DHCP-message into the structure. * For more information about option coding see dhcp_options_t. * - * @param opt_field Points to the "options" field of DHCP-message + * @param opt_field Points to the "options" field of DHCP-message * (source). * @param opt_len Length of "options" field. * @param opt_struct this structure stores info about the options wich @@ -411,30 +411,30 @@ dhcp_decode_options(uint8_t opt_field[], uint32_t opt_len, switch(opt_field[offset]) { case DHCP_OVERLOAD : opt_struct -> overload = opt_field[offset + 2]; - offset += 2 + opt_field[offset + 1]; + offset += 2 + opt_field[offset + 1]; break;
case DHCP_REQUESTED_IP : opt_struct -> requested_IP = htonl(* (uint32_t *) (opt_field + offset + 2)); - offset += 2 + opt_field[offset + 1]; + offset += 2 + opt_field[offset + 1]; break;
case DHCP_MASK : opt_struct -> flag[DHCP_MASK] = 1; opt_struct -> subnet_mask = htonl(* (uint32_t *) (opt_field + offset + 2)); - offset += 2 + opt_field[offset + 1]; + offset += 2 + opt_field[offset + 1]; break;
case DHCP_DNS : opt_struct -> flag[DHCP_DNS] = 1; opt_struct -> dns_IP = htonl(* (uint32_t *) (opt_field + offset + 2)); - offset += 2 + opt_field[offset + 1]; + offset += 2 + opt_field[offset + 1]; break;
case DHCP_ROUTER : opt_struct -> flag[DHCP_ROUTER] = 1; opt_struct -> router_IP = htonl(* (uint32_t *) (opt_field + offset + 2)); - offset += 2 + opt_field[offset + 1]; + offset += 2 + opt_field[offset + 1]; break;
case DHCP_MSG_TYPE : @@ -521,7 +521,7 @@ static int8_t dhcp_merge_options(uint8_t dst_options[], uint32_t * dst_len, } }
- if (src_offset == src_len) + if (src_offset == src_len) return 1; return 0; } @@ -726,7 +726,7 @@ void dhcp_send_release(void) {
dhcp_encode_options(btph -> vend, &opt);
- fill_udphdr(ðer_packet[sizeof(struct iphdr)], + fill_udphdr(ðer_packet[sizeof(struct iphdr)], sizeof(struct btphdr) + sizeof(struct udphdr), UDPPORT_BOOTPC, UDPPORT_BOOTPS); fill_iphdr(ether_packet, sizeof(struct btphdr) + @@ -754,7 +754,7 @@ handle_dhcp(uint8_t * packet, int32_t packetsize) { struct iphdr * iph; dhcp_options_t opt;
- memset(&opt, 0, sizeof(dhcp_options_t)); + memset(&opt, 0, sizeof(dhcp_options_t)); btph = (struct btphdr *) packet; iph = (struct iphdr *) packet - sizeof(struct udphdr) - sizeof(struct iphdr); @@ -790,7 +790,7 @@ handle_dhcp(uint8_t * packet, int32_t packetsize) { }
- // decode options + // decode options if (!dhcp_decode_options(btph -> vend, packetsize - sizeof(struct btphdr) + sizeof(btph -> vend), &opt)) { @@ -904,7 +904,7 @@ handle_dhcp(uint8_t * packet, int32_t packetsize) { else { strcpy((char *) dhcp_filename, ""); if (opt.overload != DHCP_OVERLOAD_FILE && - opt.overload != DHCP_OVERLOAD_BOTH && + opt.overload != DHCP_OVERLOAD_BOTH && strlen((char *) btph -> file)) { strncpy((char *) dhcp_filename, (char *) btph->file, @@ -969,7 +969,7 @@ strtoip(int8_t * str, uint32_t * ip) { if (i > 3 || !isdigit(**ptr)) return 0; if (strstr((char *) * ptr, ".") != NULL) { - len = (int16_t) ((int8_t *) strstr((char *) * ptr, ".") - + len = (int16_t) ((int8_t *) strstr((char *) * ptr, ".") - (int8_t *) (* ptr)); strncpy(octet, (char *) * ptr, len); octet[len] = 0; * ptr += len; diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/dns.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/dns.c index 5a931d5..a63b9fa 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/dns.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/dns.c @@ -50,13 +50,13 @@ struct dnshdr { uint16_t id; /**< an identifier used to match up replies */ uint16_t flags; /**< contains op_code, err_code, etc. */ - uint16_t qdcount; /**< specifies the number of entries in the + uint16_t qdcount; /**< specifies the number of entries in the question section */ - uint16_t ancount; /**< specifies the number of entries in the + uint16_t ancount; /**< specifies the number of entries in the answer section */ uint16_t nscount; /**< specifies the number of entries in the authority section */ - uint16_t arcount; /**< specifies the number of entries in the + uint16_t arcount; /**< specifies the number of entries in the additional section */ };
@@ -199,7 +199,7 @@ handle_dns(uint8_t * packet, int32_t packetsize) { struct dnshdr * dnsh = (struct dnshdr *) packet; uint8_t * resp_section = packet + sizeof(struct dnshdr); /* This string stores domain name from DNS-packets */ - static int8_t handle_domain_name[0x100]; + static int8_t handle_domain_name[0x100]; int i;
// verify ID - is it response for our query? @@ -275,7 +275,7 @@ handle_dns(uint8_t * packet, int32_t packetsize) { * Responses from the server are handled by handle_dns function. * * @param domain_name the domain name given as series of labels preceded - * with length(label) and terminated with 0 + * with length(label) and terminated with 0 * <br>(e.g. "\3,w,w,w,\4,h,o,s,t,\3,o,r,g,\0") * @see handle_dns */ @@ -313,7 +313,7 @@ dns_send_query(int8_t * domain_name) { * * @param packet Points to the place where ARP-header must be placed. * @param domain_name the domain name given as series of labels preceded - * with length(label) and terminated with 0 + * with length(label) and terminated with 0 * <br>(e.g. "\3,w,w,w,\4,h,o,s,t,\3,o,r,g,\0") * @see fill_udphdr * @see fill_iphdr @@ -340,7 +340,7 @@ fill_dnshdr(uint8_t * packet, int8_t * domain_name) {
/** * DNS: Extracts domain name from the question or answer section of - * the DNS-message. This function is need to support message + * the DNS-message. This function is need to support message * compression requirement (see RFC 1035, paragraph 4.1.4). * * @param dnsh Points at the DNS-header. @@ -348,7 +348,7 @@ fill_dnshdr(uint8_t * packet, int8_t * domain_name) { * which has to be extracted. * @param domain_name In case of SUCCESS this string stores extracted name. * In case of FAULT this string is empty. - * @return NULL in case of FAULT (domain name > 255 octets); + * @return NULL in case of FAULT (domain name > 255 octets); * otherwise pointer to the data following the name. * @see dnshdr */ diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/ethernet.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/ethernet.c index cc77457..a7bb168 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/ethernet.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/ethernet.c @@ -36,7 +36,7 @@ * | APPLICATION +----------------+-----------+ * V | | * upper DNS (handle_dns) BootP / DHCP (handle_bootp_client) - * + * * ************************************************************************ * </pre> */
@@ -84,9 +84,9 @@ get_mac_address(void) {
/** * Ethernet: Check if given multicast address is a multicast MAC address - * starting with 0x3333 + * starting with 0x3333 * - * @return true or false + * @return true or false */ static uint8_t is_multicast_mac(uint8_t * mac) { diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/ipv4.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/ipv4.c index df18970..9b8a522 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/ipv4.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/ipv4.c @@ -149,7 +149,7 @@ ipv4_init(void) arp_table[i].eth_len = 0; }
- /* Set IP send function to send_ipv4() */ + /* Set IP send function to send_ipv4() */ send_ip = &send_ipv4; }
diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/tftp.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/tftp.c index e8e9d09..1eb3086 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/tftp.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/app/netlib/tftp.c @@ -56,8 +56,8 @@ static int huge_load; static int len; static int tftp_finished = 0; static int lost_packets = 0; -static int tftp_errno = 0; -static int ip_version = 0; +static int tftp_errno = 0; +static int ip_version = 0; static short port_number = -1; static tftp_err_t *tftp_err; static filename_ip_t *fn_ip; @@ -122,7 +122,7 @@ send_rrq(void) + strlen("blksize") + strlen(blocksize_str) + 2; ip_len = sizeof(struct ip6hdr) + ip6_payload_len; fill_ip6hdr ((uint8_t *) ip6, ip6_payload_len, IPTYPE_UDP, get_ipv6_address(), - &(fn_ip->server_ip6)); + &(fn_ip->server_ip6));
} */ @@ -241,7 +241,7 @@ send_error(int error_code, unsigned short dport) udph = (struct udphdr *) (ip6 + 1); ip6_payload_len = sizeof(struct udphdr) + 5; ip_len = sizeof(struct ethhdr) + sizeof(struct ip6hdr) + - ip6_payload_len; + ip6_payload_len; fill_ip6hdr ((uint8_t *) ip6, ip6_payload_len, IPTYPE_UDP, get_ipv6_address(), &(fn_ip->server_ip6)); } @@ -272,7 +272,7 @@ print_progress(int urgent, int received_bytes) char buffer[100]; char *ptr;
- // 1MB steps or 0x400 times or urgent + // 1MB steps or 0x400 times or urgent if(((received_bytes - last_bytes) >> 20) > 0 || (i & 0x3FF) == 0 || urgent) { if(!first) { @@ -332,7 +332,7 @@ get_blksize(unsigned char *buffer, unsigned int len) }
/** - * Handle incoming tftp packets after read request was sent + * Handle incoming tftp packets after read request was sent * * this function also prints out some status characters * |-/ for each packet received @@ -340,13 +340,13 @@ get_blksize(unsigned char *buffer, unsigned int len) * I for an ICMP packet * #+* for different unexpected TFTP packets (not very good) * - * @param packet points to the UDP header of the packet + * @param packet points to the UDP header of the packet * @param len the length of the network packet * @return ZERO if packet was handled successfully - * ERRORCODE if error occurred + * ERRORCODE if error occurred */ int32_t -handle_tftp(uint8_t *packet, int32_t packetsize) +handle_tftp(uint8_t *packet, int32_t packetsize) { struct udphdr *udph; struct tftphdr *tftp; diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/client.lds b/qemu-0.15.x/roms/SLOF/clients/net-snk/client.lds index 2ebf9d1..2b263c9 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/client.lds +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/client.lds @@ -22,7 +22,7 @@ SECTIONS { *(.sfpr .glink) *(.rodata .rodata.* .gnu.linkonce.r.*) KEEP (*(.opd)) - . = ALIGN(256); + . = ALIGN(256); *(.data .data.* .gnu.linkonce.d.*) . = ALIGN(256); } =0x60000000 diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/include/of.h b/qemu-0.15.x/roms/SLOF/clients/net-snk/include/of.h index aced2d5..54044f1 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/include/of.h +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/include/of.h @@ -19,7 +19,7 @@ #define phandle_t p32 #define ihandle_t p32
-typedef struct +typedef struct { unsigned int serv; int nargs; diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/include/systemcall.h b/qemu-0.15.x/roms/SLOF/clients/net-snk/include/systemcall.h index 70aa92d..ccb3685 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/include/systemcall.h +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/include/systemcall.h @@ -19,20 +19,20 @@ syscall (int nr) { register unsigned long r0 asm("r0") = nr; register unsigned long r3 asm("r3"); - asm volatile ("sc" : "=r" (r3) + asm volatile ("sc" : "=r" (r3) : "r" (r0)); return r3; -} +}
extern inline long syscall_1 (int nr, long arg0) { register unsigned long r0 asm("r0") = nr; register unsigned long r3 asm("r3") = arg0; - asm volatile ("sc" : "=r" (r3) + asm volatile ("sc" : "=r" (r3) : "0" (r3), "r" (r0)); return r3; -} +}
extern inline long syscall_2 (int nr, long arg0, long arg1) @@ -40,10 +40,10 @@ syscall_2 (int nr, long arg0, long arg1) register unsigned long r0 asm("r0") = nr; register unsigned long r3 asm("r3") = arg0; register unsigned long r4 asm("r4") = arg1; - asm volatile ("sc" : "=r" (r3) - : "0" (r3), "r" (r4), "r" (r0)); + asm volatile ("sc" : "=r" (r3) + : "0" (r3), "r" (r4), "r" (r0)); return r3; -} +}
extern inline long syscall_3 (int nr, long arg0, long arg1, long arg2) @@ -52,10 +52,10 @@ syscall_3 (int nr, long arg0, long arg1, long arg2) register unsigned long r3 asm("r3") = arg0; register unsigned long r4 asm("r4") = arg1; register unsigned long r5 asm("r5") = arg2; - asm volatile ("sc" : "=r" (r3) - : "0" (r3), "r" (r4), "r" (r5), "r" (r0)); + asm volatile ("sc" : "=r" (r3) + : "0" (r3), "r" (r4), "r" (r5), "r" (r0)); return r3; -} +}
extern inline long syscall_4 (int nr, long arg0, long arg1, long arg2, long arg3) @@ -65,13 +65,13 @@ syscall_4 (int nr, long arg0, long arg1, long arg2, long arg3) register unsigned long r4 asm("r4") = arg1; register unsigned long r5 asm("r5") = arg2; register unsigned long r6 asm("r6") = arg3; - asm volatile ("sc" : "=r" (r3) - : "0" (r3), "r" (r4), "r" (r5), "r" (r6), "r" (r0)); + asm volatile ("sc" : "=r" (r3) + : "0" (r3), "r" (r4), "r" (r5), "r" (r6), "r" (r0)); return r3; -} +}
extern inline long -syscall_5 (int nr, long arg0, long arg1, long arg2, long arg3, +syscall_5 (int nr, long arg0, long arg1, long arg2, long arg3, long arg4) { register unsigned long r0 asm("r0") = nr; @@ -80,14 +80,14 @@ syscall_5 (int nr, long arg0, long arg1, long arg2, long arg3, register unsigned long r5 asm("r5") = arg2; register unsigned long r6 asm("r6") = arg3; register unsigned long r7 asm("r7") = arg4; - asm volatile ("sc" : "=r" (r3) - : "0" (r3), "r" (r4), "r" (r5), - "r" (r6), "r" (r7), "r" (r0)); + asm volatile ("sc" : "=r" (r3) + : "0" (r3), "r" (r4), "r" (r5), + "r" (r6), "r" (r7), "r" (r0)); return r3; -} +}
extern inline long -syscall_6 (int nr, long arg0, long arg1, long arg2, long arg3, +syscall_6 (int nr, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5) { register unsigned long r0 asm("r0") = nr; @@ -97,14 +97,14 @@ syscall_6 (int nr, long arg0, long arg1, long arg2, long arg3, register unsigned long r6 asm("r6") = arg3; register unsigned long r7 asm("r7") = arg4; register unsigned long r8 asm("r8") = arg5; - asm volatile ("sc" : "=r" (r3) - : "0" (r3), "r" (r4), "r" (r5), - "r" (r6), "r" (r7), "r" (r8), "r" (r0)); + asm volatile ("sc" : "=r" (r3) + : "0" (r3), "r" (r4), "r" (r5), + "r" (r6), "r" (r7), "r" (r8), "r" (r0)); return r3; -} +}
extern inline long -syscall_7 (int nr, long arg0, long arg1, long arg2, long arg3, +syscall_7 (int nr, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6) { register unsigned long r0 asm("r0") = nr; @@ -115,12 +115,12 @@ syscall_7 (int nr, long arg0, long arg1, long arg2, long arg3, register unsigned long r7 asm("r7") = arg4; register unsigned long r8 asm("r8") = arg5; register unsigned long r9 asm("r9") = arg6; - asm volatile ("sc" : "=r" (r3) - : "0" (r3), "r" (r4), "r" (r5), - "r" (r6), "r" (r7), "r" (r8), - "r" (r9), "r" (r0)); + asm volatile ("sc" : "=r" (r3) + : "0" (r3), "r" (r4), "r" (r5), + "r" (r6), "r" (r7), "r" (r8), + "r" (r9), "r" (r0)); return r3; -} +}
#define _exit_sc_nr 1 @@ -143,6 +143,6 @@ syscall_7 (int nr, long arg0, long arg1, long arg2, long arg3, #define _recv_sc_nr 4
-//typedef unsigned long size_t; +//typedef unsigned long size_t;
#endif diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/Makefile b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/Makefile index 976d851..911bda6 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/Makefile +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/Makefile @@ -20,12 +20,12 @@ include $(TOP)/make.rules OBJS = init.o systemcall.o crt0.o endian.o timer.o modules.o OBJS2 = entry.o lowmem.o
-all: kernel.o +all: kernel.o
kernel.o: $(OBJS) $(OBJS2) $(LD) $(LDFLAGS) $(OBJS) $(OBJS2) -o $@ -r
-clean: +clean: $(RM) -f *.o *.a *.i
include $(TOP)/make.depend diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/endian.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/endian.c index 04182f5..8505ad4 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/endian.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/endian.c @@ -17,12 +17,12 @@ inline uint16_t bswap_16 (uint16_t x) { return ((x&0xff00) >> 8) | ((x&0xff) << 8); } - + inline uint32_t bswap_32 (uint32_t x) { return bswap_16((x&0xffff0000) >> 16) | (bswap_16(x&0xffff) << 16); } - + inline uint64_t bswap_64 (uint64_t x) { return (unsigned long long) bswap_32((x&0xffffffff00000000ULL) >> 32) | diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/entry.S b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/entry.S index c0c7a12..c04c966 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/entry.S +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/entry.S @@ -14,15 +14,15 @@ #include <macros.h>
/* -Function: +Function: Input: - r3: - r4: - r5: prom entry - Output: + r3: + r4: + r5: prom entry + Output:
Decription: Main entry point, called from OF - + */ .globl _entry .section ".opd","aw" @@ -32,24 +32,24 @@ _entry: .previous .size main,24 .globl ._entry -._entry: +._entry: mr r3, r6 # parm 0 passed in r6 - mr r4, r7 # parm 1 passed in r7 - mr r6, r1 # save stack pointer + mr r4, r7 # parm 1 passed in r7 + mr r6, r1 # save stack pointer mflr r7 # save link register bcl 20,31,over # branch after pointer table -base: +base: .align 3 .LCgot: .quad _got-base+0x8000 .LCstack: .quad _stack+STACKSIZE-0x80-base -over: +over: mflr r8 # gpr 8 is the base ld r1,.LCstack-base(r8) # load new stack pointer add r1, r1, r8 # add base std r2, 64(r1) # save got std r7, 56(r1) # save link register # ld r2, .LCgot-base(r8) # load got pointer -# add r2, r2, r8 # add base +# add r2, r2, r8 # add base std r6, 0(r1) # save stack pointer
ld r6, _prom_entry@got(r2) @@ -117,7 +117,7 @@ _callback_entry:
.globl _exit_sp _exit_sp: .quad 0 - .globl _prom_entry + .globl _prom_entry _prom_entry: .quad 0
ENTRY(_exit) @@ -130,7 +130,7 @@ ENTRY(_exit) .globl undo_exception undo_exception:
-/* +/* unwind stack */ ld r3,exception_stack_frame@got(r2) @@ -148,15 +148,15 @@ undo_exception: .endr addi r1, r1, 0x130
-// restore regs as in default handler +// restore regs as in default handler
- ld r0, 0x48(r1) + ld r0, 0x48(r1) mtsrr0 r0 - ld r0, 0x50(r1) + ld r0, 0x50(r1) mtsrr1 r0 // 20 ld r0, 0x38(r1) - mtlr r0 + mtlr r0 ld r0, 0x30(r1) ld r11, 0x40(r1) // 30 diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/lowmem.S b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/lowmem.S index 8d6cfc6..8b73f35 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/lowmem.S +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/lowmem.S @@ -17,16 +17,16 @@ .irp i, 0x0200,0x0300,0x0380,0x0400,0x0480,0x0500,0x0600,0x0700, \ 0x0800,0x0900,0x0a00,0x0b00 . = \i - 0x200 -// 0 +// 0 stdu r1, -0x58(r1) std r0, 0x30(r1) mflr r0 std r0, 0x38(r1) // 10 mfsrr0 r0 - std r0, 0x48(r1) + std r0, 0x48(r1) mfsrr1 r0 - std r0, 0x50(r1) + std r0, 0x50(r1) // 20 std r11, 0x40(r1) li r0, \i @@ -34,14 +34,14 @@ bl _exception_handler
// 30 - ld r0, 0x48(r1) + ld r0, 0x48(r1) mtsrr0 r0 - ld r0, 0x50(r1) + ld r0, 0x50(r1) mtsrr1 r0
// 40 ld r0, 0x38(r1) - mtlr r0 + mtlr r0 ld r0, 0x30(r1) ld r11, 0x40(r1) // 50 @@ -49,9 +49,9 @@ rfid nop nop -// 60 -// .quad \i+0x68 - .quad .exception_forward +// 60 +// .quad \i+0x68 + .quad .exception_forward // 68 blr .endr @@ -63,9 +63,9 @@ mflr r11 std r11, 0x30(r1) mfsrr0 r11 - std r11, 0x40(r1) + std r11, 0x40(r1) mfsrr1 r11 - std r11, 0x48(r1) + std r11, 0x48(r1) ld r11, _system_call@got(r2) ld r11, 0(r11) mtctr r11 @@ -73,29 +73,29 @@ bctrl ld r11, 0x30(r1) mtlr r11 - ld r11, 0x40(r1) + ld r11, 0x40(r1) mtsrr0 r11 - ld r11, 0x48(r1) + ld r11, 0x48(r1) mtsrr1 r11 addi r1, r1, 0x50 rfid - + .irp i, 0x0d00,0x0e00,0x0f00, \ 0x1000,0x1100,0x1200,0x1300,0x1400,0x1500,0x1600,0x1700, \ 0x1800,0x1900,0x1a00,0x1b00,0x1c00,0x1d00,0x1e00,0x1f00, \ 0x2000,0x2100,0x2200,0x2300,0x2400,0x2500,0x2600,0x2700, \ 0x2800,0x2900,0x2a00,0x2b00,0x2c00,0x2d00,0x2e00,0x2f00 . = \i - 0x200 -// 0 +// 0 stdu r1, -0x58(r1) std r0, 0x30(r1) mflr r0 std r0, 0x38(r1) // 10 mfsrr0 r0 - std r0, 0x48(r1) + std r0, 0x48(r1) mfsrr1 r0 - std r0, 0x50(r1) + std r0, 0x50(r1) // 20 std r11, 0x40(r1) li r0, \i @@ -103,14 +103,14 @@ bl _exception_handler
// 30 - ld r0, 0x48(r1) + ld r0, 0x48(r1) mtsrr0 r0 - ld r0, 0x50(r1) + ld r0, 0x50(r1) mtsrr1 r0
// 40 ld r0, 0x38(r1) - mtlr r0 + mtlr r0 ld r0, 0x30(r1) ld r11, 0x40(r1) // 50 @@ -118,9 +118,9 @@ rfid nop nop -// 60 -// .quad \i+0x68 - .quad .exception_forward +// 60 +// .quad \i+0x68 + .quad .exception_forward // 68 blr .endr @@ -130,7 +130,7 @@ */
_exception_handler: - stdu r1, -0x130(r1) + stdu r1, -0x130(r1) .irp i, 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, \ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, \ 27, 28, 29, 30, 31 @@ -148,7 +148,7 @@ _exception_handler:
mflr r14 - bctrl + bctrl mtlr r14
ld r14,0x130(r1) @@ -164,14 +164,14 @@ _exception_handler: ld r\i, 0x30+\i*8 (r1) .endr addi r1, r1, 0x130 - blr + blr
.text - -/* Set exception handler for given exception vector. + +/* Set exception handler for given exception vector. r3: exception vector offset r4: exception handler -*/ +*/ .globl .set_exception .set_exception: .globl set_exception @@ -182,5 +182,4 @@ set_exception: .globl set_exception_asm set_exception_asm: std r4, 0x60(r3) # fixme diff 1f - 0b - blr - + blr diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/modules.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/modules.c index 1ebf0b9..367ff69 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/modules.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/modules.c @@ -13,7 +13,7 @@ #include <netdriver_int.h> #include <kernel.h> #include <of.h> -#include <rtas.h> +#include <rtas.h> #include <cpu.h> /* flush_cache */ //#include <stdlib.h> /* malloc */ #include <unistd.h> /* open, close, read, write */ diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/systemcall.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/systemcall.c index 3c70e7d..c2a1fdf 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/systemcall.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/systemcall.c @@ -214,7 +214,7 @@ _syscall_sendto(int fd, void *packet, int packet_len, int flags,
long -_system_call(long arg0, long arg1, long arg2, long arg3, +_system_call(long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6, int nr) { long rc = -1; @@ -265,7 +265,7 @@ _system_call(long arg0, long arg1, long arg2, long arg3, return rc; }
-void +void exit(int status) { _exit(status); diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/timer.c b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/timer.c index 630a9b4..2ece0ed 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/timer.c +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/kernel/timer.c @@ -22,7 +22,7 @@ uint64_t get_time(void) { uint64_t act;
- __asm__ __volatile__( + __asm__ __volatile__( "0: mftbu %0 ;\ mftbl %%r0 ; \ mftbu %%r4 ; \ diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/oflib/Makefile b/qemu-0.15.x/roms/SLOF/clients/net-snk/oflib/Makefile index aad3e89..e95cb04 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/oflib/Makefile +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/oflib/Makefile @@ -26,14 +26,14 @@ all: oflib.o oflib.o: $(OBJS) $(OBJS2) $(LD) $(LDFLAGS) $^ -o oflib.o -r
-clean: +clean: $(RM) -f $(OBJS) $(OBJS2) oflib.o
include $(TOP)/make.depend
#mrproper : clean -# rm -rf .depend +# rm -rf .depend # #depend : # @rm -rf .depend ; touch .depend ; \ diff --git a/qemu-0.15.x/roms/SLOF/clients/net-snk/sec-client.lds b/qemu-0.15.x/roms/SLOF/clients/net-snk/sec-client.lds index 0ca24ab..e2ede4c 100644 --- a/qemu-0.15.x/roms/SLOF/clients/net-snk/sec-client.lds +++ b/qemu-0.15.x/roms/SLOF/clients/net-snk/sec-client.lds @@ -22,7 +22,7 @@ SECTIONS { *(.sfpr .glink) *(.rodata .rodata.* .gnu.linkonce.r.*) KEEP (*(.opd)) - . = ALIGN(256); + . = ALIGN(256); *(.data .data.* .gnu.linkonce.d.*) . = ALIGN(256); /* *(*COM* .bss .gnu.linkonce.b.*) */ @@ -35,13 +35,13 @@ SECTIONS { _lowmem_end = .; }
- .got : + .got : { . = ALIGN(8); _got = .; *(.got .toc) _got_end = .; - } + } .bss : { *(*COM* .bss .gnu.linkonce.b.*) diff --git a/qemu-0.15.x/roms/SLOF/clients/takeover/Makefile b/qemu-0.15.x/roms/SLOF/clients/takeover/Makefile index f492234..c1444d5 100644 --- a/qemu-0.15.x/roms/SLOF/clients/takeover/Makefile +++ b/qemu-0.15.x/roms/SLOF/clients/takeover/Makefile @@ -27,7 +27,7 @@ OBJS += $(LIBCMNDIR)/libc.a entry.o main.o of.elf takeover.o %.o: %.S $(CC) $(CFLAGS) -c $^
-all: takeover.elf +all: takeover.elf
takeover.elf: ppc32wrap.o takeover.elf32 @echo " ====== Building $@ ======" @@ -44,7 +44,7 @@ of.elf: ../../boot_rom.bin $(OBJCOPY) --input-target=binary --binary-architecture=powerpc -O elf64-powerpc $< $@
takeover.elf32: takeover.elf64 - $(OBJCOPY) -O binary $^ takeover.tmp + $(OBJCOPY) -O binary $^ takeover.tmp $(OBJCOPY) --input-target=binary --binary-architecture=powerpc -O elf32-powerpc takeover.tmp $@
ppc32wrap.o: ppc32wrap.S diff --git a/qemu-0.15.x/roms/SLOF/clients/takeover/client.lds b/qemu-0.15.x/roms/SLOF/clients/takeover/client.lds index 2701d8e..e665454 100644 --- a/qemu-0.15.x/roms/SLOF/clients/takeover/client.lds +++ b/qemu-0.15.x/roms/SLOF/clients/takeover/client.lds @@ -23,7 +23,7 @@ SECTIONS { *(.sfpr .glink) *(.rodata .rodata.* .gnu.linkonce.r.*) KEEP (*(.opd)) - . = ALIGN(256); + . = ALIGN(256); *(.data .data.* .gnu.linkonce.d.*) . = ALIGN(256); } =0x60000000 diff --git a/qemu-0.15.x/roms/SLOF/lib/libbootmsg/Makefile b/qemu-0.15.x/roms/SLOF/lib/libbootmsg/Makefile index 891987e..6da8d7b 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libbootmsg/Makefile +++ b/qemu-0.15.x/roms/SLOF/lib/libbootmsg/Makefile @@ -24,11 +24,11 @@ all: $(TARGET) ifeq ($(CPUARCH),cbea) SRCS = SRCSS = bootmsg_lvl.S -else +else ifeq ($(CPUARCH),ppc970) SRCS = SRCSS = bootmsg_lvl.S -else +else ifeq ($(CPUARCH),p5) SRCS = SRCSS = bootmsg_lvl.S @@ -38,7 +38,7 @@ SRCS = SRCSS = bootmsg_lvl.S else SRCS = bootmsg.c -SRCSS = +SRCSS = endif endif endif diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/README.txt b/qemu-0.15.x/roms/SLOF/lib/libc/README.txt index eaafdf4..638f9e9 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/README.txt +++ b/qemu-0.15.x/roms/SLOF/lib/libc/README.txt @@ -10,11 +10,11 @@ library: 1) If you want to use malloc() and the like, you have to supply an implemen- tation of sbrk() in your own code. malloc() uses sbrk() to get new, free memory regions. - + Prototype: void *sbrk(int incr); Description: sbrk() increments the available data space by incr bytes and returns a pointer to the start of the new area. - + See the man-page of sbrk for details about this function.
2) Before you can use the stdio output functions like printf(), puts() and the @@ -31,7 +31,7 @@ library: functions will not use open() before calling write(), so if the stdout cannel needs to be opened first, you should do that in your start-up code before using the libc functions for the first time. - + 3) Before you can use the stdio input functions like scanf() and the like, you have to provide a standard read() function in your code. scanf() and the like use read() to get the characters from the standard @@ -46,4 +46,4 @@ library: functions will not use open() before calling read(), so if the stdin cannel needs to be opened first, you should do that in your start-up code before using the libc functions for the first time. - + diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/ctype/Makefile.inc b/qemu-0.15.x/roms/SLOF/lib/libc/ctype/Makefile.inc index 25513a9..71f2b15 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/ctype/Makefile.inc +++ b/qemu-0.15.x/roms/SLOF/lib/libc/ctype/Makefile.inc @@ -12,7 +12,7 @@
CTYPE_SRC_C = isdigit.c isprint.c isspace.c isxdigit.c tolower.c toupper.c -CTYPE_SRC_ASM = +CTYPE_SRC_ASM = CTYPE_SRCS = $(CTYPE_SRC_C:%=$(CTYPECMNDIR)/%) $(CTYPE_SRC_ASM:%=$(CTYPECMNDIR)/%) CTYPE_OBJS = $(CTYPE_SRC_C:%.c=%.o) $(CTYPE_SRC_ASM:%.S=%.o)
diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/ctype/isxdigit.c b/qemu-0.15.x/roms/SLOF/lib/libc/ctype/isxdigit.c index 9d323f3..c864e48 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/ctype/isxdigit.c +++ b/qemu-0.15.x/roms/SLOF/lib/libc/ctype/isxdigit.c @@ -14,7 +14,7 @@
int isxdigit(int ch) { - return ( + return ( (ch >= '0' && ch <= '9') | (ch >= 'A' && ch <= 'F') | (ch >= 'a' && ch <= 'f') ); diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/ctype/tolower.c b/qemu-0.15.x/roms/SLOF/lib/libc/ctype/tolower.c index f775e90..9d4a2e3 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/ctype/tolower.c +++ b/qemu-0.15.x/roms/SLOF/lib/libc/ctype/tolower.c @@ -12,7 +12,7 @@
#include <ctype.h>
-int tolower(int c) +int tolower(int c) { return (((c >= 'A') && (c <= 'Z')) ? (c - 'A' + 'a' ) : c); } diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/stdio/Makefile.inc b/qemu-0.15.x/roms/SLOF/lib/libc/stdio/Makefile.inc index ac5302d..4d7398b 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/stdio/Makefile.inc +++ b/qemu-0.15.x/roms/SLOF/lib/libc/stdio/Makefile.inc @@ -15,7 +15,7 @@ STDIO_SRC_C = fscanf.c sprintf.c vfprintf.c vsnprintf.c vsprintf.c fprintf.c \ printf.c setvbuf.c putc.c puts.c putchar.c scanf.c stdchnls.c \ vfscanf.c vsscanf.c fileno.c
-STDIO_SRC_ASM = +STDIO_SRC_ASM = STDIO_SRCS = $(STDIO_SRC_C:%=$(STDIOCMNDIR)/%) $(STDIO_SRC_ASM:%=$(STDIOCMNDIR)/%) STDIO_OBJS = $(STDIO_SRC_C:%.c=%.o) $(STDIO_SRC_ASM:%.S=%.o)
diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/stdio/fprintf.c b/qemu-0.15.x/roms/SLOF/lib/libc/stdio/fprintf.c index 866df39..513fef1 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/stdio/fprintf.c +++ b/qemu-0.15.x/roms/SLOF/lib/libc/stdio/fprintf.c @@ -17,10 +17,10 @@ int fprintf(FILE *stream, const char* fmt, ...) { int count; va_list ap; - + va_start(ap, fmt); count = vfprintf(stream, fmt, ap); va_end(ap); - + return count; } diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/stdio/printf.c b/qemu-0.15.x/roms/SLOF/lib/libc/stdio/printf.c index 01f4592..ae674ea 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/stdio/printf.c +++ b/qemu-0.15.x/roms/SLOF/lib/libc/stdio/printf.c @@ -17,11 +17,11 @@ int printf(const char* fmt, ...) { int count; va_list ap; - + va_start(ap, fmt); count = vfprintf(stdout, fmt, ap); va_end(ap); - + return count; }
diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/stdio/vsnprintf.c b/qemu-0.15.x/roms/SLOF/lib/libc/stdio/vsnprintf.c index e78fb3d..51498a7 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/stdio/vsnprintf.c +++ b/qemu-0.15.x/roms/SLOF/lib/libc/stdio/vsnprintf.c @@ -138,7 +138,7 @@ print_format(char **buffer, const char *format, void *var) sizec[i] = '\0'; print_fill(buffer, sizec, (unsigned long) var, 16, ' ', 2); **buffer = '0'; - *buffer += 1; + *buffer += 1; **buffer = 'x'; *buffer += 1; print_itoa(buffer,(unsigned long) var, 16); @@ -189,7 +189,7 @@ print_format(char **buffer, const char *format, void *var) form++; }
- + return (long int) (*buffer - start); }
@@ -211,14 +211,14 @@ vsnprintf(char *buffer, size_t bufsize, const char *format, va_list arg) if(*ptr == '%') { char formstr[20]; int i=0; - + do { formstr[i] = *ptr; ptr++; i++; } while(!(*ptr == 'd' || *ptr == 'i' || *ptr == 'u' || *ptr == 'x' || *ptr == 'X' || *ptr == 'p' || *ptr == 'c' || *ptr == 's' || *ptr == '%' - || *ptr == 'O' || *ptr == 'o' )); + || *ptr == 'O' || *ptr == 'o' )); formstr[i++] = *ptr; formstr[i] = '\0'; if(*ptr == '%') { @@ -235,7 +235,7 @@ vsnprintf(char *buffer, size_t bufsize, const char *format, va_list arg) ptr++; } } - + *buffer = '\0';
return (buffer - bstart); diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/stdio/vsscanf.c b/qemu-0.15.x/roms/SLOF/lib/libc/stdio/vsscanf.c index b9603e9..f7fe30f 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/stdio/vsscanf.c +++ b/qemu-0.15.x/roms/SLOF/lib/libc/stdio/vsscanf.c @@ -21,17 +21,17 @@ _scanf(const char **buffer, const char *fmt, va_list *ap) int i; int length = 0;
- fmt++; + fmt++;
while(*fmt != '\0') { - + char tbuf[256];
switch(*fmt) { case 'd': case 'i': if(length == 0) length = 256; - + for(i = 0; **buffer != ' ' && **buffer != '\t' && **buffer != '\n' && i < length; i++) { tbuf[i] = **buffer; *buffer += 1; @@ -43,19 +43,19 @@ _scanf(const char **buffer, const char *fmt, va_list *ap) case 'X': case 'x': if(length == 0) length = 256; - + for(i = 0; **buffer != ' ' && **buffer != '\t' && **buffer != '\n' && i < length; i++) { tbuf[i] = **buffer; *buffer += 1; } tbuf[i] = '\0'; - + *(va_arg(*ap, int *)) = strtol(tbuf, NULL, 16); break; case 'O': case 'o': if(length == 0) length = 256; - + for(i = 0; **buffer != ' ' && **buffer != '\t' && **buffer != '\n' && i < length; i++) { tbuf[i] = **buffer; *buffer += 1; @@ -73,7 +73,7 @@ _scanf(const char **buffer, const char *fmt, va_list *ap) break; case 's': if(length == 0) length = 256; - + for(i = 0; **buffer != ' ' && **buffer != '\t' && **buffer != '\n' && i < length; i++) { tbuf[i] = **buffer; *buffer += 1; @@ -84,7 +84,7 @@ _scanf(const char **buffer, const char *fmt, va_list *ap) strcpy(va_arg(*ap, char *), tbuf); break; default: - if(*fmt >= '0' && *fmt <= '9') + if(*fmt >= '0' && *fmt <= '9') length += *fmt - '0'; break; } @@ -99,19 +99,19 @@ vsscanf(const char *buffer, const char *fmt, va_list ap) {
while(*fmt != '\0') { - + if(*fmt == '%') { - + char formstr[20]; int i=0; - + do { formstr[i] = *fmt; fmt++; i++; } while(!(*fmt == 'd' || *fmt == 'i' || *fmt == 'x' || *fmt == 'X' || *fmt == 'p' || *fmt == 'c' || *fmt == 's' || *fmt == '%' - || *fmt == 'O' || *fmt == 'o' )); + || *fmt == 'O' || *fmt == 'o' )); formstr[i++] = *fmt; formstr[i] = '\0'; if(*fmt != '%') { @@ -120,7 +120,7 @@ vsscanf(const char *buffer, const char *fmt, va_list ap) _scanf(&buffer, formstr, &ap); }
- } + }
fmt++;
@@ -128,4 +128,3 @@ vsscanf(const char *buffer, const char *fmt, va_list ap)
return 0; } - diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/stdlib/Makefile.inc b/qemu-0.15.x/roms/SLOF/lib/libc/stdlib/Makefile.inc index 702f6d7..443c188 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/stdlib/Makefile.inc +++ b/qemu-0.15.x/roms/SLOF/lib/libc/stdlib/Makefile.inc @@ -13,8 +13,8 @@
STDLIB_SRC_C = error.c atoi.c atol.c strtoul.c strtol.c rand.c \ malloc.c memalign.c realloc.c free.c - -STDLIB_SRC_ASM = + +STDLIB_SRC_ASM = STDLIB_SRCS = $(STDLIB_SRC_C:%=$(STDLIBCMNDIR)/%) $(STDLIB_SRC_ASM:%=$(STDLIBCMNDIR)/%) STDLIB_OBJS = $(STDLIB_SRC_C:%.c=%.o) $(STDLIB_SRC_ASM:%.S=%.o)
diff --git a/qemu-0.15.x/roms/SLOF/lib/libc/string/Makefile.inc b/qemu-0.15.x/roms/SLOF/lib/libc/string/Makefile.inc index 7ccf3c4..e7aae8f 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libc/string/Makefile.inc +++ b/qemu-0.15.x/roms/SLOF/lib/libc/string/Makefile.inc @@ -14,7 +14,7 @@ STRING_SRC_C = strcat.c strchr.c strcmp.c strcpy.c strlen.c strncmp.c \ strncpy.c strstr.c memset.c memcpy.c memmove.c memchr.c \ memcmp.c strcasecmp.c strncasecmp.c strtok.c -STRING_SRC_ASM = +STRING_SRC_ASM = STRING_SRCS = $(STRING_SRC_C:%=$(STRINGCMNDIR)/%) $(STRING_SRC_ASM:%=$(STRINGCMNDIR)/%) STRING_OBJS = $(STRING_SRC_C:%.c=%.o) $(STRING_SRC_ASM:%.S=%.o)
diff --git a/qemu-0.15.x/roms/SLOF/lib/libnvram/envvar.c b/qemu-0.15.x/roms/SLOF/lib/libnvram/envvar.c index eec7db7..465d036 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libnvram/envvar.c +++ b/qemu-0.15.x/roms/SLOF/lib/libnvram/envvar.c @@ -71,7 +71,7 @@ char *get_env(partition_t part, char *envvar) if (!strncmp(envvar, temp, strlen(envvar))) { int pos=0; while (temp[pos]!='=' && pos < len) pos++; - // DEBUG("value='%s'\n", temp+pos+1); + // DEBUG("value='%s'\n", temp+pos+1); return temp+pos+1; } } while (len); @@ -230,7 +230,7 @@ int set_env(partition_t part, char *envvar, char *value) free_nvram_buffer(buffer);
/* If the new environment variable content is shorter than the old one, - * we need to erase the rest of the bytes + * we need to erase the rest of the bytes */
if (current<last) { diff --git a/qemu-0.15.x/roms/SLOF/lib/libnvram/libnvram.code b/qemu-0.15.x/roms/SLOF/lib/libnvram/libnvram.code index f1fd414..5807c15 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libnvram/libnvram.code +++ b/qemu-0.15.x/roms/SLOF/lib/libnvram/libnvram.code @@ -144,7 +144,7 @@ PRIM(increase_X2d_nvram_X2d_partition)
PUSH;
- if(!ret) + if(!ret) TOS.u=-1; // TRUE else TOS.u=0; // FALSE diff --git a/qemu-0.15.x/roms/SLOF/lib/libnvram/nvram.c b/qemu-0.15.x/roms/SLOF/lib/libnvram/nvram.c index e9500ec..26a27d8 100644 --- a/qemu-0.15.x/roms/SLOF/lib/libnvram/nvram.c +++ b/qemu-0.15.x/roms/SLOF/lib/libnvram/nvram.c @@ -35,7 +35,7 @@ static volatile uint8_t nvram[NVRAM_LENGTH]; /* FAKE */ static volatile uint8_t *nvram = (volatile uint8_t *)SB_NVRAM_adr; #endif
-/* This is extremely ugly, but still better than implementing +/* This is extremely ugly, but still better than implementing * another sbrk() around it. */ static char nvram_buffer[NVRAM_LENGTH]; @@ -43,7 +43,7 @@ static uint8_t nvram_buffer_locked=0x00;
/** * producer for nvram access functions. Since these functions are - * basically all the same except for the used data types, produce + * basically all the same except for the used data types, produce * them via the following macro to keep the code from bloating. */
@@ -111,11 +111,11 @@ int nvramlog_printf(const char* fmt, ...) char buff[256]; int count, i; va_list ap; - + va_start(ap, fmt); count = vsprintf(buff, fmt, ap); va_end(ap); - + for (i=0; i<count; i++) asm_cout(buff[i], 0, 1);
@@ -153,7 +153,7 @@ static uint16_t get_partition_len(int offset) * @param offset start offset of the partition header * @return static char array containing the partition name * - * NOTE: If the partition name needs to be non-temporary, strdup + * NOTE: If the partition name needs to be non-temporary, strdup * and use the copy instead. */
@@ -189,7 +189,7 @@ static int calc_used_nvram_space(void) int walk, len;
for (walk=0; walk<NVRAM_LENGTH;) { - if(get_partition_header_checksum(walk) != + if(get_partition_header_checksum(walk) != calc_partition_header_checksum(walk)) { /* If there's no valid entry, bail out */ break; @@ -234,10 +234,10 @@ partition_t get_partition(unsigned int type, char *name) { partition_t ret={0,-1}; int walk, len; - + for (walk=0; walk<NVRAM_LENGTH;) { // DEBUG("get_partition: walk=%x\n", walk); - if(get_partition_header_checksum(walk) != + if(get_partition_header_checksum(walk) != calc_partition_header_checksum(walk)) { /* If there's no valid entry, bail out */ break; @@ -294,7 +294,7 @@ int wipe_partition(partition_t partition, int header_only) int pstart, len;
pstart=partition.addr-PARTITION_HEADER_SIZE; - + len=PARTITION_HEADER_SIZE;
if(!header_only) @@ -390,10 +390,10 @@ int delete_nvram_partition(partition_t partition) if(!partition.len || partition.len == -1) return 0;
- for (i=partition.addr+partition.len; i< NVRAM_LENGTH; i++) + for (i=partition.addr+partition.len; i< NVRAM_LENGTH; i++) nvram_write_byte(i - partition.len - PARTITION_HEADER_SIZE, nvram_read_byte(i));
- erase_nvram(NVRAM_LENGTH-partition.len-PARTITION_HEADER_SIZE, + erase_nvram(NVRAM_LENGTH-partition.len-PARTITION_HEADER_SIZE, partition.len-PARTITION_HEADER_SIZE);
free_part=get_partition(0x7f, NULL); @@ -435,7 +435,7 @@ int increase_nvram_partition_size(partition_t partition, int newsize) if (free_part.len == -1 || free_part.len < newsize - partition.len ) { return 0; } - + free_offset=free_part.addr - PARTITION_HEADER_SIZE; // first unused byte end_offset=partition.addr + partition.len; // last used byte of partition + 1
@@ -500,12 +500,12 @@ void reset_nvram(void) DEBUG("Creating CPU log partitions\n"); *(uint32_t *)(char *)&(header[0]) = be32_to_cpu(LLFW_LOG_BE0_NAME_PREFIX); *(uint64_t *)(char *)&(header[4]) = be64_to_cpu(LLFW_LOG_BE0_NAME); - cpulog0=create_nvram_partition(LLFW_LOG_BE0_SIGNATURE, header, + cpulog0=create_nvram_partition(LLFW_LOG_BE0_SIGNATURE, header, (LLFW_LOG_BE0_LENGTH*16)-PARTITION_HEADER_SIZE);
*(uint32_t *)(char *)&(header[0]) = be32_to_cpu(LLFW_LOG_BE1_NAME_PREFIX); *(uint64_t *)(char *)&(header[4]) = be64_to_cpu(LLFW_LOG_BE1_NAME); - cpulog1=create_nvram_partition(LLFW_LOG_BE1_SIGNATURE, header, + cpulog1=create_nvram_partition(LLFW_LOG_BE1_SIGNATURE, header, (LLFW_LOG_BE1_LENGTH*16)-PARTITION_HEADER_SIZE);
DEBUG("Initializing CPU log partitions\n"); diff --git a/qemu-0.15.x/roms/SLOF/llfw/boot_abort.S b/qemu-0.15.x/roms/SLOF/llfw/boot_abort.S index 996bdd7..f213d10 100644 --- a/qemu-0.15.x/roms/SLOF/llfw/boot_abort.S +++ b/qemu-0.15.x/roms/SLOF/llfw/boot_abort.S @@ -52,8 +52,8 @@ ASM_ENTRY(msg_e_ierror) * R4 - handling suggestion * R5 - error string reference * R6 - error number - * - * Return: + * + * Return: * if possible input to H8 and NVRAM log and console , then reboot/halt * * Input definitions: diff --git a/qemu-0.15.x/roms/SLOF/llfw/io_generic/Makefile.inc b/qemu-0.15.x/roms/SLOF/llfw/io_generic/Makefile.inc index b660725..478247a 100644 --- a/qemu-0.15.x/roms/SLOF/llfw/io_generic/Makefile.inc +++ b/qemu-0.15.x/roms/SLOF/llfw/io_generic/Makefile.inc @@ -13,7 +13,7 @@ IOGENERICDIR = $(LLFWCMNDIR)/io_generic
IO_GENERIC_SRC_ASM = io_generic.S -IO_GENERIC_SRC_C = +IO_GENERIC_SRC_C =
IO_GENERIC_SRCS = $(IO_GENERIC_SRC_ASM:%=$(IOGENERICDIR)/%) \ $(IO_GENERIC_SRC_C:%=$(IOGENERICDIR)/%) diff --git a/qemu-0.15.x/roms/SLOF/llfw/nvramlog.S b/qemu-0.15.x/roms/SLOF/llfw/nvramlog.S index be6bfd8..0de9649 100644 --- a/qemu-0.15.x/roms/SLOF/llfw/nvramlog.S +++ b/qemu-0.15.x/roms/SLOF/llfw/nvramlog.S @@ -47,7 +47,7 @@ * Retrun 0 if no manimulation was found 1 else * * input: - * r3 - NVRAM Base Address + * r3 - NVRAM Base Address * * output: * r3 - status: 0 = ok, 1 = corrupt @@ -73,7 +73,7 @@ ASM_ENTRY(checkLogHeaderData) LOAD64( r6, LLFW_LOG_BE0_NAME) subf r5, r6, r5 add r4, r4, r5 - + lhz r5, LLFW_LOG_POS_DATA_OFFSET(r3) //check data offset addi r5, r5, -LLFW_LOG_BE0_DATA_OFFSET add r4, r4, r5 @@ -97,12 +97,12 @@ ASM_ENTRY(checkLogHeaderData) * bit 1: if Partiton Header Checksum is corrupt * bit 2: if CRC is corrupt * bit 3: if Header entries are corrupt - * - * input: + * + * input: * r3 - NVRAM log address (BASE + NVRAM_LOG_OFFSET) * - * output: - * r3 - CRC status + * output: + * r3 - CRC status * r4 - NVRAM log address * * Modifies Register: R3, R4, R5, R6, R7, R8, R9 @@ -128,7 +128,7 @@ ASM_ENTRY(.checkLogPartition) ori r7, r7, 1 // 0 as checksum is invalid 0: mr r3, r4 - bl checkLogHeaderData + bl checkLogHeaderData cmpdi 7, r3, 0 beq+ 7, 0f ori r7, r7, 4 @@ -137,13 +137,13 @@ ASM_ENTRY(.checkLogPartition) mtlr r8 blr /***************************************************************************** - * checkinitLog: check the NVRAM Log Partition Header + * checkinitLog: check the NVRAM Log Partition Header * initialize the NVRAM if the Header was modified - * - * input: - * r3 - NVRAM BASE address * - * output: + * input: + * r3 - NVRAM BASE address + * + * output: * r3 - 0 = check ok, no new header written * r3 - 1 = check not ok, header and NVRAM initialized * r4 - NVRAM log address @@ -154,20 +154,20 @@ ASM_ENTRY(.checkLogPartition) ASM_ENTRY(.checkinitLog) ASM_ENTRY(checkinitLog) mflr r9 - bl .checkLogPartition //r3..r8, r4_out = r3_in + bl .checkLogPartition //r3..r8, r4_out = r3_in mtlr r9 - + cmpwi 7, r3, 0 mr r3, r4 // r3=NVRAM_LOG address bne- 7, .initLog // if header is not ok, init header li r3, 0 - blr // header OK, return 0 + blr // header OK, return 0
-/* this is basically just a copy of .initLog +/* this is basically just a copy of .initLog registers used: r3, r4, r5, r6, r7, r9*/ init_log_2nd_be: - mflr r9 + mflr r9 li r6, LLFW_LOG_BE0_LENGTH mulli r6, r6, 0x10 add r6, r7, r6 @@ -194,11 +194,11 @@ init_log_2nd_be: /***************************************************************************** * initLog: initialize the NVRAM with 0 * write a new NVRAM Log-Partition-Header - * - * input: - * r3 - NVRAM BASE address * - * output: + * input: + * r3 - NVRAM BASE address + * + * output: * r3 - 0 = check ok, no new header written * r3 - 1 = check not ok, header and NVRAM initialized * r4 - NVRAM log address @@ -237,10 +237,10 @@ ASM_ENTRY(.initLog) * clearNVRAM: set all not used NVRAM memory to zero * * - * input: + * input: * R3 - NVRAM BASE ADDRESS * - * output: + * output: * R3 - NVARM END ADDRESS * * Modifies Register: r4, r5 @@ -255,18 +255,18 @@ ASM_ENTRY(clearNVRAM) stdx r4, r3,r5 addi r5, r5, 8 bdnz+ 0b - blr + blr /***************************************************************************** * writeNVRAMbyte: write next log into NVRAM - * * - * input: + * + * input: * R3 - byte to be written * R4 - NVRAM Base Address * - * output: + * output: * R3 - byte that was written - * R4 - NVRAM Base Address + * R4 - NVRAM Base Address * * Modifies Register: R3, R4, R5, R6 ****************************************************************************/ @@ -277,22 +277,22 @@ ENTRY(writeLogByte) addi r5, r5, 1 // increment pointer stw r5, LLFW_LOG_POS_POINTER(r4) // store pointer addi r5, r5, -1 // restore old pointer - add r6, r4, r5 // byte address in data section + add r6, r4, r5 // byte address in data section
- stb r3, LLFW_LOG_BE0_DATA_OFFSET(r6) + stb r3, LLFW_LOG_BE0_DATA_OFFSET(r6) blr
/***************************************************************************** * writeNVRAMbyte: write next log into NVRAM - * * - * input: + * + * input: * R3 - byte to be written * R4 - NVRAM Base Address * - * output: + * output: * R3 - byte that was written - * R4 - NVRAM Base Address + * R4 - NVRAM Base Address * * Modifies Register: R3, R4, R5, R6 ****************************************************************************/ @@ -305,18 +305,18 @@ ENTRY(writeLogByteBE1) addi r5, r5, 1 // increment pointer stw r5, LLFW_LOG_POS_POINTER(r4) // store pointer addi r5, r5, -1 // restore old pointer - add r6, r4, r5 // byte address in data section + add r6, r4, r5 // byte address in data section
- stb r3, LLFW_LOG_BE1_DATA_OFFSET(r6) + stb r3, LLFW_LOG_BE1_DATA_OFFSET(r6) blr
/***************************************************************************** - * calPartitionHeaderChecksum: calculate the Checksum of the + * calPartitionHeaderChecksum: calculate the Checksum of the * Partition Header as described in .... * * input: r3 - NVRAM BASE adresse * - * output: R3 - the calculated checksum as 8 bit value + * output: R3 - the calculated checksum as 8 bit value * R4 - NVRAM log address * * Modifies Register: R3, R4, R5, R6 @@ -330,9 +330,9 @@ ASM_ENTRY(.calPartitionHeaderChecksum) addi r4, r4, 1 // r4++ (index) add r5, r5, r3 // r5 new sum =sum + nexed byte rldicl r5, r5, 0, 56 - cmpld 7, r5, r3 + cmpld 7, r5, r3 cmpldi 6, r4, LLFW_LOG_POS_DATA_OFFSET - bge+ 7,.L5 // if new sum > sum + bge+ 7,.L5 // if new sum > sum addi r5, r5, 1 // new sum ++ rldicl r5, r5, 0, 56 .L5: diff --git a/qemu-0.15.x/roms/SLOF/llfw/romfs.S b/qemu-0.15.x/roms/SLOF/llfw/romfs.S index 325f79e..921c28a 100644 --- a/qemu-0.15.x/roms/SLOF/llfw/romfs.S +++ b/qemu-0.15.x/roms/SLOF/llfw/romfs.S @@ -27,15 +27,15 @@ * Find File Procedure * - set filename and rombase, on return 0 file properties are stored * in romfs_t else struct not valid - * + * * Listing procedure * - clear romfs_t (important!) - * - set filename = NULL and rombase and call returns first file + * - set filename = NULL and rombase and call returns first file * with properties in romfs_t including next-file pointer * - if nextpointer is non-zero then just the next file is returned * * Returns: - * <Success>: + * <Success>: * R3 = 0 * romfs_t is updated * <FileNotFound>: @@ -44,7 +44,7 @@ * * Potentially modifies the following registers: * - + Example usage from C:
int list_bootrom() @@ -61,7 +61,7 @@ while (romfs_stat(NULL, &rfs) == 0) { i++; printf(" %02d: %08X %08X %7d %s\n", - i, rfs.fileaddr, rfs.datap, + i, rfs.fileaddr, rfs.datap, rfs.size, rfs.namep); } if (0 == i) { @@ -160,7 +160,7 @@ ENTRY(romfs_stat_file) blr
/******************************************************************* - * Copies the data of file referenced by name string to address + * Copies the data of file referenced by name string to address * requires root address of filesystem. * FIXME: ignores flags * @@ -172,16 +172,16 @@ ENTRY(romfs_stat_file) * Returns: * <Success>: R3 = 0, R6 = size, <FileNotFound>: R3 = 1 * R5 is kept - * + * * Potentially modifies the following registers: * ctr, r15, r16, r17, r18 - * + * * Uses the following calls with subsequent register modification: * - romfs_lookup *******************************************************************/ ASM_ENTRY(romfs_load) mflr r15 - + /* save R5 twice */ /* lookup file, input regs */ /* are already set */ @@ -218,14 +218,14 @@ ASM_ENTRY(romfs_load) blr
/******************************************************************* - * looks up a file based on filename + * looks up a file based on filename * * Input: * R3 = address of filename string * R4 = ROMBASE * * Returns: - * <Success>: + * <Success>: * R3 = 0 * R4 = address of file header * R5 = address of data (real address) @@ -236,18 +236,18 @@ ASM_ENTRY(romfs_load) * * Potentially modifies the following registers: * R3, R4, R5, R6, R7, R8, R9 - * + * * Uses the following calls with subsequent register modification: * - romfs_namematch *******************************************************************/ ASM_ENTRY(romfs_lookup) mflr r9 - + romfs_lookup_next: /* save current file base */ mr r8, r4 /* name to look for */ - mr r10, r3 + mr r10, r3 /* name of file */ mr r5, r4 addi r5, r5, (4 /* elems */ * 8 /* elem-size */) @@ -286,7 +286,7 @@ ASM_ENTRY(romfs_lookup) blr
/******************************************************************* - * compares two strings in memory, + * compares two strings in memory, * both must be null-terminated and 8-byte aligned * * Input: @@ -297,14 +297,14 @@ ASM_ENTRY(romfs_lookup) * <Match>: R12 = 0 <NoMatch>: R12 = 1 * * Potentially modifies the following registers: - * R10, R11, r12, r13, r14 + * R10, R11, r12, r13, r14 *******************************************************************/ romfs_namematch: subi r10, r10, 8 subi r11, r11, 8
- /* - * load chars as 8byte chunk from current pos, name is + /* + * load chars as 8byte chunk from current pos, name is * always 8 byte aligned :) */ romfs_cmp_loop: @@ -340,7 +340,7 @@ ENTRY(c_romfs_lookup) std r15,0x38(r1) # save r15 std r14,0x40(r1) # save r14 std r13,0x48(r1) # and r13 - + mr r15,r5 # save the pointer for the return value
bl romfs_lookup # do the thing diff --git a/qemu-0.15.x/roms/SLOF/other-licence/Makefile b/qemu-0.15.x/roms/SLOF/other-licence/Makefile index fb5397d..1ddb87c 100644 --- a/qemu-0.15.x/roms/SLOF/other-licence/Makefile +++ b/qemu-0.15.x/roms/SLOF/other-licence/Makefile @@ -20,12 +20,12 @@ SUBDIRS=common bcm ifeq ($(SNK_BIOSEMU_APPS), 1) SUBDIRS += x86emu endif -CLEANSUBDIRS = $(SUBDIRS) +CLEANSUBDIRS = $(SUBDIRS)
-all : +all : for subdir in $(SUBDIRS) ; do $(MAKE) -C $${subdir} || exit 1 ; done
# Common targets for all subdirectories: -clean distclean depend: +clean distclean depend: for subdir in $(CLEANSUBDIRS) ; do $(MAKE) -C $${subdir} $@ ; done diff --git a/qemu-0.15.x/roms/SLOF/other-licence/bcm/Makefile b/qemu-0.15.x/roms/SLOF/other-licence/bcm/Makefile index b7b386d..9909e0e 100644 --- a/qemu-0.15.x/roms/SLOF/other-licence/bcm/Makefile +++ b/qemu-0.15.x/roms/SLOF/other-licence/bcm/Makefile @@ -27,18 +27,18 @@ OBJS += $(COMMONOBJS) $(SRCS:.c=.o)
all: Makefile.dep net_bcm57xx.bin
-bcm57xx_net.o: $(OBJS) +bcm57xx_net.o: $(OBJS) $(LD) $(LDFLAGS) $^ -o $@ -T ../common/module.lds -N
net_bcm57xx.bin: bcm57xx_net.o - $(OBJCOPY) -O binary $^ $@ + $(OBJCOPY) -O binary $^ $@
# A rule for making the object files in the common directory: ../common/%.o: ../common/%.c $(MAKE) -C ../common all
-clean: +clean: $(RM) -f *.o *.a *.i *.bin
distclean : clean diff --git a/qemu-0.15.x/roms/SLOF/other-licence/bcm/bcm57xx.c b/qemu-0.15.x/roms/SLOF/other-licence/bcm/bcm57xx.c index 65b319b..34bbdc3 100644 --- a/qemu-0.15.x/roms/SLOF/other-licence/bcm/bcm57xx.c +++ b/qemu-0.15.x/roms/SLOF/other-licence/bcm/bcm57xx.c @@ -332,7 +332,7 @@ static char * memset_ci( char *dest, int c, size_t n ) { char *ret = dest; - + while( n-- ) { wr08( dest, c ); dest++; @@ -801,7 +801,7 @@ bcm_dump( void ) printk( "\n* Send Data Completion Control:\n" ); printk( "%04X: %08X ", 0x1000, bcm_read_reg32( 0x1000 ) ); printk( "%04X: %08X \n", 0x1008, bcm_read_reg32( 0x1008 ) ); - + printk( "\n* Send BD Ring Selector Control:\n" ); printk( "%04X: %08X ", 0x1400, bcm_read_reg32( 0x1400 ) ); printk( "%04X: %08X ", 0x1404, bcm_read_reg32( 0x1404 ) ); @@ -907,7 +907,7 @@ bcm_nvram_lock( void ) bcm_setb_reg32( SW_ARB_R, BIT32( 1 ) );
i = 2000; - while( ( --i ) && + while( ( --i ) && // ( bcm_read_reg32( SW_ARB_R ) & BIT32( 8 ) ) == 0 ) { ( bcm_read_reg32( SW_ARB_R ) & BIT32( 9 ) ) == 0 ) { ms_delay( 1 ); @@ -1123,13 +1123,13 @@ bcm_mii_phy_init( void ) ( ( v & BIT16( 2 ) ) == 0 ) );
if( i == 0 ) { -#ifdef BCM_DEBUG +#ifdef BCM_DEBUG printk( "bcm57xx: link is down\n" ); #endif return -1; }
-#ifdef BCM_DEBUG +#ifdef BCM_DEBUG printk( "bcm57xx: link is up\n" ); #endif if( !IS_COPPER_PHY ) { @@ -1148,7 +1148,7 @@ bcm_mii_phy_init( void ) bcm_mii_read16( AUX_STAT_R, &v );
if( ( v & GIGA_ETH ) == GIGA_ETH ) { -#ifdef BCM_DEBUG +#ifdef BCM_DEBUG printk( "bcm57xx: running PHY in GMII mode (1000BaseT)\n" ); #endif // GMII device @@ -1158,7 +1158,7 @@ bcm_mii_phy_init( void ) }
} else { -#ifdef BCM_DEBUG +#ifdef BCM_DEBUG printk( "bcm57xx: running PHY in MII mode (10/100BaseT)\n" ); #endif // MII device @@ -1170,7 +1170,7 @@ bcm_mii_phy_init( void ) }
if( IS_5704 && !IS_SERDES ) { -#ifdef BCM_DEBUG +#ifdef BCM_DEBUG printk( "bcm57xx: set the link ready signal for 5704C to negative polarity\n" ); #endif i |= NEG_POLARITY; // set the link ready signal for 5704C to negative polarity @@ -1230,11 +1230,11 @@ bcm_tbi_phy_init( void ) break; }
- us_delay( 20 ); + us_delay( 20 ); }
if( ( bcm_read_reg32( ETH_MAC_STAT_R ) & BIT32( 0 ) ) == 0) { -#ifdef BCM_DEBUG +#ifdef BCM_DEBUG printk( "bcm57xx: link is down\n" ); #endif return -1; @@ -1246,7 +1246,7 @@ bcm_tbi_phy_init( void ) bcm_write_reg32( ETH_MAC_STAT_R, (u32_t) ~0 ); #endif
-#ifdef BCM_DEBUG +#ifdef BCM_DEBUG printk( "bcm57xx: link is up\n" ); #endif return 0; @@ -1571,7 +1571,7 @@ bcm_mac_init( u08_t *f_mac_pu08 ) NVR_MAC_LO += 0x50; NVR_MAC_HI += 0x50; } - + l_err_i32 = bcm_nvram_read( NVR_MAC_LO, &l_mac_st.m_lo_u32, 1 ); l_err_i32 += bcm_nvram_read( NVR_MAC_HI, &l_mac_st.m_hi_u32, 1 );
@@ -1594,7 +1594,7 @@ bcm_mac_init( u08_t *f_mac_pu08 ) bcm_write_reg32( MAC_ADDR_OFFS_HI(i), 0 ); bcm_write_reg32( MAC_ADDR_OFFS_LO(i), 0 ); } - + /* * WY 26.01.07 * not needed anymore, s.a. @@ -1637,7 +1637,7 @@ bcm_mac_init( u08_t *f_mac_pu08 )
printk( "\n" ); } while( 0 ); -#endif +#endif
return 0; } @@ -1938,7 +1938,7 @@ bcm_handle_events( void ) { * interface ****************************************************************************** */ - + /* * bcm_receive */ @@ -1993,7 +1993,7 @@ bcm_receive( char *f_buffer_pc, int f_len_i ) printk( "bcm57xx: receive packet length error:\n" ); printk( " : incoming 0x%X bytes, available buffer 0x%X bytes\n", l_ret_i, f_len_i ); printk( " : frame discarded\n" ); -#endif +#endif l_ret_i = 0; }
@@ -2005,9 +2005,9 @@ bcm_receive( char *f_buffer_pc, int f_len_i ) if( l_ret_i != 0 ) { u64_t l_cpyaddr_u64;
- l_cpyaddr_u64 = + l_cpyaddr_u64 = ( (u64_t) bcm_rxret_ring[l_rxret_cons_u32].m_hostaddr_st.m_hi_u32 << 32 ); - l_cpyaddr_u64 += + l_cpyaddr_u64 += ( (u64_t) bcm_rxret_ring[l_rxret_cons_u32].m_hostaddr_st.m_lo_u32 );
// FIXME: @@ -2017,7 +2017,7 @@ bcm_receive( char *f_buffer_pc, int f_len_i ) #endif return 0; } -// +// memcpy( (void *) f_buffer_pc, (void *) l_cpyaddr_u64, (size_t) l_ret_i ); @@ -2029,7 +2029,7 @@ bcm_receive( char *f_buffer_pc, int f_len_i ) */ bcm_rxprod_ring[l_rxprod_prod_u32] = bcm_rxret_ring[l_rxret_cons_u32]; - bcm_rxprod_ring[l_rxprod_prod_u32].m_idxlen_u32 = + bcm_rxprod_ring[l_rxprod_prod_u32].m_idxlen_u32 = ( l_rxprod_prod_u32 << 16 ); bcm_rxprod_ring[l_rxprod_prod_u32].m_idxlen_u32 += (u32_t) BCM_BUF_SIZE; @@ -2369,7 +2369,7 @@ bcm_init( void ) bcm_pcicfg_devfn, PCI_BAR1_R ) );
- l_baseaddrH_u32 = + l_baseaddrH_u32 = (u32_t) snk_kernel_interface->pci_config_read( bcm_pcicfg_puid, 4, bcm_pcicfg_bus, @@ -2670,7 +2670,7 @@ bcm_init( void ) i = (u32_t) mac_addr[0] + (u32_t) mac_addr[1] + (u32_t) mac_addr[2] + (u32_t) mac_addr[3] + (u32_t) mac_addr[4] + (u32_t) mac_addr[5]; - i &= (u32_t) 0x03ff; + i &= (u32_t) 0x03ff; bcm_write_reg32( ETH_TX_RND_BO_R, i );
// step 53: configure message transfer unit MTU size @@ -3340,7 +3340,7 @@ bcm_ioctl( int request, void* data ) bcm_pcicfg_devfn, PCI_BAR1_R ) );
- l_baseaddrH_u32 = + l_baseaddrH_u32 = (u32_t) snk_kernel_interface->pci_config_read( bcm_pcicfg_puid, 4, bcm_pcicfg_bus, @@ -3420,9 +3420,8 @@ bcm_ioctl( int request, void* data ) ret_val = -1; break; } - + snk_module_interface.running = 1; bcm_term(); return ret_val; } - diff --git a/qemu-0.15.x/roms/SLOF/other-licence/common/module.lds b/qemu-0.15.x/roms/SLOF/other-licence/common/module.lds index c17a055..d1f0d28 100644 --- a/qemu-0.15.x/roms/SLOF/other-licence/common/module.lds +++ b/qemu-0.15.x/roms/SLOF/other-licence/common/module.lds @@ -17,23 +17,23 @@ ENTRY(module_init) SECTIONS { .code 0xF800000: { - ../common/module_entry.o(.opd) + ../common/module_entry.o(.opd) *(.text .stub .text.* .gnu.linkonce.t.*) *(.sfpr .glink) *(.rodata .rodata.* .gnu.linkonce.r.*) *(.data .data.* .gnu.linkonce.d.*) *(.opd) - } - .got : + } + .got : { _got = .; *(.got .toc) - } + } .bss : { __bss_start = .; *(*COM* .bss .gnu.linkonce.b.*) __bss_end = .; - } - __bss_size = (__bss_end - __bss_start); + } + __bss_size = (__bss_end - __bss_start); __end = .; } diff --git a/qemu-0.15.x/roms/SLOF/other-licence/common/module_entry.c b/qemu-0.15.x/roms/SLOF/other-licence/common/module_entry.c index 423d908..04de497 100644 --- a/qemu-0.15.x/roms/SLOF/other-licence/common/module_entry.c +++ b/qemu-0.15.x/roms/SLOF/other-licence/common/module_entry.c @@ -40,7 +40,7 @@ module_init(snk_kernel_t *snk_kernel_int, pci_config_t *pciconf) char *bss = &__bss_start; unsigned long long bss_size = (unsigned long long) &__bss_size;
- if (((unsigned long long) bss) + bss_size >= 0xFF00000 + if (((unsigned long long) bss) + bss_size >= 0xFF00000 || bss_size >= 0x2000000) { snk_kernel_int->print("BSS size (%llu bytes) is too big!\n", bss_size); return 0; diff --git a/qemu-0.15.x/roms/SLOF/other-licence/x86emu/Makefile b/qemu-0.15.x/roms/SLOF/other-licence/x86emu/Makefile index 5f1fac4..3e213fd 100644 --- a/qemu-0.15.x/roms/SLOF/other-licence/x86emu/Makefile +++ b/qemu-0.15.x/roms/SLOF/other-licence/x86emu/Makefile @@ -22,8 +22,8 @@ LDFLAGS = ASFLAGS = -I./include -Wa,-mregnames
#NOTE: -DDEBUG only needed for debugging/tracing... -#CFLAGS = -DDEBUG -I. -I./include -I./include/x86emu -I$(ROOTDIR)/include -I$(ROOTDIR)/lib/libc/include -g -O2 -msoft-float -Wall -save-temps -nostdinc -fno-builtin -ffreestanding -CFLAGS = -UDEBUG -m64 -I. -I./include -I./include/x86emu -I$(TOP)/clients/net-snk/include -I$(ROOTDIR)/include -I$(ROOTDIR)/lib/libc/include -O3 -Wall -nostdinc -fno-builtin -ffreestanding +#CFLAGS = -DDEBUG -I. -I./include -I./include/x86emu -I$(ROOTDIR)/include -I$(ROOTDIR)/lib/libc/include -g -O2 -msoft-float -Wall -save-temps -nostdinc -fno-builtin -ffreestanding +CFLAGS = -UDEBUG -m64 -I. -I./include -I./include/x86emu -I$(TOP)/clients/net-snk/include -I$(ROOTDIR)/include -I$(ROOTDIR)/lib/libc/include -O3 -Wall -nostdinc -fno-builtin -ffreestanding
X86EMU_OBJS = debug.o decode.o fpu.o ops2.o ops.o prim_ops.o sys.o
@@ -40,7 +40,7 @@ libx86emu.a: $(X86EMU_OBJS) $(RANLIB) $@
clean: - $(RM) *.o *.i *.s libx86emu.a + $(RM) *.o *.i *.s libx86emu.a
distclean: clean
diff --git a/qemu-0.15.x/roms/SLOF/romfs/tools/Makefile b/qemu-0.15.x/roms/SLOF/romfs/tools/Makefile index 8f399a8..13ebf29 100644 --- a/qemu-0.15.x/roms/SLOF/romfs/tools/Makefile +++ b/qemu-0.15.x/roms/SLOF/romfs/tools/Makefile @@ -37,7 +37,7 @@ testing: build_romfs $(HOSTCC) $(CPPFLAGS) $(HOSTCFLAGS) $(FLAG) -c $< -o $@
clean: - rm -f build_romfs *.o + rm -f build_romfs *.o
distclean: clean rm -f Makefile.dep diff --git a/qemu-0.15.x/roms/SLOF/romfs/tools/cfg_parse.c b/qemu-0.15.x/roms/SLOF/romfs/tools/cfg_parse.c index 5137fbe..4bfc9ce 100644 --- a/qemu-0.15.x/roms/SLOF/romfs/tools/cfg_parse.c +++ b/qemu-0.15.x/roms/SLOF/romfs/tools/cfg_parse.c @@ -138,7 +138,7 @@ find_next_entry(int file, struct ffs_chain_t *chain) /* start++; if (0 != find_entry_by_token(chain, hdr->imagefile+1, &hdr2)) { - printf("[%s]: link to [%s] not found\n", + printf("[%s]: link to [%s] not found\n", hdr->token, hdr->imagefile+1); dump_fs_contents(chain); return 2; diff --git a/qemu-0.15.x/roms/SLOF/rtas/reloc.S b/qemu-0.15.x/roms/SLOF/rtas/reloc.S index e24d293..b8f311b 100644 --- a/qemu-0.15.x/roms/SLOF/rtas/reloc.S +++ b/qemu-0.15.x/roms/SLOF/rtas/reloc.S @@ -10,18 +10,18 @@ * IBM Corporation - initial implementation *****************************************************************************/
-#include <rtas.h> - +#include <rtas.h> + /* -Function: +Function: Input: r3: Destination to copy rtas code to - r4: Configuration - Output: - r3: Entry point for rtas calls + r4: Configuration + Output: + r3: Entry point for rtas calls Decription: Called by OpenFirmware to instantiate rtas, needs to copy itself to destination, also do a relocations. - + */
.extern rtas_entry @@ -38,7 +38,7 @@ Decription: Called by OpenFirmware to instantiate rtas, needs to copy .globl _rtas_start _rtas_start: mflr r10 # save link register - bcl 20,31,.over # branch (always) to .over + bcl 20,31,.over # branch (always) to .over
.base: .align 3 @@ -63,23 +63,23 @@ _rtas_start: ._rtas_stack: .quad .stack-_rtas_start+RTAS_STACKSIZE-0x60 ._rtas_toc: .quad _got-_rtas_start+0x8000
-.over: +.over: mflr r8 # gpr 8 is the base addi r8,r8,_rtas_start-.base # points to _rtas_start - mr r11,r4 # Save config value - + mr r11,r4 # Save config value + # Copy rtas code - - ld r5,._rtas_size-_rtas_start(r8) + + ld r5,._rtas_size-_rtas_start(r8) mr r4,r8 # Start of rtas addi r6,r3,-8 # Destination addi r4,r4,-8 # Source srdi r5,r5,3 # Count in quads mtctr r5 -0: - ldu r0,8(r4) +0: + ldu r0,8(r4) stdu r0,8(r6) - bdnz 0b + bdnz 0b
# Clear bss
@@ -90,8 +90,8 @@ _rtas_start: addi r6,r6,-8 sub r5,r5,r4 # Calculate bss size srdi r5,r5,3 # Count in quads - mtctr r5 -0: + mtctr r5 +0: stdu r0,8(r6) bdnz 0b
@@ -105,27 +105,27 @@ _rtas_start:
add r4, r4, r3 # Calculate reloc table address addi r4, r4, -4 - srdi r5, r5, 2 # Count in words + srdi r5, r5, 2 # Count in words mtctr r5 -0: +0: lwzu r6, 4(r4) # Load offset out of reloc table - ldx r0, r6, r3 # Load value + ldx r0, r6, r3 # Load value add r0, r0, r3 # Add relocation offset = load address stdx r0, r6, r3 - bdnz 0b -1: + bdnz 0b +1:
# Save config data
ld r5,._rtas_config_offset-_rtas_start(r8) add r5,r5,r3 std r11,0(r5) - + # Flush to memory - + mr r4,r3 # Destination address - ld r5,._rtas_size-_rtas_start(r8) - + ld r5,._rtas_size-_rtas_start(r8) + add r5,r5,r4 addi r5,r5,127 rlwinm r4,r4,0,0,24 @@ -164,7 +164,7 @@ _rtas_start: bl .rtas_init bl restore_regs_r3_r12
- ld r11,72(r1) # restore msr value + ld r11,72(r1) # restore msr value ld r2,64(r1) # restore toc ld r1,0(r1) # get old stack
@@ -177,7 +177,4 @@ _rtas_start: ld r4,._rtas_entry_offset-_rtas_start(r8) add r3,r3,r4 mtlr r10 - blr - - - + blr diff --git a/qemu-0.15.x/roms/SLOF/rtas/rtas_call.c b/qemu-0.15.x/roms/SLOF/rtas/rtas_call.c index bf1cf89..0c3c0a1 100644 --- a/qemu-0.15.x/roms/SLOF/rtas/rtas_call.c +++ b/qemu-0.15.x/roms/SLOF/rtas/rtas_call.c @@ -28,12 +28,12 @@ int rtas_callcount[0x40] __attribute__((aligned (16))); long rtas_config;
-/* +/* Function: rtas_call Input: rtas_args: pointer to RTAS arguments structure Output: - + Decription: Handle RTAS call. This C function is called from the asm function rtas_entry. */ diff --git a/qemu-0.15.x/roms/SLOF/rtas/rtas_entry.S b/qemu-0.15.x/roms/SLOF/rtas/rtas_entry.S index 74693aa..ce476f2 100644 --- a/qemu-0.15.x/roms/SLOF/rtas/rtas_entry.S +++ b/qemu-0.15.x/roms/SLOF/rtas/rtas_entry.S @@ -10,22 +10,22 @@ * IBM Corporation - initial implementation *****************************************************************************/
-#include <rtas.h> +#include <rtas.h>
/* -Function: +Function: Input: - r3: rtas parm structure + r3: rtas parm structure r4: base address - Output: + Output:
Decription: Main entry point, called from OS. Second parameter is not - used. - + used. + */ .globl rtas_entry -rtas_entry: +rtas_entry: mfmsr r11 # Get MSR to enable 64-bit mode mr r7,r11 rotldi r11,r11,1 @@ -36,12 +36,12 @@ rtas_entry:
mr r9,r1 # save old stack pointer mflr r10 # save link register - bcl 20,31,.over # branch to over -.base: + bcl 20,31,.over # branch to over +.base: .align 3 ..got: .quad _got-.base+0x8000 ..stack: .quad .stack+RTAS_STACKSIZE-0x60-.base -.over: +.over: mflr r8 # gpr 8 is the base ld r1,..stack-.base(r8) # load new stack pointer add r1,r1,r8 # add base @@ -57,7 +57,7 @@ rtas_entry: bl restore_regs_r3_r12
rtas_return: - ld r11,72(r1) # restore msr value + ld r11,72(r1) # restore msr value ld r0,80(r1) # restore link register value ld r2,64(r1) # restore toc ld r1,0(r1) # get old stack diff --git a/qemu-0.15.x/roms/SLOF/slof/Makefile.inc b/qemu-0.15.x/roms/SLOF/slof/Makefile.inc index 8c77727..fca3730 100644 --- a/qemu-0.15.x/roms/SLOF/slof/Makefile.inc +++ b/qemu-0.15.x/roms/SLOF/slof/Makefile.inc @@ -32,7 +32,7 @@ CFLAGS = -DTARG=$(TARG) -static -Wall -W -std=gnu99 \ -fno-stack-protector ASFLAGS = -Wa,-mpower4 -Wa,-mregnames $(FLAG) $(CPUARCHDEF)
-LDFLAGS += -static -nostdlib +LDFLAGS += -static -nostdlib
ifneq ($(TARG),unix) CFLAGS += -nostdinc -fno-builtin @@ -72,7 +72,7 @@ OF.o: OF.fsi $(LD) -o $@ -r -bbinary $<
-dict.xt: $(DICT) $(SLOFCMNDIR)/ref.pl +dict.xt: $(DICT) $(SLOFCMNDIR)/ref.pl cat $(DICT) | perl $(SLOFCMNDIR)/ref.pl -s $(CELLSIZE) > dict.xt
ifdef BOARD_SLOF_CODE @@ -120,7 +120,7 @@ default-font.o: $(SLOFCMNDIR)/default-font.c $(CC) $(CPPFLAGS) $< -c -o default-font.o
$(SLOFBRDDIR)/default-font.bin: default-font.o - $(OBJCOPY) -Obinary default-font.o $@ + $(OBJCOPY) -Obinary default-font.o $@
.PHONY : create_OF.ffs clean_slof distclean_slof depend
diff --git a/qemu-0.15.x/roms/SLOF/slof/OF.lds b/qemu-0.15.x/roms/SLOF/slof/OF.lds index 5f8b2b1..b4bb612 100644 --- a/qemu-0.15.x/roms/SLOF/slof/OF.lds +++ b/qemu-0.15.x/roms/SLOF/slof/OF.lds @@ -28,8 +28,8 @@ SECTIONS _slof_text_size = (_slof_text_end - _slof_text);
. = ALIGN(0x100); - .opd : - { + .opd : + { _slof_data = .; *(.opd) } @@ -39,7 +39,7 @@ SECTIONS *(.got .toc) }
- .data : { + .data : { *(.rodata .rodata.*) *(.data .data.*) *(.note.gnu.build-id) diff --git a/qemu-0.15.x/roms/SLOF/slof/entry.S b/qemu-0.15.x/roms/SLOF/slof/entry.S index ce9dd83..c029b4e 100644 --- a/qemu-0.15.x/roms/SLOF/slof/entry.S +++ b/qemu-0.15.x/roms/SLOF/slof/entry.S @@ -57,16 +57,16 @@ handler: cmpwi r4, 0x900 # Decrementer interrupt bne 0f mfdec r5 # Save old value of decrementer as reason - lis r0,0x7fff # Set decrementer to highest value + lis r0,0x7fff # Set decrementer to highest value mtdec r0 0: mfcr 0 std 0,0x100(1) mfxer 0 std 0,0x108(1) - mfsprg 0,3 # save lr + mfsprg 0,3 # save lr std 0,0x110(1) - mfsprg 0,2 # save ctr + mfsprg 0,2 # save ctr std 0,0x118(1) mfsrr0 0 std 0,0x120(1) @@ -93,7 +93,7 @@ over: lis 2,engine@ha ld 0,engine@l(2) # set up entry mtsrr0 0 - + ld 2,8+engine@l(2) # set up TOC pointer
rfid @@ -159,7 +159,7 @@ client_entry_point: bl swap_ci_regs # swap regs mtlr 4 li 3, 0 # client call - blr + blr
# # Start the client. diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/claim.fs b/qemu-0.15.x/roms/SLOF/slof/fs/claim.fs index 5ed7686..0db119e 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/claim.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/claim.fs @@ -375,7 +375,7 @@ defer release cr ." release error: region " . ." , " . ." already released" cr ELSE ?dup 0= IF - swap + swap cr ." release error: Bad/conflicting region " . ." , " . ." or available list full " cr ELSE diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/client.fs b/qemu-0.15.x/roms/SLOF/slof/fs/client.fs index 642d04f..b675969 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/client.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/client.fs @@ -56,7 +56,7 @@ VARIABLE client-callback \ Address of client's callback function client-data l@ zcount \ XXX: Should only look in client-voc... ALSO client-voc $find PREVIOUS - dup 0= >r IF + dup 0= >r IF CATCH \ If a client interface word needs some special treatment, like exit and \ yield, then the implementation needs to use THROW to indicate its needs @@ -73,7 +73,7 @@ VARIABLE client-callback \ Address of client's callback function cr type ." NOT FOUND" THEN \ Return to the client - r> ciregs >r3 ! ciregs >r4 @ jump-client + r> ciregs >r3 ! ciregs >r4 @ jump-client UNTIL ;
: flip-stack ( a1 ... an n -- an ... a1 ) ?dup IF 1 ?DO i roll LOOP THEN ; @@ -103,8 +103,8 @@ ALSO client-voc DEFINITIONS
: test ( zstr -- missing? ) \ XXX: Should only look in client-voc... - zcount - ALSO client-voc $find PREVIOUS IF nip FALSE ELSE nip nip TRUE THEN + zcount + ALSO client-voc $find PREVIOUS IF nip FALSE ELSE nip nip TRUE THEN ;
: finddevice ( zstr -- phandle ) @@ -134,7 +134,7 @@ ALSO client-voc DEFINITIONS over >r move r> zcount nip ;
: nextprop ( phandle zstr buf -- flag ) \ -1 invalid, 0 end, 1 ok - >r zcount rot next-property IF r> zplace 1 ELSE r> drop 0 THEN ; + >r zcount rot next-property IF r> zplace 1 ELSE r> drop 0 THEN ;
: open ( zstr -- ihandle ) zcount open-dev ; : close ( ihandle -- ) close-dev ; @@ -172,7 +172,7 @@ ALSO client-voc DEFINITIONS nargs flip-stack zcount rot ['] $call-method CATCH nrets 0= IF drop ELSE \ if called with 0 return args do not return the catch result dup IF nrets 1 ?DO -444 LOOP THEN - nrets flip-stack + nrets flip-stack THEN ;
\ From the PAPR. @@ -182,9 +182,9 @@ ALSO client-voc DEFINITIONS : milliseconds milliseconds ;
: start-cpu ( phandle addr r3 -- ) - >r >r - s" reg" rot get-property 0= IF drop l@ - ELSE true ABORT" start-cpu called with invalid phandle" THEN + >r >r + s" reg" rot get-property 0= IF drop l@ + ELSE true ABORT" start-cpu called with invalid phandle" THEN r> r> of-start-cpu drop ;
diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/debug.fs b/qemu-0.15.x/roms/SLOF/slof/fs/debug.fs index bfdc9fc..359a974 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/debug.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/debug.fs @@ -158,7 +158,7 @@ VARIABLE see-my-type-column " : " (see-my-type) dup xt>name (see-my-type) rot drop 4 -rot (see-colon-body) ( indent limit xt ) rot drop 1 -rot (see-my-type-init) " ;" (see-my-type) - 3drop + 3drop ;
\ Create words are a bit tricky. We find out where their code points. @@ -252,7 +252,7 @@ true value trace>up?
: trace-print ( -- ) forth-ip cr u. ." : " - forth-ip @ + forth-ip @ dup ['] breakpoint = IF drop debug-last-xt-content THEN xt>name type ." " ." ( " .s ." ) | " diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/devices/pci-device_10de_0141.fs b/qemu-0.15.x/roms/SLOF/slof/fs/devices/pci-device_10de_0141.fs index 507c383..fb3a71f 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/devices/pci-device_10de_0141.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/devices/pci-device_10de_0141.fs @@ -30,7 +30,7 @@ enable-mem-access s" NONE" 0 char-cat ( path len propaddr proplen str strlen ) \ null-terminated NONE string str= 0= IF ( path len ) \ "display-type" property is not "NONE" so we can set "screen" alias - s" screen" 2swap set-alias + s" screen" 2swap set-alias true ( true ) \ return true ELSE 2drop false ( false ) \ return false @@ -43,7 +43,7 @@ get-node node>path s" /NVDA,DISPLAY-A" $cat check-display 0= IF \ no display found on DISPLAY-A ... check DISPLAY-B get-node node>path s" /NVDA,DISPLAY-B" $cat check-display - drop \ drop result + drop \ drop result THEN
s" name" get-my-property drop s" ( " type type s" ) " type cr diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/elf.fs b/qemu-0.15.x/roms/SLOF/slof/fs/elf.fs index 8f1c7b7..f9e43ba 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/elf.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/elf.fs @@ -53,7 +53,7 @@ END-STRUCT 0 value elf-segment-offset
: xlate-vaddr32 ( programm-header-addr -- addr ) - phdr>p_vaddr l@ elf-segment-offset + + phdr>p_vaddr l@ elf-segment-offset + ;
@@ -234,10 +234,10 @@ false value elf-claim? ( file-addr ) dup ehdr>e_machine w@ CASE - 14 OF ehdr>e_class c@ ENDOF \ PPC 32 bit executable - 15 OF ehdr>e_class c@ ENDOF \ PPC 64 bit executable + 14 OF ehdr>e_class c@ ENDOF \ PPC 32 bit executable + 15 OF ehdr>e_class c@ ENDOF \ PPC 64 bit executable 17 OF ehdr>e_class c@ 4 or ENDOF \ SPU 32 bit executable - dup OF drop ABORT" Not a PPC / SPU ELF executable" ENDOF + dup OF drop ABORT" Not a PPC / SPU ELF executable" ENDOF ENDCASE ;
@@ -285,7 +285,7 @@ false value elf-claim? ENDCASE ;
-\ Method to load SPU image +\ Method to load SPU image
: elf-spu-load ( ls-start-addr file-addr -- entry ) swap to elf-segment-offset diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/envvar.fs b/qemu-0.15.x/roms/SLOF/slof/fs/envvar.fs index cdf9226..4b40f80 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/envvar.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/envvar.fs @@ -405,7 +405,7 @@ get-nv cr " Usage: nvalias (""alias-name< >device-specifier<eol>"" -- )" type cr - THEN + THEN ;
: $nvunalias ( name-str name-len -- ) diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/fcode/1275.fs b/qemu-0.15.x/roms/SLOF/slof/fs/fcode/1275.fs index ace0933..51e9f97 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/fcode/1275.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/fcode/1275.fs @@ -51,7 +51,7 @@ defer function-type ' function-type @ constant <defer>
: dest-on-top 0 >r BEGIN dup @ 0= WHILE >r REPEAT - BEGIN r> dup WHILE swap REPEAT + BEGIN r> dup WHILE swap REPEAT drop ;
@@ -64,7 +64,7 @@ defer function-type ' function-type @ constant <defer> ;
: b?branch ( flag -- ) - ?compile-mode IF + ?compile-mode IF read-fcode-offset ?negative IF dest-on-top postpone until ELSE postpone if THEN @@ -77,13 +77,13 @@ defer function-type ' function-type @ constant <defer> ; immediate
: bbranch ( -- ) - ?compile-mode IF + ?compile-mode IF read-fcode-offset ?negative IF dest-on-top postpone again ELSE postpone else get-ip next-ip fcode@ B2 = IF drop ELSE set-ip THEN THEN - ELSE + ELSE read-fcode-offset ?jump-direction 2- jump-n-ip THEN ; immediate @@ -126,7 +126,7 @@ defer function-type ' function-type @ constant <defer>
: b1(;) ( -- ) ." b1(;)" cr - rpop set-ip + rpop set-ip ;
\ : b1(:) ( -- ) @@ -136,7 +136,7 @@ defer function-type ' function-type @ constant <defer> \ ; immediate
: b(;) ( -- ) - postpone exit reveal postpone [ + postpone exit reveal postpone [ ; immediate
: b(:) ( -- ) @@ -158,27 +158,27 @@ defer function-type ' function-type @ constant <defer>
: b(endof) postpone endof - read-fcode-offset drop + read-fcode-offset drop ; immediate
: b(do) postpone do - read-fcode-offset drop + read-fcode-offset drop ; immediate
: b(?do) postpone ?do - read-fcode-offset drop + read-fcode-offset drop ; immediate
: b(loop) postpone loop - read-fcode-offset drop + read-fcode-offset drop ; immediate
: b(+loop) postpone +loop - read-fcode-offset drop + read-fcode-offset drop ; immediate
: b(leave) @@ -189,7 +189,7 @@ defer function-type ' function-type @ constant <defer> align here next-ip read-fcode# 0 swap set-token ;
-: external-token ( -- ) \ named local fcode function +: external-token ( -- ) \ named local fcode function next-ip read-fcode-string header ( str len -- ) \ create a header in the current dictionary entry new-token @@ -226,7 +226,7 @@ defer function-type ' function-type @ constant <defer> ;
: undefined-defer - cr cr ." Unititialized defer word has been executed!" cr cr + cr cr ." Unititialized defer word has been executed!" cr cr true fcode-end ! ;
@@ -236,7 +236,7 @@ defer function-type ' function-type @ constant <defer> ;
: b(create) - <variable> , + <variable> , postpone noop reveal ;
@@ -269,13 +269,13 @@ defer function-type ' function-type @ constant <defer> offset16 read-header ; - + : start1 ( -- ) 1 to fcode-spread offset16 read-header ; - + : start2 ( -- ) 2 to fcode-spread offset16 @@ -288,12 +288,12 @@ defer function-type ' function-type @ constant <defer> read-header ;
-: end0 ( -- ) - true fcode-end ! +: end0 ( -- ) + true fcode-end ! ;
-: end1 ( -- ) - end0 +: end1 ( -- ) + end0 ;
: ferror ( -- ) @@ -309,7 +309,7 @@ defer function-type ' function-type @ constant <defer> ;
: byte-load ( addr xt -- ) - >r >r + >r >r save-evaluator-state r> r> reset-fcode-end @@ -319,19 +319,19 @@ defer function-type ' function-type @ constant <defer> reset-local-fcodes depth >r evaluate-fcode - r> depth 1- <> IF clear end0 + r> depth 1- <> IF clear end0 cr ." Ambiguous stack depth after byte-load!" cr ." FCode evaluation aborted." cr cr - ELSE restore-evaluator-state + ELSE restore-evaluator-state THEN - ['] c@ to fcode-rb@ + ['] c@ to fcode-rb@ ;
create byte-load-test-fcode f1 c, 08 c, 18 c, 69 c, 00 c, 00 c, 00 c, 68 c, -12 c, 16 c, 62 c, 79 c, 74 c, 65 c, 2d c, 6c c, -6f c, 61 c, 64 c, 2d c, 74 c, 65 c, 73 c, 74 c, -2d c, 66 c, 63 c, 6f c, 64 c, 65 c, 21 c, 21 c, +12 c, 16 c, 62 c, 79 c, 74 c, 65 c, 2d c, 6c c, +6f c, 61 c, 64 c, 2d c, 74 c, 65 c, 73 c, 74 c, +2d c, 66 c, 63 c, 6f c, 64 c, 65 c, 21 c, 21 c, 90 c, 92 c, ( a6 c, a7 c, 2e c, ) 00 c,
: byte-load-test @@ -347,7 +347,7 @@ f1 c, 08 c, 18 c, 69 c, 00 c, 00 c, 00 c, 68 c, drop true ELSE false - THEN + THEN ;
( ---------------------------------------------------- ) diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/fcode/core.fs b/qemu-0.15.x/roms/SLOF/slof/fs/fcode/core.fs index 79d47c3..54331ee 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/fcode/core.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/fcode/core.fs @@ -20,7 +20,7 @@
: ?bigendian ( -- true|false ) deadbeef fcode-num ! - fcode-num ?arch64 IF 4 + THEN + fcode-num ?arch64 IF 4 + THEN c@ de = ;
@@ -57,12 +57,12 @@ fcode-end @ eva-debug? IF ." saved fcode-end " dup . cr THEN fcode-offset eva-debug? IF ." saved fcode-offset " dup . cr THEN \ local fcodes are currently NOT saved! - fcode-spread eva-debug? IF ." saved fcode-spread " dup . cr THEN + fcode-spread eva-debug? IF ." saved fcode-spread " dup . cr THEN ['] fcode@ behavior eva-debug? IF ." saved fcode@ " dup . cr THEN ;
: restore-evaluator-state - eva-debug? IF ." restored fcode@ " dup . cr THEN to fcode@ + eva-debug? IF ." restored fcode@ " dup . cr THEN to fcode@ eva-debug? IF ." restored fcode-spread " dup . cr THEN to fcode-spread \ local fcodes are currently NOT restored! eva-debug? IF ." restored fcode-offset " dup . cr THEN to fcode-offset @@ -99,10 +99,10 @@ token-table-index @ split-immediate ;
--1 VALUE break-fcode-addr - +-1 VALUE break-fcode-addr + : exec ( FCode# -- ) - + eva-debug? IF dup get-ip 8 u.r ." : " @@ -111,12 +111,12 @@ get-ip break-fcode-addr = IF TRUE fcode-end ! drop EXIT THEN - + get-token 0= IF \ imm == 0 == false ?compile-mode IF compile, ELSE - eva-debug? IF dup xt>name type space THEN + eva-debug? IF dup xt>name type space THEN execute THEN ELSE \ immediate @@ -140,8 +140,8 @@
: read-header ( adr -- ) next-ip read-byte drop - next-ip read-fcode-num16 drop - next-ip read-fcode-num32 drop + next-ip read-fcode-num16 drop + next-ip read-fcode-num32 drop ;
: read-fcode-string ( -- str len ) @@ -160,10 +160,10 @@ ;
: step-fcode ( -- ) - break-fcode-addr >r -1 to break-fcode-addr + break-fcode-addr >r -1 to break-fcode-addr fcode@ exec next-ip - r> to break-fcode-addr -; - - + r> to break-fcode-addr +; + + ( ---------------------------------------------------- ) diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/fcode/evaluator.fs b/qemu-0.15.x/roms/SLOF/slof/fs/fcode/evaluator.fs index 1434098..28901f0 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/fcode/evaluator.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/fcode/evaluator.fs @@ -18,7 +18,7 @@ hex 0 constant false
variable ip -variable fcode-end +variable fcode-end variable fcode-num 1 value fcode-spread 16 value fcode-offset diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/fcode/tokens.fs b/qemu-0.15.x/roms/SLOF/slof/fs/fcode/tokens.fs index ad6c52b..3746151 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/fcode/tokens.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/fcode/tokens.fs @@ -55,42 +55,42 @@ reset-token-table ' - 0 1F set-token ' * 0 20 set-token ' / 0 21 set-token -' mod 0 22 set-token -' and 0 23 set-token -' or 0 24 set-token -' xor 0 25 set-token -' invert 0 26 set-token -' lshift 0 27 set-token -' rshift 0 28 set-token -' >>a 0 29 set-token -' /mod 0 2A set-token +' mod 0 22 set-token +' and 0 23 set-token +' or 0 24 set-token +' xor 0 25 set-token +' invert 0 26 set-token +' lshift 0 27 set-token +' rshift 0 28 set-token +' >>a 0 29 set-token +' /mod 0 2A set-token ' u/mod 0 2B set-token -' negate 0 2C set-token -' abs 0 2D set-token -' min 0 2E set-token -' max 0 2F set-token -' >r 0 30 set-token -' r> 0 31 set-token -' r@ 0 32 set-token -' exit 0 33 set-token -' 0= 0 34 set-token -' 0<> 0 35 set-token -' 0< 0 36 set-token -' 0<= 0 37 set-token -' 0> 0 38 set-token -' 0>= 0 39 set-token +' negate 0 2C set-token +' abs 0 2D set-token +' min 0 2E set-token +' max 0 2F set-token +' >r 0 30 set-token +' r> 0 31 set-token +' r@ 0 32 set-token +' exit 0 33 set-token +' 0= 0 34 set-token +' 0<> 0 35 set-token +' 0< 0 36 set-token +' 0<= 0 37 set-token +' 0> 0 38 set-token +' 0>= 0 39 set-token ' < 0 3A set-token ' > 0 3B set-token ' = 0 3C set-token ' <> 0 3D set-token ' u> 0 3E set-token -' u<= 0 3F set-token -' u< 0 40 set-token -' u>= 0 41 set-token -' >= 0 42 set-token -' <= 0 43 set-token -' between 0 44 set-token -' within 0 45 set-token +' u<= 0 3F set-token +' u< 0 40 set-token +' u>= 0 41 set-token +' >= 0 42 set-token +' <= 0 43 set-token +' between 0 44 set-token +' within 0 45 set-token ' DROP 0 46 set-token ' DUP 0 47 set-token ' OVER 0 48 set-token @@ -98,127 +98,127 @@ reset-token-table ' ROT 0 4A set-token ' -ROT 0 4B set-token ' TUCK 0 4C set-token -' nip 0 4D set-token -' pick 0 4E set-token -' roll 0 4F set-token -' ?dup 0 50 set-token -' depth 0 51 set-token -' 2drop 0 52 set-token -' 2dup 0 53 set-token -' 2over 0 54 set-token -' 2swap 0 55 set-token -' 2rot 0 56 set-token -' 2/ 0 57 set-token -' u2/ 0 58 set-token -' 2* 0 59 set-token +' nip 0 4D set-token +' pick 0 4E set-token +' roll 0 4F set-token +' ?dup 0 50 set-token +' depth 0 51 set-token +' 2drop 0 52 set-token +' 2dup 0 53 set-token +' 2over 0 54 set-token +' 2swap 0 55 set-token +' 2rot 0 56 set-token +' 2/ 0 57 set-token +' u2/ 0 58 set-token +' 2* 0 59 set-token ' /c 0 5A set-token -' /w 0 5B set-token -' /l 0 5C set-token -' /n 0 5D set-token -' ca+ 0 5E set-token -' wa+ 0 5F set-token -' la+ 0 60 set-token -' na+ 0 61 set-token -' char+ 0 62 set-token -' wa1+ 0 63 set-token -' la1+ 0 64 set-token -' cell+ 0 65 set-token -' chars 0 66 set-token -' /w* 0 67 set-token -' /l* 0 68 set-token -' cells 0 69 set-token -' on 0 6A set-token -' off 0 6B set-token -' +! 0 6C set-token -' @ 0 6D set-token -' l@ 0 6E set-token -' w@ 0 6F set-token -' <w@ 0 70 set-token -' c@ 0 71 set-token -' ! 0 72 set-token -' l! 0 73 set-token -' w! 0 74 set-token -' c! 0 75 set-token -' 2@ 0 76 set-token -' 2! 0 77 set-token -' move 0 78 set-token -' fill 0 79 set-token -' comp 0 7A set-token +' /w 0 5B set-token +' /l 0 5C set-token +' /n 0 5D set-token +' ca+ 0 5E set-token +' wa+ 0 5F set-token +' la+ 0 60 set-token +' na+ 0 61 set-token +' char+ 0 62 set-token +' wa1+ 0 63 set-token +' la1+ 0 64 set-token +' cell+ 0 65 set-token +' chars 0 66 set-token +' /w* 0 67 set-token +' /l* 0 68 set-token +' cells 0 69 set-token +' on 0 6A set-token +' off 0 6B set-token +' +! 0 6C set-token +' @ 0 6D set-token +' l@ 0 6E set-token +' w@ 0 6F set-token +' <w@ 0 70 set-token +' c@ 0 71 set-token +' ! 0 72 set-token +' l! 0 73 set-token +' w! 0 74 set-token +' c! 0 75 set-token +' 2@ 0 76 set-token +' 2! 0 77 set-token +' move 0 78 set-token +' fill 0 79 set-token +' comp 0 7A set-token ' noop 0 7B set-token -' lwsplit 0 7C set-token -' wljoin 0 7D set-token -' lbsplit 0 7E set-token -' bljoin 0 7F set-token -' wbflip 0 80 set-token -' upc 0 81 set-token -' lcc 0 82 set-token -' pack 0 83 set-token -' count 0 84 set-token -' body> 0 85 set-token -' >body 0 86 set-token -' fcode-revision 0 87 set-token -' span 0 88 set-token -' unloop 0 89 set-token -' expect 0 8A set-token -' alloc-mem 0 8B set-token \ alloc-mem -' free-mem 0 8C set-token \ free-mem -' key? 0 8D set-token -' key 0 8E set-token -' emit 0 8F set-token -' type 0 90 set-token +' lwsplit 0 7C set-token +' wljoin 0 7D set-token +' lbsplit 0 7E set-token +' bljoin 0 7F set-token +' wbflip 0 80 set-token +' upc 0 81 set-token +' lcc 0 82 set-token +' pack 0 83 set-token +' count 0 84 set-token +' body> 0 85 set-token +' >body 0 86 set-token +' fcode-revision 0 87 set-token +' span 0 88 set-token +' unloop 0 89 set-token +' expect 0 8A set-token +' alloc-mem 0 8B set-token \ alloc-mem +' free-mem 0 8C set-token \ free-mem +' key? 0 8D set-token +' key 0 8E set-token +' emit 0 8F set-token +' type 0 90 set-token ' cr 0 91 set-token \ should be (cr but terminal support is not \ available -' cr 0 92 set-token -\ ' #out 0 93 set-token -\ ' #line 0 94 set-token -' hold 0 95 set-token -' <# 0 96 set-token -' u#> 0 97 set-token -' sign 0 98 set-token -' u# 0 99 set-token -' u#s 0 9A set-token -' u. 0 9B set-token -' u.r 0 9C set-token -' . 0 9D set-token -' .r 0 9E set-token -' .s 0 9F set-token -' base 0 A0 set-token -\ ' convert 0 A1 set-token -' $number 0 A2 set-token -' digit 0 A3 set-token +' cr 0 92 set-token +\ ' #out 0 93 set-token +\ ' #line 0 94 set-token +' hold 0 95 set-token +' <# 0 96 set-token +' u#> 0 97 set-token +' sign 0 98 set-token +' u# 0 99 set-token +' u#s 0 9A set-token +' u. 0 9B set-token +' u.r 0 9C set-token +' . 0 9D set-token +' .r 0 9E set-token +' .s 0 9F set-token +' base 0 A0 set-token +\ ' convert 0 A1 set-token +' $number 0 A2 set-token +' digit 0 A3 set-token ' -1 0 A4 set-token ' 0 0 A5 set-token ' 1 0 A6 set-token ' 2 0 A7 set-token ' 3 0 A8 set-token ' bl 0 A9 set-token -' bs 0 AA set-token -' bell 0 AB set-token -' bounds 0 AC set-token -' here 0 AD set-token -' aligned 0 AE set-token -' wbsplit 0 AF set-token -' bwjoin 0 B0 set-token +' bs 0 AA set-token +' bell 0 AB set-token +' bounds 0 AC set-token +' here 0 AD set-token +' aligned 0 AE set-token +' wbsplit 0 AF set-token +' bwjoin 0 B0 set-token ' b(<mark) 1 B1 set-token ' b(>resolve) 1 B2 set-token -\ ' ferror 0 B3 set-token -\ ' ferror 0 B4 set-token -' new-token 0 B5 set-token +\ ' ferror 0 B3 set-token +\ ' ferror 0 B4 set-token +' new-token 0 B5 set-token ' named-token 0 B6 set-token \ fcode-debug? IF ' b(:) 1 B7 set-token \ ELSE \ ' b(:) 1 B7 set-token \ THEN -' b(value) 1 B8 set-token -' b(variable) 1 B9 set-token -' b(constant) 1 BA set-token -' b(create) 1 BB set-token -' b(defer) 1 BC set-token -' b(buffer:) 1 BD set-token -' b(field) 1 BE set-token -\ ' ferror 0 BF set-token -' INSTANCE 0 C0 set-token +' b(value) 1 B8 set-token +' b(variable) 1 B9 set-token +' b(constant) 1 BA set-token +' b(create) 1 BB set-token +' b(defer) 1 BC set-token +' b(buffer:) 1 BD set-token +' b(field) 1 BE set-token +\ ' ferror 0 BF set-token +' INSTANCE 0 C0 set-token \ ' noop 1 C0 set-token \ ' ferror 0 C1 set-token \ fcode-debug? IF @@ -226,16 +226,16 @@ reset-token-table \ ELSE \ ' b(;) 1 C2 set-token \ THEN -' b(to) 1 C3 set-token +' b(to) 1 C3 set-token ' b(case) 1 C4 set-token ' b(endcase) 1 C5 set-token ' b(endof) 1 C6 set-token ' # 0 C7 set-token ' #s 0 C8 set-token ' #> 0 C9 set-token -' external-token 0 CA set-token +' external-token 0 CA set-token ' $find 0 CB set-token -' offset16 0 CC set-token +' offset16 0 CC set-token ' evaluate 0 CD set-token \ 0 CE reserved \ 0 CF reserved @@ -249,11 +249,11 @@ reset-token-table \ 0 D7 reserved ' d+ 0 D8 set-token ' d- 0 D9 set-token -' get-token 0 DA set-token -' set-token 0 DB set-token +' get-token 0 DA set-token +' set-token 0 DB set-token ' state 0 DC set-token \ possibly broken ' compile, 0 DD set-token -' behavior 0 DE set-token +' behavior 0 DE set-token
' start0 0 F0 set-token ' start1 0 F1 set-token @@ -266,8 +266,8 @@ reset-token-table \ ' 4-byte-id 0 FE set-token \ Historical ' end1 0 FF set-token
-\ ' dma-alloc 0 101 set-token -' my-address 0 102 set-token +\ ' dma-alloc 0 101 set-token +' my-address 0 102 set-token ' my-space 0 103 set-token ' property 0 110 set-token ' encode-int 0 111 set-token @@ -276,7 +276,7 @@ reset-token-table ' encode-string 0 114 set-token ' encode-bytes 0 115 set-token ' reg 0 116 set-token -' model 0 119 set-token +' model 0 119 set-token ' device-type 0 11A set-token ' parse-2int 0 11B set-token ' is-install 0 11C set-token @@ -346,28 +346,28 @@ reset-token-table ' get-my-property 0 21A set-token ' decode-int 0 21B set-token ' decode-string 0 21C set-token -' get-inherited-property 0 21D set-token -' delete-property 0 21E set-token +' get-inherited-property 0 21D set-token +' delete-property 0 21E set-token ' get-package-property 0 21F set-token -' cpeek 0 220 set-token -' wpeek 0 221 set-token -' lpeek 0 222 set-token -' cpoke 0 223 set-token -' wpoke 0 224 set-token -' lpoke 0 225 set-token -' lwflip 0 226 set-token -' lbflip 0 227 set-token +' cpeek 0 220 set-token +' wpeek 0 221 set-token +' lpeek 0 222 set-token +' cpoke 0 223 set-token +' wpoke 0 224 set-token +' lpoke 0 225 set-token +' lwflip 0 226 set-token +' lbflip 0 227 set-token ' lbflips 0 228 set-token ' rx@ 0 22E set-token ' rx! 0 22F set-token ' rb@ 0 230 set-token ' rb! 0 231 set-token -' rw@ 0 232 set-token -' rw! 0 233 set-token -' rl@ 0 234 set-token -' rl! 0 235 set-token -' wbflips 0 236 set-token -' lwflips 0 237 set-token +' rw@ 0 232 set-token +' rw! 0 233 set-token +' rl@ 0 234 set-token +' rl! 0 235 set-token +' wbflips 0 236 set-token +' lwflips 0 237 set-token \ ' probe 0 238 set-token \ ' probe-virtual 0 239 set-token \ 0 23A reserved @@ -397,15 +397,15 @@ reset-token-table ' xwflip 0 252 set-token ' xwflips 0 253 set-token ' xwsplit 0 254 set-token -\ 0 254 RESERVED FCODES +\ 0 254 RESERVED FCODES \ ... -\ 0 5FF RESERVED FCODES +\ 0 5FF RESERVED FCODES
-\ 0 600 VENDOR FCODES +\ 0 600 VENDOR FCODES \ ... -\ 0 7FF VENDOR FCODES +\ 0 7FF VENDOR FCODES
-\ 0 800 LOCAL FCODES +\ 0 800 LOCAL FCODES \ ... -\ 0 FFF LOCAL FCODES +\ 0 FFF LOCAL FCODES
diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/generic-disk.fs b/qemu-0.15.x/roms/SLOF/slof/fs/generic-disk.fs index 0543c89..d4e960b 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/generic-disk.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/generic-disk.fs @@ -15,7 +15,7 @@
\ Input: \ name of device ( e.g. "disk", "cdrom", ... ) -\ dev# +\ dev#
\ Needs from parent in device tree: \ dev-read-blocks ( addr block# #blocks phys.lo ... phys.hi -- #read ) @@ -34,23 +34,23 @@
( str len phys.lo ... phys.hi -- ) new-device set-unit ( str len ) - 2dup device-name + 2dup device-name s" 0 pci-alias-" 2swap $cat evaluate - s" block" device-type + s" block" device-type
\ Requiered interface for deblocker
s" block-size" $call-parent CONSTANT block-size - s" max-transfer" $call-parent CONSTANT max-transfer + s" max-transfer" $call-parent CONSTANT max-transfer
: read-blocks ( addr block# #blocks -- #read ) my-unit s" dev-read-blocks" $call-parent -; +;
INSTANCE VARIABLE deblocker
: open ( -- okay? ) - 0 0 s" deblocker" $open-package dup deblocker ! dup IF + 0 0 s" deblocker" $open-package dup deblocker ! dup IF s" disk-label" find-package IF my-args rot interpose THEN diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/history.fs b/qemu-0.15.x/roms/SLOF/slof/fs/history.fs index 2c2c70f..643bb2f 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/history.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/history.fs @@ -93,7 +93,7 @@ history-init-nvram history-nvram-partition his-tail BEGIN dup WHILE dup his>buf over his>len @ ( position len link saddr slen ) - rot >r (history-store-one) r> + rot >r (history-store-one) r> swap IF his>prev @ ELSE drop 0 THEN REPEAT 2drop drop diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/ide.fs b/qemu-0.15.x/roms/SLOF/slof/fs/ide.fs index 93ca766..623f8a3 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/ide.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/ide.fs @@ -32,7 +32,7 @@ true VALUE no-timeout \ flag that no timeout occured \ ***************************** : ata-ctrl! 2 >ata1 + io-c! ; \ device control reg : ata-astat@ 2 >ata1 + io-c@ ; \ read alternate status - + : ata-data@ 0 >ata + io-w@ ; \ data reg : ata-data! 0 >ata + io-w! ; \ data reg : ata-err@ 1 >ata + io-c@ ; \ error reg @@ -115,7 +115,7 @@ scsi-open \ add scsi functions \ *************************************************** : status-check ( -- ) ata-stat@ - dup + dup 01 and \ is 'check' flag set ? IF cr @@ -135,8 +135,8 @@ scsi-open \ add scsi functions THEN cr ELSE - drop \ remove unused status - THEN + drop \ remove unused status + THEN ;
\ ************************************* @@ -172,25 +172,25 @@ scsi-open \ add scsi functions 2dup \ val mask ata-stat@ and <> \ expected status ? no-timeout and \ and no timeout ? - WHILE + WHILE get-msecs r@ - \ calculate timer difference FFFF AND \ mask-off overflow bits d# 5000 > \ 5 seconds exceeded ? IF false to no-timeout \ set global flag - THEN - REPEAT + THEN + REPEAT r> \ clean return stack 3drop ;
-\ ********************************* +\ ********************************* \ remove extra spaces from string end -\ ********************************* +\ ********************************* : cut-string ( saddr nul -- ) swap over + - swap + swap 1 rshift \ bytecount -> wordcount 0 do /w - @@ -200,16 +200,16 @@ scsi-open \ add scsi functions 2020 = IF drop - 0 + 0 ELSE - LEAVE + LEAVE THEN - over + over w! LOOP drop drop -; +;
\ **************************************************** \ prints model-string received by identify device @@ -236,14 +236,14 @@ scsi-open \ add scsi functions dup d# 40 \ and is 40 chars long cut-string \ remove all trailing spaces - + BEGIN dup w@ wbflip wbsplit dup 0<> \ first char - IF + IF emit dup 0<> \ second char IF @@ -253,7 +253,7 @@ scsi-open \ add scsi functions ELSE \ second char = EndOfString drop true - THEN + THEN ELSE \ first char = EndOfString drop drop @@ -262,13 +262,13 @@ scsi-open \ add scsi functions UNTIL \ end of string detected drop 22 emit \ end string display - + sector c@ \ get lower byte of first doublet 80 AND \ check bit 7 IF ." (removable media)" THEN - + sector 1 + c@ 80 AND 0= IF \ is this an ATA drive ? @@ -278,11 +278,11 @@ scsi-open \ add scsi functions swap .capacity-text ( block-size #blocks -- ) THEN - + sector d# 98 + \ goto word 49 w@ wbflip - 200 and 0= IF cr ." ** LBA is not supported " THEN + 200 and 0= IF cr ." ** LBA is not supported " THEN
sector c@ \ get lower byte of first doublet 03 AND 01 = \ we use 12-byte packet commands (=00b) @@ -300,11 +300,11 @@ scsi-open \ add scsi functions \ **************************** : pio-sector ( addr -- ) 100 0 DO ata-data@ over w! wa1+ LOOP drop ; -: pio-sector ( addr -- ) +: pio-sector ( addr -- ) wait-for-ready pio-sector ; : pio-sectors ( n addr -- ) swap 0 ?DO dup pio-sector 200 + LOOP drop ;
-: lba! lbsplit +: lba! lbsplit 0f and 40 or \ always set LBA-mode + LBA (27..24) ata-dev@ 10 and or \ add current device-bit (DEV) ata-dev! \ set LBA (27..24) @@ -313,11 +313,11 @@ scsi-open \ add scsi functions ata-lbal! \ set LBA (7..0) ;
-: read-sectors ( lba count addr -- ) +: read-sectors ( lba count addr -- )
r dup >r ata-cnt! lba! 20 ata-cmd! r> r> pio-sectors ;
: read-sectors ( lba count addr dev-nr -- ) - set-regs ( lba count addr ) \ Set ata regs + set-regs ( lba count addr ) \ Set ata regs BEGIN >r dup 100 > WHILE over 100 r@ read-sectors >r 100 + r> 100 - r> 20000 + REPEAT @@ -327,7 +327,7 @@ scsi-open \ add scsi functions : ata-read-blocks ( addr block# #blocks dev# -- #read ) swap dup >r swap >r rot r> ( addr block# #blocks dev # R: #blocks ) read-sectors r> ( R: #read ) -; +;
\ ******************************* \ ATAPI functions @@ -341,7 +341,7 @@ scsi-open \ add scsi functions ata-lbah! ata-lbam! ; - + \ ******************************************* \ gets byte-count and reads a block of words \ from data-register to a buffer @@ -389,7 +389,7 @@ scsi-open \ add scsi functions REPEAT r> \ original value drop \ return clean -; +;
: atapi-packet-io ( -- ) return-buffer atapi-size erase \ clear return buffer @@ -456,7 +456,7 @@ scsi-open \ add scsi functions get-msecs \ initial timer value (start) >r BEGIN - atapi-test \ unit ready? false if not + atapi-test \ unit ready? false if not not no-timeout and WHILE @@ -479,7 +479,7 @@ scsi-open \ add scsi functions d# 5000 > \ 5 seconds exceeded ? IF false to no-timeout \ set global flag - THEN + THEN REPEAT r> drop @@ -492,7 +492,7 @@ scsi-open \ add scsi functions \ for 2 devices each (master / slasve) \ ****************************************************** \ 2 channels (primary/secondary) per controller -2 CONSTANT #chan +2 CONSTANT #chan
\ 2 devices (master/slave) per channel 2 CONSTANT #dev @@ -501,7 +501,7 @@ scsi-open \ add scsi functions \ connected to a controller with \ two separate channels (4) : #totaldev #dev #chan * ; - + CREATE read-blocks-xt #totaldev cells allot read-blocks-xt #totaldev cells erase
\ Execute read-blocks of device @@ -536,21 +536,21 @@ CREATE read-blocks-xt #totaldev cells allot read-blocks-xt #totaldev cells erase ata-lbah@ EB = IF \ cylinder high = EB ? cmd#device-reset ata-cmd! wait-for-ready \ only supported by ATAPI cmd#identify-packet-device ata-cmd! wait-for-ready \ first try ata - ata-stat@ CF and 48 = IF + ata-stat@ CF and 48 = IF drop true \ replace flag THEN THEN THEN THEN dup IF - ata-stat@ 8 AND IF \ data requested (as expected) ? - sector read-pio-block - drop \ discard address end + ata-stat@ 8 AND IF \ data requested (as expected) ? + sector read-pio-block + drop \ discard address end ELSE drop false THEN THEN - + no-timeout not IF \ check without any timeout ? drop false \ no, detection discarded @@ -570,7 +570,7 @@ scsi-close \ remove scsi commands from word list \ 1 0 2 Slave of Channel 0 \ 1 1 3 Slave of Channel 1 \ ************************************************* -: find-disks ( -- ) +: find-disks ( -- ) #chan 0 DO \ check 2 channels (primary & secondary) #dev 0 DO \ check 2 devices per channel (master / slave) i 2 * j + @@ -593,7 +593,7 @@ scsi-close \ remove scsi commands from word list s" cdrom" strdup i 2 * j + s" generic-disk.fs" included ELSE ." -" \ show hint for not registered - THEN + THEN ELSE ata-size to block-size \ ATA: 512 bytes 80000 to max-transfer @@ -601,7 +601,7 @@ scsi-close \ remove scsi commands from word list s" disk" strdup i 2 * j + s" generic-disk.fs" included THEN cr - THEN + THEN THEN i 2 * j + 200 + cp LOOP diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/logging.fs b/qemu-0.15.x/roms/SLOF/slof/fs/logging.fs index 4a31b50..81cc288 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/logging.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/logging.fs @@ -26,14 +26,14 @@ defer nvramlog-write-byte
: nvramlog-write-string ( str len -- ) dup 0> IF - 0 DO dup c@ + 0 DO dup c@ nvramlog-write-byte char+ LOOP ELSE drop THEN drop ;
: nvramlog-write-number ( number format -- ) - 0 swap <# 0 ?DO # LOOP #> + 0 swap <# 0 ?DO # LOOP #> nvramlog-write-string ;
: nvramlog-write-string-cr ( str len -- ) diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/packages/fat-files.fs b/qemu-0.15.x/roms/SLOF/slof/fs/packages/fat-files.fs index 76d9f51..44d4086 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/packages/fat-files.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/packages/fat-files.fs @@ -53,7 +53,7 @@ CREATE fat-buf 8 allot fat-buf 8 read 8 <> ABORT" fat-files read-fat: read failed" fat-buf 8c@ bxjoin fat-type @ dup >r 2* #split drop r> #split rot IF swap THEN drop ; - + INSTANCE VARIABLE next-cluster
: read-cluster ( cluster# -- ) @@ -116,7 +116,7 @@ CREATE dos-name b allot r@ 0<> <> IF 2drop 2r> 2drop false ." no dir<->file match " EXIT THEN r@ 0<> IF drop 2r> ." more... " RECURSE EXIT THEN 2r> 2drop true ." got it " ; - + : do-super ( -- ) 0 200 read-data data @ 0b + 2c@ bwjoin bytes/sector ! diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/packages/obp-tftp.fs b/qemu-0.15.x/roms/SLOF/slof/fs/packages/obp-tftp.fs index 6bb43c9..c4174ce 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/packages/obp-tftp.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/packages/obp-tftp.fs @@ -14,14 +14,14 @@ s" obp-tftp" device-name
INSTANCE VARIABLE ciregs-buffer
-: open ( -- okay? ) - ciregs-size alloc-mem ciregs-buffer ! +: open ( -- okay? ) + ciregs-size alloc-mem ciregs-buffer ! true ;
: load ( addr -- size )
- \ Save old client interface register + \ Save old client interface register ciregs ciregs-buffer @ ciregs-size move
s" bootargs" get-chosen 0= IF 0 0 THEN >r >r @@ -46,7 +46,7 @@ INSTANCE VARIABLE ciregs-buffer \ Call SNK netboot loadr (client-exec) dup 0< IF drop 0 THEN
- \ Restore to old client interface register + \ Restore to old client interface register ciregs-buffer @ ciregs ciregs-size move
\ Recover buffer address of BOOTP-REPLY packet @@ -65,7 +65,7 @@ INSTANCE VARIABLE ciregs-buffer ;
: close ( -- ) - ciregs-buffer @ ciregs-size free-mem + ciregs-buffer @ ciregs-size free-mem ;
: ping ( -- ) diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/packages/rom-files.fs b/qemu-0.15.x/roms/SLOF/slof/fs/packages/rom-files.fs index 418cf4e..7056428 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/packages/rom-files.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/packages/rom-files.fs @@ -25,7 +25,7 @@ INSTANCE VARIABLE file INSTANCE VARIABLE file-size INSTANCE VARIABLE found
-: open true +: open true 100 dup buffer-size ! alloc-mem buffer ! false found ! ; : close buffer @ buffer-size @ free-mem ;
@@ -35,7 +35,7 @@ INSTANCE VARIABLE found
: .read-file-name ( offset -- str len ) \ move to the file name offset - 0 seek drop + 0 seek drop \ read <buffer-size> bytes from that address buffer @ buffer-size @ read drop \ write a 0 to make sure it is a 0 terminated string @@ -53,7 +53,7 @@ INSTANCE VARIABLE found
: list .list-header - 0 0 BEGIN + dup + 0 0 BEGIN + dup .print-info dup 0 seek drop next-file 8 read drop next-file @ dup 0= UNTIL 2drop ; @@ -80,6 +80,6 @@ INSTANCE VARIABLE found over 18 + 0 seek drop here 8 read drop here @ ( dest-addr offset file-size data-offset ) rot + 0 seek drop ( dest-addr file-size ) - read + read THEN ; diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/pci-config-bridge.fs b/qemu-0.15.x/roms/SLOF/slof/fs/pci-config-bridge.fs index f813431..c505b8e 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/pci-config-bridge.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/pci-config-bridge.fs @@ -52,7 +52,7 @@
: map-out ( virt size -- ) \ ." map-out called: " .s cr - 2drop + 2drop ;
: dma-alloc ( ... size -- virt ) diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/pci-device.fs b/qemu-0.15.x/roms/SLOF/slof/fs/pci-device.fs index fbb4c61..473601b 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/pci-device.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/pci-device.fs @@ -44,7 +44,7 @@ s" my-puid" $call-parent CONSTANT my-puid \ this word should be overloaded by the device file (if present) \ the device file can call this file after its implementation \ of own close functionality -: close +: close puid >r \ save the old puid my-puid TO puid \ set up the puid pci-device-disable \ and disable the device diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/pci-properties.fs b/qemu-0.15.x/roms/SLOF/slof/fs/pci-properties.fs index 312f431..0b4669c 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/pci-properties.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/pci-properties.fs @@ -334,7 +334,7 @@ encode-start \ provide mem for property ( addr paddr plen ) 2 pick 30 + gen-rom-bar-prop \ assign the rom bar 28 10 DO \ we have 6 possible BARs - 2 pick i + \ calc BAR address ( addr paddr plen bar-addr ) + 2 pick i + \ calc BAR address ( addr paddr plen bar-addr ) pci-add-assigned-address \ and generate the props for the BAR +LOOP \ increase Index by returned len s" assigned-addresses" property drop \ and write it into the device tree diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/preprocessor.fs b/qemu-0.15.x/roms/SLOF/slof/fs/preprocessor.fs index a13fb30..3af2ee7 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/preprocessor.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/preprocessor.fs @@ -26,7 +26,7 @@ : [IF] ( flag -- ) IF exit THEN 1 BEGIN - ['] ([IF]) catch + ['] ([IF]) catch CASE 1 OF 1+ ENDOF 2 OF dup 1 = if 1- then ENDOF diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/root.fs b/qemu-0.15.x/roms/SLOF/slof/fs/root.fs index 429b77e..68ca849 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/root.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/root.fs @@ -47,7 +47,7 @@ new-device s" BootROM" device-type finish-device
- new-device + new-device #include <packages.fs> finish-device
diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/scsi-support.fs b/qemu-0.15.x/roms/SLOF/slof/fs/scsi-support.fs index 4c6e1d1..7488908 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/scsi-support.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/scsi-support.fs @@ -123,11 +123,11 @@ CONSTANT scsi-length-sense-data \ ---------------------------------------- \ Forth Word: scsi-get-sense-data ( addr -- ascq asc sense-key ) \ ---------------------------------------- -: scsi-get-sense-data ( addr -- ascq asc sense-key ) +: scsi-get-sense-data ( addr -- ascq asc sense-key ) >r ( R: -- addr ) r@ sense-data>response-code c@ 7f and 72 >= IF r@ 3 + c@ ( ascq ) - r@ 2 + c@ ( ascq asc ) + r@ 2 + c@ ( ascq asc ) r> 1 + c@ 0f and ( ascq asc sense-key ) ELSE r@ sense-data>ASCQ c@ ( ascq ) diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/term-io.fs b/qemu-0.15.x/roms/SLOF/slof/fs/term-io.fs index cdd754a..520838f 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/term-io.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/term-io.fs @@ -74,13 +74,13 @@ 2dup s" serial" str= IF 2drop serial-key? r> drop EXIT THEN \ call serial-key, cleanup return-stack, exit - 2dup s" keyboard" str= IF + 2dup s" keyboard" str= IF 2drop ( ) - \ keyboard found, check for key-available? method, execute it or return false - s" key-available?" r@ ihandle>phandle find-method IF - drop s" key-available?" r@ $call-method - ELSE - false + \ keyboard found, check for key-available? method, execute it or return false + s" key-available?" r@ ihandle>phandle find-method IF + drop s" key-available?" r@ $call-method + ELSE + false THEN r> drop EXIT \ cleanup return-stack, exit THEN diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/translate.fs b/qemu-0.15.x/roms/SLOF/slof/fs/translate.fs index e2633e5..a9d764c 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/translate.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/translate.fs @@ -32,7 +32,7 @@ \ we skip this entry... dup l@ FF AND 0<> ( prop_type address data cfgspace_offset? ) 3 pick 0= ( prop_type address data cfgspace_offset? reg_prop? ) - AND NOT IF + AND NOT IF 2dup 8 + ( prop_type address data address data' ) 2dup l@ 2 pick 8 + l@ + <= -rot l@ >= and IF l@ 03000000 and 18 rshift nip diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-enumerate.fs b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-enumerate.fs index 7118f17..ce072e5 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-enumerate.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-enumerate.fs @@ -14,13 +14,13 @@ \ create the device tree for hub
: (hub-create) ( -- ) - mps port-number new-device-address port-number + mps port-number new-device-address port-number ( mps port-number usb-address port-number ) new-device set-space ( mps port-number usb-address ) encode-int s" USB-ADDRESS" property ( mps port-number ) s" Address Set" usb-debug-print encode-int s" reg" property ( mps ) - s" Port Number Set" usb-debug-print + s" Port Number Set" usb-debug-print encode-int s" MPS-DCP" property s" MPS Set" usb-debug-print s" usb-hub.fs" INCLUDED @@ -40,7 +40,7 @@ cd-buffer @ 1d + w@-le ( Manuf Prod Serial-Num ep-mps ep-addr ep-mps ) cd-buffer @ 1b + c@ ( Manuf Prod Serial-Num ep-mps ep-addr ep-mps ep-addr ) mps port-number new-device-address port-number - ( Manuf Prod Serial-Num ep-mps ep-addr ep-mps ep-addr + ( Manuf Prod Serial-Num ep-mps ep-addr ep-mps ep-addr mps port-num usb-addr port-num ) new-device set-space ( Manuf Prod Serial-Num ep-mps ep-addr ep-mps ep-addr @@ -49,7 +49,7 @@ ( Manuf Prod Serial-Num ep-mps ep-addr ep-mps ep-addr mps port-num ) encode-int s" reg" property - ( Manuf Prod Serial-Num ep-mps ep-addr ep-mps ep-addr + ( Manuf Prod Serial-Num ep-mps ep-addr ep-mps ep-addr mps ) encode-int s" MPS-DCP" property ( Manuf Prod Serial-Num ep-mps ep-addr ep-mps ep-addr ) @@ -71,10 +71,10 @@
\ To classify device as hub/atapi/scsi/HID device
-: (device-classify) +: (device-classify) ( -- Interface-protocol Interface-subclass Interface-class TRUE|FALSE ) cd-buffer @ BULK-CONFIG-DESCRIPTOR-LEN erase - cd-buffer @ BULK-CONFIG-DESCRIPTOR-LEN mps new-device-address + cd-buffer @ BULK-CONFIG-DESCRIPTOR-LEN mps new-device-address ( buffer descp-len mps usb-address ) control-std-get-configuration-descriptor IF @@ -196,7 +196,7 @@
\ here is still the workaround to handle invalid MaxLUNs as '0' \ - ch-buffer c@ dup 0= swap f > or IF + ch-buffer c@ dup 0= swap f > or IF s" + LUN: " ch-buffer c@ usb-debug-print-val (atapi-scsi-property-set) s" usb-storage.fs" INCLUDED @@ -234,7 +234,7 @@
: (keyboard-create) ( -- ) cd-buffer @ 1f + c@ ( ep-mps ) - cd-buffer @ 1d + c@ ( ep-mps ep-addr ) + cd-buffer @ 1d + c@ ( ep-mps ep-addr ) mps port-number new-device-address port-number ( ep-mps ep-addr mps port-num usb-addr port-num ) new-device set-space ( ep-mps ep-addr mps port-num usb-addr ) diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-hub.fs b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-hub.fs index 106b680..327432c 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-hub.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-hub.fs @@ -13,8 +13,8 @@
\ ---------------------------------------------------------------------------- \ On detection of a hub after reading the device descriptor this package has to -\ be called so that the hub enumeration is done to idenitify the down stream -\ device +\ be called so that the hub enumeration is done to idenitify the down stream +\ device \ -------------------------------------------------------------------------- \ OF properties \ -------------------------------------------------------------------------- @@ -25,13 +25,13 @@ s" usb" device-type 1 encode-int s" #address-cells" property 0 encode-int s" #size-cells" property
-\ converts physical address to text unit string +\ converts physical address to text unit string
: encode-unit ( port-addr -- unit-str unit-len ) 1 hex-encode-unit ;
-\ Converts text unit string to phyical address +\ Converts text unit string to phyical address
: decode-unit ( addr len -- port-addr ) 1 hex-decode-unit ; @@ -54,10 +54,10 @@ s" usb" device-type s" notpossible" usb-debug-print ELSE decode-int nip nip to my-usb-address - THEN + THEN s" MPS-DCP" get-my-property ( TRUE | prop-addr prop-len FALSE ) - IF - s" MPS-DCP property not found Assuming 8 as MAX PACKET SIZE" ( str len ) + IF + s" MPS-DCP property not found Assuming 8 as MAX PACKET SIZE" ( str len ) usb-debug-print s" for the default control pipe" usb-debug-print 8 to MPS-DCP @@ -146,7 +146,7 @@ INSTANCE VARIABLE cd-buffer ;
-\ standard open firmware methods +\ standard open firmware methods
: open ( -- TRUE ) (allocate-mem) @@ -164,41 +164,41 @@ INSTANCE VARIABLE cd-buffer
: controlxfer ( dir addr dlen setup-packet MPS ep-fun -- TRUE|FALSE ) - s" controlxfer" $call-parent + s" controlxfer" $call-parent ;
: control-std-set-address ( speedbit -- usb-address TRUE|FALSE ) - s" control-std-set-address" $call-parent -; + s" control-std-set-address" $call-parent +;
-: control-std-get-device-descriptor +: control-std-get-device-descriptor ( data-buffer data-len MPS funcAddr -- TRUE|FALSE ) - s" control-std-get-device-descriptor" $call-parent + s" control-std-get-device-descriptor" $call-parent ;
-: control-std-get-configuration-descriptor +: control-std-get-configuration-descriptor ( data-buffer data-len MPS funcAddr -- TRUE|FALSE ) - s" control-std-get-configuration-descriptor" $call-parent + s" control-std-get-configuration-descriptor" $call-parent ;
: control-std-get-maxlun ( MPS fun-addr dir data-buff data-len -- TRUE|FALSE ) - s" control-std-get-maxlun" $call-parent + s" control-std-get-maxlun" $call-parent ;
-: control-std-set-configuration +: control-std-set-configuration ( configvalue FuncAddr -- TRUE|FALSE ) - s" control-std-set-configuration" $call-parent + s" control-std-set-configuration" $call-parent ;
: control-std-get-string-descriptor ( StringIndex data-buffer data-len MPS FuncAddr -- TRUE|FALSE ) - s" control-std-get-string-descriptor" $call-parent + s" control-std-get-string-descriptor" $call-parent ;
-: rw-endpoint +: rw-endpoint ( pt ed-type toggle buffer length mps address -- toggle TRUE|toggle FALSE ) - s" rw-endpoint" $call-parent + s" rw-endpoint" $call-parent ;
: debug-td ( -- ) @@ -238,7 +238,7 @@ INSTANCE VARIABLE cd-buffer
\ ------------------------------------------------------------------------- -\ To reset a valid port of a hub with a valid USB +\ To reset a valid port of a hub with a valid USB \ address \ --------------------------------------------------------------------------
@@ -263,7 +263,7 @@ INSTANCE VARIABLE cd-buffer
\ ------------------------------------------------------------------------- -\ To get the status of a valid port of a hub with +\ To get the status of a valid port of a hub with \ a valid USB address \ -------------------------------------------------------------------------
@@ -276,13 +276,13 @@ INSTANCE VARIABLE cd-buffer
\ -------------------------------------------------------------------------- -\ To get the hub descriptor to understand how many ports are vailable and the +\ To get the hub descriptor to understand how many ports are vailable and the \ specs of those ports \ ---------------------------------------------------------------------------
: control-get-hub-descriptor ( buffer buffer-length -- TRUE|FALSE ) - hubds-get setup-packet ! + hubds-get setup-packet ! dup setup-packet 6 + w!-le ( buffer buffer-length ) 0 -rot setup-packet MPS-DCP my-usb-address controlxfer ( TRUE|FALSE ) ; @@ -302,33 +302,33 @@ s" usb-enumerate.fs" INCLUDED
BEGIN ( port# ) status-buffer 4 erase ( port# ) - status-buffer over control-hub-port-status-get drop ( port# ) + status-buffer over control-hub-port-status-get drop ( port# ) status-buffer w@-le 102 and 0= ( port# TRUE|FALSE ) WHILE ( port# ) REPEAT ( port# ) po2pg 3 * ms \ wait for bPwrOn2PwrGood*3 ms - + \ STEP 2: Reset the port. \ (this also enables the port) dup control-hub-port-reset-set drop ( port# ) BEGIN ( port# ) status-buffer 4 erase ( port# ) - status-buffer over control-hub-port-status-get drop ( port# ) - status-buffer w@-le 10 and ( port# TRUE|FALSE ) + status-buffer over control-hub-port-status-get drop ( port# ) + status-buffer w@-le 10 and ( port# TRUE|FALSE ) WHILE ( port# ) REPEAT ( port# )
\ STEP 3: Check if a device is connected to the port.
status-buffer 4 erase ( port# ) - status-buffer over control-hub-port-status-get drop ( port# ) - status-buffer w@-le 103 and 103 <> ( port# TRUE|FALSE ) + status-buffer over control-hub-port-status-get drop ( port# ) + status-buffer w@-le 103 and 103 <> ( port# TRUE|FALSE ) s" Port status bits: " status-buffer w@-le usb-debug-print-val - IF ( port# ) - drop + IF ( port# ) + drop s" Connect status: No device connected " usb-debug-print - EXIT - THEN + EXIT + THEN
\ STEP 4: Assign an address to this device. @@ -339,18 +339,18 @@ s" usb-enumerate.fs" INCLUDED control-std-set-address ( port# usb-addr TRUE|FALSE ) 50 ms ( port# usb-addr TRUE|FALSE ) debug-td ( port# usb-addr TRUE|FALSE ) - IF ( port# usb-addr ) + IF ( port# usb-addr ) device-speed or ( port# usb-addr+speedbit ) to new-device-address ( port# ) to port-number dd-buffer @ DEVICE-DESCRIPTOR-LEN erase dd-buffer @ DEFAULT-CONTROL-MPS DEFAULT-CONTROL-MPS new-device-address - ( buffer mps mps usb-addr ) + ( buffer mps mps usb-addr ) control-std-get-device-descriptor ( TRUE|FALSE ) IF dd-buffer @ DEVICE-DESCRIPTOR-TYPE-OFFSET + c@ ( descriptor-type ) DEVICE-DESCRIPTOR-TYPE <> ( TRUE|FALSE ) - IF + IF s" HUB: ERROR!! Invalid Device Descriptor for the new device" usb-debug-print ELSE @@ -369,13 +369,13 @@ s" usb-enumerate.fs" INCLUDED create-usb-device-tree THEN ELSE - s" ERROR!! Failed to get device descriptor" usb-debug-print + s" ERROR!! Failed to get device descriptor" usb-debug-print THEN ELSE ( port# ) s" USB Set Adddress failed!!" usb-debug-print ( port# ) s" Clearing Port Power..." usb-debug-print ( port# ) control-hub-port-power-clear ( TRUE|FALSE ) - IF + IF s" Port power down " usb-debug-print ELSE s" Unable to clear port power!!!" usb-debug-print @@ -389,7 +389,7 @@ s" usb-enumerate.fs" INCLUDED \ TODO: \ 1. Remove hardcoded constants. \ 2. Remove Endian Dependencies. -\ 3. Return values of controlxfer should be checked. +\ 3. Return values of controlxfer should be checked. \ ---------------------------------------------------------------------------
: hub-enumerate ( -- ) @@ -398,17 +398,17 @@ s" usb-enumerate.fs" INCLUDED \ Get HUB configuration and SET the configuration \ note: remove hard-coded constants.
- cd-buffer @ CONFIG-DESCRIPTOR-LEN MPS-DCP my-usb-address + cd-buffer @ CONFIG-DESCRIPTOR-LEN MPS-DCP my-usb-address ( buffer descp-len mps usb-address ) - control-std-get-configuration-descriptor drop + control-std-get-configuration-descriptor drop cd-buffer @ 1+ c@ 2 <> IF s" Unable to read configuration descriptor" usb-debug-print - EXIT - THEN + EXIT + THEN cd-buffer @ 4 + c@ 1 <> IF - s" Not a valid HUB config descriptor" usb-debug-print - EXIT - THEN + s" Not a valid HUB config descriptor" usb-debug-print + EXIT + THEN
\ TODO: Do further checkings on the returned Configuration descriptor \ before proceeding to accept it. @@ -440,15 +440,15 @@ s" usb-enumerate.fs" INCLUDED d# 200 ms \ some devices need a long time (10s)
\ now start detection and configuration for these ports - + temp2 1+ 1 DO s" hub-configure-port: " i usb-debug-print-val i hub-configure-port LOOP -; +;
-\ -------------------------------------------------------------------------- +\ -------------------------------------------------------------------------- \ To initialize hub \ --------------------------------------------------------------------------
@@ -456,4 +456,3 @@ s" usb-enumerate.fs" INCLUDED mps-property-set hub-enumerate (de-allocate-mem) - diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-kbd-device-support.fs b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-kbd-device-support.fs index 9fa4236..c69c277 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-kbd-device-support.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-kbd-device-support.fs @@ -34,26 +34,26 @@ to kbd-addr : control-cls-set-protocol ( reportvalue FuncAddr -- TRUE|FALSE ) to temp1 to temp2 - 210b000000000100 setup-packet ! + 210b000000000100 setup-packet ! temp2 kbd-data l!-le - 1 kbd-data 1 setup-packet DEFAULT-CONTROL-MPS temp1 controlxfer + 1 kbd-data 1 setup-packet DEFAULT-CONTROL-MPS temp1 controlxfer ;
: control-cls-set-idle ( reportvalue FuncAddr -- TRUE|FALSE ) to temp1 to temp2 - 210a000000000000 setup-packet ! + 210a000000000000 setup-packet ! temp2 kbd-data l!-le - 0 kbd-data 0 setup-packet DEFAULT-CONTROL-MPS temp1 controlxfer + 0 kbd-data 0 setup-packet DEFAULT-CONTROL-MPS temp1 controlxfer ;
: control-std-get-report-descriptor ( data-buffer data-len MPS FuncAddr -- TRUE|FALSE ) to temp1 to temp2 to temp3 - 8106002200000000 setup-packet ! + 8106002200000000 setup-packet ! temp3 setup-packet 6 + w!-le - 0 swap temp3 setup-packet temp2 temp1 controlxfer + 0 swap temp3 setup-packet temp2 temp1 controlxfer ;
: kbd-init @@ -79,17 +79,17 @@ to kbd-addr drop \ s" dev_desc=" type cfg-buffer 12 dump cr
- cfg-buffer 9 8 kbd-addr \ get config descriptor + cfg-buffer 9 8 kbd-addr \ get config descriptor control-std-get-configuration-descriptor drop \ s" cfg_desc=" type cfg-buffer 9 dump cr
- cfg-buffer 5 + c@ kbd-addr \ set configuration + cfg-buffer 5 + c@ kbd-addr \ set configuration control-std-set-configuration drop - s" KBDS: Set config returned" usb-debug-print + s" KBDS: Set config returned" usb-debug-print
- 0 kbd-addr control-cls-set-idle drop \ set idle + 0 kbd-addr control-cls-set-idle drop \ set idle s" KBDS: Set idle returned" usb-debug-print
cfg-buffer 40 8 kbd-addr \ get report descriptor @@ -97,6 +97,6 @@ to kbd-addr drop \ s" report_desc=" type cfg-buffer 40 dump cr
- s" Finished initializing keyboard" usb-debug-print + s" Finished initializing keyboard" usb-debug-print ;
diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-keyboard.fs b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-keyboard.fs index fd96e6e..d28e87c 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-keyboard.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-keyboard.fs @@ -47,50 +47,50 @@ to kbd-addr \ save speed bit 0 value int-in-ep 0 value int-in-toggle
-kbd-addr \ give speed bit to include file +kbd-addr \ give speed bit to include file s" usb-kbd-device-support.fs" included
: control-cls-set-report ( reportvalue FuncAddr -- TRUE|FALSE ) to temp1 to temp2 - 2109000200000100 setup-packet ! - temp2 kbd-data l!-le - 1 kbd-data 1 setup-packet DEFAULT-CONTROL-MPS temp1 controlxfer + 2109000200000100 setup-packet ! + temp2 kbd-data l!-le + 1 kbd-data 1 setup-packet DEFAULT-CONTROL-MPS temp1 controlxfer ;
: control-cls-get-report ( data-buffer data-len MPS FuncAddr -- TRUE|FALSE ) to temp1 to temp2 to temp3 - a101000100000000 setup-packet ! - temp3 setup-packet 6 + w!-le - 0 swap temp3 setup-packet temp2 temp1 controlxfer + a101000100000000 setup-packet ! + temp3 setup-packet 6 + w!-le + 0 swap temp3 setup-packet temp2 temp1 controlxfer ;
: int-get-report ( -- ) \ get report for interrupt transfer 0 2 int-in-toggle kbd-report 8 mps-int-in - kbd-addr int-in-ep 7 lshift or rw-endpoint \ get report + kbd-addr int-in-ep 7 lshift or rw-endpoint \ get report swap to int-in-toggle if kbd-report @ ff00000000000000 and 38 rshift to kbd-shift \ store shift status kbd-report @ 0000ffffffffffff and to kbd-scan \ store scan codes else - 0 to kbd-shift \ clear shift status + 0 to kbd-shift \ clear shift status 0 to kbd-scan \ clear scan code buffer then ;
-: ctl-get-report ( -- ) \ get report for control transfer - kbd-report 8 8 kbd-addr control-cls-get-report if \ get report +: ctl-get-report ( -- ) \ get report for control transfer + kbd-report 8 8 kbd-addr control-cls-get-report if \ get report kbd-report @ ff00000000000000 and 38 rshift to kbd-shift \ store shift status - kbd-report @ 0000ffffffffffff and to kbd-scan \ store scan codes + kbd-report @ 0000ffffffffffff and to kbd-scan \ store scan codes else - 0 to kbd-shift \ clear shift status + 0 to kbd-shift \ clear shift status 0 to kbd-scan \ clear scan code buffer then ;
-: set-led ( led -- ) - dup to led-state +: set-led ( led -- ) + dup to led-state kbd-addr control-cls-set-report drop ;
@@ -122,71 +122,71 @@ s" usb-kbd-device-support.fs" included is-ctrl if \ ctrl is pressed? is-alt if \ alt is pressed? 4c = if \ del is pressed? - s" reboot.... " usb-debug-print + s" reboot.... " usb-debug-print \ reset-all \ reboot drop false \ invalidate del key on top of stack then false \ dummy for last drop then then - drop \ clear stack + drop \ clear stack ;
: get-ukbd-char ( ScanCode -- char|false ) - dup ctrl_alt_del_key \ check ctrl+alt+del + dup ctrl_alt_del_key \ check ctrl+alt+del dup to scancode \ store scan code case \ translate scan code --> char - 04 of [char] a endof - 05 of [char] b endof - 06 of [char] c endof - 07 of [char] d endof - 08 of [char] e endof - 09 of [char] f endof - 0a of [char] g endof - 0b of [char] h endof - 0c of [char] i endof - 0d of [char] j endof - 0e of [char] k endof - 0f of [char] l endof - 10 of [char] m endof - 11 of [char] n endof - 12 of [char] o endof - 13 of [char] p endof - 14 of [char] q endof - 15 of [char] r endof - 16 of [char] s endof - 17 of [char] t endof - 18 of [char] u endof - 19 of [char] v endof - 1a of [char] w endof - 1b of [char] x endof - 1c of [char] y endof - 1d of [char] z endof - 1e of [char] 1 endof - 1f of [char] 2 endof - 20 of [char] 3 endof - 21 of [char] 4 endof - 22 of [char] 5 endof - 23 of [char] 6 endof - 24 of [char] 7 endof - 25 of [char] 8 endof - 26 of [char] 9 endof - 27 of [char] 0 endof + 04 of [char] a endof + 05 of [char] b endof + 06 of [char] c endof + 07 of [char] d endof + 08 of [char] e endof + 09 of [char] f endof + 0a of [char] g endof + 0b of [char] h endof + 0c of [char] i endof + 0d of [char] j endof + 0e of [char] k endof + 0f of [char] l endof + 10 of [char] m endof + 11 of [char] n endof + 12 of [char] o endof + 13 of [char] p endof + 14 of [char] q endof + 15 of [char] r endof + 16 of [char] s endof + 17 of [char] t endof + 18 of [char] u endof + 19 of [char] v endof + 1a of [char] w endof + 1b of [char] x endof + 1c of [char] y endof + 1d of [char] z endof + 1e of [char] 1 endof + 1f of [char] 2 endof + 20 of [char] 3 endof + 21 of [char] 4 endof + 22 of [char] 5 endof + 23 of [char] 6 endof + 24 of [char] 7 endof + 25 of [char] 8 endof + 26 of [char] 9 endof + 27 of [char] 0 endof 28 of 0d endof \ Enter - 29 of 1b endof \ ESC - 2a of 08 endof \ Backsace + 29 of 1b endof \ ESC + 2a of 08 endof \ Backsace 2b of 09 endof \ Tab - 2c of 20 endof \ Space - 2d of [char] - endof - 2e of [char] = endof - 2f of [char] [ endof - 30 of [char] ] endof - 31 of [char] \ endof - 33 of [char] ; endof - 34 of [char] ' endof - 35 of [char] ` endof - 36 of [char] , endof - 37 of [char] . endof + 2c of 20 endof \ Space + 2d of [char] - endof + 2e of [char] = endof + 2f of [char] [ endof + 30 of [char] ] endof + 31 of [char] \ endof + 33 of [char] ; endof + 34 of [char] ' endof + 35 of [char] ` endof + 36 of [char] , endof + 37 of [char] . endof 38 of [char] / endof 39 of led-state CapsLk xor set-led false endof \ CapsLk 3a of 1b 7e31315b to multi-key endof \ F1 @@ -213,7 +213,7 @@ s" usb-kbd-device-support.fs" included 51 of 1b 425b to multi-key endof \ D-arrow 52 of 1b 415b to multi-key endof \ U-arrow 53 of led-state NumLk xor set-led false endof \ NumLk - 54 of [char] / endof \ keypad / + 54 of [char] / endof \ keypad / 55 of [char] * endof \ keypad * 56 of [char] - endof \ keypad - 57 of [char] + endof \ keypad + @@ -259,12 +259,12 @@ s" usb-kbd-device-support.fs" included 38 of [char] ? endof dup of ret endof \ other keys are no change endcase - to ret \ overwrite new char + to ret \ overwrite new char then then then led-state NumLk and 0 <> if \ if NumLk is on - scancode + scancode case \ translate scan code --> char 59 of [char] 1 endof 5a of [char] 2 endof @@ -285,12 +285,12 @@ s" usb-kbd-device-support.fs" included ;
: key-available? ( -- true|false ) - multi-key 0 <> IF + multi-key 0 <> IF true \ multi scan code key was pressed... so key is available EXIT \ done THEN - kbd-scan 0 = IF \ if no kbd-scan code is currently available - int-get-report \ check for one using int-get-report + kbd-scan 0 = IF \ if no kbd-scan code is currently available + int-get-report \ check for one using int-get-report THEN kbd-scan 0 <> \ if a kbd-scan is available, report true, else false ; @@ -298,7 +298,7 @@ s" usb-kbd-device-support.fs" included : usb-kread ( -- char|false ) \ usb key read for control transfer multi-key 0 <> if \ if multi scan code key is pressed multi-key ff and \ read one byte from buffer - multi-key 8 rshift to multi-key \ move to next byte + multi-key 8 rshift to multi-key \ move to next byte else \ normal key check \ check for new scan code only, if kbd-scan is not set, e.g. \ by a previous call to key-available? @@ -309,28 +309,28 @@ s" usb-kbd-device-support.fs" included \ ctl-get-report \ read report (control transfer) \ end of interrupt/control switch THEN - kbd-scan 0 <> if \ scan code exist? + kbd-scan 0 <> if \ scan code exist? begin kbd-scan ff and dup 00 = while \ get a last scancode in report buffer kbd-scan 8 rshift to kbd-scan \ This algorithm is wrong --> must be fixed! drop \ KBD doesn't set scancode in pressed order!!! repeat dup key-old <> if \ if the scancode is new - dup to key-old \ save current scan code - get-ukbd-char \ translate scan code --> char - milliseconds fa + to expire-ms \ set typematic delay 250ms + dup to key-old \ save current scan code + get-ukbd-char \ translate scan code --> char + milliseconds fa + to expire-ms \ set typematic delay 250ms else \ scan code is not changed - milliseconds expire-ms > if \ if timer is expired ... should be considered timer carry over - get-ukbd-char \ translate scan code --> char - milliseconds 21 + to expire-ms \ set typematic rate 30cps - else \ timer is not expired - drop false \ do nothing - then + milliseconds expire-ms > if \ if timer is expired ... should be considered timer carry over + get-ukbd-char \ translate scan code --> char + milliseconds 21 + to expire-ms \ set typematic rate 30cps + else \ timer is not expired + drop false \ do nothing + then then kbd-scan 8 rshift to kbd-scan \ handled scan-code - else + else 0 to key-old \ clear privious key false \ no scan code --> return false - then + then then ;
diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-ohci.fs b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-ohci.fs index f4d9670..add1a6e 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-ohci.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-ohci.fs @@ -883,7 +883,7 @@ THEN \ Its OHCI controller (AM8111) behaves different to NEC's one 23f02edf hcintrval rl!-le \ frame-interval register hchcca hchccareg rl!-le \ HC communication area - + d# 50 ms
hcrhdescA rl@-le ff and ( total-rh-ports ) diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-static.fs b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-static.fs index 8732957..55920ef 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-static.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-static.fs @@ -253,7 +253,7 @@ FALSE VALUE ext-disk-alias \ first external disk: not yet assigned s" cdrom" 2swap ( alias-name len' dev-path len ) set-alias ( -- ) \ cdrom-alias-num 1 + TO cdrom-alias-num - ELSE + ELSE drop ( -- ) THEN uDOC-check \ check if uDOC-device is present and working (ELBA only) @@ -267,10 +267,10 @@ FALSE VALUE ext-disk-alias \ first external disk: not yet assigned cdrom-alias-num 0= IF ." Not found CDROM! " cr THEN - ." CDROM found " cdrom-alias-num . cr + ." CDROM found " cdrom-alias-num . cr ;
- + : usb-dev-test ( -- TRUE ) s" USB Device Test " usb-debug-print 1 usb-create-alias-name diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-storage.fs b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-storage.fs index f23c27a..ee5c2fd 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-storage.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-storage.fs @@ -87,7 +87,7 @@ s" usb-storage-support.fs" INCLUDED \ dump buffer in debug-mode usb-debug-flag IF - command-buffer 0E + c@ TO bulk-cmd-len + command-buffer 0E + c@ TO bulk-cmd-len s" cmd-length: " bulk-cmd-len usb-debug-print-val command-buffer bulk-cmd-len 0E + dump cr THEN @@ -225,9 +225,9 @@ usb-debug-flag to scsi-param-debug \ copy debug flag s" usb-storage: read-capacity" usb-debug-print command-buffer 1 8 80 lun scsi-length-read-cap-10 ( address tag transfer-len direction lun command-len ) - build-cbw + build-cbw \ command-buffer 30 dump cr \ dump the command buffer - command-buffer SCSI-COMMAND-OFFSET + ( address ) + command-buffer SCSI-COMMAND-OFFSET + ( address ) scsi-build-read-cap-10 lun 5 lshift command-buffer SCSI-COMMAND-OFFSET + ( address ) @@ -574,7 +574,7 @@ scsi-close \ no further scsi words required ELSE -1 to max-block-num \ indeterminate THEN - response-buffer 4 + + response-buffer 4 + l@ to block-size s" usb-storage: block-size=" block-size usb-debug-print-val ; @@ -631,7 +631,7 @@ scsi-close \ no further scsi words required set-drive-alias 200 to block-size \ Default block-size, will be overwritten in "open" 10000 to max-transfer - + ihandle-bulk (close-package) ;
diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-support.fs b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-support.fs index 08ff9bd..5fc4de3 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-support.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/usb/usb-support.fs @@ -113,11 +113,11 @@ VARIABLE controlxfer-cmd -rot ( dir ed-ptr addr dlen ) dup 0<> IF ( dir ed-ptr addr dlen ) >r >r >r TO temp1 r> r> r> temp1 ( ed-ptr addr dlen dir ) - 3 pick ( ed-ptr addr dlen dir ed-ptr ) + 3 pick ( ed-ptr addr dlen dir ed-ptr ) ed>tdqhp l@-le td>ntd l@-le ( ed-ptr addr dlen dir td-datahead ) - 4 pick ( ed-ptr addr dlen dir td-datahead ed-ptr ) + 4 pick ( ed-ptr addr dlen dir td-datahead ed-ptr ) td>tattr l@-le 10 rshift ( ed-ptr addr dlen dir td-head-data MPS ) - swap ( ed-ptr addr dlen dir MPS td-head-data ) + swap ( ed-ptr addr dlen dir MPS td-head-data ) >r >r >r >r >r 1 r> r> r> r> r> ( ed-ptr 1 addr dlen dir MPS td-head-data ) >r >r 0= IF ( ed-ptr 1 addr dlen dir ) @@ -199,7 +199,7 @@ VARIABLE controlxfer-cmd td-retire-count num-tds <> ( ed-ptr ) IF dup display-descriptors ( ed-ptr ) - s" maximum of retire " usb-debug-print + s" maximum of retire " usb-debug-print THEN free-ed td-retire-count num-tds <> @@ -283,7 +283,7 @@ VARIABLE controlxfer-cmd endpt-num setup-packet 4 + c! \ endpoint number 0 0 0 setup-packet DEFAULT-CONTROL-MPS usb-addr-contr-req controlxfer ( TRUE|FALSE ) -; +;
\ It resets the usb bulk-device 21FF000000000000 CONSTANT BULK-RESET @@ -298,20 +298,20 @@ VARIABLE controlxfer-cmd >r ( bulk-out-endp bulk-in-endp R: usb-addr ) \ perform a bulk reset r@ control-std-bulk-reset - IF s" bulk reset OK" - ELSE s" bulk reset failed" + IF s" bulk reset OK" + ELSE s" bulk reset failed" THEN usb-debug-print - + \ clear bulk-in endpoint ( bulk-out-endp bulk-in-endp R: usb-addr ) 80 or r@ control-std-clear-feature - IF s" control-std-clear IN endpoint OK" - ELSE s" control-std-clear-IN endpoint failed" + IF s" control-std-clear IN endpoint OK" + ELSE s" control-std-clear-IN endpoint failed" THEN usb-debug-print
\ clear bulk-out endpoint ( bulk-out-endp R: usb-addr ) r@ control-std-clear-feature - IF s" control-std-clear OUT endpoint OK" - ELSE s" control-std-clear-OUT endpoint failed" + IF s" control-std-clear OUT endpoint OK" + ELSE s" control-std-clear-OUT endpoint failed" THEN usb-debug-print r> drop ; @@ -477,7 +477,7 @@ VARIABLE controlxfer-cmd NEXT-TD 0<> \ clean the TD if we IF NEXT-TD (free-td-list) \ had a stalled - THEN + THEN THEN (free-td-list) ELSE @@ -500,11 +500,11 @@ VARIABLE controlxfer-cmd 1 OF disable-bulk-list-processing ENDOF 2 OF disable-interrupt-list-processing ENDOF ENDCASE - saved-rw-ed ed>tdqhp l@-le 2 and 0<> IF - 1 + saved-rw-ed ed>tdqhp l@-le 2 and 0<> IF + 1 s" retired 1" usb-debug-print ELSE - 0 + 0 s" retired 0" usb-debug-print THEN \ s" retired " usb-debug-print-val @@ -518,9 +518,9 @@ VARIABLE controlxfer-cmd
\ (DO-rw-endpoint): T1 12 80 0 0chis method is an privately visible function -\ to be used by the "rw-endpoint" the required -\ number OF times based on the actual length -\ to be transferred +\ to be used by the "rw-endpoint" the required +\ number OF times based on the actual length +\ to be transferred
\ Arguments: \ pt: Packet type diff --git a/qemu-0.15.x/roms/SLOF/slof/fs/vpd-bootlist.fs b/qemu-0.15.x/roms/SLOF/slof/fs/vpd-bootlist.fs index 5a08215..4f2f0e8 100644 --- a/qemu-0.15.x/roms/SLOF/slof/fs/vpd-bootlist.fs +++ b/qemu-0.15.x/roms/SLOF/slof/fs/vpd-bootlist.fs @@ -117,8 +117,8 @@ CREATE select/install-path 2 cells allot bootdevice 2@ nip IF 0 ELSE - \ Check for all no device -> use boot-device - vpd-bootlist l@ 07070707 = IF 0 ELSE -6b THEN + \ Check for all no device -> use boot-device + vpd-bootlist l@ 07070707 = IF 0 ELSE -6b THEN THEN ELSE -6a THEN boot-exception-handler diff --git a/qemu-0.15.x/roms/SLOF/slof/prim.code b/qemu-0.15.x/roms/SLOF/slof/prim.code index d1ac61f..177e1d3 100644 --- a/qemu-0.15.x/roms/SLOF/slof/prim.code +++ b/qemu-0.15.x/roms/SLOF/slof/prim.code @@ -451,7 +451,7 @@ code_EXECUTE: // don't need this as prim while (size > 0) { *--d1 = *--s1; size -= sizeof(t); } \ }
-#define _FWOVERLAP(s, d, size) ((d >= s) && ((type_u)d < ((type_u)s + size))) +#define _FWOVERLAP(s, d, size) ((d >= s) && ((type_u)d < ((type_u)s + size)))
#define _MOVE(s, d, size, t) if _FWOVERLAP(s, d, size) _BWMOVE(s, d, size, t) else _FWMOVE(s, d, size, t)
diff --git a/qemu-0.15.x/roms/SLOF/tools/gen_reloc_table.c b/qemu-0.15.x/roms/SLOF/tools/gen_reloc_table.c index b2e2176..a4f4060 100644 --- a/qemu-0.15.x/roms/SLOF/tools/gen_reloc_table.c +++ b/qemu-0.15.x/roms/SLOF/tools/gen_reloc_table.c @@ -53,7 +53,7 @@ main(int argc, char *argv[]) fprintf (stderr, "reloc_diff orig_file other_file output_file\n"); exit(-1); } - + orig = fopen(argv[1], "rb"); other = fopen(argv[2], "rb"); output_file = fopen(argv[3], "wb"); @@ -75,7 +75,7 @@ main(int argc, char *argv[])
if (cnt_a == 0) break; - + if (a == b) continue;
if (a + 0x40 == b) diff --git a/qemu-0.15.x/roms/ipxe/src/Makefile.housekeeping b/qemu-0.15.x/roms/ipxe/src/Makefile.housekeeping index ba01f16..5050068 100644 --- a/qemu-0.15.x/roms/ipxe/src/Makefile.housekeeping +++ b/qemu-0.15.x/roms/ipxe/src/Makefile.housekeeping @@ -655,7 +655,7 @@ CLEANUP += $(BIN)/NIC # Doesn't match the $(BIN)/*.* pattern
# Analyse a target name (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and # derive the variables: -# +# # TGT_ELEMENTS : the elements of the target (e.g. "dfe538 prism2_pci") # TGT_PREFIX : the prefix type (e.g. "zrom") # TGT_DRIVERS : the driver for each element (e.g. "rtl8139 prism2_pci") @@ -864,7 +864,7 @@ $(BIN)/%.zbin : $(BIN)/%.bin $(BIN)/%.zinfo $(ZBIN) # Rules for each media format. These are generated and placed in an # external Makefile fragment. We could do this via $(eval ...), but # that would require make >= 3.80. -# +# # Note that there's an alternative way to generate most .rom images: # they can be copied from their 'master' ROM image using cp and # reprocessed with makerom to add the PCI IDs and ident string. The @@ -873,10 +873,10 @@ $(BIN)/%.zbin : $(BIN)/%.bin $(BIN)/%.zinfo $(ZBIN) # $(BIN)/dfe538%rom : $(BIN)/rtl8139%rom # cat $< $@ # $(FINALISE_rom) -# +# # You can derive the ROM/driver relationships using the variables # DRIVER_<rom> and/or ROMS_<driver>. -# +# # We don't currently do this, because (a) it would require generating # yet more Makefile fragments (since you need a rule for each ROM in # ROMS), and (b) the linker is so fast that it probably wouldn't make diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/core/freebsd_loader.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/core/freebsd_loader.c index 464f6d9..805b5cd 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/core/freebsd_loader.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/core/freebsd_loader.c @@ -48,7 +48,7 @@ static unsigned int off; static void elf_freebsd_probe(void) { image_type = Elf; - if ( (estate.e.elf32.e_entry & 0xf0000000) && + if ( (estate.e.elf32.e_entry & 0xf0000000) && (estate.e.elf32.e_type == ET_EXEC)) { image_type = Elf_FreeBSD; @@ -58,11 +58,11 @@ static void elf_freebsd_probe(void) } /* Make sure we have a null to start with... */ shdr = 0; - + /* Clear the symbol index values... */ symtabindex = -1; symstrindex = -1; - + /* ...and the load addresses of the symbols */ symtab_load = 0; symstr_load = 0; @@ -84,8 +84,8 @@ static void elf_freebsd_find_segment_end(void) * Note that we need to count the actual size, * not just the end of the disk image size. */ - estate.curaddr += - (estate.p.phdr32[estate.segment].p_memsz - + estate.curaddr += + (estate.p.phdr32[estate.segment].p_memsz - estate.p.phdr32[estate.segment].p_filesz); }
@@ -130,7 +130,7 @@ static int elf_freebsd_debug_loader(unsigned int offset) /* Make sure that the next address is long aligned... */ /* Assumes size of long is a power of 2... */ estate.curaddr = (estate.curaddr + sizeof(long) - 1) & ~(sizeof(long) - 1); - + /* If we have not yet gotten the shdr loaded, try that */ if (shdr == 0) { @@ -139,13 +139,13 @@ static int elf_freebsd_debug_loader(unsigned int offset) if (estate.toread) { #if ELF_DEBUG - printf("shdr *, size %lX, curaddr %lX\n", + printf("shdr *, size %lX, curaddr %lX\n", estate.toread, estate.curaddr); #endif - + /* Start reading at the curaddr and make that the shdr */ shdr = (Elf32_Shdr *)phys_to_virt(estate.curaddr); - + /* Start to read... */ return 1; } @@ -160,7 +160,7 @@ static int elf_freebsd_debug_loader(unsigned int offset) /* Make sure that the address is page aligned... */ /* Symbols need to start in their own page(s)... */ estate.curaddr = (estate.curaddr + 4095) & ~4095; - + /* Need to make new indexes... */ for (i=0; i < estate.e.elf32.e_shnum; i++) { @@ -191,12 +191,12 @@ static int elf_freebsd_debug_loader(unsigned int offset) } } } - + /* Check if we have a symbol table index and have not loaded it */ if ((symtab_load == 0) && (symtabindex >= 0)) { /* No symbol table yet? Load it first... */ - + /* This happens to work out in a strange way. * If we are past the point in the file already, * we will skip a *large* number of bytes which @@ -205,22 +205,22 @@ static int elf_freebsd_debug_loader(unsigned int offset) * the state machine work in a cleaner way but this * is a nasty side-effect trick... */ estate.skip = shdr[symtabindex].sh_offset - (estate.loc + offset); - + /* And we need to read this many bytes... */ estate.toread = shdr[symtabindex].sh_size; - + if (estate.toread) { #if ELF_DEBUG - printf("db sym, size %lX, curaddr %lX\n", + printf("db sym, size %lX, curaddr %lX\n", estate.toread, estate.curaddr); #endif /* Save where we are loading this... */ symtab_load = estate.curaddr; - + *((long *)phys_to_virt(estate.curaddr)) = estate.toread; estate.curaddr += sizeof(long); - + /* Start to read... */ return 1; } @@ -229,26 +229,26 @@ static int elf_freebsd_debug_loader(unsigned int offset) { /* We have already loaded the symbol table, so * now on to the symbol strings... */ - - + + /* Same nasty trick as above... */ estate.skip = shdr[symstrindex].sh_offset - (estate.loc + offset); - + /* And we need to read this many bytes... */ estate.toread = shdr[symstrindex].sh_size; - + if (estate.toread) { #if ELF_DEBUG - printf("db str, size %lX, curaddr %lX\n", + printf("db str, size %lX, curaddr %lX\n", estate.toread, estate.curaddr); #endif /* Save where we are loading this... */ symstr_load = estate.curaddr; - + *((long *)phys_to_virt(estate.curaddr)) = estate.toread; estate.curaddr += sizeof(long); - + /* Start to read... */ return 1; } @@ -258,7 +258,7 @@ static int elf_freebsd_debug_loader(unsigned int offset) return 0; }
-static void elf_freebsd_boot(unsigned long entry) +static void elf_freebsd_boot(unsigned long entry) { if (image_type != Elf_FreeBSD) return; @@ -271,38 +271,38 @@ static void elf_freebsd_boot(unsigned long entry) bsdinfo.bi_kernelname = virt_to_phys(KERNEL_BUF); bsdinfo.bi_nfs_diskless = NULL; bsdinfo.bi_size = sizeof(bsdinfo); -#define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */ +#define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */ if(freebsd_kernel_env[0] != '\0'){ freebsd_howto |= RB_BOOTINFO; bsdinfo.bi_envp = (unsigned long)freebsd_kernel_env; } - + /* Check if we have symbols loaded, and if so, * made the meta_data needed to pass those to * the kernel. */ if ((symtab_load !=0) && (symstr_load != 0)) { unsigned long *t; - + bsdinfo.bi_symtab = symtab_load; - + /* End of symbols (long aligned...) */ /* Assumes size of long is a power of 2... */ bsdinfo.bi_esymtab = (symstr_load + sizeof(long) + *((long *)phys_to_virt(symstr_load)) + sizeof(long) - 1) & ~(sizeof(long) - 1); - + /* Where we will build the meta data... */ t = phys_to_virt(bsdinfo.bi_esymtab); - + #if ELF_DEBUG printf("Metadata at %lX\n",t); #endif - + /* Set up the pointer to the memory... */ bsdinfo.bi_modulep = virt_to_phys(t); - + /* The metadata structure is an array of 32-bit * words where we store some information about the * system. This is critical, as FreeBSD now looks @@ -311,33 +311,33 @@ static void elf_freebsd_boot(unsigned long entry) */ /* First, do the kernel name and the kernel type */ /* Note that this assumed x86 byte order... */ - + /* 'kernel\0\0' */ *t++=MODINFO_NAME; *t++= 7; *t++=0x6E72656B; *t++=0x00006C65; - + /* 'elf kernel\0\0' */ *t++=MODINFO_TYPE; *t++=11; *t++=0x20666C65; *t++=0x6E72656B; *t++ = 0x00006C65; - + /* Now the symbol start/end - note that they are * here in local/physical address - the Kernel * boot process will relocate the addresses. */ *t++=MODINFOMD_SSYM | MODINFO_METADATA; *t++=sizeof(*t); *t++=bsdinfo.bi_symtab; *t++=MODINFOMD_ESYM | MODINFO_METADATA; *t++=sizeof(*t); *t++=bsdinfo.bi_esymtab; - + *t++=MODINFO_END; *t++=0; /* end of metadata */ - + /* Since we have symbols we need to make * sure that the kernel knows its own end * of memory... It is not _end but after * the symbols and the metadata... */ bsdinfo.bi_kernend = virt_to_phys(t); - + /* Signal locore.s that we have a valid bootinfo * structure that was completely filled in. */ freebsd_howto |= 0x80000000; } - - xstart32(entry, freebsd_howto, NODEV, 0, 0, 0, + + xstart32(entry, freebsd_howto, NODEV, 0, 0, 0, virt_to_phys(&bsdinfo), 0, 0, 0); longjmp(restart_etherboot, -2); } @@ -369,7 +369,7 @@ static void aout_freebsd_boot(void) bsdinfo.bi_kernelname = virt_to_phys(KERNEL_BUF); bsdinfo.bi_nfs_diskless = NULL; bsdinfo.bi_size = sizeof(bsdinfo); - xstart32(astate.head.a_entry, freebsd_howto, NODEV, 0, 0, 0, + xstart32(astate.head.a_entry, freebsd_howto, NODEV, 0, 0, 0, virt_to_phys(&bsdinfo), 0, 0, 0); longjmp(restart_etherboot, -2); } diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/core/nulltrap.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/core/nulltrap.c index 3046fbe..0262577 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/core/nulltrap.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/core/nulltrap.c @@ -44,7 +44,7 @@ void null_function_trap ( void ) { __asm__ __volatile__ ( "nop ; nop ; nop ; nop" );
__asm__ __volatile__ ( "movl %%esp, %0" : "=r" ( stack ) ); - printf ( "NULL method called from %p (stack %p)\n", + printf ( "NULL method called from %p (stack %p)\n", __builtin_return_address ( 0 ), stack ); DBG_HD ( stack, 256 ); while ( 1 ) {} diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/core/relocate.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/core/relocate.c index 47450e7..00552f9 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/core/relocate.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/core/relocate.c @@ -4,7 +4,7 @@ /* * Originally by Eric Biederman * - * Heavily modified by Michael Brown + * Heavily modified by Michael Brown * */
@@ -22,7 +22,7 @@ extern char _max_align[]; extern char _textdata[]; extern char _etextdata[];
-/* within 1MB of 4GB is too close. +/* within 1MB of 4GB is too close. * MAX_ADDR is the maximum address we can easily do DMA to. * * Not sure where this constraint comes from, but kept it from Eric's diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/core/timer2.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/core/timer2.c index 0778665..750c6aa 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/core/timer2.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/core/timer2.c @@ -4,7 +4,7 @@ * Use the "System Timer 2" to implement the udelay callback in * the BIOS timer driver. Also used to calibrate the clock rate * in the RTDSC timer driver. - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2, or (at diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/core/wince_loader.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/core/wince_loader.c index f452b65..8b5e6c8 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/core/wince_loader.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/core/wince_loader.c @@ -12,25 +12,25 @@ typedef struct _BOOT_ARGS{ unsigned char ucComPort; unsigned char ucBaudDivisor; unsigned char ucPCIConfigType; - + unsigned long dwSig; #define BOOTARG_SIG 0x544F4F42 unsigned long dwLen; - + unsigned char ucLoaderFlags; unsigned char ucEshellFlags; unsigned char ucEdbgAdapterType; unsigned char ucEdbgIRQ; - + unsigned long dwEdbgBaseAddr; - unsigned long dwEdbgDebugZone; + unsigned long dwEdbgDebugZone; unsigned long dwDHCPLeaseTime; unsigned long dwEdbgFlags; - + unsigned long dwEBootFlag; unsigned long dwEBootAddr; unsigned long dwLaunchAddr; - + unsigned long pvFlatFrameBuffer; unsigned short vesaMode; unsigned short cxDisplayScreen; @@ -39,7 +39,7 @@ typedef struct _BOOT_ARGS{ unsigned short cyPhysicalScreen; unsigned short cbScanLineLength; unsigned short bppScreen; - + unsigned char RedMaskSize; unsigned char REdMaskPosition; unsigned char GreenMaskSize; @@ -83,7 +83,7 @@ static sector_t ce_loader(unsigned char *data, unsigned int len, int eof) static int firsttime = 1;
/* - * new packet in, we have to + * new packet in, we have to * [1] copy data to dbuffer, * * update... @@ -94,64 +94,64 @@ static sector_t ce_loader(unsigned char *data, unsigned int len, int eof) len = 0;
d_now = 0; - + #if 0 printf("dbuffer_available =%ld \n", dbuffer_available); -#endif - - if (firsttime) +#endif + + if (firsttime) { d_now = sizeof(ce_signature); - printf("String Physical Address = %lx \n", + printf("String Physical Address = %lx \n", *(unsigned long *)(dbuffer+d_now)); - + d_now += sizeof(unsigned long); - printf("Image Size = %ld [%lx]\n", - *(unsigned long *)(dbuffer+d_now), + printf("Image Size = %ld [%lx]\n", + *(unsigned long *)(dbuffer+d_now), *(unsigned long *)(dbuffer+d_now)); - + d_now += sizeof(unsigned long); - dbuffer_available -= d_now; - + dbuffer_available -= d_now; + d_now = (unsigned long)get_x_header(dbuffer, d_now); firsttime = 0; } - + if (not_loadin == 0) { d_now = get_x_header(dbuffer, d_now); } - + while ( not_loadin > 0 ) { /* dbuffer do not have enough data to loading, copy all */ #if LOAD_DEBUG - printf("[0] not_loadin = [%ld], dbuffer_available = [%ld] \n", + printf("[0] not_loadin = [%ld], dbuffer_available = [%ld] \n", not_loadin, dbuffer_available); printf("[0] d_now = [%ld] \n", d_now); #endif - + if( dbuffer_available <= not_loadin) { this_write = dbuffer_available ; memcpy(phys_to_virt(ce_curaddr), (dbuffer+d_now), this_write ); ce_curaddr += this_write; not_loadin -= this_write; - + /* reset index and available in the dbuffer */ dbuffer_available = 0; d_now = 0; #if LOAD_DEBUG - printf("[1] not_loadin = [%ld], dbuffer_available = [%ld] \n", + printf("[1] not_loadin = [%ld], dbuffer_available = [%ld] \n", not_loadin, dbuffer_available); - printf("[1] d_now = [%ld], this_write = [%d] \n", + printf("[1] d_now = [%ld], this_write = [%d] \n", d_now, this_write); #endif - + // get the next packet... return (0); } - + /* dbuffer have more data then loading ... , copy partital.... */ else { @@ -159,19 +159,19 @@ static sector_t ce_loader(unsigned char *data, unsigned int len, int eof) memcpy(phys_to_virt(ce_curaddr), (dbuffer+d_now), this_write); ce_curaddr += this_write; not_loadin = 0; - + /* reset index and available in the dbuffer */ dbuffer_available -= this_write; d_now += this_write; #if LOAD_DEBUG - printf("[2] not_loadin = [%ld], dbuffer_available = [%ld] \n", + printf("[2] not_loadin = [%ld], dbuffer_available = [%ld] \n", not_loadin, dbuffer_available); - printf("[2] d_now = [%ld], this_write = [%d] \n\n", + printf("[2] d_now = [%ld], this_write = [%d] \n\n", d_now, this_write); #endif - + /* dbuffer not empty, proceed processing... */ - + // don't have enough data to get_x_header.. if ( dbuffer_available < (sizeof(unsigned long) * 3) ) { @@ -181,11 +181,11 @@ static sector_t ce_loader(unsigned char *data, unsigned int len, int eof) } else { -#if LOAD_DEBUG +#if LOAD_DEBUG printf("with remaining data to call get_x \n"); - printf("dbuffer available = %ld , d_now = %ld\n", + printf("dbuffer available = %ld , d_now = %ld\n", dbuffer_available, d_now); -#endif +#endif d_now = get_x_header(dbuffer, d_now); } } @@ -204,7 +204,7 @@ static int get_x_header(unsigned char *dbuffer, unsigned long now) entry = X.size; done(1); printf("Entry Point Address = [%lx] \n", entry); - jump_2ep(); + jump_2ep(); }
if (!prep_segment(X.addr, X.addr + X.size, X.addr + X.size, 0, 0)) { @@ -219,7 +219,7 @@ static int get_x_header(unsigned char *dbuffer, unsigned long now)
/* reset index of this section */ not_loadin = X.size; - + #if 1 printf("\n"); printf("\t Section Address = [%lx] \n", X.addr); @@ -242,10 +242,10 @@ static void jump_2ep() BootArgs.ucComPort = 1; BootArgs.ucBaudDivisor = 1; BootArgs.ucPCIConfigType = 1; // do not fill with 0 - + BootArgs.dwSig = BOOTARG_SIG; BootArgs.dwLen = sizeof(BootArgs); - + if(BootArgs.ucVideoMode == 0) { BootArgs.cxDisplayScreen = 640; @@ -255,7 +255,7 @@ static void jump_2ep() BootArgs.bppScreen = 16; BootArgs.cbScanLineLength = 1024; BootArgs.pvFlatFrameBuffer = 0x800a0000; // ollie say 0x98000000 - } + } else if(BootArgs.ucVideoMode != 0xFF) { BootArgs.cxDisplayScreen = 0; @@ -264,7 +264,7 @@ static void jump_2ep() BootArgs.cyPhysicalScreen = 0; BootArgs.bppScreen = 0; BootArgs.cbScanLineLength = 0; - BootArgs.pvFlatFrameBuffer = 0; + BootArgs.pvFlatFrameBuffer = 0; }
ep = phys_to_virt(BOOT_ARG_PTR_LOCATION); diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/drivers/net/undinet.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/drivers/net/undinet.c index 56bd628..3e14d5f 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/drivers/net/undinet.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/drivers/net/undinet.c @@ -213,7 +213,7 @@ static int undinet_transmit ( struct net_device *netdev, return rc; }
-/** +/** * Poll for received packets * * @v netdev Network device diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/drivers/net/undirom.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/drivers/net/undirom.c index 2463d96..a547596 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/drivers/net/undirom.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/drivers/net/undirom.c @@ -178,7 +178,7 @@ static int undirom_probe ( unsigned int rom_segment ) { /** * Create UNDI ROMs for all possible expansion ROMs * - * @ret + * @ret */ static void undirom_probe_all_roms ( void ) { static int probed = 0; diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/image/com32.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/image/com32.c index d6e48eb..9569a16 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/image/com32.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/image/com32.c @@ -155,7 +155,7 @@ static int com32_exec_loop ( struct image *image ) {
/** * Check image name extension - * + * * @v image COM32 image * @ret rc Return status code */ @@ -163,7 +163,7 @@ static int com32_identify ( struct image *image ) { const char *ext; static const uint8_t magic[] = { 0xB8, 0xFF, 0x4C, 0xCD, 0x21 }; uint8_t buf[5]; - + if ( image->len >= 5 ) { /* Check for magic number * mov eax,21cd4cffh diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/image/comboot.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/image/comboot.c index 0b924cc..03d2027 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/image/comboot.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/image/comboot.c @@ -62,7 +62,7 @@ struct comboot_psp {
/** * Copy command line to PSP - * + * * @v image COMBOOT image */ static void comboot_copy_cmdline ( struct image * image, userptr_t seg_userptr ) { @@ -95,7 +95,7 @@ static void comboot_copy_cmdline ( struct image * image, userptr_t seg_userptr )
/** * Initialize PSP - * + * * @v image COMBOOT image * @v seg_userptr segment to initialize */ @@ -211,7 +211,7 @@ static int comboot_exec_loop ( struct image *image ) {
/** * Check image name extension - * + * * @v image COMBOOT image * @ret rc Return status code */ @@ -252,7 +252,7 @@ static int comboot_prepare_segment ( struct image *image ) seg_userptr = real_to_user ( COMBOOT_PSP_SEG, 0 );
/* Allow etra 0x100 bytes before image for PSP */ - filesz = image->len + 0x100; + filesz = image->len + 0x100;
/* Ensure the entire 64k segment is free */ memsz = 0xFFFF; diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/bits/byteswap.h b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/bits/byteswap.h index ddbd40e..1fe2a92 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/bits/byteswap.h +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/bits/byteswap.h @@ -28,7 +28,7 @@ __bswap_variable_64(uint64_t x) { union { uint64_t qword; - uint32_t dword[2]; + uint32_t dword[2]; } u;
u.qword = x; diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/comboot.h b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/comboot.h index b343413..373ffea 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/comboot.h +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/comboot.h @@ -73,7 +73,7 @@ struct ijb_entry { #define COMBOOT_FEATURE_LOCAL_BOOT (1 << 0) #define COMBOOT_FEATURE_IDLE_LOOP (1 << 1)
-/** Maximum number of shuffle descriptors for +/** Maximum number of shuffle descriptors for * shuffle and boot functions * (INT 22h AX=0012h, 001Ah, 001Bh) */ @@ -146,7 +146,7 @@ typedef struct { extern void hook_comboot_interrupts ( ); extern void unhook_comboot_interrupts ( );
-/* These are not the correct prototypes, but it doens't matter, +/* These are not the correct prototypes, but it doens't matter, * as we only ever get the address of these functions; * they are only called from COM32 code running in PHYS_CODE */ diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/int13.h b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/int13.h index a14ebb2..6be9816 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/int13.h +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/int13.h @@ -181,7 +181,7 @@ struct int13_disk_parameters { /** INT13 extensions version 3.0 (EDD-3.0) */ #define INT13_EXTENSION_VER_3_0 0x30
-/** @} */ +/** @} */
/** Maximum number of sectors for which CHS geometry is allowed to be valid * diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/pxe_api.h b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/pxe_api.h index 9b40187..ec110d1 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/pxe_api.h +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/pxe_api.h @@ -1395,7 +1395,7 @@ struct pci_nic_info { UINT16_t SubVendor_ID; /**< PCI subvendor ID */ UINT16_t SubDevice_ID; /**< PCI subdevice ID */ } __attribute__ (( packed )); - + /** Information for an ISAPnP or equivalent NIC */ struct pnp_nic_info { UINT32_t EISA_Dev_ID; /**< EISA device ID */ @@ -1427,7 +1427,7 @@ struct s_PXENV_UNDI_GET_NIC_TYPE {
typedef struct s_PXENV_UNDI_GET_NIC_TYPE PXENV_UNDI_GET_NIC_TYPE_t;
-extern PXENV_EXIT_t pxenv_undi_get_nic_type ( +extern PXENV_EXIT_t pxenv_undi_get_nic_type ( struct s_PXENV_UNDI_GET_NIC_TYPE *undi_get_nic_type );
/** @} */ /* pxenv_undi_get_nic_type */ diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/undi.h b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/undi.h index 325fcbb..9f484ff 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/undi.h +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/undi.h @@ -41,7 +41,7 @@ struct undi_device { * Filled in only for the preloaded UNDI device by pxeprefix.S */ UINT16_t pci_vendor; - /** PCI device ID + /** PCI device ID * * Filled in only for the preloaded UNDI device by pxeprefix.S */ diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/vga.h b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/vga.h index 01fc39d..e55ad6a 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/include/vga.h +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/include/vga.h @@ -9,7 +9,7 @@ * Based on VGA info at http://www.goodnet.com/~tinara/FreeVGA/home.htm * Based on VESA framebuffer (c) 1998 Gerd Knorr kraxel@goldbach.in-berlin.de * - */ + */
#ifndef VGA_H_INCL #define VGA_H_INCL 1 @@ -160,7 +160,7 @@ void vga_hardware_fixup(void);
/* * vga register parameters - * these are copied to the + * these are copied to the * registers. * */ @@ -183,8 +183,8 @@ struct vga_par { struct fb_bitfield { __u32 offset; /* beginning of bitfield */ __u32 length; /* length of bitfield */ - __u32 msb_right; /* != 0 : Most significant bit is */ - /* right */ + __u32 msb_right; /* != 0 : Most significant bit is */ + /* right */ };
struct screeninfo { @@ -201,7 +201,7 @@ struct screeninfo { struct fb_bitfield red; /* bitfield in fb mem if true color, */ struct fb_bitfield green; /* else only length is significant */ struct fb_bitfield blue; - struct fb_bitfield transp; /* transparency */ + struct fb_bitfield transp; /* transparency */
__u32 nonstd; /* != 0 Non standard pixel format */
diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pcbios/int13.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pcbios/int13.c index 392dbd5..e77bf8d 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pcbios/int13.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pcbios/int13.c @@ -48,7 +48,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); * INT 13 emulation * * This module provides a mechanism for exporting block devices via - * the BIOS INT 13 disk interrupt interface. + * the BIOS INT 13 disk interrupt interface. * */
@@ -541,7 +541,7 @@ static int int13_rw_sectors ( struct int13_drive *int13, int13->drive, int13->capacity.blksize ); return -INT13_STATUS_INVALID; } - + /* Calculate parameters */ cylinder = ( ( ( ix86->regs.cl & 0xc0 ) << 2 ) | ix86->regs.ch ); assert ( cylinder < int13->cylinders ); @@ -984,7 +984,7 @@ static __asmcall void int13 ( struct i386_all_regs *ix86 ) { } continue; } - + DBGC2 ( int13, "INT13,%02x (%02x): ", ix86->regs.ah, int13->drive );
@@ -1064,11 +1064,11 @@ static void int13_hook_vector ( void ) { TEXT16_CODE ( "\nint13_wrapper:\n\t" /* Preserve %ax and %dx for future reference */ "pushw %%bp\n\t" - "movw %%sp, %%bp\n\t" + "movw %%sp, %%bp\n\t" "pushw %%ax\n\t" "pushw %%dx\n\t" /* Clear OF, set CF, call int13() */ - "orb $0, %%al\n\t" + "orb $0, %%al\n\t" "stc\n\t" "pushl %0\n\t" "pushw %%cs\n\t" diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_entry.S b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_entry.S index 0d3a57c..00f8272 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_entry.S +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_entry.S @@ -87,7 +87,7 @@ pxenv: .word ppxe, 0 /* PXEPtr */ .equ pxenv_length, . - pxenv .size pxenv, . - pxenv - + /**************************************************************************** * pxenv_entry (16-bit far call) * diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_tftp.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_tftp.c index 7f0af7a..3a48e9e 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_tftp.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_tftp.c @@ -217,7 +217,7 @@ static int pxe_tftp_open ( uint32_t ipaddress, unsigned int port, * value before calling this function in protected mode. You cannot * call this function with a 32-bit stack segment. (See the relevant * @ref pxe_x86_pmode16 "implementation note" for more details.) - * + * * @note According to the PXE specification version 2.1, this call * "opens a file for reading/writing", though how writing is to be * achieved without the existence of an API call %pxenv_tftp_write() @@ -523,7 +523,7 @@ PXENV_EXIT_t pxenv_tftp_read_file ( struct s_PXENV_TFTP_READ_FILE * value before calling this function in protected mode. You cannot * call this function with a 32-bit stack segment. (See the relevant * @ref pxe_x86_pmode16 "implementation note" for more details.) - * + * * @note There is no way to specify the TFTP server port with this API * call. Though you can open a file using a non-standard TFTP server * port (via s_PXENV_TFTP_OPEN::TFTPPort or, potentially, diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_undi.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_undi.c index 3938207..610b6ec 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_undi.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/pxe/pxe_undi.c @@ -358,7 +358,7 @@ pxenv_undi_set_mcast_address ( struct s_PXENV_UNDI_SET_MCAST_ADDRESS * * Status: working */ -PXENV_EXIT_t +PXENV_EXIT_t pxenv_undi_set_station_address ( struct s_PXENV_UNDI_SET_STATION_ADDRESS *undi_set_station_address ) { struct ll_protocol *ll_protocol = pxe_netdev->ll_protocol; diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/syslinux/com32_call.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/syslinux/com32_call.c index 47df64c..dfadd18 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/syslinux/com32_call.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/syslinux/com32_call.c @@ -75,7 +75,7 @@ void __asmcall com32_intcall ( uint8_t interrupt, physaddr_t inregs_phys, physad /* patch INT instruction */ "pushw %%ax\n\t" "movb %%ss:(com32_int_vector), %%al\n\t" - "movb %%al, %%cs:(com32_intcall_instr + 1)\n\t" + "movb %%al, %%cs:(com32_intcall_instr + 1)\n\t" /* perform a jump to avoid problems with cache * consistency in self-modifying code on some CPUs (486) */ @@ -105,7 +105,7 @@ void __asmcall com32_intcall ( uint8_t interrupt, physaddr_t inregs_phys, physad
if ( outregs_phys ) { memcpy_user ( phys_to_user ( outregs_phys ), 0, - virt_to_user( &com32_regs ), 0, + virt_to_user( &com32_regs ), 0, sizeof(com32sys_t) ); } } @@ -164,7 +164,7 @@ void __asmcall com32_farcall ( uint32_t proc, physaddr_t inregs_phys, physaddr_t
if ( outregs_phys ) { memcpy_user ( phys_to_user ( outregs_phys ), 0, - virt_to_user( &com32_regs ), 0, + virt_to_user( &com32_regs ), 0, sizeof(com32sys_t) ); } } @@ -181,7 +181,7 @@ int __asmcall com32_cfarcall ( uint32_t proc, physaddr_t stack, size_t stacksz ) __asm__ __volatile__ ( REAL_CODE ( "lcall *%%ss:(com32_farcall_proc)\n\t" ) : "=a" (eax) - : + : : "ecx", "edx" );
remove_user_from_rm_stack ( 0, stacksz ); diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/syslinux/comboot_call.c b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/syslinux/comboot_call.c index 571ba9e..b1a438c 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/syslinux/comboot_call.c +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/interface/syslinux/comboot_call.c @@ -505,7 +505,7 @@ static __asmcall void int22 ( struct i386_all_regs *ix86 ) {
/* Jump to real-mode entry point */ __asm__ __volatile__ ( - REAL_CODE ( + REAL_CODE ( "pushw %0\n\t" "popw %%ds\n\t" "pushl %1\n\t" diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/kir-Makefile b/qemu-0.15.x/roms/ipxe/src/arch/i386/kir-Makefile index bbfc1a3..f097cbb 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/kir-Makefile +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/kir-Makefile @@ -1,5 +1,5 @@ # Makefile to build a KEEP_IT_REAL flavour -# +# # KEEP_IT_REAL, by its nature, requires a different build of every # single object file, since the inclusion of ".code16gcc" will # generate different machine code from the assembly. Unlike the other diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/dskprefix.S b/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/dskprefix.S index 7aa017c..2ca1ff4 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/dskprefix.S +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/dskprefix.S @@ -31,7 +31,7 @@ FILE_LICENCE ( GPL2_ONLY ) _dsk_start:
jmp $BOOTSEG, $go /* reload cs:ip to match relocation addr */ -go: +go: movw $0x2000-12, %di /* 0x2000 is arbitrary value >= length */ /* of bootsect + room for stack + 12 for */ /* saved disk parm block */ @@ -96,7 +96,7 @@ go:
movw $disksizes, %si /* table of sizes to try */
-probe_loop: +probe_loop: lodsb cbtw /* extend to word */ movw %ax, sectors @@ -110,7 +110,7 @@ probe_loop: int $0x13 jc probe_loop /* try next value */
-got_sectors: +got_sectors: movw $msg1end-msg1, %cx movw $msg1, %si call print_str @@ -162,13 +162,13 @@ endseg: .word SYSSEG * * in: es - starting address segment (normally SYSSEG) */ -read_it: +read_it: movw $0,sread /* load whole image including prefix */ movw %es,%ax testw $0x0fff, %ax die: jne die /* es must be at 64kB boundary */ xorw %bx,%bx /* bx is starting address within segment */ -rp_read: +rp_read: movw %es,%ax movw %bx,%dx movb $4, %cl @@ -177,7 +177,7 @@ rp_read: cmpw endseg, %ax /* have we loaded all yet? */ jb ok1_read ret -ok1_read: +ok1_read: movw sectors, %ax subw sread, %ax movw %ax,%cx @@ -188,7 +188,7 @@ ok1_read: xorw %ax,%ax subw %bx,%ax shrw $9, %ax -ok2_read: +ok2_read: call read_track movw %ax,%cx addw sread, %ax @@ -198,10 +198,10 @@ ok2_read: subw head, %ax jne ok4_read incw track -ok4_read: +ok4_read: movw %ax, head xorw %ax,%ax -ok3_read: +ok3_read: movw %ax, sread shlw $9, %cx addw %cx,%bx @@ -212,7 +212,7 @@ ok3_read: xorw %bx,%bx jmp rp_read
-read_track: +read_track: pusha pushw %ax pushw %bx @@ -265,12 +265,12 @@ bad_rt: pushw %ax /* save error code */ * ret <- sp */
-print_all: +print_all: call print_nl /* nl for readability */ movw $5, %cx /* error code + 4 registers */ movw %sp,%bp
-print_loop: +print_loop: pushw %cx /* save count left */
cmpb $5, %cl @@ -287,7 +287,7 @@ print_loop: movb $0x3A, %al /* ':' */ int $0x10
-no_reg: +no_reg: addw $2, %bp /* next register */ call print_hex /* print it */ movb $0x20, %al /* print a space */ @@ -297,16 +297,16 @@ no_reg: call print_nl /* nl for readability */ ret
-print_str: +print_str: movw $0x0007, %bx /* page 0, attribute 7 (normal) */ movb $0x0e, %ah /* write char, tty mode */ -prloop: +prloop: lodsb int $0x10 loop prloop ret
-print_nl: +print_nl: movw $0x0007, %bx /* page 0, attribute 7 (normal) */ movw $0xe0d, %ax /* CR */ int $0x10 @@ -316,7 +316,7 @@ print_nl:
/* print_hex prints the word pointed to by ss:bp in hexadecimal. */
-print_hex: +print_hex: movw (%bp),%dx /* load word into dx */ movb $4, %cl movb $0x0e, %ah /* write char, tty mode */ @@ -325,7 +325,7 @@ print_hex: call print_digit call print_digit /* fall through */ -print_digit: +print_digit: rol %cl,%dx /* rotate so that lowest 4 bits are used */ movb $0x0f, %al /* mask for nybble */ andb %dl,%al @@ -340,18 +340,18 @@ sread: .word 0 /* sectors read of current track */ head: .word 0 /* current head */ track: .word 0 /* current track */
-sectors: +sectors: .word 0
dpseg: .word 0 dpoff: .word 0
-disksizes: +disksizes: .byte 36,18,15,9
-msg1: +msg1: .ascii "Loading ROM image" -msg1end: +msg1end:
.org 510, 0 .word 0xAA55 diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/libprefix.S b/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/libprefix.S index 77151a6..92fc15d 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/libprefix.S +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/libprefix.S @@ -497,7 +497,7 @@ install_block: * Memory is allocated using the BIOS free base memory counter at * 0x40:13. * - * Parameters: + * Parameters: * none * Returns: * %ax : .text16 segment address diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/lkrnprefix.S b/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/lkrnprefix.S index f87ef85..246a211 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/lkrnprefix.S +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/lkrnprefix.S @@ -51,12 +51,12 @@ FILE_LICENCE ( GPL_ANY ) .section ".prefix", "ax", @progbits .globl _lkrn_start _lkrn_start: -/* +/* This is a minimal boot sector. If anyone tries to execute it (e.g., if - a .lilo file is dd'ed to a floppy), print an error message. + a .lilo file is dd'ed to a floppy), print an error message. */
-bootsector: +bootsector: jmp $BOOTSEG, $1f /* reload cs:ip to match relocation addr */ 1: movw $0x2000, %di /* 0x2000 is arbitrary value >= length @@ -76,14 +76,14 @@ bootsector:
movw $0x0007, %bx /* page 0, attribute 7 (normal) */ movb $0x0e, %ah /* write char, tty mode */ -prloop: +prloop: lodsb int $0x10 loop prloop freeze: jmp freeze
why: .ascii "This image cannot be loaded from a floppy disk.\r\n" -why_end: +why_end:
/* @@ -91,11 +91,11 @@ why_end: Documentation/x86/boot.txt */ .org 497 -setup_sects: +setup_sects: .byte SETUPSECS -root_flags: +root_flags: .word 0 -syssize: +syssize: .long -PREFIXPGH
.section ".zinfo.fixup", "a", @progbits /* Compressor fixups */ @@ -105,13 +105,13 @@ syssize: .long 0 .previous -ram_size: +ram_size: .word 0 -vid_mode: +vid_mode: .word 0 -root_dev: +root_dev: .word 0 -boot_flag: +boot_flag: .word 0xAA55 jump: /* Manually specify a two-byte jmp instruction here rather diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/romprefix.S b/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/romprefix.S index dd602dd..7533bb5 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/romprefix.S +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/romprefix.S @@ -75,7 +75,7 @@ build_id:
pciheader: .ascii "PCIR" /* Signature */ - .word pci_vendor_id /* Vendor identification */ + .word pci_vendor_id /* Vendor identification */ .word pci_device_id /* Device identification */ .word 0x0000 /* Device list pointer */ .word pciheader_len /* PCI data structure length */ diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/unnrv2b.S b/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/unnrv2b.S index f5724c1..718ce13 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/unnrv2b.S +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/prefix/unnrv2b.S @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer * * This file is free software; you can redistribute it and/or diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/scripts/i386-kir.lds b/qemu-0.15.x/roms/ipxe/src/arch/i386/scripts/i386-kir.lds index 338d6ee..ea45e11 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/scripts/i386-kir.lds +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/scripts/i386-kir.lds @@ -21,7 +21,7 @@ SECTIONS { * _prefix_link_addr = 0 * _load_addr = 0 * _max_align = 16 - * + * * We guarantee alignment of virtual addresses to any alignment * specified by the constituent object files (e.g. via * __attribute__((aligned(x)))). Load addresses are guaranteed @@ -52,7 +52,7 @@ SECTIONS { *(.prefix.*) _eprefix_progbits = .; } - + _eprefix = .;
/* diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/transitions/libkir.S b/qemu-0.15.x/roms/ipxe/src/arch/i386/transitions/libkir.S index 1176fcc..e8aadc3 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/transitions/libkir.S +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/transitions/libkir.S @@ -148,7 +148,7 @@ kir_to_ext: * * Call a specific C function in the internal code. The prototype of * the C function must be - * void function ( struct i386_all_resg *ix86 ); + * void function ( struct i386_all_resg *ix86 ); * ix86 will point to a struct containing the real-mode registers * at entry to kir_call. * diff --git a/qemu-0.15.x/roms/ipxe/src/arch/i386/transitions/librm.S b/qemu-0.15.x/roms/ipxe/src/arch/i386/transitions/librm.S index 5eb82b4..b0eee61 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/i386/transitions/librm.S +++ b/qemu-0.15.x/roms/ipxe/src/arch/i386/transitions/librm.S @@ -162,7 +162,7 @@ idt_init: /* Reuse the return opcode here */ * The return address for this function should be a 32-bit virtual * address. * - * Parameters: + * Parameters: * %ecx : number of bytes to move from RM stack to PM stack * **************************************************************************** @@ -259,7 +259,7 @@ rm_idtr: * The return address for this function should be a 32-bit (sic) * real-mode offset within .code16. * - * Parameters: + * Parameters: * %ecx : number of bytes to move from PM stack to RM stack * **************************************************************************** @@ -340,9 +340,9 @@ rm_ds: .word 0 * * Call a specific C function in the protected-mode code. The * prototype of the C function must be - * void function ( struct i386_all_regs *ix86 ); + * void function ( struct i386_all_regs *ix86 ); * ix86 will point to a struct containing the real-mode registers - * at entry to prot_call. + * at entry to prot_call. * * All registers will be preserved across prot_call(), unless the C * function explicitly overwrites values in ix86. Interrupt status diff --git a/qemu-0.15.x/roms/ipxe/src/arch/x86/include/bits/string.h b/qemu-0.15.x/roms/ipxe/src/arch/x86/include/bits/string.h index f35cdab..da3a28e 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/x86/include/bits/string.h +++ b/qemu-0.15.x/roms/ipxe/src/arch/x86/include/bits/string.h @@ -35,7 +35,7 @@ __memcpy ( void *dest, const void *src, size_t len ) { : "=&c" ( d0 ), "=&S" ( d1 ), "=&D" ( d2 ) : "0" ( len ), "1" ( src ), "2" ( dest ) : "memory" ); - return dest; + return dest; } #endif
diff --git a/qemu-0.15.x/roms/ipxe/src/arch/x86/include/valgrind/memcheck.h b/qemu-0.15.x/roms/ipxe/src/arch/x86/include/valgrind/memcheck.h index 46d2343..1d1c258 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/x86/include/valgrind/memcheck.h +++ b/qemu-0.15.x/roms/ipxe/src/arch/x86/include/valgrind/memcheck.h @@ -22,16 +22,16 @@ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product + 2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written + 4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS @@ -53,7 +53,7 @@ the terms of the GNU General Public License, version 2. See the COPYING file in the source distribution for details.
- ---------------------------------------------------------------- + ---------------------------------------------------------------- */
@@ -71,12 +71,12 @@
#include "valgrind.h"
-/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! +/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! This enum comprises an ABI exported by Valgrind to programs which use client requests. DO NOT CHANGE THE ORDER OF THESE ENTRIES, NOR DELETE ANY -- add new ones at the end. */ typedef - enum { + enum { VG_USERREQ__MAKE_MEM_NOACCESS = VG_USERREQ_TOOL_BASE('M','C'), VG_USERREQ__MAKE_MEM_UNDEFINED, VG_USERREQ__MAKE_MEM_DEFINED, @@ -97,7 +97,7 @@ typedef VG_USERREQ__COUNT_LEAK_BLOCKS,
/* This is just for memcheck's internal use - don't use it */ - _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR + _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR = VG_USERREQ_TOOL_BASE('M','C') + 256 } Vg_MemCheckClientRequest;
@@ -113,7 +113,7 @@ typedef _qzz_addr, _qzz_len, 0, 0, 0); \ _qzz_res; \ })) - + /* Similarly, mark memory at _qzz_addr as addressable but undefined for _qzz_len bytes. */ #define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr,_qzz_len) \ diff --git a/qemu-0.15.x/roms/ipxe/src/arch/x86/include/valgrind/valgrind.h b/qemu-0.15.x/roms/ipxe/src/arch/x86/include/valgrind/valgrind.h index d72754b..9ce269b 100644 --- a/qemu-0.15.x/roms/ipxe/src/arch/x86/include/valgrind/valgrind.h +++ b/qemu-0.15.x/roms/ipxe/src/arch/x86/include/valgrind/valgrind.h @@ -21,16 +21,16 @@ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product + 2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written + 4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS @@ -52,13 +52,13 @@ the terms of the GNU General Public License, version 2. See the COPYING file in the source distribution for details.
- ---------------------------------------------------------------- + ---------------------------------------------------------------- */
/* This file is for inclusion into client (your!) code.
- You can use these macros to manipulate and query Valgrind's + You can use these macros to manipulate and query Valgrind's execution inside your own programs.
The resulting executables will still run without Valgrind, just a @@ -177,8 +177,8 @@ this is executed not under Valgrind. Args are passed in a memory block, and so there's no intrinsic limit to the number that could be passed, but it's currently five. - - The macro args are: + + The macro args are: _zzq_rlval result lvalue _zzq_default default value (result returned when running on real CPU) _zzq_request request code @@ -204,7 +204,7 @@ #if defined(PLAT_x86_linux) || defined(PLAT_x86_darwin)
typedef - struct { + struct { unsigned int nraddr; /* where's the code? */ } OrigFn; @@ -258,7 +258,7 @@ typedef #if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin)
typedef - struct { + struct { unsigned long long int nraddr; /* where's the code? */ } OrigFn; @@ -312,7 +312,7 @@ typedef #if defined(PLAT_ppc32_linux)
typedef - struct { + struct { unsigned int nraddr; /* where's the code? */ } OrigFn; @@ -372,7 +372,7 @@ typedef #if defined(PLAT_ppc64_linux)
typedef - struct { + struct { unsigned long long int nraddr; /* where's the code? */ unsigned long long int r2; /* what tocptr do we need? */ } @@ -438,7 +438,7 @@ typedef #if defined(PLAT_arm_linux)
typedef - struct { + struct { unsigned int nraddr; /* where's the code? */ } OrigFn; @@ -497,7 +497,7 @@ typedef #if defined(PLAT_ppc32_aix5)
typedef - struct { + struct { unsigned int nraddr; /* where's the code? */ unsigned int r2; /* what tocptr do we need? */ } @@ -569,7 +569,7 @@ typedef #if defined(PLAT_ppc64_aix5)
typedef - struct { + struct { unsigned long long int nraddr; /* where's the code? */ unsigned long long int r2; /* what tocptr do we need? */ } @@ -1587,7 +1587,7 @@ typedef "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ "r11", "r12", "r13"
-/* These CALL_FN_ macros assume that on ppc32-linux, +/* These CALL_FN_ macros assume that on ppc32-linux, sizeof(unsigned long) == 4. */
#define CALL_FN_W_v(lval, orig) \ @@ -4103,7 +4103,7 @@ typedef #define VG_IS_TOOL_USERREQ(a, b, v) \ (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
-/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! +/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! This enum comprises an ABI exported by Valgrind to programs which use client requests. DO NOT CHANGE THE ORDER OF THESE ENTRIES, NOR DELETE ANY -- add new ones at the end. */ @@ -4216,7 +4216,7 @@ VALGRIND_PRINTF(const char *format, ...) VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, VG_USERREQ__PRINTF_VALIST_BY_REF, (unsigned long)format, - (unsigned long)&vargs, + (unsigned long)&vargs, 0, 0, 0); va_end(vargs); return (int)_qzz_res; @@ -4233,7 +4233,7 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF, (unsigned long)format, - (unsigned long)&vargs, + (unsigned long)&vargs, 0, 0, 0); va_end(vargs); return (int)_qzz_res; @@ -4244,7 +4244,7 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
/* These requests allow control to move from the simulated CPU to the real CPU, calling an arbitary function. - + Note that the current ThreadId is inserted as the first argument. So this call:
@@ -4349,7 +4349,7 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) - It marks the block as being addressable and undefined (if 'is_zeroed' is not set), or addressable and defined (if 'is_zeroed' is set). This controls how accesses to the block by the program are handled. - + 'addr' is the start of the usable block (ie. after any redzone), 'sizeB' is its size. 'rzB' is the redzone size if the allocator can apply redzones -- these are blocks of padding at the start and end of @@ -4357,7 +4357,7 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) Valgrind will spot block overruns. `is_zeroed' indicates if the memory is zeroed (or filled with another predictable value), as is the case for calloc(). - + VALGRIND_MALLOCLIKE_BLOCK should be put immediately after the point where a heap block -- that will be used by the client program -- is allocated. It's best to put it at the outermost level of the allocator if possible; @@ -4403,7 +4403,7 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
Note: there is currently no VALGRIND_REALLOCLIKE_BLOCK client request; it has to be emulated with MALLOCLIKE/FREELIKE and memory copying. - + Ignored if addr == 0. */ #define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed) \ diff --git a/qemu-0.15.x/roms/ipxe/src/core/ansiesc.c b/qemu-0.15.x/roms/ipxe/src/core/ansiesc.c index 05bbb86..f0d8a6a 100644 --- a/qemu-0.15.x/roms/ipxe/src/core/ansiesc.c +++ b/qemu-0.15.x/roms/ipxe/src/core/ansiesc.c @@ -101,7 +101,7 @@ int ansiesc_process ( struct ansiesc_context *ctx, int c ) { ctx->function <<= 8; ctx->function |= c; } else { - /* Treat as Final Byte. Zero ctx->count before + /* Treat as Final Byte. Zero ctx->count before * calling handler to avoid potential infinite loops. */ int count = ctx->count; diff --git a/qemu-0.15.x/roms/ipxe/src/core/btext.c b/qemu-0.15.x/roms/ipxe/src/core/btext.c index 4fb7378..974c533 100644 --- a/qemu-0.15.x/roms/ipxe/src/core/btext.c +++ b/qemu-0.15.x/roms/ipxe/src/core/btext.c @@ -15,7 +15,7 @@
#undef __BIG_ENDIAN #if 0 -#define __LITTLE_ENDIAN +#define __LITTLE_ENDIAN #endif
#include "btext.h" @@ -90,7 +90,7 @@ btext_setup_display(u32 width, u32 height, u32 depth, u32 pitch, * changes. */
-static void +static void map_boot_text(void) { boot_infos_t *bi = &disp_bi; @@ -313,7 +313,7 @@ static u32 expand_bits_8[16] BTDATA = { 0x0000ffff,0xff00ffff,0x00ffffff,0xffffffff #else #error FIXME: No endianness?? -#endif +#endif }; #if 0 static const u32 expand_bits_16[4] BTDATA = { diff --git a/qemu-0.15.x/roms/ipxe/src/core/i82365.c b/qemu-0.15.x/roms/ipxe/src/core/i82365.c index c26639e..e4c4ea2 100644 --- a/qemu-0.15.x/roms/ipxe/src/core/i82365.c +++ b/qemu-0.15.x/roms/ipxe/src/core/i82365.c @@ -381,10 +381,10 @@ int deinit_i82365(void) { state->Vcc, state->Vpp, state->io_irq, state->csc_mask); printf ("\nERROR:UNIMPLEMENTED\n" ); return 0; - // First set global controller options + // First set global controller options // set_bridge_state(sock); *TODO* check: need this here?
- // IO card, RESET flag, IO interrupt + // IO card, RESET flag, IO interrupt reg = t->intr; if (state->io_irq != t->cap.pci_irq) reg |= state->io_irq; reg |= (state->flags & SS_RESET) ? 0 : I365_PC_RESET; @@ -457,14 +457,14 @@ return 0; if (reg != i365_get(sock, I365_POWER)) i365_set(sock, I365_POWER, reg);
- // Chipset-specific functions + // Chipset-specific functions if (t->flags & IS_CIRRUS) { - // Speaker control + // Speaker control i365_bflip(sock, PD67_MISC_CTL_1, PD67_MC1_SPKR_ENA, state->flags & SS_SPKR_ENA); }
- // Card status change interrupt mask + // Card status change interrupt mask reg = t->cs_irq << 4; if (state->csc_mask & SS_DETECT) reg |= I365_CSC_DETECT; if (state->flags & SS_IOCARD) { @@ -478,7 +478,7 @@ return 0; i365_get(sock, I365_CSC);
return 0; -} // i365_set_socket +} // i365_set_socket */
/*static int i365_get_io_map(u_short sock, struct pccard_io_map *io) @@ -500,7 +500,7 @@ return 0; "%#4.4x-%#4.4x\n", sock, map, io->flags, io->speed, io->start, io->stop); return 0; -} // i365_get_io_map +} // i365_get_io_map */
/*====================================================================*/ @@ -518,7 +518,7 @@ printf ( "UNIMPLEMENTED\n" ); //if ((map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || if ((map > 1) || (io->stop < io->start)) return -EINVAL; - // Turn off the window before changing anything + // Turn off the window before changing anything if (i365_get(sock, I365_ADDRWIN) & I365_ENA_IO(map)) i365_bclr(sock, I365_ADDRWIN, I365_ENA_IO(map)); i365_set_pair(sock, I365_IO(map)+I365_W_START, io->start); @@ -529,11 +529,11 @@ printf ( "UNIMPLEMENTED\n" ); if (io->flags & MAP_16BIT) ioctl |= I365_IOCTL_16BIT(map); if (io->flags & MAP_AUTOSZ) ioctl |= I365_IOCTL_IOCS16(map); i365_set(sock, I365_IOCTL, ioctl); - // Turn on the window if necessary + // Turn on the window if necessary if (io->flags & MAP_ACTIVE) i365_bset(sock, I365_ADDRWIN, I365_ENA_IO(map)); return 0; -} // i365_set_io_map +} // i365_set_io_map */
/* @@ -556,7 +556,7 @@ printf ( "UNIMPLEMENTED\n" ); ((mem->sys_start > 0xffffff) || (mem->sys_stop > 0xffffff))) return -EINVAL;
- // Turn off the window before changing anything + // Turn off the window before changing anything if (i365_get(sock, I365_ADDRWIN) & I365_ENA_MEM(map)) i365_bclr(sock, I365_ADDRWIN, I365_ENA_MEM(map));
@@ -580,11 +580,11 @@ printf ( "UNIMPLEMENTED\n" ); if (mem->flags & MAP_ATTRIB) i |= I365_MEM_REG; i365_set_pair(sock, base+I365_W_OFF, i);
- // Turn on the window if necessary + // Turn on the window if necessary if (mem->flags & MAP_ACTIVE) i365_bset(sock, I365_ADDRWIN, I365_ENA_MEM(map)); return 0; -} // i365_set_mem_map +} // i365_set_mem_map */
@@ -626,7 +626,7 @@ int i82365_interfacer ( interface_func_t func, int sockno, int par1, int par2, v case SELECTCONFIG: // Params: par1: config number; par3 config pointer pointer if ( 0 > pccsock[sockno].configoffset ) return 1; if ( NULL == (pccc = par3 ) ) return 2; - // write config number to + // write config number to upc = ioremap ( MAP_ATTRMEM_TO, MAP_ATTRMEM_LEN ); if ( pccsock[sockno].configoffset > MAP_ATTRMEM_LEN ) return 3; if ( ( par1 & 0x7fffffc0 ) ) return 4; diff --git a/qemu-0.15.x/roms/ipxe/src/core/malloc.c b/qemu-0.15.x/roms/ipxe/src/core/malloc.c index d694f55..630c9c7 100644 --- a/qemu-0.15.x/roms/ipxe/src/core/malloc.c +++ b/qemu-0.15.x/roms/ipxe/src/core/malloc.c @@ -273,9 +273,9 @@ void free_memblock ( void *ptr, size_t size ) { /* Insert/merge into free list */ list_for_each_entry_safe ( block, tmp, &free_blocks, list ) { /* Calculate gaps before and after the "freeing" block */ - gap_before = ( ( ( void * ) freeing ) - + gap_before = ( ( ( void * ) freeing ) - ( ( ( void * ) block ) + block->size ) ); - gap_after = ( ( ( void * ) block ) - + gap_after = ( ( ( void * ) block ) - ( ( ( void * ) freeing ) + freeing->size ) ); /* Merge with immediately preceding block, if possible */ if ( gap_before == 0 ) { diff --git a/qemu-0.15.x/roms/ipxe/src/core/pcmcia.c b/qemu-0.15.x/roms/ipxe/src/core/pcmcia.c index 2d8ceb6..251b5a6 100644 --- a/qemu-0.15.x/roms/ipxe/src/core/pcmcia.c +++ b/qemu-0.15.x/roms/ipxe/src/core/pcmcia.c @@ -225,7 +225,7 @@ static void pcmcia_init_all(void) { printf ( ") with %d possible configuration(s)\n", configs ); // Now set dependency: If it's Network or multi->network, accept if ( (inited <= 0 ) && (6 == (0xff & pccsock[i].type) ) && (0 < configs ) ) { - printf ( "activating this device with ioport %x-%x (config #%d)\n", + printf ( "activating this device with ioport %x-%x (config #%d)\n", pccconfig[0].iowin, pccconfig[0].iowin+pccconfig[0].iolen-1, pccconfig[0].index ); inited = i; // And unmap attrmem ourselves! diff --git a/qemu-0.15.x/roms/ipxe/src/core/serial.c b/qemu-0.15.x/roms/ipxe/src/core/serial.c index a5551b1..6e161ff 100644 --- a/qemu-0.15.x/roms/ipxe/src/core/serial.c +++ b/qemu-0.15.x/roms/ipxe/src/core/serial.c @@ -103,7 +103,7 @@ void serial_putc ( int ch ) { i = 1000; /* timeout */ while(--i > 0) { status = uart_readb(UART_BASE + UART_LSR); - if (status & UART_LSR_THRE) { + if (status & UART_LSR_THRE) { /* TX buffer emtpy */ uart_writeb(ch, UART_BASE + UART_TBR); break; diff --git a/qemu-0.15.x/roms/ipxe/src/core/settings.c b/qemu-0.15.x/roms/ipxe/src/core/settings.c index 0a8c5f6..379057b 100644 --- a/qemu-0.15.x/roms/ipxe/src/core/settings.c +++ b/qemu-0.15.x/roms/ipxe/src/core/settings.c @@ -1250,7 +1250,7 @@ static int fetchf_uristring ( struct settings *settings,
{ char raw_buf[ raw_len + 1 ]; - + fetch_string_setting ( settings, setting, raw_buf, sizeof ( raw_buf ) ); return uri_encode ( raw_buf, buf, len, URI_FRAGMENT ); @@ -1327,7 +1327,7 @@ static int storef_int ( struct settings *settings, struct setting *setting, u.num = htonl ( strtoul ( value, &endp, 0 ) ); if ( *endp ) return -EINVAL; - return store_setting ( settings, setting, + return store_setting ( settings, setting, &u.bytes[ sizeof ( u ) - size ], size ); }
diff --git a/qemu-0.15.x/roms/ipxe/src/core/string.c b/qemu-0.15.x/roms/ipxe/src/core/string.c index 190007a..42072db 100644 --- a/qemu-0.15.x/roms/ipxe/src/core/string.c +++ b/qemu-0.15.x/roms/ipxe/src/core/string.c @@ -22,7 +22,7 @@ FILE_LICENCE ( GPL2_ONLY ); * - Added strsep() which will replace strtok() soon (because strsep() is * reentrant and should be faster). Use only strsep() in new code, please. */ - + #include <stdint.h> #include <stdlib.h> #include <string.h> diff --git a/qemu-0.15.x/roms/ipxe/src/core/stringextra.c b/qemu-0.15.x/roms/ipxe/src/core/stringextra.c index 0a50985..de6c7cd 100644 --- a/qemu-0.15.x/roms/ipxe/src/core/stringextra.c +++ b/qemu-0.15.x/roms/ipxe/src/core/stringextra.c @@ -30,7 +30,7 @@ FILE_LICENCE ( GPL2_ONLY ); * if anything ever does want to use a function of these, consider moving * the function in question back into string.c */ - + #include <stdint.h> #include <stdlib.h> #include <string.h> diff --git a/qemu-0.15.x/roms/ipxe/src/core/vsprintf.c b/qemu-0.15.x/roms/ipxe/src/core/vsprintf.c index b46d9c4..625137f 100644 --- a/qemu-0.15.x/roms/ipxe/src/core/vsprintf.c +++ b/qemu-0.15.x/roms/ipxe/src/core/vsprintf.c @@ -228,7 +228,7 @@ size_t vcprintf ( struct printf_context *ctx, const char *fmt, va_list args ) { intptr_t ptrval;
ptrval = ( intptr_t ) va_arg ( args, void * ); - ptr = format_hex ( ptr, ptrval, width, + ptr = format_hex ( ptr, ptrval, width, ( ALT_FORM | LCASE ) ); } else if ( ( *fmt & ~0x20 ) == 'X' ) { unsigned long long hex; diff --git a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/aes.c b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/aes.c index 87faaa1..27b1751 100644 --- a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/aes.c +++ b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/aes.c @@ -20,7 +20,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
/** * AES implementation - this is a small code version. There are much faster - * versions around but they are much larger in size (i.e. they use large + * versions around but they are much larger in size (i.e. they use large * submix tables). */
@@ -34,7 +34,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define rot2(x) (((x) << 16) | ((x) >> 16)) #define rot3(x) (((x) << 8) | ((x) >> 24))
-/* +/* * This cute trick does 4 'mul by two' at once. Stolen from * Dr B. R. Gladman brg@gladman.uk.net but I'm sure the u-(u>>7) is * a standard graphics trick @@ -110,7 +110,7 @@ static const uint8_t aes_sbox[256] = /* * AES is-box */ -static const uint8_t aes_isbox[256] = +static const uint8_t aes_isbox[256] = { 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38, 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb, @@ -164,7 +164,7 @@ static unsigned char AES_xtime(uint32_t x) /** * Set up AES with the key/iv and cipher size. */ -void AES_set_key(AES_CTX *ctx, const uint8_t *key, +void AES_set_key(AES_CTX *ctx, const uint8_t *key, const uint8_t *iv, AES_MODE mode) { int i, ii; @@ -287,13 +287,13 @@ void AES_cbc_encrypt(AES_CTX *ctx, const uint8_t *msg, uint8_t *out, int length)
AES_encrypt(ctx, tin);
- tout0 = tin[0]; + tout0 = tin[0]; l2n(tout0, out_32); - tout1 = tin[1]; + tout1 = tin[1]; l2n(tout1, out_32); - tout2 = tin[2]; + tout2 = tin[2]; l2n(tout2, out_32); - tout3 = tin[3]; + tout3 = tin[3]; l2n(tout3, out_32); }
@@ -370,7 +370,7 @@ void AES_encrypt(const AES_CTX *ctx, uint32_t *data) uint32_t tmp[4]; uint32_t tmp1, old_a0, a0, a1, a2, a3, row; int curr_rnd; - int rounds = ctx->rounds; + int rounds = ctx->rounds; const uint32_t *k = ctx->ks;
/* Pre-round key addition */ @@ -387,7 +387,7 @@ void AES_encrypt(const AES_CTX *ctx, uint32_t *data) { a0 = (uint32_t)aes_sbox[(data[row%4]>>24)&0xFF]; a1 = (uint32_t)aes_sbox[(data[(row+1)%4]>>16)&0xFF]; - a2 = (uint32_t)aes_sbox[(data[(row+2)%4]>>8)&0xFF]; + a2 = (uint32_t)aes_sbox[(data[(row+2)%4]>>8)&0xFF]; a3 = (uint32_t)aes_sbox[(data[(row+3)%4])&0xFF];
/* Perform MixColumn iff not last round */ @@ -407,7 +407,7 @@ void AES_encrypt(const AES_CTX *ctx, uint32_t *data) }
/* KeyAddition - note that it is vital that this loop is separate from - the MixColumn operation, which must be atomic...*/ + the MixColumn operation, which must be atomic...*/ for (row = 0; row < 4; row++) { data[row] = tmp[row] ^ *(k++); @@ -419,7 +419,7 @@ void AES_encrypt(const AES_CTX *ctx, uint32_t *data) * Decrypt a single block (16 bytes) of data */ void AES_decrypt(const AES_CTX *ctx, uint32_t *data) -{ +{ uint32_t tmp[4]; uint32_t xt0,xt1,xt2,xt3,xt4,xt5,xt6; uint32_t a0, a1, a2, a3, row; @@ -448,7 +448,7 @@ void AES_decrypt(const AES_CTX *ctx, uint32_t *data) if (curr_rnd<(rounds-1)) { /* The MDS cofefficients (0x09, 0x0B, 0x0D, 0x0E) - are quite large compared to encryption; this + are quite large compared to encryption; this operation slows decryption down noticeably. */ xt0 = AES_xtime(a0^a1); xt1 = AES_xtime(a1^a2); diff --git a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint.c b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint.c index 49cad97..d02ce3e 100644 --- a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint.c +++ b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint.c @@ -21,8 +21,8 @@ * @brief The bigint implementation as used by the axTLS project. * * The bigint library is for RSA encryption/decryption as well as signing. - * This code tries to minimise use of malloc/free by maintaining a small - * cache. A bigint context may maintain state by being made "permanent". + * This code tries to minimise use of malloc/free by maintaining a small + * cache. A bigint context may maintain state by being made "permanent". * It be be later released with a bi_depermanent() and bi_free() call. * * It supports the following reduction techniques: @@ -79,9 +79,9 @@ BI_CTX *bi_initialize(void) { /* calloc() sets everything to zero */ BI_CTX *ctx = (BI_CTX *)calloc(1, sizeof(BI_CTX)); - + /* the radix */ - ctx->bi_radix = alloc(ctx, 2); + ctx->bi_radix = alloc(ctx, 2); ctx->bi_radix->comps[0] = 0; ctx->bi_radix->comps[1] = 1; bi_permanent(ctx->bi_radix); @@ -91,7 +91,7 @@ BI_CTX *bi_initialize(void) /** * @brief Close the bigint context and free any resources. * - * Free up any used memory - a check is done if all objects were not + * Free up any used memory - a check is done if all objects were not * properly freed. * @param ctx [in] The bigint session context. */ @@ -99,7 +99,7 @@ void bi_terminate(BI_CTX *ctx) { bigint *p, *pn;
- bi_depermanent(ctx->bi_radix); + bi_depermanent(ctx->bi_radix); bi_free(ctx, ctx->bi_radix);
if (ctx->active_count != 0) @@ -122,7 +122,7 @@ void bi_terminate(BI_CTX *ctx) }
/** - * @brief Increment the number of references to this object. + * @brief Increment the number of references to this object. * It does not do a full copy. * @param bi [in] The bigint to copy. * @return A reference to the same bigint. @@ -174,9 +174,9 @@ void bi_depermanent(bigint *bi) }
/** - * @brief Free a bigint object so it can be used again. + * @brief Free a bigint object so it can be used again. * - * The memory itself it not actually freed, just tagged as being available + * The memory itself it not actually freed, just tagged as being available * @param ctx [in] The bigint session context. * @param bi [in] The bigint to be freed. */ @@ -211,7 +211,7 @@ void bi_free(BI_CTX *ctx, bigint *bi) * @brief Convert an (unsigned) integer into a bigint. * @param ctx [in] The bigint session context. * @param i [in] The (unsigned) integer to be converted. - * + * */ bigint *int_to_bi(BI_CTX *ctx, comp i) { @@ -279,7 +279,7 @@ bigint *bi_add(BI_CTX *ctx, bigint *bia, bigint *bib) * is_negative may be null. * @return The result of the subtraction. The result is always positive. */ -bigint *bi_subtract(BI_CTX *ctx, +bigint *bi_subtract(BI_CTX *ctx, bigint *bia, bigint *bib, int *is_negative) { int n = bia->size; @@ -292,7 +292,7 @@ bigint *bi_subtract(BI_CTX *ctx, pa = bia->comps; pb = bib->comps;
- do + do { comp sl, rl, cy1; sl = *pa - *pb++; @@ -340,7 +340,7 @@ static bigint *bi_int_multiply(BI_CTX *ctx, bigint *bia, comp b) }
/** - * @brief Does both division and modulo calculations. + * @brief Does both division and modulo calculations. * * Used extensively when doing classical reduction. * @param ctx [in] The bigint session context. @@ -415,9 +415,9 @@ bigint *bi_divide(BI_CTX *ctx, bigint *u, bigint *v, int is_mod) if (v->size > 1 && V2) { /* we are implementing the following: - if (V2*q_dash > (((U(0)*COMP_RADIX + U(1) - + if (V2*q_dash > (((U(0)*COMP_RADIX + U(1) - q_dash*V1)*COMP_RADIX) + U(2))) ... */ - comp inner = (comp)((long_comp)COMP_RADIX*U(0) + U(1) - + comp inner = (comp)((long_comp)COMP_RADIX*U(0) + U(1) - (long_comp)q_dash*V1); if ((long_comp)V2*q_dash > (long_comp)inner*COMP_RADIX + U(2)) { @@ -429,11 +429,11 @@ bigint *bi_divide(BI_CTX *ctx, bigint *u, bigint *v, int is_mod) if (q_dash) { int is_negative; - tmp_u = bi_subtract(ctx, tmp_u, + tmp_u = bi_subtract(ctx, tmp_u, bi_int_multiply(ctx, bi_copy(v), q_dash), &is_negative); more_comps(tmp_u, n+1);
- Q(j) = q_dash; + Q(j) = q_dash;
/* add back */ if (is_negative) @@ -448,7 +448,7 @@ bigint *bi_divide(BI_CTX *ctx, bigint *u, bigint *v, int is_mod) } else { - Q(j) = 0; + Q(j) = 0; }
/* copy back to u */ @@ -492,10 +492,10 @@ static bigint *bi_int_divide(BI_CTX *ctx __unused, bigint *biR, comp denom)
#ifdef CONFIG_BIGINT_MONTGOMERY /** - * There is a need for the value of integer N' such that B^-1(B-1)-N^-1N'=1, - * where B^-1(B-1) mod N=1. Actually, only the least significant part of - * N' is needed, hence the definition N0'=N' mod b. We reproduce below the - * simple algorithm from an article by Dusse and Kaliski to efficiently + * There is a need for the value of integer N' such that B^-1(B-1)-N^-1N'=1, + * where B^-1(B-1) mod N=1. Actually, only the least significant part of + * N' is needed, hence the definition N0'=N' mod b. We reproduce below the + * simple algorithm from an article by Dusse and Kaliski to efficiently * find N0' from N0 and b */ static comp modular_inverse(bigint *bim) { @@ -523,7 +523,7 @@ static comp modular_inverse(bigint *bim) #if defined(CONFIG_BIGINT_KARATSUBA) || defined(CONFIG_BIGINT_BARRETT) || \ defined(CONFIG_BIGINT_MONTGOMERY) /** - * Take each component and shift down (in terms of components) + * Take each component and shift down (in terms of components) */ static bigint *comp_right_shift(bigint *biR, int num_shifts) { @@ -550,7 +550,7 @@ static bigint *comp_right_shift(bigint *biR, int num_shifts) }
/** - * Take each component and shift it up (in terms of components) + * Take each component and shift it up (in terms of components) */ static bigint *comp_left_shift(bigint *biR, int num_shifts) { @@ -609,7 +609,7 @@ bigint *bi_import(BI_CTX *ctx, const uint8_t *data, int size)
#ifdef CONFIG_SSL_FULL_MODE /** - * @brief The testharness uses this code to import text hex-streams and + * @brief The testharness uses this code to import text hex-streams and * convert them into bigints. * @param ctx [in] The bigint session context. * @param data [in] A string consisting of hex characters. The characters must @@ -657,14 +657,14 @@ void bi_print(const char *label, bigint *x) comp num = (x->comps[i] & mask) >> (j*4); putc((num <= 9) ? (num + '0') : (num + 'A' - 10), stdout); } - } + }
printf("\n"); } #endif
/** - * @brief Take a bigint and convert it into a byte sequence. + * @brief Take a bigint and convert it into a byte sequence. * * This is useful after a decrypt operation. * @param ctx [in] The bigint session context. @@ -699,7 +699,7 @@ void bi_export(BI_CTX *ctx, bigint *x, uint8_t *data, int size) }
/** - * @brief Pre-calculate some of the expensive steps in reduction. + * @brief Pre-calculate some of the expensive steps in reduction. * * This function should only be called once (normally when a session starts). * When the session is over, bi_free_mod() should be called. bi_mod_power() @@ -737,7 +737,7 @@ void bi_set_mod(BI_CTX *ctx, bigint *bim, int mod_offset) ctx->N0_dash[mod_offset] = modular_inverse(ctx->bi_mod[mod_offset]);
#elif defined (CONFIG_BIGINT_BARRETT) - ctx->bi_mu[mod_offset] = + ctx->bi_mu[mod_offset] = bi_divide(ctx, comp_left_shift( bi_clone(ctx, ctx->bi_radix), k*2-1), ctx->bi_mod[mod_offset], 0); bi_permanent(ctx->bi_mu[mod_offset]); @@ -760,20 +760,20 @@ void bi_free_mod(BI_CTX *ctx, int mod_offset) bi_free(ctx, ctx->bi_RR_mod_m[mod_offset]); bi_free(ctx, ctx->bi_R_mod_m[mod_offset]); #elif defined(CONFIG_BIGINT_BARRETT) - bi_depermanent(ctx->bi_mu[mod_offset]); + bi_depermanent(ctx->bi_mu[mod_offset]); bi_free(ctx, ctx->bi_mu[mod_offset]); #endif - bi_depermanent(ctx->bi_normalised_mod[mod_offset]); + bi_depermanent(ctx->bi_normalised_mod[mod_offset]); bi_free(ctx, ctx->bi_normalised_mod[mod_offset]); }
-/** +/** * Perform a standard multiplication between two bigints. */ static bigint *regular_multiply(BI_CTX *ctx, bigint *bia, bigint *bib) { int i, j, i_plus_j; - int n = bia->size; + int n = bia->size; int t = bib->size; bigint *biR = alloc(ctx, n + t); comp *sr = biR->comps; @@ -787,7 +787,7 @@ static bigint *regular_multiply(BI_CTX *ctx, bigint *bia, bigint *bib) memset(biR->comps, 0, ((n+t)*COMP_BYTE_SIZE)); i = 0;
- do + do { comp carry = 0; comp b = *sb++; @@ -811,9 +811,9 @@ static bigint *regular_multiply(BI_CTX *ctx, bigint *bia, bigint *bib)
#ifdef CONFIG_BIGINT_KARATSUBA /* - * Karatsuba improves on regular multiplication due to only 3 multiplications - * being done instead of 4. The additional additions/subtractions are O(N) - * rather than O(N^2) and so for big numbers it saves on a few operations + * Karatsuba improves on regular multiplication due to only 3 multiplications + * being done instead of 4. The additional additions/subtractions are O(N) + * rather than O(N^2) and so for big numbers it saves on a few operations */ static bigint *karatsuba(BI_CTX *ctx, bigint *bia, bigint *bib, int is_square) { @@ -857,7 +857,7 @@ static bigint *karatsuba(BI_CTX *ctx, bigint *bia, bigint *bib, int is_square) p1 = bi_multiply(ctx, bi_add(ctx, x0, x1), bi_add(ctx, y0, y1)); }
- p1 = bi_subtract(ctx, + p1 = bi_subtract(ctx, bi_subtract(ctx, p1, bi_copy(p2), NULL), bi_copy(p0), NULL);
comp_left_shift(p1, m); @@ -956,7 +956,7 @@ bigint *bi_square(BI_CTX *ctx, bigint *bia) check(bia);
#ifdef CONFIG_BIGINT_KARATSUBA - if (bia->size < SQU_KARATSUBA_THRESH) + if (bia->size < SQU_KARATSUBA_THRESH) { return regular_square(ctx, bia); } @@ -987,25 +987,25 @@ int bi_compare(bigint *bia, bigint *bib) r = -1; else { - comp *a = bia->comps; - comp *b = bib->comps; + comp *a = bia->comps; + comp *b = bib->comps;
/* Same number of components. Compare starting from the high end * and working down. */ r = 0; i = bia->size - 1;
- do + do { if (a[i] > b[i]) - { + { r = 1; - break; + break; } else if (a[i] < b[i]) - { + { r = -1; - break; + break; } } while (--i >= 0); } @@ -1014,7 +1014,7 @@ int bi_compare(bigint *bia, bigint *bib) }
/* - * Allocate and zero more components. Does not consume bi. + * Allocate and zero more components. Does not consume bi. */ static void more_comps(bigint *bi, int n) { @@ -1196,7 +1196,7 @@ bigint *bi_mont(BI_CTX *ctx, bigint *bixy) #elif defined(CONFIG_BIGINT_BARRETT) /* * Stomp on the most significant components to give the illusion of a "mod base - * radix" operation + * radix" operation */ static bigint *comp_mod(bigint *bi, int mod) { @@ -1213,9 +1213,9 @@ static bigint *comp_mod(bigint *bi, int mod) /* * Barrett reduction has no need for some parts of the product, so ignore bits * of the multiply. This routine gives Barrett its big performance - * improvements over Classical/Montgomery reduction methods. + * improvements over Classical/Montgomery reduction methods. */ -static bigint *partial_multiply(BI_CTX *ctx, bigint *bia, bigint *bib, +static bigint *partial_multiply(BI_CTX *ctx, bigint *bia, bigint *bib, int inner_partial, int outer_partial) { int i = 0, j, n = bia->size, t = bib->size; @@ -1233,7 +1233,7 @@ static bigint *partial_multiply(BI_CTX *ctx, bigint *bia, bigint *bib,
if (inner_partial) { - memset(sr, 0, inner_partial*COMP_BYTE_SIZE); + memset(sr, 0, inner_partial*COMP_BYTE_SIZE); } else /* outer partial */ { @@ -1249,7 +1249,7 @@ static bigint *partial_multiply(BI_CTX *ctx, bigint *bia, bigint *bib, memset(&sr[outer_partial], 0, (n+t-outer_partial)*COMP_BYTE_SIZE); }
- do + do { comp *a = sa; comp b = *sb++; @@ -1267,7 +1267,7 @@ static bigint *partial_multiply(BI_CTX *ctx, bigint *bia, bigint *bib,
do { - if (inner_partial && i_plus_j >= inner_partial) + if (inner_partial && i_plus_j >= inner_partial) { break; } @@ -1310,7 +1310,7 @@ bigint *bi_barrett(BI_CTX *ctx, bigint *bi) q1 = comp_right_shift(bi_clone(ctx, bi), k-1);
/* do outer partial multiply */ - q2 = partial_multiply(ctx, q1, ctx->bi_mu[mod_offset], 0, k-1); + q2 = partial_multiply(ctx, q1, ctx->bi_mu[mod_offset], 0, k-1); q3 = comp_right_shift(q2, k+1); r1 = comp_mod(bi, k+1);
@@ -1330,7 +1330,7 @@ bigint *bi_barrett(BI_CTX *ctx, bigint *bi)
#ifdef CONFIG_BIGINT_SLIDING_WINDOW /* - * Work out g1, g3, g5, g7... etc for the sliding-window algorithm + * Work out g1, g3, g5, g7... etc for the sliding-window algorithm */ static void precompute_slide_window(BI_CTX *ctx, int window, bigint *g1) { @@ -1361,7 +1361,7 @@ static void precompute_slide_window(BI_CTX *ctx, int window, bigint *g1) /** * @brief Perform a modular exponentiation. * - * This function requires bi_set_mod() to have been called previously. This is + * This function requires bi_set_mod() to have been called previously. This is * one of the optimisations used for performance. * @param ctx [in] The bigint session context. * @param bi [in] The bigint on which to perform the mod power operation. @@ -1378,7 +1378,7 @@ bigint *bi_mod_power(BI_CTX *ctx, bigint *bi, bigint *biexp) if (!ctx->use_classical) { /* preconvert */ - bi = bi_mont(ctx, + bi = bi_mont(ctx, bi_multiply(ctx, bi, ctx->bi_RR_mod_m[mod_offset])); /* x' */ bi_free(ctx, biR); biR = ctx->bi_R_mod_m[mod_offset]; /* A */ @@ -1439,7 +1439,7 @@ bigint *bi_mod_power(BI_CTX *ctx, bigint *bi, bigint *biexp) i--; } } while (i >= 0); - + /* cleanup */ for (i = 0; i < ctx->window; i++) { @@ -1479,8 +1479,8 @@ bigint *bi_mod_power2(BI_CTX *ctx, bigint *bi, bigint *bim, bigint *biexp) * doing peer verification, and so is not expensive :-) */ BI_CTX *tmp_ctx = bi_initialize(); bi_set_mod(tmp_ctx, bi_clone(tmp_ctx, bim), BIGINT_M_OFFSET); - tmp_biR = bi_mod_power(tmp_ctx, - bi_clone(tmp_ctx, bi), + tmp_biR = bi_mod_power(tmp_ctx, + bi_clone(tmp_ctx, bi), bi_clone(tmp_ctx, biexp)); biR = bi_clone(ctx, tmp_biR); bi_free(tmp_ctx, tmp_biR); diff --git a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint.h b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint.h index f5f3353..149f160 100644 --- a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint.h +++ b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint.h @@ -22,7 +22,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define BIGINT_HEADER
/* enable features based on a 'super-set' capbaility. */ -#if defined(CONFIG_SSL_FULL_MODE) +#if defined(CONFIG_SSL_FULL_MODE) #define CONFIG_SSL_ENABLE_CLIENT #define CONFIG_SSL_CERT_VERIFICATION #elif defined(CONFIG_SSL_ENABLE_CLIENT) @@ -48,7 +48,7 @@ bigint *int_to_bi(BI_CTX *ctx, comp i);
/* the functions that actually do something interesting */ bigint *bi_add(BI_CTX *ctx, bigint *bia, bigint *bib); -bigint *bi_subtract(BI_CTX *ctx, bigint *bia, +bigint *bi_subtract(BI_CTX *ctx, bigint *bia, bigint *bib, int *is_negative); bigint *bi_divide(BI_CTX *ctx, bigint *bia, bigint *bim, int is_mod); bigint *bi_multiply(BI_CTX *ctx, bigint *bia, bigint *bib); diff --git a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint_impl.h b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint_impl.h index 762a7cc..f087f11 100644 --- a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint_impl.h +++ b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/bigint_impl.h @@ -26,13 +26,13 @@ #define BIGINT_Q_OFFSET 2 /**< q module offset. */ #define BIGINT_NUM_MODS 3 /**< The number of modulus constants used. */ #else -#define BIGINT_NUM_MODS 1 +#define BIGINT_NUM_MODS 1 #endif
/* Architecture specific functions for big ints */ #ifdef WIN32 -#define COMP_RADIX 4294967296i64 -#define COMP_BIG_MSB 0x8000000000000000i64 +#define COMP_RADIX 4294967296i64 +#define COMP_BIG_MSB 0x8000000000000000i64 #else #define COMP_RADIX 4294967296ULL /**< Max component + 1 */ #define COMP_BIG_MSB 0x8000000000000000ULL /**< (Max dbl comp + 1)/ 2 */ @@ -61,7 +61,7 @@ struct _bigint typedef struct _bigint bigint; /**< An alias for _bigint */
/** - * Maintains the state of the cache, and a number of variables used in + * Maintains the state of the cache, and a number of variables used in * reduction. */ typedef struct /**< A big integer "session" context. */ diff --git a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/crypto.h b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/crypto.h index a9893cf..a2755ae 100644 --- a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/crypto.h +++ b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/crypto.h @@ -32,12 +32,12 @@ extern "C" { #include "bigint.h"
/************************************************************************** - * AES declarations + * AES declarations **************************************************************************/
#define AES_MAXROUNDS 14
-typedef struct aes_key_st +typedef struct aes_key_st { uint16_t rounds; uint16_t key_size; @@ -51,9 +51,9 @@ typedef enum AES_MODE_256 } AES_MODE;
-void AES_set_key(AES_CTX *ctx, const uint8_t *key, +void AES_set_key(AES_CTX *ctx, const uint8_t *key, const uint8_t *iv, AES_MODE mode); -void AES_cbc_encrypt(AES_CTX *ctx, const uint8_t *msg, +void AES_cbc_encrypt(AES_CTX *ctx, const uint8_t *msg, uint8_t *out, int length); void AES_cbc_decrypt(AES_CTX *ks, const uint8_t *in, uint8_t *out, int length); void AES_convert_key(AES_CTX *ctx); @@ -61,10 +61,10 @@ void AES_encrypt(const AES_CTX *ctx, uint32_t *data); void AES_decrypt(const AES_CTX *ctx, uint32_t *data);
/************************************************************************** - * RC4 declarations + * RC4 declarations **************************************************************************/
-typedef struct +typedef struct { int x, y, m[256]; } RC4_CTX; @@ -73,7 +73,7 @@ void RC4_setup(RC4_CTX *s, const uint8_t *key, int length); void RC4_crypt(RC4_CTX *s, const uint8_t *msg, uint8_t *data, int length);
/************************************************************************** - * SHA1 declarations + * SHA1 declarations **************************************************************************/
#define SHA1_SIZE 20 @@ -82,7 +82,7 @@ void RC4_crypt(RC4_CTX *s, const uint8_t *msg, uint8_t *data, int length); * This structure will hold context information for the SHA-1 * hashing operation */ -typedef struct +typedef struct { uint32_t Intermediate_Hash[SHA1_SIZE/4]; /* Message Digest */ uint32_t Length_Low; /* Message length in bits */ @@ -96,14 +96,14 @@ void SHA1Update(SHA1_CTX *, const uint8_t * msg, int len); void SHA1Final(SHA1_CTX *, uint8_t *digest);
/************************************************************************** - * MD5 declarations + * MD5 declarations **************************************************************************/
/* MD5 context. */
#define MD5_SIZE 16
-typedef struct +typedef struct { uint32_t state[4]; /* state (ABCD) */ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ @@ -115,15 +115,15 @@ void MD5Update(MD5_CTX *, const uint8_t *msg, int len); void MD5Final(MD5_CTX *, uint8_t *digest);
/************************************************************************** - * HMAC declarations + * HMAC declarations **************************************************************************/ -void hmac_md5(const uint8_t *msg, int length, const uint8_t *key, +void hmac_md5(const uint8_t *msg, int length, const uint8_t *key, int key_len, uint8_t *digest); -void hmac_sha1(const uint8_t *msg, int length, const uint8_t *key, +void hmac_sha1(const uint8_t *msg, int length, const uint8_t *key, int key_len, uint8_t *digest);
/************************************************************************** - * RNG declarations + * RNG declarations **************************************************************************/ void RNG_initialize(const uint8_t *seed_buf, int size); void RNG_terminate(void); @@ -136,10 +136,10 @@ static inline void get_random_NZ(int num_rand_bytes, uint8_t *rand_data) { }
/************************************************************************** - * RSA declarations + * RSA declarations **************************************************************************/
-typedef struct +typedef struct { bigint *m; /* modulus */ bigint *e; /* public exponent */ @@ -156,7 +156,7 @@ typedef struct BI_CTX *bi_ctx; } RSA_CTX;
-void RSA_priv_key_new(RSA_CTX **rsa_ctx, +void RSA_priv_key_new(RSA_CTX **rsa_ctx, const uint8_t *modulus, int mod_len, const uint8_t *pub_exp, int pub_len, const uint8_t *priv_exp, int priv_len @@ -168,7 +168,7 @@ void RSA_priv_key_new(RSA_CTX **rsa_ctx, const uint8_t *qInv, int qInv_len #endif ); -void RSA_pub_key_new(RSA_CTX **rsa_ctx, +void RSA_pub_key_new(RSA_CTX **rsa_ctx, const uint8_t *modulus, int mod_len, const uint8_t *pub_exp, int pub_len); void RSA_free(RSA_CTX *ctx); @@ -180,18 +180,18 @@ bigint *RSA_raw_sign_verify(RSA_CTX *c, bigint *bi_msg); bigint *RSA_sign_verify(BI_CTX *ctx, const uint8_t *sig, int sig_len, bigint *modulus, bigint *pub_exp); bigint *RSA_public(const RSA_CTX *c, bigint *bi_msg); -int RSA_encrypt(const RSA_CTX *ctx, const uint8_t *in_data, uint16_t in_len, +int RSA_encrypt(const RSA_CTX *ctx, const uint8_t *in_data, uint16_t in_len, uint8_t *out_data, int is_signing); void RSA_print(const RSA_CTX *ctx); #endif
/************************************************************************** - * ASN1 declarations + * ASN1 declarations **************************************************************************/ #define X509_OK 0 #define X509_NOT_OK -1 #define X509_VFY_ERROR_NO_TRUSTED_CERT -2 -#define X509_VFY_ERROR_BAD_SIGNATURE -3 +#define X509_VFY_ERROR_BAD_SIGNATURE -3 #define X509_VFY_ERROR_NOT_YET_VALID -4 #define X509_VFY_ERROR_EXPIRED -5 #define X509_VFY_ERROR_SELF_SIGNED -6 @@ -245,7 +245,7 @@ struct _x509_ctx typedef struct _x509_ctx X509_CTX;
#ifdef CONFIG_SSL_CERT_VERIFICATION -typedef struct +typedef struct { X509_CTX *cert[CONFIG_X509_MAX_CA_CERTS]; } CA_CERT_CTX; @@ -267,13 +267,13 @@ void x509_display_error(int error); #endif
/************************************************************************** - * MISC declarations + * MISC declarations **************************************************************************/
extern const char * const unsupported_str;
typedef void (*crypt_func)(void *, const uint8_t *, uint8_t *, int); -typedef void (*hmac_func)(const uint8_t *msg, int length, const uint8_t *key, +typedef void (*hmac_func)(const uint8_t *msg, int length, const uint8_t *key, int key_len, uint8_t *digest);
typedef struct @@ -299,4 +299,4 @@ void print_blob(const char *format, const uint8_t *data, int size, ...); } #endif
-#endif +#endif diff --git a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/os_port.h b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/os_port.h index babdbfa..738c8d1 100644 --- a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/os_port.h +++ b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/os_port.h @@ -58,4 +58,4 @@ static inline int fclose ( FILE *stream __unused ) { #define CONFIG_SSL_ENABLE_CLIENT 1 #define CONFIG_BIGINT_CLASSICAL 1
-#endif +#endif diff --git a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/rsa.c b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/rsa.c index 389eda5..fe330ce 100644 --- a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/rsa.c +++ b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/rsa.c @@ -31,7 +31,7 @@ static bigint *bi_crt(const RSA_CTX *rsa, bigint *bi); #endif
-void RSA_priv_key_new(RSA_CTX **ctx, +void RSA_priv_key_new(RSA_CTX **ctx, const uint8_t *modulus, int mod_len, const uint8_t *pub_exp, int pub_len, const uint8_t *priv_exp, int priv_len @@ -66,7 +66,7 @@ void RSA_priv_key_new(RSA_CTX **ctx, #endif }
-void RSA_pub_key_new(RSA_CTX **ctx, +void RSA_pub_key_new(RSA_CTX **ctx, const uint8_t *modulus, int mod_len, const uint8_t *pub_exp, int pub_len) { @@ -126,7 +126,7 @@ void RSA_free(RSA_CTX *rsa_ctx) * @return The number of bytes that were originally encrypted. -1 on error. * @see http://www.rsasecurity.com/rsalabs/node.asp?id=2125 */ -int RSA_decrypt(const RSA_CTX *ctx, const uint8_t *in_data, +int RSA_decrypt(const RSA_CTX *ctx, const uint8_t *in_data, uint8_t *out_data, int is_decryption) { int byte_size = ctx->num_octets; @@ -157,7 +157,7 @@ int RSA_decrypt(const RSA_CTX *ctx, const uint8_t *in_data, while (block[i++] == 0xff && i < byte_size);
if (block[i-2] != 0xff) - i = byte_size; /*ensure size is 0 */ + i = byte_size; /*ensure size is 0 */ } else /* PKCS1.5 encryption padding is random */ #endif @@ -169,7 +169,7 @@ int RSA_decrypt(const RSA_CTX *ctx, const uint8_t *in_data, /* get only the bit we want */ if (size > 0) memcpy(out_data, &block[i], size); - + free(block); return size ? size : -1; } @@ -191,7 +191,7 @@ bigint *RSA_private(const RSA_CTX *c, bigint *bi_msg) #ifdef CONFIG_BIGINT_CRT /** * Use the Chinese Remainder Theorem to quickly perform RSA decrypts. - * This should really be in bigint.c (and was at one stage), but needs + * This should really be in bigint.c (and was at one stage), but needs * access to the RSA_CTX context... */ static bigint *bi_crt(const RSA_CTX *rsa, bigint *bi) @@ -225,7 +225,7 @@ static bigint *bi_crt(const RSA_CTX *rsa, bigint *bi) /** * Used for diagnostics. */ -void RSA_print(const RSA_CTX *rsa_ctx) +void RSA_print(const RSA_CTX *rsa_ctx) { if (rsa_ctx == NULL) return; @@ -252,7 +252,7 @@ bigint *RSA_public(const RSA_CTX * c, bigint *bi_msg) * Use PKCS1.5 for encryption/signing. * see http://www.rsasecurity.com/rsalabs/node.asp?id=2125 */ -int RSA_encrypt(const RSA_CTX *ctx, const uint8_t *in_data, uint16_t in_len, +int RSA_encrypt(const RSA_CTX *ctx, const uint8_t *in_data, uint16_t in_len, uint8_t *out_data, int is_signing) { int byte_size = ctx->num_octets; @@ -267,7 +267,7 @@ int RSA_encrypt(const RSA_CTX *ctx, const uint8_t *in_data, uint16_t in_len, out_data[1] = 1; /* PKCS1.5 signing pads with "0xff"'s */ memset(&out_data[2], 0xff, num_pads_needed); } - else /* randomize the encryption padding with non-zero bytes */ + else /* randomize the encryption padding with non-zero bytes */ { out_data[1] = 2; get_random_NZ(num_pads_needed, &out_data[2]); @@ -278,7 +278,7 @@ int RSA_encrypt(const RSA_CTX *ctx, const uint8_t *in_data, uint16_t in_len,
/* now encrypt it */ dat_bi = bi_import(ctx->bi_ctx, out_data, byte_size); - encrypt_bi = is_signing ? RSA_private(ctx, dat_bi) : + encrypt_bi = is_signing ? RSA_private(ctx, dat_bi) : RSA_public(ctx, dat_bi); bi_export(ctx->bi_ctx, encrypt_bi, out_data, byte_size); return byte_size; diff --git a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/sha1.c b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/sha1.c index 9a42801..b477872 100644 --- a/qemu-0.15.x/roms/ipxe/src/crypto/axtls/sha1.c +++ b/qemu-0.15.x/roms/ipxe/src/crypto/axtls/sha1.c @@ -35,7 +35,7 @@ static void SHA1PadMessage(SHA1_CTX *ctx); static void SHA1ProcessMessageBlock(SHA1_CTX *ctx);
/** - * Initialize the SHA1 context + * Initialize the SHA1 context */ void SHA1Init(SHA1_CTX *ctx) { diff --git a/qemu-0.15.x/roms/ipxe/src/crypto/md5.c b/qemu-0.15.x/roms/ipxe/src/crypto/md5.c index ef322ad..40e28a6 100644 --- a/qemu-0.15.x/roms/ipxe/src/crypto/md5.c +++ b/qemu-0.15.x/roms/ipxe/src/crypto/md5.c @@ -1,4 +1,4 @@ -/* +/* * Cryptographic API. * * MD5 Message Digest Algorithm (RFC1321). @@ -12,10 +12,10 @@ * Copyright (c) Cryptoapi developers. * Copyright (c) 2002 James Morris jmorris@intercode.com.au * Copyright (c) 2006 Michael Brown mbrown@fensystems.co.uk - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) + * Software Foundation; either version 2 of the License, or (at your option) * any later version. * */ diff --git a/qemu-0.15.x/roms/ipxe/src/doxygen.cfg b/qemu-0.15.x/roms/ipxe/src/doxygen.cfg index 4fc9f1e..1818dd6 100644 --- a/qemu-0.15.x/roms/ipxe/src/doxygen.cfg +++ b/qemu-0.15.x/roms/ipxe/src/doxygen.cfg @@ -14,206 +14,206 @@ # Project related configuration options #---------------------------------------------------------------------------
-# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings.
DOXYFILE_ENCODING = UTF-8
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project.
PROJECT_NAME = iPXE
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used.
-PROJECT_NUMBER = +PROJECT_NUMBER =
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = @BIN@/doc
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system.
CREATE_SUBDIRS = NO
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, # Spanish, Swedish, and Ukrainian.
OUTPUT_LANGUAGE = English
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this.
BRIEF_MEMBER_DESC = YES
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed.
REPEAT_BRIEF = YES
-# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the"
-ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF =
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description.
ALWAYS_DETAILED_SEC = YES
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown.
INLINE_INHERITED_MEMB = NO
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used.
FULL_PATH_NAMES = YES
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip.
-STRIP_FROM_PATH = +STRIP_FROM_PATH =
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag.
-STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH =
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM.
SHORT_NAMES = NO
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.)
JAVADOC_AUTOBRIEF = YES
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.)
QT_AUTOBRIEF = NO
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead.
MULTILINE_CPP_IS_BRIEF = NO
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements.
INHERIT_DOCS = YES
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it.
SEPARATE_MEMBER_PAGES = NO
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments.
TAB_SIZE = 8
-# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines.
ALIASES = v=@param \ ret=@retval \ err=@exception
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc.
OPTIMIZE_OUTPUT_FOR_C = YES
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc.
OPTIMIZE_OUTPUT_JAVA = NO
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for # Fortran.
OPTIMIZE_FOR_FORTRAN = NO
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for # VHDL.
OPTIMIZE_OUTPUT_VHDL = NO
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate.
BUILTIN_STL_SUPPORT = NO @@ -223,58 +223,58 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present.
SIP_SUPPORT = NO
-# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO.
IDL_PROPERTY_SUPPORT = NO
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly.
DISTRIBUTE_GROUP_DOC = YES
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command.
SUBGROUPING = YES
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name.
TYPEDEF_HIDES_STRUCT = NO
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols
SYMBOL_CACHE_SIZE = 0 @@ -283,275 +283,275 @@ SYMBOL_CACHE_SIZE = 0 # Build related configuration options #---------------------------------------------------------------------------
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
EXTRACT_ALL = YES
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation.
EXTRACT_PRIVATE = YES
-# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation.
EXTRACT_STATIC = YES
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included.
EXTRACT_LOCAL_CLASSES = YES
-# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included.
EXTRACT_LOCAL_METHODS = NO
-# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default # anonymous namespace are hidden.
EXTRACT_ANON_NSPACES = NO
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_MEMBERS = NO
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_CLASSES = NO
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation.
HIDE_FRIEND_COMPOUNDS = NO
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block.
HIDE_IN_BODY_DOCS = NO
-# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation.
INTERNAL_DOCS = YES
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO.
CASE_SENSE_NAMES = YES
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden.
HIDE_SCOPE_NAMES = NO
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file.
SHOW_INCLUDE_FILES = YES
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members.
INLINE_INFO = YES
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order.
SORT_MEMBER_DOCS = NO
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order.
SORT_BRIEF_DOCS = NO
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order.
SORT_GROUP_NAMES = NO
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list.
SORT_BY_SCOPE_NAME = NO
-# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation.
GENERATE_TODOLIST = YES
-# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation.
GENERATE_TESTLIST = YES
-# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation.
GENERATE_BUGLIST = YES
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation.
GENERATE_DEPRECATEDLIST= YES
-# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif.
-ENABLED_SECTIONS = +ENABLED_SECTIONS =
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting.
MAX_INITIALIZER_LINES = 30
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation.
SHOW_USED_FILES = YES
-# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO.
SHOW_DIRECTORIES = YES
# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the +# This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES.
SHOW_FILES = YES
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES.
SHOW_NAMESPACES = YES
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command <command> <input-file>, where <command> is the value of -# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples.
-FILE_VERSION_FILTER = +FILE_VERSION_FILTER =
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name # of the layout file.
-LAYOUT_FILE = +LAYOUT_FILE =
#--------------------------------------------------------------------------- # configuration options related to warning and progress messages #---------------------------------------------------------------------------
-# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used.
QUIET = NO
-# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used.
WARNINGS = YES
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled.
WARN_IF_UNDOCUMENTED = YES
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly.
WARN_IF_DOC_ERROR = YES
-# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation.
WARN_NO_PARAMDOC = YES
-# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER)
-WARN_FORMAT = +WARN_FORMAT =
-# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr.
-WARN_LOGFILE = +WARN_LOGFILE =
#--------------------------------------------------------------------------- # configuration options related to the input files #---------------------------------------------------------------------------
-# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces.
INPUT = @SRCDIRS@ \ @@ -559,106 +559,106 @@ INPUT = @SRCDIRS@ \ config \ doc
-# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings.
INPUT_ENCODING = UTF-8
-# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
FILE_PATTERNS = *.c \ *.h \ *.dox
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used.
RECURSIVE = YES
-# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag.
-EXCLUDE = +EXCLUDE =
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input.
EXCLUDE_SYMLINKS = NO
-# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/*
-EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS =
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test
-EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS =
-# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command).
-EXAMPLE_PATH = +EXAMPLE_PATH =
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included.
-EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS =
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used.
EXAMPLE_RECURSIVE = NO
-# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command).
-IMAGE_PATH = +IMAGE_PATH =
-# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command <filter> <input-file>, where <filter> -# is the value of the INPUT_FILTER tag, and <input-file> is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored.
-INPUT_FILTER = +INPUT_FILTER =
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files.
-FILTER_PATTERNS = +FILTER_PATTERNS =
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES).
FILTER_SOURCE_FILES = YES @@ -667,32 +667,32 @@ FILTER_SOURCE_FILES = YES # configuration options related to source browsing #---------------------------------------------------------------------------
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO.
SOURCE_BROWSER = YES
-# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation.
INLINE_SOURCES = YES
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible.
STRIP_CODE_COMMENTS = NO
-# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed.
REFERENCED_BY_RELATION = YES
-# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed.
REFERENCES_RELATION = YES @@ -704,16 +704,16 @@ REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
-# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher.
USE_HTAGS = NO
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES @@ -722,130 +722,130 @@ VERBATIM_HEADERS = YES # configuration options related to the alphabetical class index #---------------------------------------------------------------------------
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces.
ALPHABETICAL_INDEX = YES
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20])
COLS_IN_ALPHA_INDEX = 5
-# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers.
-IGNORE_PREFIX = +IGNORE_PREFIX =
#--------------------------------------------------------------------------- # configuration options related to the HTML output #---------------------------------------------------------------------------
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output.
GENERATE_HTML = YES
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path.
-HTML_OUTPUT = +HTML_OUTPUT =
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension.
-HTML_FILE_EXTENSION = +HTML_FILE_EXTENSION =
-# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header.
-HTML_HEADER = +HTML_HEADER =
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer.
-HTML_FOOTER = +HTML_FOOTER =
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased!
-HTML_STYLESHEET = +HTML_STYLESHEET =
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used.
HTML_ALIGN_MEMBERS = YES
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
HTML_DYNAMIC_SECTIONS = YES
-# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
GENERATE_DOCSET = NO
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) # can be grouped.
DOCSET_FEEDNAME = "Doxygen generated docs"
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name.
DOCSET_BUNDLE_ID = org.doxygen.Project
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation.
GENERATE_HTMLHELP = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory.
-CHM_FILE = +CHM_FILE =
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp.
-HHC_LOCATION = +HHC_LOCATION =
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO).
GENERATE_CHI = NO @@ -854,58 +854,58 @@ GENERATE_CHI = NO # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content.
-CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING =
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file.
BINARY_TOC = NO
-# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view.
TOC_EXPAND = YES
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated # HTML documentation.
GENERATE_QHP = NO
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder.
-QCH_FILE = +QCH_FILE =
-# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see # <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>.
QHP_NAMESPACE = org.doxygen.Project
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see # <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>.
QHP_VIRTUAL_FOLDER = doc
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file .
-QHG_LOCATION = +QHG_LOCATION =
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it.
DISABLE_INDEX = NO
-# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation.
ENUM_VALUES_PER_LINE = 4 @@ -913,11 +913,11 @@ ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. Other possible values # for this tag are: HIERARCHIES, which will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list; # ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which @@ -927,16 +927,16 @@ ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NONE
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown.
TREEVIEW_WIDTH = 250
-# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated.
FORMULA_FONTSIZE = 10 @@ -945,74 +945,74 @@ FORMULA_FONTSIZE = 10 # configuration options related to the LaTeX output #---------------------------------------------------------------------------
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output.
GENERATE_LATEX = NO
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path.
-LATEX_OUTPUT = +LATEX_OUTPUT =
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name.
LATEX_CMD_NAME = latex
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name.
MAKEINDEX_CMD_NAME = makeindex
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general.
COMPACT_LATEX = YES
-# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used.
PAPER_TYPE = a4wide
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output.
-EXTRA_PACKAGES = +EXTRA_PACKAGES =
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing!
-LATEX_HEADER = +LATEX_HEADER =
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer.
PDF_HYPERLINKS = NO
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation.
USE_PDFLATEX = NO
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML.
LATEX_BATCHMODE = YES
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output.
LATEX_HIDE_INDICES = NO @@ -1021,68 +1021,68 @@ LATEX_HIDE_INDICES = NO # configuration options related to the RTF output #---------------------------------------------------------------------------
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors.
GENERATE_RTF = NO
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path.
-RTF_OUTPUT = +RTF_OUTPUT =
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general.
COMPACT_RTF = NO
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links.
RTF_HYPERLINKS = NO
-# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value.
-RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE =
-# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file.
-RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE =
#--------------------------------------------------------------------------- # configuration options related to the man page output #---------------------------------------------------------------------------
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages
GENERATE_MAN = NO
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path.
-MAN_OUTPUT = +MAN_OUTPUT =
-# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3)
-MAN_EXTENSION = +MAN_EXTENSION =
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO.
MAN_LINKS = YES @@ -1091,33 +1091,33 @@ MAN_LINKS = YES # configuration options related to the XML output #---------------------------------------------------------------------------
-# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation.
GENERATE_XML = NO
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path.
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files.
-XML_SCHEMA = +XML_SCHEMA =
-# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files.
-XML_DTD = +XML_DTD =
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output.
XML_PROGRAMLISTING = YES @@ -1126,10 +1126,10 @@ XML_PROGRAMLISTING = YES # configuration options for the AutoGen Definitions output #---------------------------------------------------------------------------
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment.
GENERATE_AUTOGEN_DEF = NO @@ -1138,89 +1138,89 @@ GENERATE_AUTOGEN_DEF = NO # configuration options related to the Perl module output #---------------------------------------------------------------------------
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment.
GENERATE_PERLMOD = NO
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output.
PERLMOD_LATEX = NO
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same.
PERLMOD_PRETTY = YES
-# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables.
-PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX =
#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #---------------------------------------------------------------------------
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files.
ENABLE_PREPROCESSING = YES
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES.
MACRO_EXPANSION = YES
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags.
EXPAND_ONLY_PREDEF = YES
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found.
SEARCH_INCLUDES = YES
-# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor.
INCLUDE_PATH = @INCDIRS@
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used.
-INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS =
-# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator.
PREDEFINED = DOXYGEN=1
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition.
EXPAND_AS_DEFINED = __attribute__ \ @@ -1231,256 +1231,256 @@ EXPAND_AS_DEFINED = __attribute__ \ __table_start \ __table_end
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed.
SKIP_FUNCTION_MACROS = YES
#--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #---------------------------------------------------------------------------
-# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here.
-TAGFILES = +TAGFILES =
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads.
-GENERATE_TAGFILE = +GENERATE_TAGFILE =
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed.
ALLEXTERNALS = NO
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed.
EXTERNAL_GROUPS = YES
-# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl').
-PERL_PATH = +PERL_PATH =
#--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #---------------------------------------------------------------------------
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs.
CLASS_DIAGRAMS = NO
-# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path.
-MSCGEN_PATH = +MSCGEN_PATH =
-# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class.
HIDE_UNDOC_RELATIONS = NO
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default)
HAVE_DOT = NO
-# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font.
DOT_FONTNAME = FreeSans
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt.
DOT_FONTSIZE = 10
-# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot # can find it using this tag.
-DOT_FONTPATH = +DOT_FONTPATH =
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO.
CLASS_GRAPH = YES
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes.
COLLABORATION_GRAPH = YES
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies
GROUP_GRAPHS = YES
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language.
UML_LOOK = NO
-# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances.
TEMPLATE_RELATIONS = YES
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files.
INCLUDE_GRAPH = YES
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file.
INCLUDED_BY_GRAPH = YES
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command.
CALL_GRAPH = NO
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command.
CALLER_GRAPH = NO
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one.
GRAPHICAL_HIERARCHY = YES
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories.
DIRECTORY_GRAPH = YES
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used.
DOT_IMAGE_FORMAT = png
-# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path.
-DOT_PATH = +DOT_PATH =
-# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command).
-DOTFILE_DIRS = +DOTFILE_DIRS =
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
DOT_GRAPH_MAX_NODES = 50
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
MAX_DOT_GRAPH_DEPTH = 0
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read).
DOT_TRANSPARENT = NO
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default.
DOT_MULTI_TARGETS = NO
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs.
GENERATE_LEGEND = YES
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs.
DOT_CLEANUP = YES
#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine +# Configuration::additions related to the search engine #---------------------------------------------------------------------------
-# The SEARCHENGINE tag specifies whether or not a search engine should be +# The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored.
SEARCHENGINE = NO diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/bitbash/bitbash.c b/qemu-0.15.x/roms/ipxe/src/drivers/bitbash/bitbash.c index ac91407..fff3814 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/bitbash/bitbash.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/bitbash/bitbash.c @@ -32,7 +32,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); * @v basher Bit-bashing interface * @v bit_id Bit number * @v data Value to write - * + * * If @c data is 0, a logic 0 will be written. If @c data is * non-zero, a logic 1 will be written. */ diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/bitbash/spi_bit.c b/qemu-0.15.x/roms/ipxe/src/drivers/bitbash/spi_bit.c index b64ffb8..247d3e1 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/bitbash/spi_bit.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/bitbash/spi_bit.c @@ -166,7 +166,7 @@ static int spi_bit_rw ( struct spi_bus *bus, struct spi_device *device, spi_bit_set_slave_select ( spibit, device->slave, DESELECT_SLAVE );
/* Set clock line to idle state */ - write_bit ( &spibit->basher, SPI_BIT_SCLK, + write_bit ( &spibit->basher, SPI_BIT_SCLK, ( bus->mode & SPI_MODE_CPOL ) );
/* Assert chip select on specified slave */ diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/bus/isa_ids.c b/qemu-0.15.x/roms/ipxe/src/drivers/bus/isa_ids.c index e72b233..d209e7f 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/bus/isa_ids.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/bus/isa_ids.c @@ -3,7 +3,7 @@ #include <byteswap.h> #include <ipxe/isa_ids.h>
-/* +/* * EISA and ISAPnP IDs are actually mildly human readable, though in a * somewhat brain-damaged way. * diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/bus/pci.c b/qemu-0.15.x/roms/ipxe/src/drivers/bus/pci.c index 3ae17e5..1db212b 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/bus/pci.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/bus/pci.c @@ -120,7 +120,7 @@ static void pci_read_bases ( struct pci_device *pci ) { bar = pci_bar ( pci, reg ); if ( bar & PCI_BASE_ADDRESS_SPACE_IO ) { if ( ! pci->ioaddr ) - pci->ioaddr = + pci->ioaddr = ( bar & PCI_BASE_ADDRESS_IO_MASK ); } else { if ( ! pci->membase ) diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/MT25218_PRM.h b/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/MT25218_PRM.h index 4011bd0..a997925 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/MT25218_PRM.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/MT25218_PRM.h @@ -46,7 +46,7 @@ struct arbelprm_ud_address_vector_st { /* Little Endian */ pseudo_bit_t reserved1[0x00008]; /* -------------- */ pseudo_bit_t hop_limit[0x00008]; /* IPv6 hop limit */ - pseudo_bit_t max_stat_rate[0x00003];/* Maximum static rate control. + pseudo_bit_t max_stat_rate[0x00003];/* Maximum static rate control. 0 - 4X injection rate 1 - 1X injection rate other - reserved @@ -73,7 +73,7 @@ struct arbelprm_ud_address_vector_st { /* Little Endian */ /* -------------- */ pseudo_bit_t rgid_31_0[0x00020]; /* Remote GID[31:0] if G bit is set. Must be set to 0x2 if G bit is cleared. */ /* -------------- */ -}; +};
/* Send doorbell */
@@ -88,7 +88,7 @@ struct arbelprm_send_doorbell_st { /* Little Endian */ pseudo_bit_t reserved1[0x00002]; pseudo_bit_t qpn[0x00018]; /* QP number this doorbell is rung on */ /* -------------- */ -}; +};
/* ACCESS_LAM_inject_errors_input_modifier */
@@ -102,7 +102,7 @@ struct arbelprm_access_lam_inject_errors_input_modifier_st { /* Little Endian */ pseudo_bit_t index0[0x00007]; pseudo_bit_t q0[0x00001]; /* -------------- */ -}; +};
/* ACCESS_LAM_inject_errors_input_parameter */
@@ -114,7 +114,7 @@ struct arbelprm_access_lam_inject_errors_input_parameter_st { /* Little Endian * pseudo_bit_t ra[0x00010]; /* Row Address */ pseudo_bit_t ca[0x00010]; /* Column Address */ /* -------------- */ -}; +};
/* */
@@ -122,12 +122,12 @@ struct arbelprm_recv_wqe_segment_next_st { /* Little Endian */ pseudo_bit_t reserved0[0x00006]; pseudo_bit_t nda_31_6[0x0001a]; /* Next WQE address, low 32 bit. WQE address must be aligned to 64-byte boundary (6 LSB are forced ZERO). */ /* -------------- */ - pseudo_bit_t nds[0x00006]; /* Next WQE size in OctoWords (16 bytes). + pseudo_bit_t nds[0x00006]; /* Next WQE size in OctoWords (16 bytes). Zero value in NDS field signals end of WQEs? chain. */ pseudo_bit_t reserved1[0x0001a]; /* -------------- */ -}; +};
/* Send wqe segment data inline */
@@ -141,7 +141,7 @@ struct arbelprm_wqe_segment_data_inline_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x00040]; /* -------------- */ -}; +};
/* Send wqe segment data ptr */
@@ -155,7 +155,7 @@ struct arbelprm_wqe_segment_data_ptr_st { /* Little Endian */ /* -------------- */ pseudo_bit_t local_address_l[0x00020]; /* -------------- */ -}; +};
/* Send wqe segment rd */
@@ -167,7 +167,7 @@ struct arbelprm_local_invalidate_segment_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x000a0]; /* -------------- */ -}; +};
/* Fast_Registration_Segment */
@@ -197,7 +197,7 @@ struct arbelprm_fast_registration_segment_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reg_len_l[0x00020]; /* Region Length[31:0] */ /* -------------- */ -}; +};
/* Send wqe segment atomic */
@@ -210,7 +210,7 @@ struct arbelprm_wqe_segment_atomic_st { /* Little Endian */ /* -------------- */ pseudo_bit_t compare_l[0x00020]; /* -------------- */ -}; +};
/* Send wqe segment remote address */
@@ -223,7 +223,7 @@ struct arbelprm_wqe_segment_remote_address_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved0[0x00020]; /* -------------- */ -}; +};
/* end wqe segment bind */
@@ -253,7 +253,7 @@ struct arbelprm_wqe_segment_bind_st { /* Little Endian */ /* -------------- */ pseudo_bit_t length_l[0x00020]; /* -------------- */ -}; +};
/* Send wqe segment ud */
@@ -267,7 +267,7 @@ struct arbelprm_wqe_segment_ud_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00040]; /* -------------- */ -}; +};
/* Send wqe segment rd */
@@ -279,7 +279,7 @@ struct arbelprm_wqe_segment_rd_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00040]; /* -------------- */ -}; +};
/* Send wqe segment ctrl */
@@ -296,7 +296,7 @@ struct arbelprm_wqe_segment_ctrl_send_st { /* Little Endian */ /* -------------- */ pseudo_bit_t immediate[0x00020]; /* If the OpCode encodes an operation with Immediate (RDMA-write/SEND), This field will hold the Immediate data to be sent. If the OpCode encodes send and invalidate operations, this field holds the Invalidation key to be inserted into the packet; otherwise, this field is reserved. */ /* -------------- */ -}; +};
/* Send wqe segment next */
@@ -304,41 +304,41 @@ struct arbelprm_wqe_segment_next_st { /* Little Endian */ pseudo_bit_t nopcode[0x00005]; /* Next Opcode: OpCode to be used in the next WQE. Encodes the type of operation to be executed on the QP: ?00000? - NOP. WQE with this opcode creates a completion, but does nothing else ?01000? - RDMA-write - ?01001? - RDMA-Write with Immediate - ?10000? - RDMA-read + ?01001? - RDMA-Write with Immediate + ?10000? - RDMA-read ?10001? - Atomic Compare & swap ?10010? - Atomic Fetch & Add ?11000? - Bind memory window - + The encoding for the following operations depends on the QP type: For RC, UC and RD QP: ?01010? - SEND ?01011? - SEND with Immediate - - For UD QP: + + For UD QP: the encoding depends on the values of bit[31] of the Q_key field in the Datagram Segment (see Table 39, ?Unreliable Datagram Segment Format - Pointers,? on page 101) of both the current WQE and the next WQE, as follows: - + If the last WQE Q_Key bit[31] is clear and the next WQE Q_key bit[31] is set : ?01000? - SEND ?01001? - SEND with Immediate - + otherwise (if the next WQE Q_key bit[31] is cleared, or the last WQE Q_Key bit[31] is set): ?01010? - SEND ?01011? - SEND with Immediate - + All other opcode values are RESERVED, and will result in invalid operation execution. */ pseudo_bit_t reserved0[0x00001]; pseudo_bit_t nda_31_6[0x0001a]; /* Next WQE address, low 32 bit. WQE address must be aligned to 64-byte boundary (6 LSB are forced ZERO). */ /* -------------- */ - pseudo_bit_t nds[0x00006]; /* Next WQE size in OctoWords (16 bytes). + pseudo_bit_t nds[0x00006]; /* Next WQE size in OctoWords (16 bytes). Zero value in NDS field signals end of WQEs? chain. */ pseudo_bit_t f[0x00001]; /* Fence bit. If set, next WQE will start execution only after all previous Read/Atomic WQEs complete. */ pseudo_bit_t always1[0x00001]; pseudo_bit_t reserved1[0x00018]; /* -------------- */ -}; +};
/* Address Path */
@@ -360,8 +360,8 @@ struct arbelprm_address_path_st { /* Little Endian */ 7 - infinite */ /* -------------- */ pseudo_bit_t hop_limit[0x00008]; /* IPv6 hop limit */ - pseudo_bit_t max_stat_rate[0x00003];/* Maximum static rate control. - 0 - 100% injection rate + pseudo_bit_t max_stat_rate[0x00003];/* Maximum static rate control. + 0 - 100% injection rate 1 - 25% injection rate 2 - 12.5% injection rate 3 - 50% injection rate @@ -384,7 +384,7 @@ struct arbelprm_address_path_st { /* Little Endian */ /* -------------- */ pseudo_bit_t rgid_31_0[0x00020]; /* Remote GID[31:0] */ /* -------------- */ -}; +};
/* HCA Command Register (HCR) */
@@ -414,7 +414,7 @@ struct arbelprm_hca_command_register_st { /* Little Endian */ pseudo_bit_t status[0x00008]; /* Command execution status report. Valid only if command interface in under SW ownership (Go bit is cleared) 0 - command completed without error. If different than zero, command execution completed with error. Syndrom encoding is depended on command executed and is defined for each command */ /* -------------- */ -}; +};
/* CQ Doorbell */
@@ -428,14 +428,14 @@ struct arbelprm_cq_cmd_doorbell_st { /* Little Endian */ Other - Reserved */ pseudo_bit_t reserved0[0x00001]; pseudo_bit_t cmd_sn[0x00002]; /* Command Sequence Number - This field should be incremented upon receiving completion notification of the respective CQ. - This transition is done by ringing Request notification for next Solicited, Request notification for next Solicited or Unsolicited + This transition is done by ringing Request notification for next Solicited, Request notification for next Solicited or Unsolicited completion or Request notification for multiple completions doorbells after receiving completion notification. This field is initialized to Zero */ pseudo_bit_t reserved1[0x00002]; /* -------------- */ pseudo_bit_t cq_param[0x00020]; /* parameter to be used by CQ command */ /* -------------- */ -}; +};
/* RD-send doorbell */
@@ -449,7 +449,7 @@ struct arbelprm_rd_send_doorbell_st { /* Little Endian */ /* -------------- */ struct arbelprm_send_doorbell_st send_doorbell;/* Send Parameters */ /* -------------- */ -}; +};
/* Multicast Group Member QP */
@@ -458,7 +458,7 @@ struct arbelprm_mgmqp_st { /* Little Endian */ pseudo_bit_t reserved0[0x00007]; pseudo_bit_t qi[0x00001]; /* Qi: QPN_i is valid */ /* -------------- */ -}; +};
/* vsd */
@@ -575,7 +575,7 @@ struct arbelprm_vsd_st { /* Little Endian */ /* -------------- */ pseudo_bit_t vsd_dw55[0x00020]; /* -------------- */ -}; +};
/* ACCESS_LAM_inject_errors */
@@ -586,7 +586,7 @@ struct arbelprm_access_lam_inject_errors_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved0[0x00020]; /* -------------- */ -}; +};
/* Logical DIMM Information */
@@ -605,7 +605,7 @@ struct arbelprm_dimminfo_st { /* Little Endian */ /* -------------- */ pseudo_bit_t spd[0x00001]; /* 0 - DIMM SPD was read from DIMM 1 - DIMM SPD was read from InfiniHost-III-EX NVMEM */ - pseudo_bit_t sladr[0x00003]; /* SPD Slave Address 3 LSBits. + pseudo_bit_t sladr[0x00003]; /* SPD Slave Address 3 LSBits. Valid only if spd bit is 0. */ pseudo_bit_t sock_num[0x00002]; /* DIMM socket number (for double sided DIMM one of the two numbers will be reported) */ pseudo_bit_t syn[0x00004]; /* Error syndrome (valid regardless of status value) @@ -626,7 +626,7 @@ struct arbelprm_dimminfo_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved4[0x00040]; /* -------------- */ -}; +};
/* UAR Parameters */
@@ -650,7 +650,7 @@ struct arbelprm_uar_params_st { /* Little Endian */ Table must be aligned to its size */ /* -------------- */ pseudo_bit_t uar_scratch_base_addr_l[0x00020];/* Base address of UAR scratchpad [31:0]. - Number of entries in table is 2^log_max_uars. + Number of entries in table is 2^log_max_uars. Table must be aligned to its size. */ /* -------------- */ pseudo_bit_t uar_context_base_addr_h[0x00020];/* Base address of UAR Context [63:32]. @@ -658,10 +658,10 @@ struct arbelprm_uar_params_st { /* Little Endian */ Table must be aligned to its size. */ /* -------------- */ pseudo_bit_t uar_context_base_addr_l[0x00020];/* Base address of UAR Context [31:0]. - Number of entries in table is 2^log_max_uars. + Number of entries in table is 2^log_max_uars. Table must be aligned to its size. */ /* -------------- */ -}; +};
/* Translation and Protection Tables Parameters */
@@ -678,7 +678,7 @@ struct arbelprm_tptparams_st { /* Little Endian */ /* -------------- */ pseudo_bit_t log_mpt_sz[0x00006]; /* Log (base 2) of the number of region/windows entries in the MPT table. */ pseudo_bit_t reserved0[0x00002]; - pseudo_bit_t pfto[0x00005]; /* Page Fault RNR Timeout - + pseudo_bit_t pfto[0x00005]; /* Page Fault RNR Timeout - The field returned in RNR Naks generated when a page fault is detected. It has no effect when on-demand-paging is not used. */ pseudo_bit_t reserved1[0x00013]; @@ -695,7 +695,7 @@ struct arbelprm_tptparams_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved3[0x00040]; /* -------------- */ -}; +};
/* Multicast Support Parameters */
@@ -704,14 +704,14 @@ struct arbelprm_multicastparam_st { /* Little Endian */ The base address must be aligned to the entry size. Address may be set to 0xFFFFFFFF if multicast is not supported. */ /* -------------- */ - pseudo_bit_t mc_base_addr_l[0x00020];/* Base Address of the Multicast Table [31:0]. + pseudo_bit_t mc_base_addr_l[0x00020];/* Base Address of the Multicast Table [31:0]. The base address must be aligned to the entry size. Address may be set to 0xFFFFFFFF if multicast is not supported. */ /* -------------- */ pseudo_bit_t reserved0[0x00040]; /* -------------- */ pseudo_bit_t log_mc_table_entry_sz[0x00010];/* Log2 of the Size of multicast group member (MGM) entry. - Must be greater than 5 (to allow CTRL and GID sections). + Must be greater than 5 (to allow CTRL and GID sections). That implies the number of QPs per MC table entry. */ pseudo_bit_t reserved1[0x00010]; /* -------------- */ @@ -729,7 +729,7 @@ struct arbelprm_multicastparam_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved5[0x00020]; /* -------------- */ -}; +};
/* QPC/EEC/CQC/EQC/RDB Parameters */
@@ -810,18 +810,18 @@ struct arbelprm_qpcbaseaddr_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved9[0x00040]; /* -------------- */ - pseudo_bit_t rdb_base_addr_h[0x00020];/* Base address of table that holds remote read and remote atomic requests [63:32]. + pseudo_bit_t rdb_base_addr_h[0x00020];/* Base address of table that holds remote read and remote atomic requests [63:32]. Address may be set to 0xFFFFFFFF if remote RDMA reads are not supported. Please refer to QP and EE chapter for further explanation on RDB allocation. */ /* -------------- */ - pseudo_bit_t rdb_base_addr_l[0x00020];/* Base address of table that holds remote read and remote atomic requests [31:0]. + pseudo_bit_t rdb_base_addr_l[0x00020];/* Base address of table that holds remote read and remote atomic requests [31:0]. Table must be aligned to RDB entry size (32 bytes). Address may be set to zero if remote RDMA reads are not supported. Please refer to QP and EE chapter for further explanation on RDB allocation. */ /* -------------- */ pseudo_bit_t reserved10[0x00040]; /* -------------- */ -}; +};
/* Header_Log_Register */
@@ -830,7 +830,7 @@ struct arbelprm_header_log_register_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved0[0x00060]; /* -------------- */ -}; +};
/* Performance Monitors */
@@ -862,7 +862,7 @@ struct arbelprm_performance_monitors_st { /* Little Endian */ /* -------------- */ pseudo_bit_t event_counter2[0x00020];/* Read/write event counter, counting events specified by EvCntl and EvCnt2 fields repsectively. When the event counter reaches is maximum value of 0xFFFFFF, the next event will cause it to roll over to zero, set F1 or F2 bit respectively and generate interrupt by I1 I2 bit respectively. */ /* -------------- */ -}; +};
/* Receive segment format */
@@ -876,7 +876,7 @@ struct arbelprm_wqe_segment_ctrl_recv_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved4[0x00020]; /* -------------- */ -}; +};
/* MLX WQE segment format */
@@ -895,7 +895,7 @@ struct arbelprm_wqe_segment_ctrl_mlx_st { /* Little Endian */ pseudo_bit_t vcrc[0x00010]; /* Packet's VCRC (if not 0 - otherwise computed by HW) */ pseudo_bit_t rlid[0x00010]; /* Destination LID (must match given headers) */ /* -------------- */ -}; +};
/* Send WQE segment format */
@@ -926,7 +926,7 @@ struct arbelprm_send_wqe_segment_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00200]; /* -------------- */ -}; +};
/* QP and EE Context Entry */
@@ -944,7 +944,7 @@ struct arbelprm_queue_pair_ee_context_entry_st { /* Little Endian */ pseudo_bit_t st[0x00003]; /* Service type (invalid in EE context): 000-Reliable Connection 001-Unreliable Connection - 010-Reliable Datagram + 010-Reliable Datagram 011-Unreliable Datagram 111-MLX transport (raw bits injection). Used for management QPs and RAW */ pseudo_bit_t reserved3[0x00009]; @@ -983,7 +983,7 @@ struct arbelprm_queue_pair_ee_context_entry_st { /* Little Endian */ 0x3 - 1024 0x4 - 2048 other - reserved - + Should be configured to 0x4 for UD and MLX QPs. */ /* -------------- */ pseudo_bit_t usr_page[0x00018]; /* QP (see "non_privileged Access to the HCA Hardware"). Not valid (reserved) in EE context. */ @@ -1008,15 +1008,15 @@ struct arbelprm_queue_pair_ee_context_entry_st { /* Little Endian */ pseudo_bit_t pd[0x00018]; /* QP protection domain. Not valid (reserved) in EE context. */ pseudo_bit_t reserved13[0x00008]; /* -------------- */ - pseudo_bit_t wqe_base_adr_h[0x00020];/* Bits 63:32 of WQE address for both SQ and RQ. + pseudo_bit_t wqe_base_adr_h[0x00020];/* Bits 63:32 of WQE address for both SQ and RQ. Reserved for EE context. */ /* -------------- */ pseudo_bit_t wqe_lkey[0x00020]; /* memory key (L-Key) to be used to access WQEs. Not valid (reserved) in EE context. */ /* -------------- */ pseudo_bit_t reserved14[0x00003]; pseudo_bit_t ssc[0x00001]; /* Send Signaled Completion - 1 - all send WQEs generate CQEs. - 0 - only send WQEs with C bit set generate completion. + 1 - all send WQEs generate CQEs. + 0 - only send WQEs with C bit set generate completion. Not valid (reserved) in EE context. */ pseudo_bit_t sic[0x00001]; /* If set - Ignore end to end credits on send queue. Not valid (reserved) in EE context. */ pseudo_bit_t cur_retry_cnt[0x00003];/* Current transport retry counter (QUERY_QPEE only). @@ -1031,8 +1031,8 @@ struct arbelprm_queue_pair_ee_context_entry_st { /* Little Endian */ pseudo_bit_t retry_count[0x00003]; /* Transport timeout Retry count */ pseudo_bit_t reserved16[0x00002]; pseudo_bit_t sra_max[0x00003]; /* Maximum number of outstanding RDMA-read/Atomic operations allowed in the send queue. Maximum number is 2^SRA_Max. Must be zero in EE context. */ - pseudo_bit_t flight_lim[0x00004]; /* Number of outstanding (in-flight) messages on the wire allowed for this send queue. - Number of outstanding messages is 2^Flight_Lim. + pseudo_bit_t flight_lim[0x00004]; /* Number of outstanding (in-flight) messages on the wire allowed for this send queue. + Number of outstanding messages is 2^Flight_Lim. Use 0xF for unlimited number of outstanding messages. */ pseudo_bit_t ack_req_freq[0x00004]; /* ACK required frequency. ACK required bit will be set in every 2^AckReqFreq packets at least. Not valid for RD QP. */ /* -------------- */ @@ -1059,11 +1059,11 @@ struct arbelprm_queue_pair_ee_context_entry_st { /* Little Endian */ pseudo_bit_t reserved22[0x00008]; /* -------------- */ pseudo_bit_t reserved23[0x00003]; - pseudo_bit_t rsc[0x00001]; /* 1 - all receive WQEs generate CQEs. - 0 - only receive WQEs with C bit set generate completion. + pseudo_bit_t rsc[0x00001]; /* 1 - all receive WQEs generate CQEs. + 0 - only receive WQEs with C bit set generate completion. Not valid (reserved) in EE context. */ - pseudo_bit_t ric[0x00001]; /* Invalid Credits. + pseudo_bit_t ric[0x00001]; /* Invalid Credits. 1 - place "Invalid Credits" to ACKs sent from this queue. 0 - ACKs report the actual number of end to end credits on the connection. Not valid (reserved) in EE context. @@ -1073,17 +1073,17 @@ struct arbelprm_queue_pair_ee_context_entry_st { /* Little Endian */ pseudo_bit_t rwe[0x00001]; /* If set - RDMA - write enabled on receive queue. Not valid (reserved) in EE context. */ pseudo_bit_t rre[0x00001]; /* If set - RDMA - read enabled on receive queue. Not valid (reserved) in EE context. */ pseudo_bit_t reserved25[0x00005]; - pseudo_bit_t rra_max[0x00003]; /* Maximum number of outstanding RDMA-read/Atomic operations allowed on receive queue is 2^RRA_Max. + pseudo_bit_t rra_max[0x00003]; /* Maximum number of outstanding RDMA-read/Atomic operations allowed on receive queue is 2^RRA_Max. Must be 0 for EE context. */ pseudo_bit_t reserved26[0x00008]; /* -------------- */ pseudo_bit_t next_rcv_psn[0x00018]; /* Next (expected) PSN on receive */ - pseudo_bit_t min_rnr_nak[0x00005]; /* Minimum RNR NAK timer value (TTTTT field encoding according to the IB spec Vol1 9.7.5.2.8). + pseudo_bit_t min_rnr_nak[0x00005]; /* Minimum RNR NAK timer value (TTTTT field encoding according to the IB spec Vol1 9.7.5.2.8). Not valid (reserved) in EE context. */ pseudo_bit_t reserved27[0x00003]; /* -------------- */ pseudo_bit_t reserved28[0x00005]; - pseudo_bit_t ra_buff_indx[0x0001b]; /* Index to outstanding read/atomic buffer. + pseudo_bit_t ra_buff_indx[0x0001b]; /* Index to outstanding read/atomic buffer. This field constructs the address to the RDB for maintaining the incoming RDMA read and atomic requests. */ /* -------------- */ pseudo_bit_t cqn_rcv[0x00018]; /* CQ number completions from receive queue to be reported to. Not valid (reserved) in EE context. */ @@ -1092,7 +1092,7 @@ struct arbelprm_queue_pair_ee_context_entry_st { /* Little Endian */ pseudo_bit_t reserved30[0x00006]; pseudo_bit_t rcv_wqe_base_adr_l[0x0001a];/* While opening (creating) the WQ, this field should contain the address of first descriptor to be posted. Not valid (reserved) in EE context. */ /* -------------- */ - pseudo_bit_t rcv_db_record_index[0x00020];/* Index in the UAR Context Table Entry containing the doorbell record for the receive queue. + pseudo_bit_t rcv_db_record_index[0x00020];/* Index in the UAR Context Table Entry containing the doorbell record for the receive queue. HW uses this index as an offset from the UAR Context Table Entry in order to read this RQ doorbell record. The entry is obtained via the usr_page field. Not valid for EE. */ @@ -1101,7 +1101,7 @@ struct arbelprm_queue_pair_ee_context_entry_st { /* Little Endian */ On send datagrams, if Q_Key[31] specified in the WQE is set, then this Q_Key will be transmitted in the outgoing message. Not valid (reserved) in EE context. */ /* -------------- */ - pseudo_bit_t srqn[0x00018]; /* SRQN - Shared Receive Queue Number - specifies the SRQ number from which the QP dequeues receive descriptors. + pseudo_bit_t srqn[0x00018]; /* SRQN - Shared Receive Queue Number - specifies the SRQ number from which the QP dequeues receive descriptors. SRQN is valid only if SRQ bit is set. Not valid (reserved) in EE context. */ pseudo_bit_t srq[0x00001]; /* SRQ - Shared Receive Queue. If this bit is set, then the QP is associated with a SRQ. Not valid (reserved) in EE context. */ pseudo_bit_t reserved31[0x00007]; @@ -1118,21 +1118,21 @@ struct arbelprm_queue_pair_ee_context_entry_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved33[0x00040]; /* -------------- */ -}; +};
/* Clear Interrupt [63:0] */
struct arbelprm_clr_int_st { /* Little Endian */ pseudo_bit_t clr_int_h[0x00020]; /* Clear Interrupt [63:32] - Write transactions to this register will clear (de-assert) the virtual interrupt output pins of InfiniHost-III-EX. The value to be written in this register is obtained by executing QUERY_ADAPTER command on command interface after system boot. + Write transactions to this register will clear (de-assert) the virtual interrupt output pins of InfiniHost-III-EX. The value to be written in this register is obtained by executing QUERY_ADAPTER command on command interface after system boot. This register is write-only. Reading from this register will cause undefined result */ /* -------------- */ pseudo_bit_t clr_int_l[0x00020]; /* Clear Interrupt [31:0] - Write transactions to this register will clear (de-assert) the virtual interrupt output pins of InfiniHost-III-EX. The value to be written in this register is obtained by executing QUERY_ADAPTER command on command interface after system boot. + Write transactions to this register will clear (de-assert) the virtual interrupt output pins of InfiniHost-III-EX. The value to be written in this register is obtained by executing QUERY_ADAPTER command on command interface after system boot. This register is write-only. Reading from this register will cause undefined result */ /* -------------- */ -}; +};
/* EQ_Arm_DB_Region */
@@ -1143,7 +1143,7 @@ struct arbelprm_eq_arm_db_region_st { /* Little Endian */ pseudo_bit_t eq_x_arm_l[0x00020]; /* EQ[31:0] X state. This register is used to Arm EQs when setting the appropriate bits. */ /* -------------- */ -}; +};
/* EQ Set CI DBs Table */
@@ -1404,7 +1404,7 @@ struct arbelprm_eq_set_ci_table_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved63[0x00020]; /* -------------- */ -}; +};
/* InfiniHost-III-EX Configuration Registers */
@@ -1415,7 +1415,7 @@ struct arbelprm_configuration_registers_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x3fcb20]; /* -------------- */ -}; +};
/* QP_DB_Record */
@@ -1425,11 +1425,11 @@ struct arbelprm_qp_db_record_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00005]; pseudo_bit_t res[0x00003]; /* 0x3 for SQ - 0x4 for RQ + 0x4 for RQ 0x5 for SRQ */ pseudo_bit_t qp_number[0x00018]; /* QP number */ /* -------------- */ -}; +};
/* CQ_ARM_DB_Record */
@@ -1445,7 +1445,7 @@ struct arbelprm_cq_arm_db_record_st { /* Little Endian */ pseudo_bit_t res[0x00003]; /* Must be 0x2 */ pseudo_bit_t cq_number[0x00018]; /* CQ number */ /* -------------- */ -}; +};
/* CQ_CI_DB_Record */
@@ -1456,7 +1456,7 @@ struct arbelprm_cq_ci_db_record_st { /* Little Endian */ pseudo_bit_t res[0x00003]; /* Must be 0x1 */ pseudo_bit_t cq_number[0x00018]; /* CQ number */ /* -------------- */ -}; +};
/* Virtual_Physical_Mapping */
@@ -1472,7 +1472,7 @@ struct arbelprm_virtual_physical_mapping_st { /* Little Endian */ pseudo_bit_t reserved1[0x00006]; pseudo_bit_t pa_l[0x00014]; /* Physical Address[31:12] */ /* -------------- */ -}; +};
/* MOD_STAT_CFG */
@@ -1485,7 +1485,7 @@ struct arbelprm_mod_stat_cfg_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x007e0]; /* -------------- */ -}; +};
/* SRQ Context */
@@ -1501,7 +1501,7 @@ struct arbelprm_srq_context_st { /* Little Endian */ /* -------------- */ pseudo_bit_t l_key[0x00020]; /* memory key (L-Key) to be used to access WQEs. */ /* -------------- */ - pseudo_bit_t srq_db_record_index[0x00020];/* Index in the UAR Context Table Entry containing the doorbell record for the receive queue. + pseudo_bit_t srq_db_record_index[0x00020];/* Index in the UAR Context Table Entry containing the doorbell record for the receive queue. HW uses this index as an offset from the UAR Context Table Entry in order to read this SRQ doorbell record. The entry is obtained via the usr_page field. */ /* -------------- */ @@ -1528,7 +1528,7 @@ struct arbelprm_srq_context_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved4[0x00060]; /* -------------- */ -}; +};
/* PBL */
@@ -1549,7 +1549,7 @@ struct arbelprm_pbl_st { /* Little Endian */ /* -------------- */ pseudo_bit_t mtt_3_l[0x00020]; /* Fourth MTT[31:0] */ /* -------------- */ -}; +};
/* Performance Counters */
@@ -1580,7 +1580,7 @@ struct arbelprm_performance_counters_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved3[0x00620]; /* -------------- */ -}; +};
/* Transport and CI Error Counters */
@@ -1601,10 +1601,10 @@ struct arbelprm_transport_and_ci_error_counters_st { /* Little Endian */ /* -------------- */ pseudo_bit_t sq_num_lpe[0x00020]; /* Requester - number of local protection errors */ /* -------------- */ - pseudo_bit_t rq_num_wrfe[0x00020]; /* Responder - number of CQEs with error. + pseudo_bit_t rq_num_wrfe[0x00020]; /* Responder - number of CQEs with error. Incremented each time a CQE with error is generated */ /* -------------- */ - pseudo_bit_t sq_num_wrfe[0x00020]; /* Requester - number of CQEs with error. + pseudo_bit_t sq_num_wrfe[0x00020]; /* Requester - number of CQEs with error. Incremented each time a CQE with error is generated */ /* -------------- */ pseudo_bit_t reserved0[0x00020]; @@ -1724,7 +1724,7 @@ struct arbelprm_transport_and_ci_error_counters_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved12[0x002a0]; /* -------------- */ -}; +};
/* Event_data Field - HCR Completion Event */
@@ -1743,7 +1743,7 @@ struct arbelprm_hcr_completion_event_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved3[0x00020]; /* -------------- */ -}; +};
/* Completion with Error CQE */
@@ -1760,7 +1760,7 @@ struct arbelprm_completion_with_error_st { /* Little Endian */ 0x02 - Local QP Operation Error 0x03 - Local EE Context Operation Error 0x04 - Local Protection Error - 0x05 - Work Request Flushed Error + 0x05 - Work Request Flushed Error 0x06 - Memory Window Bind Error 0x10 - Bad Response Error 0x11 - Local Access Error @@ -1786,22 +1786,22 @@ struct arbelprm_completion_with_error_st { /* Little Endian */ pseudo_bit_t owner[0x00001]; /* Owner field. Zero value of this field means SW ownership of CQE. */ pseudo_bit_t reserved6[0x00010]; pseudo_bit_t opcode[0x00008]; /* The opcode of WQE completion is reported for. - + The following values are reported in case of completion with error: 0xFE - For completion with error on Receive Queues 0xFF - For completion with error on Send Queues */ /* -------------- */ -}; +};
/* Resize CQ Input Mailbox */
struct arbelprm_resize_cq_st { /* Little Endian */ pseudo_bit_t reserved0[0x00020]; /* -------------- */ - pseudo_bit_t start_addr_h[0x00020]; /* Start address of CQ[63:32]. + pseudo_bit_t start_addr_h[0x00020]; /* Start address of CQ[63:32]. Must be aligned on CQE size (32 bytes) */ /* -------------- */ - pseudo_bit_t start_addr_l[0x00020]; /* Start address of CQ[31:0]. + pseudo_bit_t start_addr_l[0x00020]; /* Start address of CQ[31:0]. Must be aligned on CQE size (32 bytes) */ /* -------------- */ pseudo_bit_t reserved1[0x00018]; @@ -1814,7 +1814,7 @@ struct arbelprm_resize_cq_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved4[0x00100]; /* -------------- */ -}; +};
/* MAD_IFC Input Modifier */
@@ -1826,14 +1826,14 @@ struct arbelprm_mad_ifc_input_modifier_st { /* Little Endian */ pseudo_bit_t rlid[0x00010]; /* Remote (source) LID from the received MAD. This field is required for trap generation upon MKey/BKey validation. */ /* -------------- */ -}; +};
/* MAD_IFC Input Mailbox */
struct arbelprm_mad_ifc_st { /* Little Endian */ pseudo_bit_t request_mad_packet[64][0x00020];/* Request MAD Packet (256bytes) */ /* -------------- */ - pseudo_bit_t my_qpn[0x00018]; /* Destination QP number from the received MAD. + pseudo_bit_t my_qpn[0x00018]; /* Destination QP number from the received MAD. This field is reserved if Mad_extended_info indication in the input modifier is clear. */ pseudo_bit_t reserved0[0x00008]; /* -------------- */ @@ -1845,25 +1845,25 @@ struct arbelprm_mad_ifc_st { /* Little Endian */ This field is reserved if Mad_extended_info indication in the input modifier is clear. */ pseudo_bit_t ml_path[0x00007]; /* My (destination) LID path bits from the received MAD. This field is reserved if Mad_extended_info indication in the input modifier is clear. */ - pseudo_bit_t g[0x00001]; /* If set, the GRH field in valid. + pseudo_bit_t g[0x00001]; /* If set, the GRH field in valid. This field is reserved if Mad_extended_info indication in the input modifier is clear. */ pseudo_bit_t reserved2[0x00004]; pseudo_bit_t sl[0x00004]; /* Service Level of the received MAD. This field is reserved if Mad_extended_info indication in the input modifier is clear. */ /* -------------- */ - pseudo_bit_t pkey_indx[0x00010]; /* Index in PKey table that matches PKey of the received MAD. + pseudo_bit_t pkey_indx[0x00010]; /* Index in PKey table that matches PKey of the received MAD. This field is reserved if Mad_extended_info indication in the input modifier is clear. */ pseudo_bit_t reserved3[0x00010]; /* -------------- */ pseudo_bit_t reserved4[0x00180]; /* -------------- */ - pseudo_bit_t grh[10][0x00020]; /* The GRH field of the MAD packet that was scattered to the first 40 bytes pointed to by the scatter list. - Valid if Mad_extended_info bit (in the input modifier) and g bit are set. + pseudo_bit_t grh[10][0x00020]; /* The GRH field of the MAD packet that was scattered to the first 40 bytes pointed to by the scatter list. + Valid if Mad_extended_info bit (in the input modifier) and g bit are set. Otherwise this field is reserved. */ /* -------------- */ pseudo_bit_t reserved5[0x004c0]; /* -------------- */ -}; +};
/* Query Debug Message */
@@ -1924,7 +1924,7 @@ struct arbelprm_query_debug_msg_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved3[0x00400]; /* -------------- */ -}; +};
/* User Access Region */
@@ -1939,7 +1939,7 @@ struct arbelprm_uar_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x03ec0]; /* -------------- */ -}; +};
/* Receive doorbell */
@@ -1953,7 +1953,7 @@ struct arbelprm_receive_doorbell_st { /* Little Endian */ pseudo_bit_t reserved3[0x00002]; pseudo_bit_t qpn[0x00018]; /* QP number or SRQ number this doorbell is rung on */ /* -------------- */ -}; +};
/* SET_IB Parameters */
@@ -1974,7 +1974,7 @@ struct arbelprm_set_ib_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x00180]; /* -------------- */ -}; +};
/* Multicast Group Member */
@@ -2014,7 +2014,7 @@ struct arbelprm_mgm_entry_st { /* Little Endian */ /* -------------- */ struct arbelprm_mgmqp_st mgmqp_7; /* Multicast Group Member QP */ /* -------------- */ -}; +};
/* INIT_IB Parameters */
@@ -2068,7 +2068,7 @@ struct arbelprm_init_ib_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved5[0x006c0]; /* -------------- */ -}; +};
/* Query Device Limitations */
@@ -2285,7 +2285,7 @@ struct arbelprm_query_dev_lim_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved41[0x002c0]; /* -------------- */ -}; +};
/* QUERY_ADAPTER Parameters Block */
@@ -2299,7 +2299,7 @@ struct arbelprm_query_adapter_st { /* Little Endian */ /* -------------- */ struct arbelprm_vsd_st vsd; /* -------------- */ -}; +};
/* QUERY_FW Parameters Block */
@@ -2318,7 +2318,7 @@ struct arbelprm_query_fw_st { /* Little Endian */ pseudo_bit_t log_max_outstanding_cmd[0x00008];/* Log2 of the maximum number of commands the HCR can support simultaneously */ pseudo_bit_t reserved1[0x00017]; pseudo_bit_t dt[0x00001]; /* Debug Trace Support - 0 - Debug trace is not supported + 0 - Debug trace is not supported 1 - Debug trace is supported */ /* -------------- */ pseudo_bit_t cmd_interface_db[0x00001];/* Set if the device accepts commands by means of special doorbells */ @@ -2326,10 +2326,10 @@ struct arbelprm_query_fw_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved3[0x00060]; /* -------------- */ - pseudo_bit_t clr_int_base_addr_h[0x00020];/* Bits [63:32] of Clear interrupt register physical address. + pseudo_bit_t clr_int_base_addr_h[0x00020];/* Bits [63:32] of Clear interrupt register physical address. Points to 64 bit register. */ /* -------------- */ - pseudo_bit_t clr_int_base_addr_l[0x00020];/* Bits [31:0] of Clear interrupt register physical address. + pseudo_bit_t clr_int_base_addr_l[0x00020];/* Bits [31:0] of Clear interrupt register physical address. Points to 64 bit register. */ /* -------------- */ pseudo_bit_t reserved4[0x00040]; @@ -2342,12 +2342,12 @@ struct arbelprm_query_fw_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved5[0x00020]; /* -------------- */ - pseudo_bit_t eq_arm_base_addr_h[0x00020];/* Bits [63:32] of EQ Arm DBs physical address. + pseudo_bit_t eq_arm_base_addr_h[0x00020];/* Bits [63:32] of EQ Arm DBs physical address. Points to 64 bit register. Setting bit x in the offset, arms EQ number x. */ /* -------------- */ - pseudo_bit_t eq_arm_base_addr_l[0x00020];/* Bits [31:0] of EQ Arm DBs physical address. + pseudo_bit_t eq_arm_base_addr_l[0x00020];/* Bits [31:0] of EQ Arm DBs physical address. Points to 64 bit register. Setting bit x in the offset, arms EQ number x. */ /* -------------- */ @@ -2375,7 +2375,7 @@ struct arbelprm_query_fw_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved6[0x004c0]; /* -------------- */ -}; +};
/* ACCESS_LAM */
@@ -2384,7 +2384,7 @@ struct arbelprm_access_lam_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved0[0x00080]; /* -------------- */ -}; +};
/* ENABLE_LAM Parameters Block */
@@ -2418,7 +2418,7 @@ struct arbelprm_enable_lam_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x00400]; /* -------------- */ -}; +};
/* Memory Access Parameters for UD Address Vector Table */
@@ -2430,7 +2430,7 @@ struct arbelprm_udavtable_memory_parameters_st { /* Little Endian */ pseudo_bit_t xlation_en[0x00001]; /* When cleared, address is physical address and no translation will be done. When set, address is virtual. */ pseudo_bit_t reserved1[0x00002]; /* -------------- */ -}; +};
/* INIT_HCA & QUERY_HCA Parameters Block */
@@ -2471,7 +2471,7 @@ struct arbelprm_init_hca_st { /* Little Endian */ pseudo_bit_t responder_exu[0x00004];/* Indicate the relation between the execution enegines allocation dedicated for responder versus the engines dedicated for reqvester . responder_exu/16 = (number of responder exu engines)/(total number of engines) Legal values are 0x0-0xF. 0 is "auto". - + */ pseudo_bit_t reserved6[0x00004]; pseudo_bit_t wqe_quota[0x0000f]; /* Maximum number of WQEs that are executed prior to preemption of execution unit. 0 - reserved. */ @@ -2495,7 +2495,7 @@ struct arbelprm_init_hca_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved11[0x00600]; /* -------------- */ -}; +};
/* Event Queue Context Table Entry */
@@ -2521,7 +2521,7 @@ struct arbelprm_eqc_st { /* Little Endian */ /* -------------- */ pseudo_bit_t start_address_h[0x00020];/* Start Address of Event Queue[63:32]. */ /* -------------- */ - pseudo_bit_t start_address_l[0x00020];/* Start Address of Event Queue[31:0]. + pseudo_bit_t start_address_l[0x00020];/* Start Address of Event Queue[31:0]. Must be aligned on 32-byte boundary */ /* -------------- */ pseudo_bit_t reserved3[0x00018]; @@ -2536,7 +2536,7 @@ struct arbelprm_eqc_st { /* Little Endian */ 00iiiiii - set to INTA given in QUERY_ADAPTER in order to generate INTA messages on Express. 10jjjjjj - specificies type of interrupt message to be generated (total 64 different messages supported). All other values are reserved and should not be used. - + If interrupt generation is not required, ST field must be set upon creation to Fired state. No EQ arming doorbell should be performed. In this case hardware will not generate any interrupt. */ pseudo_bit_t reserved6[0x00018]; /* -------------- */ @@ -2555,7 +2555,7 @@ struct arbelprm_eqc_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved9[0x00080]; /* -------------- */ -}; +};
/* Memory Translation Table (MTT) Entry */
@@ -2566,7 +2566,7 @@ struct arbelprm_mtt_st { /* Little Endian */ pseudo_bit_t reserved0[0x0000b]; pseudo_bit_t ptag_l[0x00014]; /* Low-order bits of Physical tag. The size of the field depends on the page size of the region. Maximum PTAG size is 52 bits. */ /* -------------- */ -}; +};
/* Memory Protection Table (MPT) Entry */
@@ -2601,13 +2601,13 @@ struct arbelprm_mpt_st { /* Little Endian */ /* -------------- */ pseudo_bit_t pd[0x00018]; /* Protection Domain */ pseudo_bit_t reserved3[0x00001]; - pseudo_bit_t ei[0x00001]; /* Enable Invalidation - When set, Local/Remote invalidation can be executed on this window/region. + pseudo_bit_t ei[0x00001]; /* Enable Invalidation - When set, Local/Remote invalidation can be executed on this window/region. Must be set for type2 windows and non-shared physical memory regions. Must be clear for regions that are used to access Work Queues, Completion Queues and Event Queues */ pseudo_bit_t zb[0x00001]; /* When set, this region is Zero Based Region */ pseudo_bit_t fre[0x00001]; /* When set, Fast Registration Operations can be executed on this region */ pseudo_bit_t rae[0x00001]; /* When set, remote access can be enabled on this region. - Used when executing Fast Registration Work Request to validate that remote access rights can be granted to this MPT. + Used when executing Fast Registration Work Request to validate that remote access rights can be granted to this MPT. If the bit is cleared, Fast Registration Work Request requesting remote access rights will fail. */ pseudo_bit_t reserved4[0x00003]; @@ -2641,7 +2641,7 @@ struct arbelprm_mpt_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved8[0x00040]; /* -------------- */ -}; +};
/* Completion Queue Context Table Entry */
@@ -2653,7 +2653,7 @@ struct arbelprm_completion_queue_context_st { /* Little Endian */ 0x6 - ARMED SOLICITED (Request Solicited Notification) 0xA - FIRED other - reserved - + Must be 0x0 in CQ initialization. Valid for the QUERY_CQ and HW2SW_CQ commands only. */ pseudo_bit_t reserved1[0x00005]; @@ -2666,10 +2666,10 @@ struct arbelprm_completion_queue_context_st { /* Little Endian */ 1010 - CQ write failure Valid for the QUERY_CQ and HW2SW_CQ commands only */ /* -------------- */ - pseudo_bit_t start_address_h[0x00020];/* Start address of CQ[63:32]. + pseudo_bit_t start_address_h[0x00020];/* Start address of CQ[63:32]. Must be aligned on CQE size (32 bytes) */ /* -------------- */ - pseudo_bit_t start_address_l[0x00020];/* Start address of CQ[31:0]. + pseudo_bit_t start_address_l[0x00020];/* Start address of CQ[31:0]. Must be aligned on CQE size (32 bytes) */ /* -------------- */ pseudo_bit_t usr_page[0x00018]; /* UAR page this CQ can be accessed through (ringinig CQ doorbells) */ @@ -2694,7 +2694,7 @@ struct arbelprm_completion_queue_context_st { /* Little Endian */ Valid for QUERY_CQ and HW2SW_CQ commands only. */ /* -------------- */ pseudo_bit_t solicit_producer_indx[0x00020];/* Maintained by HW. - Valid for QUERY_CQ and HW2SW_CQ commands only. + Valid for QUERY_CQ and HW2SW_CQ commands only. */ /* -------------- */ pseudo_bit_t consumer_counter[0x00020];/* Consumer counter is a 32bits counter that is incremented for each CQE pooled from the CQ. @@ -2719,7 +2719,7 @@ struct arbelprm_completion_queue_context_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved8[0x00020]; /* -------------- */ -}; +};
/* GPIO_event_data */
@@ -2732,7 +2732,7 @@ struct arbelprm_gpio_event_data_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00020]; /* -------------- */ -}; +};
/* Event_data Field - QP/EE Events */
@@ -2749,7 +2749,7 @@ struct arbelprm_qp_ee_event_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved4[0x00060]; /* -------------- */ -}; +};
/* InfiniHost-III-EX Type0 Configuration Header */
@@ -2895,19 +2895,19 @@ struct arbelprm_mt25208_type0_st { /* Little Endian */ /* -------------- */ pseudo_bit_t uncorrectable_error_status_register[0x00020];/* 0 Training Error Status 4 Data Link Protocol Error Status - 12 Poisoned TLP Status - 13 Flow Control Protocol Error Status - 14 Completion Timeout Status - 15 Completer Abort Status - 16 Unexpected Completion Status - 17 Receiver Overflow Status - 18 Malformed TLP Status - 19 ECRC Error Status + 12 Poisoned TLP Status + 13 Flow Control Protocol Error Status + 14 Completion Timeout Status + 15 Completer Abort Status + 16 Unexpected Completion Status + 17 Receiver Overflow Status + 18 Malformed TLP Status + 19 ECRC Error Status 20 Unsupported Request Error Status */ /* -------------- */ pseudo_bit_t uncorrectable_error_mask_register[0x00020];/* 0 Training Error Mask 4 Data Link Protocol Error Mask - 12 Poisoned TLP Mask + 12 Poisoned TLP Mask 13 Flow Control Protocol Error Mask 14 Completion Timeout Mask 15 Completer Abort Mask @@ -2947,7 +2947,7 @@ struct arbelprm_mt25208_type0_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved13[0x006a0]; /* -------------- */ -}; +};
/* Event Data Field - Performance Monitor */
@@ -2965,7 +2965,7 @@ struct arbelprm_performance_monitor_event_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00040]; /* -------------- */ -}; +};
/* Event_data Field - Page Faults */
@@ -2989,7 +2989,7 @@ struct arbelprm_page_fault_event_data_st { /* Little Endian */ /* -------------- */ pseudo_bit_t prefetch_len[0x00020]; /* Indicates how many subsequent pages in the same memory region/window will be accessed by the following transaction after this page fault is resolved. measured in bytes. SW can use this information in order to page-in the subsequent pages if they are not present. */ /* -------------- */ -}; +};
/* WQE segments format */
@@ -3006,7 +3006,7 @@ struct arbelprm_wqe_segment_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x00080]; /* -------------- */ -}; +};
/* Event_data Field - Port State Change */
@@ -3019,7 +3019,7 @@ struct arbelprm_port_state_change_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved3[0x00060]; /* -------------- */ -}; +};
/* Event_data Field - Completion Queue Error */
@@ -3036,7 +3036,7 @@ struct arbelprm_completion_queue_error_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved3[0x00060]; /* -------------- */ -}; +};
/* Event_data Field - Completion Event */
@@ -3046,12 +3046,12 @@ struct arbelprm_completion_event_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x000a0]; /* -------------- */ -}; +};
/* Event Queue Entry */
struct arbelprm_event_queue_entry_st { /* Little Endian */ - pseudo_bit_t event_sub_type[0x00008];/* Event Sub Type. + pseudo_bit_t event_sub_type[0x00008];/* Event Sub Type. Defined for events which have sub types, zero elsewhere. */ pseudo_bit_t reserved0[0x00008]; pseudo_bit_t event_type[0x00008]; /* Event Type */ @@ -3060,12 +3060,12 @@ struct arbelprm_event_queue_entry_st { /* Little Endian */ pseudo_bit_t event_data[6][0x00020];/* Delivers auxilary data to handle event. */ /* -------------- */ pseudo_bit_t reserved2[0x00007]; - pseudo_bit_t owner[0x00001]; /* Owner of the entry - 0 SW + pseudo_bit_t owner[0x00001]; /* Owner of the entry + 0 SW 1 HW */ pseudo_bit_t reserved3[0x00018]; /* -------------- */ -}; +};
/* QP/EE State Transitions Command Parameters */
@@ -3078,14 +3078,14 @@ struct arbelprm_qp_ee_state_transitions_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x009c0]; /* -------------- */ -}; +};
/* Completion Queue Entry Format */
struct arbelprm_completion_queue_entry_st { /* Little Endian */ pseudo_bit_t my_qpn[0x00018]; /* Indicates the QP for which completion is being reported */ pseudo_bit_t reserved0[0x00004]; - pseudo_bit_t ver[0x00004]; /* CQE version. + pseudo_bit_t ver[0x00004]; /* CQE version. 0 for InfiniHost-III-EX */ /* -------------- */ pseudo_bit_t my_ee[0x00018]; /* EE context (for RD only). @@ -3106,10 +3106,10 @@ struct arbelprm_completion_queue_entry_st { /* Little Endian */ pseudo_bit_t reserved1[0x00003]; pseudo_bit_t sl[0x00004]; /* Service Level of the message. Valid in Responder of UD QP CQE only. */ /* -------------- */ - pseudo_bit_t immediate_ethertype_pkey_indx_eecredits[0x00020];/* Valid for receive queue completion only. - If Opcode field indicates that this was send/write with immediate, this field contains immediate field of the packet. - If completion corresponds to RAW receive queue, bits 15:0 contain Ethertype field of the packet. - If completion corresponds to GSI receive queue, bits 31:16 contain index in PKey table that matches PKey of the message arrived. + pseudo_bit_t immediate_ethertype_pkey_indx_eecredits[0x00020];/* Valid for receive queue completion only. + If Opcode field indicates that this was send/write with immediate, this field contains immediate field of the packet. + If completion corresponds to RAW receive queue, bits 15:0 contain Ethertype field of the packet. + If completion corresponds to GSI receive queue, bits 31:16 contain index in PKey table that matches PKey of the message arrived. If Opcode field indicates that this was send and invalidate, this field contains the key that was invalidated. For CQE of send queue of the reliable connection service (but send and invalide), bits [4:0] of this field contain the encoded EEcredits received in last ACK of the message. */ /* -------------- */ @@ -3126,12 +3126,12 @@ struct arbelprm_completion_queue_entry_st { /* Little Endian */ For CQEs corresponding to send completion, NOPCODE field of the WQE is copied to this field. For CQEs corresponding to receive completions, opcode field of last packet in the message copied to this field. For CQEs corresponding to the receive queue of QPs mapped to QP1, the opcode will be SEND with Immediate (messages are guaranteed to be SEND only) - + The following values are reported in case of completion with error: 0xFE - For completion with error on Receive Queues 0xFF - For completion with error on Send Queues */ /* -------------- */ -}; +};
/* */
@@ -3152,7 +3152,7 @@ struct arbelprm_ecc_detect_event_data_st { /* Little Endian */ pseudo_bit_t err_ra[0x00010]; pseudo_bit_t err_ca[0x00010]; /* -------------- */ -}; +};
/* Event_data Field - ECC Detection Event */
@@ -3177,7 +3177,7 @@ struct arbelprm_scrubbing_event_st { /* Little Endian */ pseudo_bit_t err_ra[0x00010]; /* Error row address */ pseudo_bit_t err_ca[0x00010]; /* Error column address */ /* -------------- */ -}; +};
/* Miscellaneous Counters */
@@ -3186,28 +3186,28 @@ struct arbelprm_misc_counters_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved0[0x007e0]; /* -------------- */ -}; +};
/* LAM_EN Output Parameter */
struct arbelprm_lam_en_out_param_st { /* Little Endian */ pseudo_bit_t reserved0[0x00040]; /* -------------- */ -}; +};
/* Extended_Completion_Queue_Entry */
struct arbelprm_extended_completion_queue_entry_st { /* Little Endian */ pseudo_bit_t reserved0[0x00020]; /* -------------- */ -}; +};
/* */
struct arbelprm_eq_cmd_doorbell_st { /* Little Endian */ pseudo_bit_t reserved0[0x00020]; /* -------------- */ -}; +};
/* 0 */
@@ -3456,5 +3456,5 @@ struct arbelprm_arbel_prm_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved59[0xffcfc0]; /* -------------- */ -}; +}; #endif /* H_prefix_arbelprm_bits_fixnames_MT25218_PRM_csp_H */ diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/MT25408_PRM.h b/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/MT25408_PRM.h index cc248da..f8c19ce 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/MT25408_PRM.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/MT25408_PRM.h @@ -47,7 +47,7 @@ struct hermonprm_ud_address_vector_st { /* Little Endian */ pseudo_bit_t reserved1[0x00008]; /* -------------- */ pseudo_bit_t hop_limit[0x00008]; /* IPv6 hop limit */ - pseudo_bit_t max_stat_rate[0x00004];/* Maximum static rate control. + pseudo_bit_t max_stat_rate[0x00004];/* Maximum static rate control. 0 - 4X injection rate 1 - 1X injection rate other - reserved @@ -72,7 +72,7 @@ struct hermonprm_ud_address_vector_st { /* Little Endian */ /* -------------- */ pseudo_bit_t rgid_31_0[0x00020]; /* Remote GID[31:0] if G bit is set. Must be set to 0x2 if G bit is cleared. */ /* -------------- */ -}; +};
/* Send doorbell */
@@ -87,7 +87,7 @@ struct hermonprm_send_doorbell_st { /* Little Endian */ pseudo_bit_t reserved1[0x00002]; pseudo_bit_t qpn[0x00018]; /* QP number this doorbell is rung on */ /* -------------- */ -}; +};
/* Send wqe segment data inline */
@@ -101,7 +101,7 @@ struct hermonprm_wqe_segment_data_inline_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x00040]; /* -------------- */ -}; +};
/* Send wqe segment data ptr */
@@ -115,7 +115,7 @@ struct hermonprm_wqe_segment_data_ptr_st { /* Little Endian */ /* -------------- */ pseudo_bit_t local_address_l[0x00020]; /* -------------- */ -}; +};
/* Send wqe segment rd */
@@ -127,7 +127,7 @@ struct hermonprm_local_invalidate_segment_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x000a0]; /* -------------- */ -}; +};
/* Fast_Registration_Segment ####michal - doesn't match PRM (fields were added, see below) new table size in bytes - 0x30 */
@@ -157,7 +157,7 @@ struct hermonprm_fast_registration_segment_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reg_len_l[0x00020]; /* Region Length[31:0] */ /* -------------- */ -}; +};
/* Send wqe segment atomic */
@@ -170,7 +170,7 @@ struct hermonprm_wqe_segment_atomic_st { /* Little Endian */ /* -------------- */ pseudo_bit_t compare_l[0x00020]; /* -------------- */ -}; +};
/* Send wqe segment remote address */
@@ -183,7 +183,7 @@ struct hermonprm_wqe_segment_remote_address_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved0[0x00020]; /* -------------- */ -}; +};
/* end wqe segment bind */
@@ -213,7 +213,7 @@ struct hermonprm_wqe_segment_bind_st { /* Little Endian */ /* -------------- */ pseudo_bit_t length_l[0x00020]; /* -------------- */ -}; +};
/* Send wqe segment ud */
@@ -227,7 +227,7 @@ struct hermonprm_wqe_segment_ud_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00040]; /* -------------- */ -}; +};
/* Send wqe segment rd */
@@ -239,7 +239,7 @@ struct hermonprm_wqe_segment_rd_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00040]; /* -------------- */ -}; +};
/* Send wqe segment ctrl */
@@ -263,7 +263,7 @@ struct hermonprm_wqe_segment_ctrl_send_st { /* Little Endian */ /* -------------- */ pseudo_bit_t immediate[0x00020]; /* If the OpCode encodes an operation with Immediate (RDMA-write/SEND), This field will hold the Immediate data to be sent. If the OpCode encodes send and invalidate operations, this field holds the Invalidation key to be inserted into the packet; otherwise, this field is reserved. */ /* -------------- */ -}; +};
/* Address Path # ###michal - match to PRM */
@@ -280,19 +280,19 @@ struct hermonprm_address_path_st { /* Little Endian */ pseudo_bit_t reserved1[0x00008]; /* -------------- */ pseudo_bit_t hop_limit[0x00008]; /* IPv6 hop limit */ - pseudo_bit_t max_stat_rate[0x00004];/* Maximum static rate control. - 0 - 100% injection rate + pseudo_bit_t max_stat_rate[0x00004];/* Maximum static rate control. + 0 - 100% injection rate 1 - 25% injection rate 2 - 12.5% injection rate 3 - 50% injection rate - 7: 2.5 Gb/s. - 8: 10 Gb/s. - 9: 30 Gb/s. - 10: 5 Gb/s. + 7: 2.5 Gb/s. + 8: 10 Gb/s. + 9: 30 Gb/s. + 10: 5 Gb/s. 11: 20 Gb/s. - 12: 40 Gb/s. - 13: 60 Gb/s. - 14: 80 Gb/s. + 12: 40 Gb/s. + 13: 60 Gb/s. + 14: 80 Gb/s. 15: 120 Gb/s. */ pseudo_bit_t reserved2[0x00004]; pseudo_bit_t mgid_index[0x00007]; /* Index to port GID table */ @@ -328,7 +328,7 @@ struct hermonprm_address_path_st { /* Little Endian */ /* -------------- */ pseudo_bit_t dmac_31_0[0x00020]; /* -------------- */ -}; +};
/* HCA Command Register (HCR) #### michal - match PRM */
@@ -359,7 +359,7 @@ struct hermonprm_hca_command_register_st { /* Little Endian */ pseudo_bit_t status[0x00008]; /* Command execution status report. Valid only if command interface in under SW ownership (Go bit is cleared) 0 - command completed without error. If different than zero, command execution completed with error. Syndrom encoding is depended on command executed and is defined for each command */ /* -------------- */ -}; +};
/* CQ Doorbell */
@@ -373,14 +373,14 @@ struct hermonprm_cq_cmd_doorbell_st { /* Little Endian */ Other - Reserved */ pseudo_bit_t reserved0[0x00001]; pseudo_bit_t cmd_sn[0x00002]; /* Command Sequence Number - This field should be incremented upon receiving completion notification of the respective CQ. - This transition is done by ringing Request notification for next Solicited, Request notification for next Solicited or Unsolicited + This transition is done by ringing Request notification for next Solicited, Request notification for next Solicited or Unsolicited completion or Request notification for multiple completions doorbells after receiving completion notification. This field is initialized to Zero */ pseudo_bit_t reserved1[0x00002]; /* -------------- */ pseudo_bit_t cq_param[0x00020]; /* parameter to be used by CQ command */ /* -------------- */ -}; +};
/* RD-send doorbell */
@@ -394,7 +394,7 @@ struct hermonprm_rd_send_doorbell_st { /* Little Endian */ /* -------------- */ struct hermonprm_send_doorbell_st send_doorbell;/* Send Parameters */ /* -------------- */ -}; +};
/* Multicast Group Member QP #### michal - match PRM */
@@ -404,7 +404,7 @@ struct hermonprm_mgmqp_st { /* Little Endian */ pseudo_bit_t blck_lb[0x00001]; /* Block self-loopback messages arriving to this qp */ pseudo_bit_t qi[0x00001]; /* Qi: QPN_i is valid */ /* -------------- */ -}; +};
/* vsd */
@@ -521,7 +521,7 @@ struct hermonprm_vsd_st { /* Little Endian */ /* -------------- */ pseudo_bit_t vsd_dw55[0x00020]; /* -------------- */ -}; +};
/* UAR Parameters */
@@ -535,7 +535,7 @@ struct hermonprm_uar_params_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x000a0]; /* -------------- */ -}; +};
/* Translation and Protection Tables Parameters */
@@ -552,7 +552,7 @@ struct hermonprm_tptparams_st { /* Little Endian */ /* -------------- */ pseudo_bit_t log_dmpt_sz[0x00006]; /* Log (base 2) of the number of region/windows entries in the dMPT table. */ pseudo_bit_t reserved0[0x00002]; - pseudo_bit_t pfto[0x00005]; /* Page Fault RNR Timeout - + pseudo_bit_t pfto[0x00005]; /* Page Fault RNR Timeout - The field returned in RNR Naks generated when a page fault is detected. It has no effect when on-demand-paging is not used. */ pseudo_bit_t reserved1[0x00013]; @@ -575,7 +575,7 @@ struct hermonprm_tptparams_st { /* Little Endian */ Entry size is 64 bytes. Table must be aligned to its size. */ /* -------------- */ -}; +};
/* Multicast Support Parameters #### michal - match PRM */
@@ -584,14 +584,14 @@ struct hermonprm_multicastparam_st { /* Little Endian */ The base address must be aligned to the entry size. Address may be set to 0xFFFFFFFF if multicast is not supported. */ /* -------------- */ - pseudo_bit_t mc_base_addr_l[0x00020];/* Base Address of the Multicast Table [31:0]. + pseudo_bit_t mc_base_addr_l[0x00020];/* Base Address of the Multicast Table [31:0]. The base address must be aligned to the entry size. Address may be set to 0xFFFFFFFF if multicast is not supported. */ /* -------------- */ pseudo_bit_t reserved0[0x00040]; /* -------------- */ pseudo_bit_t log_mc_table_entry_sz[0x00005];/* Log2 of the Size of multicast group member (MGM) entry. - Must be greater than 5 (to allow CTRL and GID sections). + Must be greater than 5 (to allow CTRL and GID sections). That implies the number of QPs per MC table entry. */ pseudo_bit_t reserved1[0x0000b]; pseudo_bit_t reserved2[0x00010]; @@ -611,7 +611,7 @@ struct hermonprm_multicastparam_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved6[0x00020]; /* -------------- */ -}; +};
/* QPC/EEC/CQC/EQC/RDB Parameters #### michal - doesn't match PRM (field name are differs. see below) */
@@ -679,12 +679,12 @@ struct hermonprm_qpcbaseaddr_st { /* Little Endian */ /* -------------- */ pseudo_bit_t log_num_rd[0x00003]; /* Log (base 2) of the maximum number of RdmaRdC entries per QP. This denotes the maximum number of outstanding reads/atomics as a responder. */ pseudo_bit_t reserved7[0x00002]; - pseudo_bit_t rdmardc_base_addr_l[0x0001b];/* rdmardc_base_addr_l: Base address of table that holds remote read and remote atomic requests [31:0]. + pseudo_bit_t rdmardc_base_addr_l[0x0001b];/* rdmardc_base_addr_l: Base address of table that holds remote read and remote atomic requests [31:0]. Table must be aligned to RDB entry size (32 bytes). */ /* -------------- */ pseudo_bit_t reserved8[0x00040]; /* -------------- */ -}; +};
/* Header_Log_Register */
@@ -693,7 +693,7 @@ struct hermonprm_header_log_register_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved0[0x00060]; /* -------------- */ -}; +};
/* Performance Monitors */
@@ -725,7 +725,7 @@ struct hermonprm_performance_monitors_st { /* Little Endian */ /* -------------- */ pseudo_bit_t event_counter2[0x00020];/* Read/write event counter, counting events specified by EvCntl and EvCnt2 fields repsectively. When the event counter reaches is maximum value of 0xFFFFFF, the next event will cause it to roll over to zero, set F1 or F2 bit respectively and generate interrupt by I1 I2 bit respectively. */ /* -------------- */ -}; +};
/* MLX WQE segment format */
@@ -751,7 +751,7 @@ struct hermonprm_wqe_segment_ctrl_mlx_st { /* Little Endian */ pseudo_bit_t reserved5[0x00010]; pseudo_bit_t rlid[0x00010]; /* Destination LID (must match given headers) */ /* -------------- */ -}; +};
/* Send WQE segment format */
@@ -780,7 +780,7 @@ struct hermonprm_send_wqe_segment_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00200]; /* -------------- */ -}; +};
/* QP and EE Context Entry */
@@ -833,7 +833,7 @@ struct hermonprm_queue_pair_ee_context_entry_st { /* Little Endian */ 0x3 - 1024 0x4 - 2048 other - reserved - + Should be configured to 0x4 for UD and MLX QPs. */ /* -------------- */ pseudo_bit_t usr_page[0x00018]; /* UAR number to ring doorbells for this QP (aliased to doorbell and Blue Flame pages) */ @@ -883,7 +883,7 @@ struct hermonprm_queue_pair_ee_context_entry_st { /* Little Endian */ pseudo_bit_t reserved24[0x00008]; /* -------------- */ pseudo_bit_t reserved25[0x00004]; - pseudo_bit_t ric[0x00001]; /* Invalid Credits. + pseudo_bit_t ric[0x00001]; /* Invalid Credits. 1 - place "Invalid Credits" to ACKs sent from this queue. 0 - ACKs report the actual number of end to end credits on the connection. Not valid (reserved) in EE context. @@ -895,12 +895,12 @@ struct hermonprm_queue_pair_ee_context_entry_st { /* Little Endian */ pseudo_bit_t rwe[0x00001]; /* If set - RDMA - write enabled on receive queue. Not valid (reserved) in EE context. */ pseudo_bit_t rre[0x00001]; /* If set - RDMA - read enabled on receive queue. Not valid (reserved) in EE context. */ pseudo_bit_t reserved28[0x00005]; - pseudo_bit_t rra_max[0x00003]; /* Maximum number of outstanding RDMA-read/Atomic operations allowed on receive queue is 2^RRA_Max. + pseudo_bit_t rra_max[0x00003]; /* Maximum number of outstanding RDMA-read/Atomic operations allowed on receive queue is 2^RRA_Max. Must be 0 for EE context. */ pseudo_bit_t physical_function[0x00008]; /* -------------- */ pseudo_bit_t next_rcv_psn[0x00018]; /* Next (expected) PSN on receive */ - pseudo_bit_t min_rnr_nak[0x00005]; /* Minimum RNR NAK timer value (TTTTT field encoding according to the IB spec Vol1 9.7.5.2.8). + pseudo_bit_t min_rnr_nak[0x00005]; /* Minimum RNR NAK timer value (TTTTT field encoding according to the IB spec Vol1 9.7.5.2.8). Not valid (reserved) in EE context. */ pseudo_bit_t reserved30[0x00003]; /* -------------- */ @@ -919,7 +919,7 @@ struct hermonprm_queue_pair_ee_context_entry_st { /* Little Endian */ On send datagrams, if Q_Key[31] specified in the WQE is set, then this Q_Key will be transmitted in the outgoing message. Not valid (reserved) in EE context. */ /* -------------- */ - pseudo_bit_t srqn[0x00018]; /* SRQN - Shared Receive Queue Number - specifies the SRQ number from which the QP dequeues receive descriptors. + pseudo_bit_t srqn[0x00018]; /* SRQN - Shared Receive Queue Number - specifies the SRQ number from which the QP dequeues receive descriptors. SRQN is valid only if SRQ bit is set. Not valid (reserved) in EE context. */ pseudo_bit_t srq[0x00001]; /* SRQ - Shared Receive Queue. If this bit is set, then the QP is associated with a SRQ. Not valid (reserved) in EE context. */ pseudo_bit_t reserved34[0x00007]; @@ -983,7 +983,7 @@ struct hermonprm_queue_pair_ee_context_entry_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved48[0x000c0]; /* -------------- */ -}; +};
/* */
@@ -993,21 +993,21 @@ struct hermonprm_mcg_qp_dw_st { /* Little Endian */ pseudo_bit_t blck_lb[0x00001]; pseudo_bit_t reserved1[0x00001]; /* -------------- */ -}; +};
/* Clear Interrupt [63:0] #### michal - match to PRM */
struct hermonprm_clr_int_st { /* Little Endian */ pseudo_bit_t clr_int_h[0x00020]; /* Clear Interrupt [63:32] - Write transactions to this register will clear (de-assert) the virtual interrupt output pins of InfiniHost-III-EX. The value to be written in this register is obtained by executing QUERY_ADAPTER command on command interface after system boot. + Write transactions to this register will clear (de-assert) the virtual interrupt output pins of InfiniHost-III-EX. The value to be written in this register is obtained by executing QUERY_ADAPTER command on command interface after system boot. This register is write-only. Reading from this register will cause undefined result */ /* -------------- */ pseudo_bit_t clr_int_l[0x00020]; /* Clear Interrupt [31:0] - Write transactions to this register will clear (de-assert) the virtual interrupt output pins of InfiniHost-III-EX. The value to be written in this register is obtained by executing QUERY_ADAPTER command on command interface after system boot. + Write transactions to this register will clear (de-assert) the virtual interrupt output pins of InfiniHost-III-EX. The value to be written in this register is obtained by executing QUERY_ADAPTER command on command interface after system boot. This register is write-only. Reading from this register will cause undefined result */ /* -------------- */ -}; +};
/* EQ Set CI DBs Table */
@@ -1268,7 +1268,7 @@ struct hermonprm_eq_set_ci_table_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved63[0x00020]; /* -------------- */ -}; +};
/* InfiniHost-III-EX Configuration Registers #### michal - match to PRM */
@@ -1279,7 +1279,7 @@ struct hermonprm_configuration_registers_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x3fcb20]; /* -------------- */ -}; +};
/* QP_DB_Record ### michal = gdror fixed */
@@ -1287,7 +1287,7 @@ struct hermonprm_qp_db_record_st { /* Little Endian */ pseudo_bit_t receive_wqe_counter[0x00010];/* Modulo-64K counter of WQEs posted to the QP since its creation. Should be initialized to zero. */ pseudo_bit_t reserved0[0x00010]; /* -------------- */ -}; +};
/* CQ_ARM_DB_Record */
@@ -1303,7 +1303,7 @@ struct hermonprm_cq_arm_db_record_st { /* Little Endian */ pseudo_bit_t res[0x00003]; /* Must be 0x2 */ pseudo_bit_t cq_number[0x00018]; /* CQ number */ /* -------------- */ -}; +};
/* CQ_CI_DB_Record */
@@ -1314,7 +1314,7 @@ struct hermonprm_cq_ci_db_record_st { /* Little Endian */ pseudo_bit_t res[0x00003]; /* Must be 0x1 */ pseudo_bit_t cq_number[0x00018]; /* CQ number */ /* -------------- */ -}; +};
/* Virtual_Physical_Mapping */
@@ -1330,7 +1330,7 @@ struct hermonprm_virtual_physical_mapping_st { /* Little Endian */ pseudo_bit_t reserved1[0x00006]; pseudo_bit_t pa_l[0x00014]; /* Physical Address[31:12] */ /* -------------- */ -}; +};
/* MOD_STAT_CFG #### michal - gdror fix */
@@ -1518,7 +1518,7 @@ struct hermonprm_srq_context_st { /* Little Endian */ pseudo_bit_t reserved10[0x00002]; pseudo_bit_t db_record_addr_l[0x0001e];/* SRQ DB Record physical address [31:2] */ /* -------------- */ -}; +};
/* PBL */
@@ -1539,7 +1539,7 @@ struct hermonprm_pbl_st { /* Little Endian */ /* -------------- */ pseudo_bit_t mtt_3_l[0x00020]; /* Fourth MTT[31:0] */ /* -------------- */ -}; +};
/* Performance Counters #### michal - gdror fixed */
@@ -1554,7 +1554,7 @@ struct hermonprm_performance_counters_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved4[0x00620]; /* -------------- */ -}; +};
/* Transport and CI Error Counters */
@@ -1575,10 +1575,10 @@ struct hermonprm_transport_and_ci_error_counters_st { /* Little Endian */ /* -------------- */ pseudo_bit_t sq_num_lpe[0x00020]; /* Requester - number of local protection errors */ /* -------------- */ - pseudo_bit_t rq_num_wrfe[0x00020]; /* Responder - number of CQEs with error. + pseudo_bit_t rq_num_wrfe[0x00020]; /* Responder - number of CQEs with error. Incremented each time a CQE with error is generated */ /* -------------- */ - pseudo_bit_t sq_num_wrfe[0x00020]; /* Requester - number of CQEs with error. + pseudo_bit_t sq_num_wrfe[0x00020]; /* Requester - number of CQEs with error. Incremented each time a CQE with error is generated */ /* -------------- */ pseudo_bit_t reserved0[0x00020]; @@ -1698,7 +1698,7 @@ struct hermonprm_transport_and_ci_error_counters_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved12[0x002a0]; /* -------------- */ -}; +};
/* Event_data Field - HCR Completion Event #### michal - match PRM */
@@ -1717,7 +1717,7 @@ struct hermonprm_hcr_completion_event_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved3[0x00020]; /* -------------- */ -}; +};
/* Completion with Error CQE #### michal - gdror fixed */
@@ -1732,7 +1732,7 @@ struct hermonprm_completion_with_error_st { /* Little Endian */ 0x02 - Local QP Operation Error 0x03 - Local EE Context Operation Error 0x04 - Local Protection Error - 0x05 - Work Request Flushed Error + 0x05 - Work Request Flushed Error 0x06 - Memory Window Bind Error 0x10 - Bad Response Error 0x11 - Local Access Error @@ -1752,7 +1752,7 @@ struct hermonprm_completion_with_error_st { /* Little Endian */ pseudo_bit_t wqe_counter[0x00010]; /* -------------- */ pseudo_bit_t opcode[0x00005]; /* The opcode of WQE completion is reported for. - + The following values are reported in case of completion with error: 0xFE - For completion with error on Receive Queues 0xFF - For completion with error on Send Queues */ @@ -1761,7 +1761,7 @@ struct hermonprm_completion_with_error_st { /* Little Endian */ pseudo_bit_t owner[0x00001]; /* HW Flips this bit for every CQ warp around. Initialized to Zero. */ pseudo_bit_t reserved3[0x00018]; /* -------------- */ -}; +};
/* Resize CQ Input Mailbox */
@@ -1790,7 +1790,7 @@ struct hermonprm_resize_cq_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved10[0x00100]; /* -------------- */ -}; +};
/* MAD_IFC Input Modifier */
@@ -1802,14 +1802,14 @@ struct hermonprm_mad_ifc_input_modifier_st { /* Little Endian */ pseudo_bit_t rlid[0x00010]; /* Remote (source) LID from the received MAD. This field is required for trap generation upon MKey/BKey validation. */ /* -------------- */ -}; +};
/* MAD_IFC Input Mailbox ###michal -gdror fixed */
struct hermonprm_mad_ifc_st { /* Little Endian */ pseudo_bit_t request_mad_packet[64][0x00020];/* Request MAD Packet (256bytes) */ /* -------------- */ - pseudo_bit_t my_qpn[0x00018]; /* Destination QP number from the received MAD. + pseudo_bit_t my_qpn[0x00018]; /* Destination QP number from the received MAD. This field is reserved if Mad_extended_info indication in the input modifier is clear. */ pseudo_bit_t reserved0[0x00008]; /* -------------- */ @@ -1822,25 +1822,25 @@ struct hermonprm_mad_ifc_st { /* Little Endian */ pseudo_bit_t reserved3[0x00010]; pseudo_bit_t ml_path[0x00007]; /* My (destination) LID path bits from the received MAD. This field is reserved if Mad_extended_info indication in the input modifier is clear. */ - pseudo_bit_t g[0x00001]; /* If set, the GRH field in valid. + pseudo_bit_t g[0x00001]; /* If set, the GRH field in valid. This field is reserved if Mad_extended_info indication in the input modifier is clear. */ pseudo_bit_t reserved4[0x00004]; pseudo_bit_t sl[0x00004]; /* Service Level of the received MAD. This field is reserved if Mad_extended_info indication in the input modifier is clear. */ /* -------------- */ - pseudo_bit_t pkey_indx[0x00010]; /* Index in PKey table that matches PKey of the received MAD. + pseudo_bit_t pkey_indx[0x00010]; /* Index in PKey table that matches PKey of the received MAD. This field is reserved if Mad_extended_info indication in the input modifier is clear. */ pseudo_bit_t reserved5[0x00010]; /* -------------- */ pseudo_bit_t reserved6[0x00160]; /* -------------- */ - pseudo_bit_t grh[10][0x00020]; /* The GRH field of the MAD packet that was scattered to the first 40 bytes pointed to by the scatter list. - Valid if Mad_extended_info bit (in the input modifier) and g bit are set. + pseudo_bit_t grh[10][0x00020]; /* The GRH field of the MAD packet that was scattered to the first 40 bytes pointed to by the scatter list. + Valid if Mad_extended_info bit (in the input modifier) and g bit are set. Otherwise this field is reserved. */ /* -------------- */ pseudo_bit_t reserved7[0x004c0]; /* -------------- */ -}; +};
/* Query Debug Message #### michal - gdror fixed */
@@ -1899,7 +1899,7 @@ struct hermonprm_query_debug_msg_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved4[0x003c0]; /* -------------- */ -}; +};
/* User Access Region */
@@ -1914,7 +1914,7 @@ struct hermonprm_uar_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x03ec0]; /* -------------- */ -}; +};
/* Receive doorbell */
@@ -1928,7 +1928,7 @@ struct hermonprm_receive_doorbell_st { /* Little Endian */ pseudo_bit_t reserved3[0x00002]; pseudo_bit_t qpn[0x00018]; /* QP number or SRQ number this doorbell is rung on */ /* -------------- */ -}; +};
/* SET_IB Parameters */
@@ -1949,7 +1949,7 @@ struct hermonprm_set_ib_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x00180]; /* -------------- */ -}; +};
/* Multicast Group Member #### michal - gdror fixed */
@@ -1989,7 +1989,7 @@ struct hermonprm_mgm_entry_st { /* Little Endian */ /* -------------- */ struct hermonprm_mgmqp_st mgmqp_7; /* Multicast Group Member QP */ /* -------------- */ -}; +};
/* INIT_PORT Parameters #### michal - match PRM */
@@ -2041,7 +2041,7 @@ struct hermonprm_init_port_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved5[0x006c0]; /* -------------- */ -}; +};
/* Query Device Capablities #### michal - gdror fixed */
@@ -2267,7 +2267,7 @@ struct hermonprm_query_dev_cap_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved46[0x002c0]; /* -------------- */ -}; +};
/* QUERY_ADAPTER Parameters Block #### michal - gdror fixed */
@@ -2281,7 +2281,7 @@ struct hermonprm_query_adapter_st { /* Little Endian */ /* -------------- */ struct hermonprm_vsd_st vsd; /* ###michal- this field was replaced by 2 fields : vsd .1664; vsd(continued/psid .128; */ /* -------------- */ -}; +};
/* QUERY_FW Parameters Block #### michal - doesn't match PRM */
@@ -2298,7 +2298,7 @@ struct hermonprm_query_fw_st { /* Little Endian */ pseudo_bit_t log_max_outstanding_cmd[0x00008];/* Log2 of the maximum number of commands the HCR can support simultaneously */ pseudo_bit_t reserved1[0x00017]; pseudo_bit_t dt[0x00001]; /* Debug Trace Support - 0 - Debug trace is not supported + 0 - Debug trace is not supported 1 - Debug trace is supported */ /* -------------- */ pseudo_bit_t reserved2[0x00001]; @@ -2346,7 +2346,7 @@ struct hermonprm_query_fw_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved8[0x00600]; /* -------------- */ -}; +};
/* Memory Access Parameters for UD Address Vector Table */
@@ -2358,7 +2358,7 @@ struct hermonprm_udavtable_memory_parameters_st { /* Little Endian */ pseudo_bit_t xlation_en[0x00001]; /* When cleared, address is physical address and no translation will be done. When set, address is virtual. */ pseudo_bit_t reserved1[0x00002]; /* -------------- */ -}; +};
/* INIT_HCA & QUERY_HCA Parameters Block ####michal-doesn't match PRM (see differs below) new size in bytes:0x300 */
@@ -2407,7 +2407,7 @@ struct hermonprm_init_hca_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved10[0x00600]; /* -------------- */ -}; +};
/* Event Queue Context Table Entry #### michal - gdror fixed */
@@ -2454,19 +2454,19 @@ struct hermonprm_eqc_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved12[0x00040]; /* -------------- */ - pseudo_bit_t consumer_counter[0x00018];/* Consumer counter. The counter is incremented for each EQE polled from the EQ. - Must be 0x0 in EQ initialization. + pseudo_bit_t consumer_counter[0x00018];/* Consumer counter. The counter is incremented for each EQE polled from the EQ. + Must be 0x0 in EQ initialization. Maintained by HW (valid for the QUERY_EQ command only). */ pseudo_bit_t reserved13[0x00008]; /* -------------- */ - pseudo_bit_t producer_counter[0x00018];/* Producer Coutner. The counter is incremented for each EQE that is written by the HW to the EQ. + pseudo_bit_t producer_counter[0x00018];/* Producer Coutner. The counter is incremented for each EQE that is written by the HW to the EQ. EQ overrun is reported if Producer_counter + 1 equals to Consumer_counter and a EQE needs to be added. Maintained by HW (valid for the QUERY_EQ command only) */ pseudo_bit_t reserved14[0x00008]; /* -------------- */ pseudo_bit_t reserved15[0x00080]; /* -------------- */ -}; +};
/* Memory Translation Table (MTT) Entry #### michal - match to PRM */
@@ -2477,7 +2477,7 @@ struct hermonprm_mtt_st { /* Little Endian */ pseudo_bit_t reserved0[0x00002]; pseudo_bit_t ptag_l[0x0001d]; /* Low-order bits of Physical tag. The size of the field depends on the page size of the region. Maximum PTAG size is 52 bits. */ /* -------------- */ -}; +};
/* Memory Protection Table (MPT) Entry ### doesn't match PRM (new fields were added). new size in bytes : 0x54 */
@@ -2547,7 +2547,7 @@ struct hermonprm_mpt_st { /* Little Endian */ pseudo_bit_t mtt_fbo[0x00015]; /* First byte offset in the zero-based region - the first byte within the first block/page start address refers to. When mtt_rep is being used, fbo points within the replicated block (i.e. block-size x 2^mtt_rep) */ pseudo_bit_t reserved10[0x0000b]; /* -------------- */ -}; +};
/* Completion Queue Context Table Entry #### michal - match PRM */
@@ -2559,7 +2559,7 @@ struct hermonprm_completion_queue_context_st { /* Little Endian */ 0x6 - ARMED SOLICITED (Request Solicited Notification) 0xA - FIRED other - reserved - + Must be 0x0 in CQ initialization. Valid for the QUERY_CQ and HW2SW_CQ commands only. */ pseudo_bit_t reserved1[0x00005]; @@ -2605,7 +2605,7 @@ struct hermonprm_completion_queue_context_st { /* Little Endian */ pseudo_bit_t reserved11[0x00008]; /* -------------- */ pseudo_bit_t solicit_producer_indx[0x00018];/* Maintained by HW. - Valid for QUERY_CQ and HW2SW_CQ commands only. + Valid for QUERY_CQ and HW2SW_CQ commands only. */ pseudo_bit_t reserved12[0x00008]; /* -------------- */ @@ -2627,7 +2627,7 @@ struct hermonprm_completion_queue_context_st { /* Little Endian */ pseudo_bit_t reserved17[0x00003]; pseudo_bit_t db_record_addr_l[0x0001d];/* CQ DB Record physical address [31:3] */ /* -------------- */ -}; +};
/* GPIO_event_data #### michal - gdror fixed */
@@ -2640,7 +2640,7 @@ struct hermonprm_gpio_event_data_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00020]; /* -------------- */ -}; +};
/* Event_data Field - QP/EE Events #### michal - doesn't match PRM */
@@ -2657,7 +2657,7 @@ struct hermonprm_qp_ee_event_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved4[0x00060]; /* -------------- */ -}; +};
/* InfiniHost-III-EX Type0 Configuration Header ####michal - doesn't match PRM (new fields added, see below) */
@@ -2803,19 +2803,19 @@ struct hermonprm_mt25208_type0_st { /* Little Endian */ /* -------------- */ pseudo_bit_t uncorrectable_error_status_register[0x00020];/* 0 Training Error Status 4 Data Link Protocol Error Status - 12 Poisoned TLP Status - 13 Flow Control Protocol Error Status - 14 Completion Timeout Status - 15 Completer Abort Status - 16 Unexpected Completion Status - 17 Receiver Overflow Status - 18 Malformed TLP Status - 19 ECRC Error Status + 12 Poisoned TLP Status + 13 Flow Control Protocol Error Status + 14 Completion Timeout Status + 15 Completer Abort Status + 16 Unexpected Completion Status + 17 Receiver Overflow Status + 18 Malformed TLP Status + 19 ECRC Error Status 20 Unsupported Request Error Status */ /* -------------- */ pseudo_bit_t uncorrectable_error_mask_register[0x00020];/* 0 Training Error Mask 4 Data Link Protocol Error Mask - 12 Poisoned TLP Mask + 12 Poisoned TLP Mask 13 Flow Control Protocol Error Mask 14 Completion Timeout Mask 15 Completer Abort Mask @@ -2855,7 +2855,7 @@ struct hermonprm_mt25208_type0_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved13[0x006a0]; /* -------------- */ -}; +};
/* Event Data Field - Performance Monitor */
@@ -2873,7 +2873,7 @@ struct hermonprm_performance_monitor_event_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00040]; /* -------------- */ -}; +};
/* Event_data Field - Page Faults */
@@ -2897,7 +2897,7 @@ struct hermonprm_page_fault_event_data_st { /* Little Endian */ /* -------------- */ pseudo_bit_t prefetch_len[0x00020]; /* Indicates how many subsequent pages in the same memory region/window will be accessed by the following transaction after this page fault is resolved. measured in bytes. SW can use this information in order to page-in the subsequent pages if they are not present. */ /* -------------- */ -}; +};
/* WQE segments format */
@@ -2914,7 +2914,7 @@ struct hermonprm_wqe_segment_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved2[0x00080]; /* -------------- */ -}; +};
/* Event_data Field - Port State Change #### michal - match PRM */
@@ -2927,7 +2927,7 @@ struct hermonprm_port_state_change_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved3[0x00060]; /* -------------- */ -}; +};
/* Event_data Field - Completion Queue Error #### michal - match PRM */
@@ -2944,7 +2944,7 @@ struct hermonprm_completion_queue_error_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved3[0x00060]; /* -------------- */ -}; +};
/* Event_data Field - Completion Event #### michal - match PRM */
@@ -2954,12 +2954,12 @@ struct hermonprm_completion_event_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x000a0]; /* -------------- */ -}; +};
/* Event Queue Entry #### michal - match to PRM */
struct hermonprm_event_queue_entry_st { /* Little Endian */ - pseudo_bit_t event_sub_type[0x00008];/* Event Sub Type. + pseudo_bit_t event_sub_type[0x00008];/* Event Sub Type. Defined for events which have sub types, zero elsewhere. */ pseudo_bit_t reserved0[0x00008]; pseudo_bit_t event_type[0x00008]; /* Event Type */ @@ -2968,12 +2968,12 @@ struct hermonprm_event_queue_entry_st { /* Little Endian */ pseudo_bit_t event_data[6][0x00020];/* Delivers auxilary data to handle event. */ /* -------------- */ pseudo_bit_t reserved2[0x00007]; - pseudo_bit_t owner[0x00001]; /* Owner of the entry - 0 SW + pseudo_bit_t owner[0x00001]; /* Owner of the entry + 0 SW 1 HW */ pseudo_bit_t reserved3[0x00018]; /* -------------- */ -}; +};
/* QP/EE State Transitions Command Parameters ###michal - doesn't match PRM (field name changed) */
@@ -2986,7 +2986,7 @@ struct hermonprm_qp_ee_state_transitions_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved1[0x00800]; /* -------------- */ -}; +};
/* Completion Queue Entry Format #### michal - fixed by gdror */
@@ -3010,7 +3010,7 @@ struct hermonprm_completion_queue_entry_st { /* Little Endian */ For IPoIB (UD) and RawEth CQEs this field contains the RSS hash function value. Otherwise, this field is reserved. */ /* -------------- */ - pseudo_bit_t srq_rqpn[0x00018]; /* For Responder UD QPs, Remote (source) QP number. + pseudo_bit_t srq_rqpn[0x00018]; /* For Responder UD QPs, Remote (source) QP number. For Responder SRC QPs, SRQ number. Otherwise, this field is reserved. */ pseudo_bit_t ml_path_mac_index[0x00007];/* For responder UD over IB CQE: These are the lower LMC bits of the DLID in an incoming UD packet, higher bits of this field, that are not part of the LMC bits are zeroed by HW. Invalid if incoming message DLID is the permissive LID or incoming message is multicast. @@ -3028,17 +3028,17 @@ struct hermonprm_completion_queue_entry_st { /* Little Endian */ For responder UD over Ethernet and RawEth - it is VLAN-header[15:12] Otherwise, this field is reserved. */ /* -------------- */ - pseudo_bit_t smac31_0_rawether_ipoib_status[0x00020];/* For responder UD over Ethernet - source MAC[31:0] of the packet. - For responder RawEth and UD over IB - RawEth-IPoIB status {3 reserved, ipok,udp,tcp,ipv4opt,ipv6,ipv4vf,ipv4,rht(6),ipv6extmask(6),reserved(2),l2am,reserved(2),bfcs,reserved(2),enc} + pseudo_bit_t smac31_0_rawether_ipoib_status[0x00020];/* For responder UD over Ethernet - source MAC[31:0] of the packet. + For responder RawEth and UD over IB - RawEth-IPoIB status {3 reserved, ipok,udp,tcp,ipv4opt,ipv6,ipv4vf,ipv4,rht(6),ipv6extmask(6),reserved(2),l2am,reserved(2),bfcs,reserved(2),enc} Otherwise, this field is reserved. */ /* -------------- */ - pseudo_bit_t byte_cnt[0x00020]; /* Byte count of data transferred. Applicable for RDMA-read, Atomic and all receive operations. completions. + pseudo_bit_t byte_cnt[0x00020]; /* Byte count of data transferred. Applicable for RDMA-read, Atomic and all receive operations. completions. For Receive Queue that is subject for headers. separation, byte_cnt[31:24] specify number of bytes scattered to the first scatter entry (headers. length). Byte_cnt[23:0] specify total byte count received (including headers). */ /* -------------- */ pseudo_bit_t checksum[0x00010]; /* Valid for RawEth and IPoIB only. */ pseudo_bit_t wqe_counter[0x00010]; /* -------------- */ - pseudo_bit_t opcode[0x00005]; /* Send completions - same encoding as WQE. + pseudo_bit_t opcode[0x00005]; /* Send completions - same encoding as WQE. Error coding is 0x1F Receive: 0x0 - RDMA-Write with Immediate @@ -3052,14 +3052,14 @@ struct hermonprm_completion_queue_entry_st { /* Little Endian */ pseudo_bit_t reserved1[0x00010]; pseudo_bit_t reserved2[0x00008]; /* -------------- */ -}; +};
/* */
struct hermonprm_mcg_qps_st { /* Little Endian */ struct hermonprm_mcg_qp_dw_st dw[128]; /* -------------- */ -}; +};
/* */
@@ -3084,7 +3084,7 @@ struct hermonprm_mcg_hdr_st { /* Little Endian */ /* -------------- */ pseudo_bit_t gid0[0x00020]; /* -------------- */ -}; +};
/* */
@@ -3096,7 +3096,7 @@ struct hermonprm_sched_queue_context_st { /* Little Endian */ pseudo_bit_t reserved0[0x00006]; pseudo_bit_t weight[0x00010]; /* Weight of this SchQ */ /* -------------- */ -}; +};
/* */
@@ -3117,7 +3117,7 @@ struct hermonprm_ecc_detect_event_data_st { /* Little Endian */ pseudo_bit_t err_ra[0x00010]; pseudo_bit_t err_ca[0x00010]; /* -------------- */ -}; +};
/* Event_data Field - ECC Detection Event */
@@ -3142,14 +3142,14 @@ struct hermonprm_scrubbing_event_st { /* Little Endian */ pseudo_bit_t err_ra[0x00010]; /* Error row address */ pseudo_bit_t err_ca[0x00010]; /* Error column address */ /* -------------- */ -}; +};
/* */
struct hermonprm_eq_cmd_doorbell_st { /* Little Endian */ pseudo_bit_t reserved0[0x00020]; /* -------------- */ -}; +};
/* 0 */
@@ -3400,5 +3400,5 @@ struct hermonprm_hermon_prm_st { /* Little Endian */ /* -------------- */ pseudo_bit_t reserved64[0xffcfc0]; /* -------------- */ -}; +}; #endif /* H_prefix_hermonprm_bits_fixnames_MT25408_PRM_csp_H */ diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/arbel.c b/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/arbel.c index c121bfd..1044645 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/arbel.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/infiniband/arbel.c @@ -239,7 +239,7 @@ arbel_cmd_query_dev_lim ( struct arbel *arbel, static inline int arbel_cmd_query_fw ( struct arbel *arbel, struct arbelprm_query_fw *fw ) { return arbel_cmd ( arbel, - ARBEL_HCR_OUT_CMD ( ARBEL_HCR_QUERY_FW, + ARBEL_HCR_OUT_CMD ( ARBEL_HCR_QUERY_FW, 1, sizeof ( *fw ) ), 0, NULL, 0, fw ); } @@ -1551,7 +1551,7 @@ static int arbel_complete ( struct ib_device *ibdev, }
return rc; -} +}
/** * Poll completion queue diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c509-eisa.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c509-eisa.c index 195a844..4b7c1b0 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c509-eisa.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c509-eisa.c @@ -19,7 +19,7 @@ static int el3_eisa_probe ( struct nic *nic, struct eisa_device *eisa ) { nic->ioaddr = eisa->ioaddr; nic->irqno = 0; enable_eisa_device ( eisa ); - + /* Hand off to generic t5x9 probe routine */ return t5x9_probe ( nic, ISA_PROD_ID ( PROD_ID ), ISA_PROD_ID_MASK ); } diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c509.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c509.c index 4326a83..b4f4431 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c509.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c509.c @@ -21,7 +21,7 @@ FILE_LICENCE ( BSD2 ); * effectively defines another bus type similar to ISAPnP. Even the * original ISA cards can be programatically mapped to any I/O address * in the range 0x200-0x3e0. - * + * * However, there is a small problem: once you've activated a card, * the only ways to deactivate it will also wipe its tag, meaning that * you won't be able to subsequently reactivate it without going diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c595.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c595.c index 3178178..49fa0ab 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c595.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c595.c @@ -11,7 +11,7 @@ * the proper functioning of this software, nor do the authors assume any * responsibility for damages incurred with its use. * -* This code is based on Martin Renters' etherboot-4.4.3 3c509.c and +* This code is based on Martin Renters' etherboot-4.4.3 3c509.c and * Herb Peyerl's FreeBSD 3.4-RELEASE if_vx.c driver. * * Copyright (C) 1993-1994, David Greenman, Martin Renters. @@ -353,7 +353,7 @@ int offset; return (inw(BASE + VX_W0_EEPROM_DATA)); }
-static void +static void vxgetlink(void) { int n, k; @@ -374,8 +374,8 @@ vxgetlink(void) return; } GO_WINDOW(3); - vx_connector = (inl(BASE + VX_W3_INTERNAL_CFG) - & INTERNAL_CONNECTOR_MASK) + vx_connector = (inl(BASE + VX_W3_INTERNAL_CFG) + & INTERNAL_CONNECTOR_MASK) >> INTERNAL_CONNECTOR_BITS; if (vx_connector & 0x10) { vx_connector &= 0x0f; @@ -386,9 +386,9 @@ vxgetlink(void) } }
-static void +static void vxsetlink(void) -{ +{ int i, j; char *reason, *warning; static char prev_conn = -1; @@ -441,7 +441,7 @@ vxsetlink(void) default: /* AUI and MII fall here */ break; } - GO_WINDOW(1); + GO_WINDOW(1); }
static void t595_disable ( struct nic *nic ) { diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c595.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c595.h index e27d204..cbe5db0 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c595.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c595.h @@ -129,7 +129,7 @@ FILE_LICENCE ( BSD3 ); #define VX_W0_EEPROM_DATA 0x0c #define VX_W0_EEPROM_COMMAND 0x0a #define VX_W0_RESOURCE_CFG 0x08 -#define VX_W0_ADDRESS_CFG 0x06 +#define VX_W0_ADDRESS_CFG 0x06 #define VX_W0_CONFIG_CTRL 0x04 /* Read */ #define VX_W0_PRODUCT_ID 0x02 @@ -297,15 +297,15 @@ FILE_LICENCE ( BSD3 );
#define VX_BUSY_WAIT while (inw(BASE + VX_STATUS) & S_COMMAND_IN_PROGRESS)
-/* Address Config. Register. +/* Address Config. Register. * Window 0/Port 06 */
-#define ACF_CONNECTOR_BITS 14 +#define ACF_CONNECTOR_BITS 14 #define ACF_CONNECTOR_UTP 0 #define ACF_CONNECTOR_AUI 1 #define ACF_CONNECTOR_BNC 3 - + #define INTERNAL_CONNECTOR_BITS 20 #define INTERNAL_CONNECTOR_MASK 0x01700000
@@ -336,7 +336,7 @@ FILE_LICENCE ( BSD3 ); #define ERR_DRIBBLE (unsigned short) (0x1000)
/* - * TX Status. + * TX Status. * * Reports the transmit status of a completed transmission. Writing this * register pops the transmit completion stack. diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c5x9.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c5x9.c index 4d9bc8d..ceec14e 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c5x9.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c5x9.c @@ -124,7 +124,7 @@ static void t509_enable ( struct nic *nic ) { static void t509_reset ( struct nic *nic ) { t5x9_disable ( nic ); t509_enable ( nic ); -} +}
/************************************************************************** ETH_TRANSMIT - Transmit a frame diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c90x.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c90x.c index c190057..d378a4b 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/3c90x.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/3c90x.c @@ -32,7 +32,7 @@ * driver Donald Becker wrote for the Linux kernel, and with some assistance * from the remainder of the Etherboot distribution. * - * Indented with unix 'indent' command: + * Indented with unix 'indent' command: * $ indent -kr -i8 3c90x.c */
diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/amd8111e.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/amd8111e.c index 476d530..eaf6500 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/amd8111e.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/amd8111e.c @@ -1,7 +1,7 @@ -/* Advanced Micro Devices Inc. AMD8111E Linux Network Driver - * Copyright (C) 2004 Advanced Micro Devices +/* Advanced Micro Devices Inc. AMD8111E Linux Network Driver + * Copyright (C) 2004 Advanced Micro Devices * Copyright (C) 2005 Liu Tao liutao1980@gmail.com [etherboot port] - * + * * Copyright 2001,2002 Jeff Garzik jgarzik@mandrakesoft.com [ 8139cp.c,tg3.c ] * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com)[ tg3.c] * Copyright 1996-1999 Thomas Bogendoerfer [ pcnet32.c ] @@ -11,7 +11,7 @@ * Carsten Langgaard, carstenl@mips.com [ pcnet32.c ] * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. * - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,7 +24,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */
@@ -67,12 +67,12 @@ struct amd8111e_tx_desc { u16 tag_ctrl_cmd; u32 buf_phy_addr; u32 reserved; -}; +};
struct amd8111e_rx_desc { u32 reserved; u16 msg_len; - u16 tag_ctrl_info; + u16 tag_ctrl_info; u16 buf_len; u16 rx_flags; u32 buf_phy_addr; @@ -130,8 +130,8 @@ static void amd8111e_poll_link(struct amd8111e_priv *lp); static void amd8111e_restart(struct amd8111e_priv *lp);
-/* - * This function clears necessary the device registers. +/* + * This function clears necessary the device registers. */ static void amd8111e_init_hw_default(struct amd8111e_priv *lp) { @@ -211,8 +211,8 @@ static void amd8111e_init_hw_default(struct amd8111e_priv *lp) readl(mmio + CMD2); }
-/* - * This function initializes the device registers and starts the device. +/* + * This function initializes the device registers and starts the device. */ static int amd8111e_start(struct amd8111e_priv *lp) { @@ -228,7 +228,7 @@ static int amd8111e_start(struct amd8111e_priv *lp)
/* enable the port manager and set auto negotiation always */ writel(VAL1 | EN_PMGR, mmio + CMD3 ); - writel(XPHYANE | XPHYRST, mmio + CTRL2); + writel(XPHYANE | XPHYRST, mmio + CTRL2);
/* set control registers */ reg_val = readl(mmio + CTRL1); @@ -245,7 +245,7 @@ static int amd8111e_start(struct amd8111e_priv *lp) /* set default IPG to 96 */ writew(DEFAULT_IPG, mmio + IPG); - writew(DEFAULT_IPG - IFS1_DELTA, mmio + IFS1); + writew(DEFAULT_IPG - IFS1_DELTA, mmio + IFS1);
/* AutoPAD transmit, Retransmit on Underflow */ writel(VAL0 | APAD_XMT | REX_RTRY | REX_UFLO, mmio + CMD2); @@ -255,7 +255,7 @@ static int amd8111e_start(struct amd8111e_priv *lp)
/* Setting the MAC address to the device */ for(i = 0; i < ETH_ALEN; i++) - writeb(nic->node_addr[i], mmio + PADR + i); + writeb(nic->node_addr[i], mmio + PADR + i);
/* set RUN bit to start the chip, interrupt not enabled */ writel(VAL2 | RDMD0 | VAL0 | RUN, mmio + CMD0); @@ -265,7 +265,7 @@ static int amd8111e_start(struct amd8111e_priv *lp) return 0; }
-/* +/* This function will read the PHY registers. */ static int amd8111e_read_phy(struct amd8111e_priv *lp, int phy_addr, int reg, u32 *val) @@ -294,8 +294,8 @@ static int amd8111e_read_phy(struct amd8111e_priv *lp, int phy_addr, int reg, u3 return 0; }
-/* -This function will write into PHY registers. +/* +This function will write into PHY registers. */ #if 0 static int amd8111e_write_phy(struct amd8111e_priv *lp, int phy_addr, int reg, u32 val) @@ -549,7 +549,7 @@ static void amd8111e_transmit(struct nic *nic, const char *dst_addr, lp->tx_ring[index].buf_len = cpu_to_le16(ETH_HLEN + size); lp->tx_ring[index].buf_phy_addr = cpu_to_le32(virt_to_bus(frame)); wmb(); - lp->tx_ring[index].tx_flags = + lp->tx_ring[index].tx_flags = cpu_to_le16(OWN_BIT | STP_BIT | ENP_BIT | ADD_FCS_BIT | LTINT_BIT); writel(VAL1 | TDMD0, lp->mmio + CMD0); readl(lp->mmio + CMD0); diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/amd8111e.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/amd8111e.h index a402a63..94b6d5f 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/amd8111e.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/amd8111e.h @@ -1,6 +1,6 @@ /* - * Advanced Micro Devices Inc. AMD8111E Linux Network Driver - * Copyright (C) 2003 Advanced Micro Devices + * Advanced Micro Devices Inc. AMD8111E Linux Network Driver + * Copyright (C) 2003 Advanced Micro Devices * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,7 +14,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA
Module Name: @@ -23,10 +23,10 @@ Module Name:
Abstract: - AMD8111 based 10/100 Ethernet Controller driver definitions. + AMD8111 based 10/100 Ethernet Controller driver definitions.
Environment: - + Kernel Mode
Revision History: @@ -42,7 +42,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
/* Command style register access
-Registers CMD0, CMD2, CMD3,CMD7 and INTEN0 uses a write access technique called command style access. It allows the write to selected bits of this register without altering the bits that are not selected. Command style registers are divided into 4 bytes that can be written independently. Higher order bit of each byte is the value bit that specifies the value that will be written into the selected bits of register. +Registers CMD0, CMD2, CMD3,CMD7 and INTEN0 uses a write access technique called command style access. It allows the write to selected bits of this register without altering the bits that are not selected. Command style registers are divided into 4 bytes that can be written independently. Higher order bit of each byte is the value bit that specifies the value that will be written into the selected bits of register.
eg., if the value 10011010b is written into the least significant byte of a command style register, bits 1,3 and 4 of the register will be set to 1, and the other bits will not be altered. If the value 00011010b is written into the same byte, bits 1,3 and 4 will be cleared to 0 and the other bits will not be altered.
@@ -124,8 +124,8 @@ typedef enum { ASF_INIT_DONE = (1 << 1), ASF_INIT_PRESENT = (1 << 0),
-}STAT_ASF_BITS; - +}STAT_ASF_BITS; + typedef enum {
MIB_CMD_ACTIVE = (1 << 15 ), @@ -159,7 +159,7 @@ typedef enum { typedef enum {
INTR = (1 << 31), - PCSINT = (1 << 28), + PCSINT = (1 << 28), LCINT = (1 << 27), APINT5 = (1 << 26), APINT4 = (1 << 25), @@ -447,7 +447,7 @@ typedef enum { DLY_INT_B_T1 = (1 << 25), DLY_INT_B_T0 = ( 1 << 24), EVENT_COUNT_B = (0xF << 16) | (0x1 << 20),/* 20:16 */ - MAX_DELAY_TIME_B = (0xF << 0) | (0xF << 4) | (1 << 8)| + MAX_DELAY_TIME_B = (0xF << 0) | (0xF << 4) | (1 << 8)| (1 << 9) | (1 << 10), /* 10:0 */ }DLY_INT_B_BITS;
@@ -570,8 +570,8 @@ typedef enum { #define MIN_IPG 96 #define MAX_IPG 255 #define IPG_STEP 16 -#define CSTATE 1 -#define SSTATE 2 +#define CSTATE 1 +#define SSTATE 2
/* amd8111e decriptor flag definitions */ typedef enum { @@ -605,7 +605,7 @@ typedef enum { #define TCC_MASK 0x0003
/* driver ioctl parameters */ -#define AMD8111E_REG_DUMP_LEN 13*sizeof(u32) +#define AMD8111E_REG_DUMP_LEN 13*sizeof(u32)
/* crc generator constants */ #define CRC32 0xedb88320 diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2.c index a986bde..0918c4f 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2.c @@ -76,7 +76,7 @@ static struct flash_spec flash_table[] = SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 0100"}, /* Entry 0101: ST M45PE10 (non-buffered flash, TetonII B0) */ - {0x19000002, 0x5b808201, 0x000500db, 0x03840253, 0xaf020406, + {0x19000002, 0x5b808201, 0x000500db, 0x03840253, 0xaf020406, 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*2, "Entry 0101: ST M45PE10 (128kB non-bufferred)"}, @@ -232,7 +232,7 @@ bnx2_write_phy(struct bnx2 *bp, u32 reg, u32 val) BNX2_EMAC_MDIO_COMM_COMMAND_WRITE | BNX2_EMAC_MDIO_COMM_START_BUSY | BNX2_EMAC_MDIO_COMM_DISEXT; REG_WR(bp, BNX2_EMAC_MDIO_COMM, val1); - + for (i = 0; i < 50; i++) { udelay(10);
@@ -386,7 +386,7 @@ bnx2_resolve_flow_ctrl(struct bnx2 *bp) u32 local_adv, remote_adv;
bp->flow_ctrl = 0; - if ((bp->autoneg & (AUTONEG_SPEED | AUTONEG_FLOW_CTRL)) != + if ((bp->autoneg & (AUTONEG_SPEED | AUTONEG_FLOW_CTRL)) != (AUTONEG_SPEED | AUTONEG_FLOW_CTRL)) {
if (bp->duplex == DUPLEX_FULL) { @@ -1270,7 +1270,7 @@ bnx2_alloc_bad_rbuf(struct bnx2 *bp) }
static void -bnx2_set_mac_addr(struct bnx2 *bp) +bnx2_set_mac_addr(struct bnx2 *bp) { u32 val; u8 *mac_addr = bp->nic->node_addr; @@ -1279,7 +1279,7 @@ bnx2_set_mac_addr(struct bnx2 *bp)
REG_WR(bp, BNX2_EMAC_MAC_MATCH0, val);
- val = (mac_addr[2] << 24) | (mac_addr[3] << 16) | + val = (mac_addr[2] << 24) | (mac_addr[3] << 16) | (mac_addr[4] << 8) | mac_addr[5];
REG_WR(bp, BNX2_EMAC_MAC_MATCH1, val); @@ -1497,7 +1497,7 @@ bnx2_init_cpus(struct bnx2 *bp) cpu_reg.bp = BNX2_TXP_CPU_HW_BREAKPOINT; cpu_reg.spad_base = BNX2_TXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - + fw.ver_major = bnx2_TXP_b06FwReleaseMajor; fw.ver_minor = bnx2_TXP_b06FwReleaseMinor; fw.ver_fix = bnx2_TXP_b06FwReleaseFix; @@ -1543,7 +1543,7 @@ bnx2_init_cpus(struct bnx2 *bp) cpu_reg.bp = BNX2_TPAT_CPU_HW_BREAKPOINT; cpu_reg.spad_base = BNX2_TPAT_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - + fw.ver_major = bnx2_TPAT_b06FwReleaseMajor; fw.ver_minor = bnx2_TPAT_b06FwReleaseMinor; fw.ver_fix = bnx2_TPAT_b06FwReleaseFix; @@ -1589,7 +1589,7 @@ bnx2_init_cpus(struct bnx2 *bp) cpu_reg.bp = BNX2_COM_CPU_HW_BREAKPOINT; cpu_reg.spad_base = BNX2_COM_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - + fw.ver_major = bnx2_COM_b06FwReleaseMajor; fw.ver_minor = bnx2_COM_b06FwReleaseMinor; fw.ver_fix = bnx2_COM_b06FwReleaseFix; @@ -1659,7 +1659,7 @@ bnx2_enable_nvram_access(struct bnx2 *bp)
val = REG_RD(bp, BNX2_NVM_ACCESS_ENABLE); /* Enable both bits, even on read. */ - REG_WR(bp, BNX2_NVM_ACCESS_ENABLE, + REG_WR(bp, BNX2_NVM_ACCESS_ENABLE, val | BNX2_NVM_ACCESS_ENABLE_EN | BNX2_NVM_ACCESS_ENABLE_WR_EN); }
@@ -1670,7 +1670,7 @@ bnx2_disable_nvram_access(struct bnx2 *bp)
val = REG_RD(bp, BNX2_NVM_ACCESS_ENABLE); /* Disable both bits, even after read. */ - REG_WR(bp, BNX2_NVM_ACCESS_ENABLE, + REG_WR(bp, BNX2_NVM_ACCESS_ENABLE, val & ~(BNX2_NVM_ACCESS_ENABLE_EN | BNX2_NVM_ACCESS_ENABLE_WR_EN)); } @@ -1853,9 +1853,9 @@ bnx2_init_chip(struct bnx2 *bp) val = BNX2_DMA_CONFIG_DATA_BYTE_SWAP | BNX2_DMA_CONFIG_DATA_WORD_SWAP | #if __BYTE_ORDER == __BIG_ENDIAN - BNX2_DMA_CONFIG_CNTL_BYTE_SWAP | + BNX2_DMA_CONFIG_CNTL_BYTE_SWAP | #endif - BNX2_DMA_CONFIG_CNTL_WORD_SWAP | + BNX2_DMA_CONFIG_CNTL_WORD_SWAP | DMA_READ_CHANS << 12 | DMA_WRITE_CHANS << 16;
@@ -1946,7 +1946,7 @@ bnx2_init_chip(struct bnx2 *bp) REG_WR(bp, BNX2_HC_STATISTICS_ADDR_H, (u64) bp->stats_blk_mapping >> 32);
- REG_WR(bp, BNX2_HC_TX_QUICK_CONS_TRIP, + REG_WR(bp, BNX2_HC_TX_QUICK_CONS_TRIP, (bp->tx_quick_cons_trip_int << 16) | bp->tx_quick_cons_trip);
REG_WR(bp, BNX2_HC_RX_QUICK_CONS_TRIP, @@ -2688,10 +2688,10 @@ DRIVER ( "BNX2", nic_driver, pci_driver, bnx2_driver, bnx2_probe, bnx2_disable ) /* static struct pci_driver bnx2_driver __pci_driver = { .type = NIC_DRIVER, - .name = "BNX2", + .name = "BNX2", .probe = bnx2_probe, - .ids = bnx2_nics, - .id_count = sizeof(bnx2_nics)/sizeof(bnx2_nics[0]), - .class = 0, + .ids = bnx2_nics, + .id_count = sizeof(bnx2_nics)/sizeof(bnx2_nics[0]), + .class = 0, }; */ diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2.h index 9267868..163bdce 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2.h @@ -149,9 +149,9 @@ typedef int pci_power_t; */ struct tx_bd { u32 tx_bd_haddr_hi; - u32 tx_bd_haddr_lo; - u32 tx_bd_mss_nbytes; - u32 tx_bd_vlan_tag_flags; + u32 tx_bd_haddr_lo; + u32 tx_bd_mss_nbytes; + u32 tx_bd_vlan_tag_flags; #define TX_BD_FLAGS_CONN_FAULT (1<<0) #define TX_BD_FLAGS_TCP_UDP_CKSUM (1<<1) #define TX_BD_FLAGS_IP_CKSUM (1<<2) @@ -4018,10 +4018,10 @@ struct bnx2 { struct sw_bd *tx_buf_ring; int tx_ring_size;
- u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); + u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); u16 hw_tx_cons;
-#ifdef BCM_VLAN +#ifdef BCM_VLAN struct vlan_group *vlgrp; #endif
@@ -4076,7 +4076,7 @@ struct bnx2 { #define CHIP_REV_Ax 0x00000000 #define CHIP_REV_Bx 0x00001000 #define CHIP_REV_Cx 0x00002000 - + #define CHIP_METAL(bp) (((bp)->chip_id) & 0x00000ff0) #define CHIP_BONDING(bp) (((bp)->chip_id) & 0x0000000f)
@@ -4154,7 +4154,7 @@ struct bnx2 {
u32 advertising;
- u8 req_flow_ctrl; /* flow ctrl advertisement */ + u8 req_flow_ctrl; /* flow ctrl advertisement */ /* settings or forced */ /* settings */ u8 autoneg; @@ -4304,7 +4304,7 @@ struct fw_info { #define BNX2_DRV_MSG_DATA_WAIT1 0x00020000 #define BNX2_DRV_MSG_DATA_WAIT2 0x00030000 #define BNX2_DRV_MSG_DATA_WAIT3 0x00040000 - + #define BNX2_DRV_MSG_SEQ 0x0000ffff
#define BNX2_FW_MB 0x00000008 @@ -4314,38 +4314,38 @@ struct fw_info { #define BNX2_FW_MSG_STATUS_FAILURE 0x00ff0000
#define BNX2_LINK_STATUS 0x0000000c -#define BNX2_LINK_STATUS_INIT_VALUE 0xffffffff -#define BNX2_LINK_STATUS_LINK_UP 0x1 -#define BNX2_LINK_STATUS_LINK_DOWN 0x0 +#define BNX2_LINK_STATUS_INIT_VALUE 0xffffffff +#define BNX2_LINK_STATUS_LINK_UP 0x1 +#define BNX2_LINK_STATUS_LINK_DOWN 0x0 #define BNX2_LINK_STATUS_SPEED_MASK 0x1e -#define BNX2_LINK_STATUS_AN_INCOMPLETE (0<<1) -#define BNX2_LINK_STATUS_10HALF (1<<1) -#define BNX2_LINK_STATUS_10FULL (2<<1) -#define BNX2_LINK_STATUS_100HALF (3<<1) -#define BNX2_LINK_STATUS_100BASE_T4 (4<<1) -#define BNX2_LINK_STATUS_100FULL (5<<1) -#define BNX2_LINK_STATUS_1000HALF (6<<1) -#define BNX2_LINK_STATUS_1000FULL (7<<1) -#define BNX2_LINK_STATUS_2500HALF (8<<1) -#define BNX2_LINK_STATUS_2500FULL (9<<1) -#define BNX2_LINK_STATUS_AN_ENABLED (1<<5) -#define BNX2_LINK_STATUS_AN_COMPLETE (1<<6) -#define BNX2_LINK_STATUS_PARALLEL_DET (1<<7) -#define BNX2_LINK_STATUS_RESERVED (1<<8) -#define BNX2_LINK_STATUS_PARTNER_AD_1000FULL (1<<9) -#define BNX2_LINK_STATUS_PARTNER_AD_1000HALF (1<<10) -#define BNX2_LINK_STATUS_PARTNER_AD_100BT4 (1<<11) -#define BNX2_LINK_STATUS_PARTNER_AD_100FULL (1<<12) -#define BNX2_LINK_STATUS_PARTNER_AD_100HALF (1<<13) -#define BNX2_LINK_STATUS_PARTNER_AD_10FULL (1<<14) -#define BNX2_LINK_STATUS_PARTNER_AD_10HALF (1<<15) -#define BNX2_LINK_STATUS_TX_FC_ENABLED (1<<16) -#define BNX2_LINK_STATUS_RX_FC_ENABLED (1<<17) -#define BNX2_LINK_STATUS_PARTNER_SYM_PAUSE_CAP (1<<18) -#define BNX2_LINK_STATUS_PARTNER_ASYM_PAUSE_CAP (1<<19) -#define BNX2_LINK_STATUS_SERDES_LINK (1<<20) -#define BNX2_LINK_STATUS_PARTNER_AD_2500FULL (1<<21) -#define BNX2_LINK_STATUS_PARTNER_AD_2500HALF (1<<22) +#define BNX2_LINK_STATUS_AN_INCOMPLETE (0<<1) +#define BNX2_LINK_STATUS_10HALF (1<<1) +#define BNX2_LINK_STATUS_10FULL (2<<1) +#define BNX2_LINK_STATUS_100HALF (3<<1) +#define BNX2_LINK_STATUS_100BASE_T4 (4<<1) +#define BNX2_LINK_STATUS_100FULL (5<<1) +#define BNX2_LINK_STATUS_1000HALF (6<<1) +#define BNX2_LINK_STATUS_1000FULL (7<<1) +#define BNX2_LINK_STATUS_2500HALF (8<<1) +#define BNX2_LINK_STATUS_2500FULL (9<<1) +#define BNX2_LINK_STATUS_AN_ENABLED (1<<5) +#define BNX2_LINK_STATUS_AN_COMPLETE (1<<6) +#define BNX2_LINK_STATUS_PARALLEL_DET (1<<7) +#define BNX2_LINK_STATUS_RESERVED (1<<8) +#define BNX2_LINK_STATUS_PARTNER_AD_1000FULL (1<<9) +#define BNX2_LINK_STATUS_PARTNER_AD_1000HALF (1<<10) +#define BNX2_LINK_STATUS_PARTNER_AD_100BT4 (1<<11) +#define BNX2_LINK_STATUS_PARTNER_AD_100FULL (1<<12) +#define BNX2_LINK_STATUS_PARTNER_AD_100HALF (1<<13) +#define BNX2_LINK_STATUS_PARTNER_AD_10FULL (1<<14) +#define BNX2_LINK_STATUS_PARTNER_AD_10HALF (1<<15) +#define BNX2_LINK_STATUS_TX_FC_ENABLED (1<<16) +#define BNX2_LINK_STATUS_RX_FC_ENABLED (1<<17) +#define BNX2_LINK_STATUS_PARTNER_SYM_PAUSE_CAP (1<<18) +#define BNX2_LINK_STATUS_PARTNER_ASYM_PAUSE_CAP (1<<19) +#define BNX2_LINK_STATUS_SERDES_LINK (1<<20) +#define BNX2_LINK_STATUS_PARTNER_AD_2500FULL (1<<21) +#define BNX2_LINK_STATUS_PARTNER_AD_2500HALF (1<<22)
#define BNX2_DRV_PULSE_MB 0x00000010 #define BNX2_DRV_PULSE_SEQ_MASK 0x00007fff @@ -4525,7 +4525,7 @@ struct fw_info { 0x00020000) #define BNX2_BC_STATE_RESET_TYPE_VAUX (BNX2_BC_STATE_RESET_TYPE_SIG | \ 0x00030000) -#define BNX2_BC_STATE_RESET_TYPE_DRV_MASK DRV_MSG_CODE +#define BNX2_BC_STATE_RESET_TYPE_DRV_MASK DRV_MSG_CODE #define BNX2_BC_STATE_RESET_TYPE_DRV_RESET (BNX2_BC_STATE_RESET_TYPE_SIG | \ DRV_MSG_CODE_RESET) #define BNX2_BC_STATE_RESET_TYPE_DRV_UNLOAD (BNX2_BC_STATE_RESET_TYPE_SIG | \ diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2_fw.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2_fw.h index 8158974..69287cf 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2_fw.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/bnx2_fw.h @@ -1934,7 +1934,7 @@ static u32 bnx2_RXP_b06FwText[(0x588c/4) + 1] = { 0x10c00007, 0x00000000, 0x8ca20000, 0x24c6ffff, 0x24a50004, 0xac820000, 0x14c0fffb, 0x24840004, 0x03e00008, 0x00000000, 0x0a00161f, 0x00a01021, 0xac860000, 0x00000000, 0x00000000, 0x24840004, 0x00a01021, 0x1440fffa, - 0x24a5ffff, 0x03e00008, 0x00000000, 0x00000000 }; + 0x24a5ffff, 0x03e00008, 0x00000000, 0x00000000 };
static u32 bnx2_RXP_b06FwData[(0x0/4) + 1] = { 0x0 }; static u32 bnx2_RXP_b06FwRodata[(0x28/4) + 1] = { diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.c index ee34d0c..a938ec3 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.c @@ -9,14 +9,14 @@ From: Russ Nelson nelson@crynwr.com Date: Tue, 18 Mar 2008 12:42:00 -0400 Subject: Re: [Etherboot-developers] cs89x0 driver in etherboot - -- quote from email + -- quote from email As copyright holder, if I say it doesn't conflict with the GPL, then it doesn't conflict with the GPL.
However, there's no point in causing people's brains to overheat, so yes, I grant permission for the code to be relicensed under the GPLv2. Please make sure that this change in licensing makes its - way upstream. -russ + way upstream. -russ -- quote from email **/
@@ -27,7 +27,7 @@ FILE_LICENCE ( GPL2_ONLY ); Permission is granted to distribute the enclosed cs89x0.[ch] driver only in conjunction with the Etherboot package. The code is ordinarily distributed under the GPL. - + Russ Nelson, January 2000
ChangeLog: @@ -516,7 +516,7 @@ static int cs89x0_probe ( struct nic *nic, struct isa_device *isa __unused ) { eth_cs_type==CS8920M?"M":"", cs_revision, eth_nic_base); -#ifndef EMBEDDED +#ifndef EMBEDDED /* First check to see if an EEPROM is attached*/ if ((readreg(PP_SelfST) & EEPROM_PRESENT) == 0) { printf("\ncs: no EEPROM...\n"); @@ -593,7 +593,7 @@ static int cs89x0_probe ( struct nic *nic, struct isa_device *isa __unused ) { eth_adapter_cnf = A_CNF_10B_T | A_CNF_MEDIA_10B_T; eth_auto_neg_cnf = EE_AUTO_NEG_ENABLE | IMM_BIT; #endif -#ifndef EMBEDDED +#ifndef EMBEDDED /* Set the LineCTL quintuplet based on adapter configuration read from EEPROM */ if ((eth_adapter_cnf & A_CNF_EXTND_10B_2) && @@ -709,7 +709,7 @@ static void cs89x0_disable ( struct nic *nic, cs89x0_reset(nic); } -static isa_probe_addr_t cs89x0_probe_addrs[] = { +static isa_probe_addr_t cs89x0_probe_addrs[] = { #ifndef EMBEDDED /* use "conservative" default values for autoprobing */ 0x300, 0x320, 0x340, 0x200, 0x220, 0x240, diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.h index a36b907..4cb6235 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.h @@ -5,14 +5,14 @@ From: Russ Nelson nelson@crynwr.com Date: Tue, 18 Mar 2008 12:42:00 -0400 Subject: Re: [Etherboot-developers] cs89x0 driver in etherboot - -- quote from email + -- quote from email As copyright holder, if I say it doesn't conflict with the GPL, then it doesn't conflict with the GPL.
However, there's no point in causing people's brains to overheat, so yes, I grant permission for the code to be relicensed under the GPLv2. Please make sure that this change in licensing makes its - way upstream. -russ + way upstream. -russ -- quote from email **/
diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.txt b/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.txt index 72b7df2..4059932 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.txt +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/cs89x0.txt @@ -6,14 +6,14 @@ From: Russ Nelson nelson@crynwr.com Date: Tue, 18 Mar 2008 12:42:00 -0400 Subject: Re: [Etherboot-developers] cs89x0 driver in etherboot - -- quote from email + -- quote from email As copyright holder, if I say it doesn't conflict with the GPL, then it doesn't conflict with the GPL.
However, there's no point in causing people's brains to overheat, so yes, I grant permission for the code to be relicensed under the GPLv2. Please make sure that this change in licensing makes its - way upstream. -russ + way upstream. -russ -- quote from email **/
diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/davicom.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/davicom.c index 1411774..6962371 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/davicom.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/davicom.c @@ -1,11 +1,11 @@ #ifdef ALLMULTI #error multicast support is not yet implemented #endif -/* +/* DAVICOM DM9009/DM9102/DM9102A Etherboot Driver V1.00
- This driver was ported from Marty Connor's Tulip Etherboot driver. - Thanks Marty Connor (mdc@etherboot.org) + This driver was ported from Marty Connor's Tulip Etherboot driver. + Thanks Marty Connor (mdc@etherboot.org)
This davicom etherboot driver supports DM9009/DM9102/DM9102A/ DM9102A+DM9801/DM9102A+DM9802 NICs. @@ -27,14 +27,14 @@ FILE_LICENCE ( GPL_ANY ); Do the different programming for DM9801/DM9802
12 OCT 2000 Sten 0.90 - This driver was ported from tulip driver and it + This driver was ported from tulip driver and it has the following difference. Changed symbol tulip/TULIP to davicom/DAVICOM Deleted some code that did not use in this driver. Used chain-strcture to replace ring structure for both TX/RX descriptor. Allocated two tx descriptor. - According current media mode to set operating + According current media mode to set operating register(CR6) */
@@ -216,7 +216,7 @@ static int phy_read(int location) /* Send Phy addres */ for (i=0x10; i>0; i=i>>1) phy_write_1bit(io_dcr9, phy_addr&i ? PHY_DATA_1: PHY_DATA_0); - + /* Send register addres */ for (i=0x10; i>0; i=i>>1) phy_write_1bit(io_dcr9, location&i ? PHY_DATA_1: PHY_DATA_0); @@ -239,7 +239,7 @@ static int phy_read(int location) static void phy_write(int location, u16 phy_data) { u16 i, phy_addr=1; - u32 io_dcr9; + u32 io_dcr9;
whereami("phy_write\n");
@@ -309,7 +309,7 @@ static int phy_read_1bit(u32 ee_addr) }
/* - DM9801/DM9802 present check and program + DM9801/DM9802 present check and program */ static void HPNA_process(void) { @@ -351,7 +351,7 @@ static void davicom_media_chk(struct nic * nic __unused) /* wait */ ;
if ( (phy_read(1) & 0x24) == 0x24 ) { - if (phy_read(17) & 0xa000) + if (phy_read(17) & 0xa000) csr6 |= 0x00000200; /* Full Duplex mode */ } else csr6 |= 0x00040000; /* Select DM9801/DM9802 when Ethernet link failed */ @@ -553,7 +553,7 @@ static void davicom_transmit(struct nic *nic, const char *d, unsigned int t, if (currticks() >= to) { DBG ("TX Timeout!\n"); } - + /* Point to next TX descriptor */ TxPtr = (++TxPtr >= NTXD) ? 0:TxPtr; /* Sten 10/9 */
diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/depca.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/depca.c index 735a52d..eb9155b 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/depca.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/depca.c @@ -14,9 +14,9 @@ FILE_LICENCE ( GPL_ANY );
Copyright 1994 David C. Davies - and + and United States Government - (as represented by the Director, National Security Agency). + (as represented by the Director, National Security Agency).
Copyright 1995 Digital Equipment Corporation.
@@ -71,7 +71,7 @@ FILE_LICENCE ( GPL_ANY ); Digital Equipment Corporation, 1989 8) "DEC EtherWORKS Turbo_(TP BNC) Ethernet Controller Owners Manual", Digital Equipment corporation, 1991, Pub. #EK-DE202-OM.001 - +
Peter Bauer's depca.c (V0.5) was referred to when debugging V0.1 of this driver. @@ -145,20 +145,20 @@ FILE_LICENCE ( GPL_ANY ); [Alan Cox: Changed the code to allow command line irq/io assignments] [Dave Davies: Changed the code to allow command line mem/name assignments] - 6) run the net startup bits for your eth?? interface manually - (usually /etc/rc.inet[12] at boot time). + 6) run the net startup bits for your eth?? interface manually + (usually /etc/rc.inet[12] at boot time). 7) enjoy!
Note that autoprobing is not allowed in loadable modules - the system is already up and running and you're messing with interrupts.
- To unload a module, turn off the associated interface + To unload a module, turn off the associated interface 'ifconfig eth?? down' then 'rmmod depca'.
To assign a base memory address for the shared memory when running as a loadable module, see 5 above. To include the adapter name (if you have no PROM but know the card name) also see 5 above. Note that this last - option will not work with kernel built-in depca's. + option will not work with kernel built-in depca's.
The shared memory assignment for a loadable module makes sense to avoid the 'memory autoprobe' picking the wrong shared memory (for the case of @@ -167,7 +167,7 @@ FILE_LICENCE ( GPL_ANY ); ************************************************************************ Support for MCA EtherWORKS cards added 11-3-98. Verified to work with up to 2 DE212 cards in a system (although not - fully stress-tested). + fully stress-tested).
Currently known bugs/limitations:
@@ -186,7 +186,7 @@ FILE_LICENCE ( GPL_ANY ); ----------------
Version Date Description - + 0.1 25-jan-94 Initial writing. 0.2 27-jan-94 Added LANCE TX hardware buffer chaining. 0.3 1-feb-94 Added multiple DEPCA support. @@ -200,7 +200,7 @@ FILE_LICENCE ( GPL_ANY ); 0.351 30-apr-94 Added EISA support. Added DE422 recognition. 0.36 16-may-94 DE422 fix released. 0.37 22-jul-94 Added MODULE support - 0.38 15-aug-94 Added DBR ROM switch in depca_close(). + 0.38 15-aug-94 Added DBR ROM switch in depca_close(). Multi DEPCA bug fix. 0.38axp 15-sep-94 Special version for Alpha AXP Linux V1.0. 0.381 12-dec-94 Added DE101 recognition, fix multicast bug. @@ -208,17 +208,17 @@ FILE_LICENCE ( GPL_ANY ); 0.383 22-feb-95 Fix for conflict with VESA SCSI reported by stromain@alf.dec.com 0.384 17-mar-95 Fix a ring full bug reported by bkm@star.rl.ac.uk - 0.385 3-apr-95 Fix a recognition bug reported by + 0.385 3-apr-95 Fix a recognition bug reported by ryan.niemi@lastfrontier.com 0.386 21-apr-95 Fix the last fix...sorry, must be galloping senility 0.40 25-May-95 Rewrite for portability & updated. ALPHA support from jestabro@amt.tay1.dec.com 0.41 26-Jun-95 Added verify_area() calls in depca_ioctl() from suggestion by heiko@colossus.escape.de - 0.42 27-Dec-95 Add 'mem' shared memory assignment for loadable + 0.42 27-Dec-95 Add 'mem' shared memory assignment for loadable modules. Add 'adapter_name' for loadable modules when no PROM. - Both above from a suggestion by + Both above from a suggestion by pchen@woodruffs121.residence.gatech.edu. Add new multicasting code. 0.421 22-Apr-96 Fix alloc_device() bug jari@markkus2.fimr.fi @@ -228,7 +228,7 @@ FILE_LICENCE ( GPL_ANY ); 0.44 1-Sep-97 Fix *_probe() to test check_region() first - bug reported by mmogilvi@elbert.uccs.edu 0.45 3-Nov-98 Added support for MCA EtherWORKS (DE210/DE212) cards - by tymm@computer.org + by tymm@computer.org 0.451 5-Nov-98 Fixed mca stuff cuz I'm a dummy. tymm@computer.org 0.5 14-Nov-98 Re-spin for 2.1.x kernels. 0.51 27-Jun-99 Correct received packet length for CRC from @@ -257,17 +257,17 @@ FILE_LICENCE ( GPL_ANY ); #define DEPCA_RBSA 0x0e /* RAM buffer starting address (2k buff.) */
/* -** These are LANCE registers addressable through nic->ioaddr + DEPCA_ADDR +** These are LANCE registers addressable through nic->ioaddr + DEPCA_ADDR */ #define CSR0 0 #define CSR1 1 #define CSR2 2 #define CSR3 3
-/* -** NETWORK INTERFACE CSR (NI_CSR) bit definitions +/* +** NETWORK INTERFACE CSR (NI_CSR) bit definitions */ - + #define TO 0x0100 /* Time Out for remote boot */ #define SHE 0x0080 /* SHadow memory Enable */ #define BS 0x0040 /* Bank Select */ @@ -279,8 +279,8 @@ FILE_LICENCE ( GPL_ANY ); #define IEN 0x0002 /* Interrupt tristate ENable (1->enable) */ #define LED 0x0001 /* LED control */
-/* -** Control and Status Register 0 (CSR0) bit definitions +/* +** Control and Status Register 0 (CSR0) bit definitions */
#define ERR 0x8000 /* Error summary */ @@ -311,7 +311,7 @@ FILE_LICENCE ( GPL_ANY ); #define BCON 0x0001 /* Byte CONtrol */
/* -** Initialization Block Mode Register +** Initialization Block Mode Register */
#define PROM 0x8000 /* Promiscuous Mode */ @@ -325,7 +325,7 @@ FILE_LICENCE ( GPL_ANY ); #define DRX 0x0001 /* Disable the Receiver */
/* -** Receive Message Descriptor 1 (RMD1) bit definitions. +** Receive Message Descriptor 1 (RMD1) bit definitions. */
#define R_OWN 0x80000000 /* Owner bit 0 = host, 1 = lance */ @@ -338,7 +338,7 @@ FILE_LICENCE ( GPL_ANY ); #define R_ENP 0x0100 /* End of Packet */
/* -** Transmit Message Descriptor 1 (TMD1) bit definitions. +** Transmit Message Descriptor 1 (TMD1) bit definitions. */
#define T_OWN 0x80000000 /* Owner bit 0 = host, 1 = lance */ @@ -411,14 +411,14 @@ static char *adapter_name[] = { ** Memory Alignment. Each descriptor is 4 longwords long. To force a ** particular alignment on the TX descriptor, adjust DESC_SKIP_LEN and ** DESC_ALIGN. ALIGN aligns the start address of the private memory area -** and hence the RX descriptor ring's first entry. +** and hence the RX descriptor ring's first entry. */ #define ALIGN4 ((u32)4 - 1) /* 1 longword align */ #define ALIGN8 ((u32)8 - 1) /* 2 longword (quadword) align */ #define ALIGN ALIGN8 /* Keep the LANCE happy... */
/* -** The DEPCA Rx and Tx ring descriptors. +** The DEPCA Rx and Tx ring descriptors. */ struct depca_rx_desc { volatile s32 base; diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/dmfe.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/dmfe.c index dd6c1de..1887266 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/dmfe.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/dmfe.c @@ -1,6 +1,6 @@ /************************************************************************** * -* dmfe.c -- Etherboot device driver for the Davicom +* dmfe.c -- Etherboot device driver for the Davicom * DM9102/DM9102A/DM9102A+DM9801/DM9102A+DM9802 NIC fast ethernet card * * Written 2003-2003 by Timothy Legge tlegge@rogers.com @@ -21,7 +21,7 @@ * * Portions of this code based on: * -* dmfe.c: A Davicom DM9102/DM9102A/DM9102A+DM9801/DM9102A+DM9802 +* dmfe.c: A Davicom DM9102/DM9102A/DM9102A+DM9801/DM9102A+DM9802 * NIC fast ethernet driver for Linux. * Copyright (C) 1997 Sten Wang * (C)Copyright 1997-1998 DAVICOM Semiconductor,Inc. All Rights Reserved. @@ -29,7 +29,7 @@ * * REVISION HISTORY: * ================ -* v1.0 10-02-2004 timlegge Boots ltsp needs cleanup +* v1.0 10-02-2004 timlegge Boots ltsp needs cleanup * * Indent Options: indent -kr -i8 * @@ -395,7 +395,7 @@ static void dmfe_irq(struct nic *nic __unused, irq_action_t action __unused) /************************************************************************** TRANSMIT - Transmit a frame ***************************************************************************/ -static void dmfe_transmit(struct nic *nic, +static void dmfe_transmit(struct nic *nic, const char *dest, /* Destination */ unsigned int type, /* Type */ unsigned int size, /* size */ diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/eepro.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/eepro.c index 909482b..772fdfb 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/eepro.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/eepro.c @@ -20,7 +20,7 @@ has 34 pins, the top row of 2 are not used.
/*
- timlegge 2005-05-18 remove the relocation changes cards that + timlegge 2005-05-18 remove the relocation changes cards that write directly to the hardware don't need it */
@@ -94,7 +94,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); /* Word 5: */ #define ee_BNC_TPE 0 /* 0=TPE */ #define ee_BootType 1 /* 00=None, 01=IPX, 10=ODI, 11=NDIS */ -#define ee_BootTypeMask 0x3 +#define ee_BootTypeMask 0x3 #define ee_NumConn 3 /* Number of Connections 0= One or Two */ #define ee_FlashSock 4 /* Presence of Flash Socket 0= Present */ #define ee_PortTPE 5 @@ -391,8 +391,8 @@ static int eepro_poll(struct nic *nic, int retrieve) nic->packetlen = rcv_size; rcv_car = (rx_start + RCV_HEADER + rcv_size); rx_start = rcv_next_frame; -/* - hex_dump(rcv_car, nic->packetlen); +/* + hex_dump(rcv_car, nic->packetlen); */
if (rcv_car == 0) diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/eepro100.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/eepro100.c index 85840cd..ba31c51 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/eepro100.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/eepro100.c @@ -48,7 +48,7 @@ * * The driver was finished before Intel got the NDA out of the closet. * - * Datasheet is now published and available from + * Datasheet is now published and available from * ftp://download.intel.com/design/network/manuals/8255X_OpenSDM.pdf * - Michael Brown * */ diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/epic100.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/epic100.c index 5211317..14748b0 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/epic100.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/epic100.c @@ -339,7 +339,7 @@ epic100_transmit(struct nic *nic, const char *destaddr, unsigned int type, * set the base address with the "ownership" * bits last. */ - + tx_ring[entry].buflength |= cpu_to_le32(len); tx_ring[entry].status = cpu_to_le32(len << 16) | cpu_to_le32(TRING_OWN); /* Pass ownership to the chip. */ @@ -414,7 +414,7 @@ epic100_poll(struct nic *nic, int retrieve) rx_ring[entry].status = RRING_OWN;
/* Restart Receiver */ - outl(CR_START_RX | CR_QUEUE_RX, command); + outl(CR_START_RX | CR_QUEUE_RX, command);
return retcode; } diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/etherfabric.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/etherfabric.c index 15e7d4c..9fc3824 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/etherfabric.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/etherfabric.c @@ -251,7 +251,7 @@ gmii_link_ok ( struct efab_nic *efab ) #define MDIO_MMDREG_STAT2_PRESENT_WIDTH (2)
/* PHY XGXS lane state */ -#define MDIO_PHYXS_LANE_STATE (0x18) +#define MDIO_PHYXS_LANE_STATE (0x18) #define MDIO_PHYXS_LANE_ALIGNED_LBN (12) #define MDIO_PHYXS_LANE_SYNC0_LBN (0) #define MDIO_PHYXS_LANE_SYNC1_LBN (1) @@ -1005,7 +1005,7 @@ mdio_clause45_check_mmds ( struct efab_nic *efab ) #define FCN_XX_DTXA_WIDTH 4
/* Receive filter table */ -#define FCN_RX_FILTER_TBL0 0xF00000 +#define FCN_RX_FILTER_TBL0 0xF00000
/* Receive descriptor pointer table */ #define FCN_RX_DESC_PTR_TBL_KER_A1 0x11800 @@ -1158,7 +1158,7 @@ mdio_clause45_check_mmds ( struct efab_nic *efab ) * Low-level hardware access * * - *******************************************************************************/ + *******************************************************************************/
#define FCN_REVISION_REG(efab, reg) \ ( ( efab->pci_revision == FALCON_REV_B0 ) ? reg ## _B0 : reg ## _A1 ) @@ -1260,7 +1260,7 @@ falcon_read ( struct efab_nic *efab, efab_oword_t *value, unsigned int reg ) reg, EFAB_OWORD_VAL ( *value ) ); }
-/** +/** * Read from Falcon SRAM * */ @@ -1391,7 +1391,7 @@ falcon_interrupts ( struct efab_nic *efab, int enabled, int force ) * SPI access * * - *******************************************************************************/ + *******************************************************************************/
/** Maximum length for a single SPI transaction */ @@ -1498,7 +1498,7 @@ fail1: * Falcon bit-bashed I2C interface * * - *******************************************************************************/ + *******************************************************************************/
static void falcon_i2c_bit_write ( struct bit_basher *basher, unsigned int bit_id, @@ -1559,7 +1559,7 @@ static struct bit_basher_operations falcon_i2c_bit_ops = { * MDIO access * * - *******************************************************************************/ + *******************************************************************************/
static int falcon_gmii_wait ( struct efab_nic *efab ) @@ -1606,7 +1606,7 @@ falcon_mdio_write ( struct efab_nic *efab, int device,
if ( efab->phy_10g ) { /* clause45 */ - EFAB_POPULATE_OWORD_2 ( reg, + EFAB_POPULATE_OWORD_2 ( reg, FCN_MD_PRT_ADR, efab->phy_addr, FCN_MD_DEV_ADR, device ); } @@ -1648,7 +1648,7 @@ falcon_mdio_read ( struct efab_nic *efab, int device, int location ) int value;
/* Check MII not currently being accessed */ - if ( falcon_gmii_wait ( efab ) ) + if ( falcon_gmii_wait ( efab ) ) return -1;
if ( efab->phy_10g ) { @@ -2265,7 +2265,7 @@ falcon_reconfigure_xmac ( struct efab_nic *efab ) falcon_xmac_writel ( efab, ®, FCN_XM_GLB_CFG_REG_MAC );
/* Configure TX */ - EFAB_POPULATE_DWORD_6 ( reg, + EFAB_POPULATE_DWORD_6 ( reg, FCN_XM_TXEN, 1, FCN_XM_TX_PRMBL, 1, FCN_XM_AUTO_PAD, 1, @@ -2559,7 +2559,7 @@ falcon_txc_phy_init ( struct efab_nic *efab )
/* Turn amplitude down and preemphasis off on the host side * (PHY<->MAC) as this is believed less likely to upset falcon - * and no adverse effects have been noted. It probably also + * and no adverse effects have been noted. It probably also * saves a picowatt or two */
/* Turn off preemphasis */ @@ -2719,7 +2719,7 @@ static struct efab_phy_operations falcon_tenxpress_phy_ops = { /* Master Configuration register 2 */ #define PMC_MCONF2_REG (0xd002) /* Drive Tx off centre of data eye (1) vs. clock edge (0) */ -#define PMC_MCONF2_TEDGE (1 << 2) +#define PMC_MCONF2_TEDGE (1 << 2) /* Drive Rx off centre of data eye (1) vs. clock edge (0) */ #define PMC_MCONF2_REDGE (1 << 3)
@@ -2906,7 +2906,7 @@ sfe4001_init ( struct efab_nic *efab ) for (count=0; count<20; count++) { /* Turn on 1.2V, 2.5V, 3.3V and 5V power rails */ out = 0xff & ~( (1 << P0_EN_1V2_LBN) | (1 << P0_EN_2V5_LBN) | - (1 << P0_EN_3V3X_LBN) | (1 << P0_EN_5V_LBN) | + (1 << P0_EN_3V3X_LBN) | (1 << P0_EN_5V_LBN) | (1 << P0_X_TRST_LBN) );
rc = i2c->write ( i2c, &i2c_pca9539, P0_OUT, &out, EFAB_BYTE ); @@ -3019,7 +3019,7 @@ struct efab_board_operations sfe4003_ops = { * Hardware initialisation * * - *******************************************************************************/ + *******************************************************************************/
static void falcon_free_special_buffer ( void *p ) @@ -3073,7 +3073,7 @@ static void clear_b0_fpga_memories ( struct efab_nic *efab) { efab_oword_t blanko, temp; - int offset; + int offset;
EFAB_ZERO_OWORD ( blanko );
@@ -3375,7 +3375,7 @@ falcon_init_sram ( struct efab_nic *efab ) falcon_write ( efab, ®, FCN_NIC_STAT_REG );
/* Deactivate any external SRAM that might be present */ - EFAB_POPULATE_OWORD_2 ( reg, + EFAB_POPULATE_OWORD_2 ( reg, FCN_GPIO1_OEN, 1, FCN_GPIO1_OUT, 1 ); falcon_write ( efab, ®, FCN_GPIO_CTL_REG_KER ); @@ -3409,8 +3409,8 @@ falcon_setup_nic ( struct efab_nic *efab ) efab_oword_t reg; int tx_fc, xoff_thresh, xon_thresh;
- /* bug5129: Clear the parity enables on the TX data fifos as - * they produce false parity errors because of timing issues + /* bug5129: Clear the parity enables on the TX data fifos as + * they produce false parity errors because of timing issues */ falcon_read ( efab, ®, FCN_SPARE_REG_KER ); EFAB_SET_OWORD_FIELD ( reg, FCN_MEM_PERR_EN_TX_DATA, 0 ); @@ -3508,7 +3508,7 @@ falcon_init_resources ( struct efab_nic *efab ) FCN_EVQ_EN, 1, FCN_EVQ_SIZE, FQS(FCN_EVQ, EFAB_EVQ_SIZE), FCN_EVQ_BUF_BASE_ID, ev_queue->entry.id ); - falcon_write ( efab, ®, + falcon_write ( efab, ®, FCN_REVISION_REG ( efab, FCN_EVQ_PTR_TBL_KER ) ); /* Push the tx queue to the hardware */ @@ -3521,7 +3521,7 @@ falcon_init_resources ( struct efab_nic *efab ) FCN_TX_DESCQ_SIZE, FQS(FCN_TX_DESCQ, EFAB_TXD_SIZE), FCN_TX_DESCQ_TYPE, 0 /* kernel queue */, FCN_TX_NON_IP_DROP_DIS_B0, 1 ); - falcon_write ( efab, ®, + falcon_write ( efab, ®, FCN_REVISION_REG ( efab, FCN_TX_DESC_PTR_TBL_KER ) ); /* Push the rx queue to the hardware */ @@ -3559,7 +3559,7 @@ falcon_fini_resources ( struct efab_nic *efab ) EFAB_POPULATE_OWORD_2 ( cmd, FCN_TX_FLUSH_DESCQ_CMD, 1, FCN_TX_FLUSH_DESCQ, 0 ); - falcon_write ( efab, &cmd, + falcon_write ( efab, &cmd, FCN_REVISION_REG ( efab, FCN_TX_DESC_PTR_TBL_KER ) );
EFAB_POPULATE_OWORD_2 ( cmd, @@ -3572,11 +3572,11 @@ falcon_fini_resources ( struct efab_nic *efab )
/* Remove descriptor rings from card */ EFAB_ZERO_OWORD ( cmd ); - falcon_write ( efab, &cmd, + falcon_write ( efab, &cmd, FCN_REVISION_REG ( efab, FCN_TX_DESC_PTR_TBL_KER ) ); - falcon_write ( efab, &cmd, + falcon_write ( efab, &cmd, FCN_REVISION_REG ( efab, FCN_RX_DESC_PTR_TBL_KER ) ); - falcon_write ( efab, &cmd, + falcon_write ( efab, &cmd, FCN_REVISION_REG ( efab, FCN_EVQ_PTR_TBL_KER ) ); }
@@ -3641,7 +3641,7 @@ falcon_notify_tx_desc ( struct efab_nic *efab, * Software receive interface * * - *******************************************************************************/ + *******************************************************************************/
static int efab_fill_rx_queue ( struct efab_nic *efab, @@ -3721,7 +3721,7 @@ efab_receive ( struct efab_nic *efab, unsigned int id, int len, int drop ) * Software transmit interface * * - *******************************************************************************/ + *******************************************************************************/
static int efab_transmit ( struct net_device *netdev, struct io_buffer *iob ) diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/hfa384x.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/hfa384x.h index 2e3ccf5..dce80a8 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/hfa384x.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/hfa384x.h @@ -39,7 +39,7 @@ * * -------------------------------------------------------------------- * -* Portions of the development of this software were funded by +* Portions of the development of this software were funded by * Intersil Corporation as part of PRISM(R) chipset product development. * * -------------------------------------------------------------------- @@ -129,17 +129,17 @@ FILE_LICENCE ( GPL2_ONLY );
/*--- MAC Internal memory constants and macros ------*/ /* masks and macros used to manipulate MAC internal memory addresses. */ -/* MAC internal memory addresses are 23 bit quantities. The MAC uses - * a paged address space where the upper 16 bits are the page number - * and the lower 7 bits are the offset. There are various Host API - * elements that require two 16-bit quantities to specify a MAC - * internal memory address. Unfortunately, some of the API's use a - * page/offset format where the offset value is JUST the lower seven - * bits and the page is the remaining 16 bits. Some of the API's - * assume that the 23 bit address has been split at the 16th bit. We - * refer to these two formats as AUX format and CMD format. The +/* MAC internal memory addresses are 23 bit quantities. The MAC uses + * a paged address space where the upper 16 bits are the page number + * and the lower 7 bits are the offset. There are various Host API + * elements that require two 16-bit quantities to specify a MAC + * internal memory address. Unfortunately, some of the API's use a + * page/offset format where the offset value is JUST the lower seven + * bits and the page is the remaining 16 bits. Some of the API's + * assume that the 23 bit address has been split at the 16th bit. We + * refer to these two formats as AUX format and CMD format. The * macros below help handle some of this. - */ + */
/* Handy constant */ #define HFA384x_ADDR_AUX_OFF_MAX ((UINT16)0x007f) @@ -421,7 +421,7 @@ Configuration RIDs: Network Parameters, Static Configuration Entities
/*-------------------------------------------------------------------- Configuration RID lengths: Network Params, Static Config Entities - This is the length of JUST the DATA part of the RID (does not + This is the length of JUST the DATA part of the RID (does not include the len or code fields) --------------------------------------------------------------------*/ /* TODO: fill in the rest of these */ @@ -484,7 +484,7 @@ Configuration RIDs: Network Parameters, Dynamic Configuration Entities
/*-------------------------------------------------------------------- Configuration RID Lengths: Network Param, Dynamic Config Entities - This is the length of JUST the DATA part of the RID (does not + This is the length of JUST the DATA part of the RID (does not include the len or code fields) --------------------------------------------------------------------*/ /* TODO: fill in the rest of these */ @@ -523,7 +523,7 @@ Configuration RIDs: Behavior Parameters
/*-------------------------------------------------------------------- Configuration RID Lengths: Behavior Parameters - This is the length of JUST the DATA part of the RID (does not + This is the length of JUST the DATA part of the RID (does not include the len or code fields) --------------------------------------------------------------------*/ #define HFA384x_RID_ITICKTIME_LEN ((UINT16)2) @@ -553,7 +553,7 @@ Information RIDs: NIC Information
/*---------------------------------------------------------------------- Information RID Lengths: NIC Information - This is the length of JUST the DATA part of the RID (does not + This is the length of JUST the DATA part of the RID (does not include the len or code fields) --------------------------------------------------------------------*/ #define HFA384x_RID_MAXLOADTIME_LEN ((UINT16)0) @@ -610,7 +610,7 @@ Information RIDs: MAC Information
/*-------------------------------------------------------------------- Information RID Lengths: MAC Information - This is the length of JUST the DATA part of the RID (does not + This is the length of JUST the DATA part of the RID (does not include the len or code fields) --------------------------------------------------------------------*/ #define HFA384x_RID_PORTSTATUS_LEN ((UINT16)0) @@ -654,8 +654,8 @@ Information RIDs: Modem Information #define HFA384x_RID_LFOSTATUS ((UINT16)0xFDC7) // 1.7.1
/*-------------------------------------------------------------------- -Information RID Lengths: Modem Information - This is the length of JUST the DATA part of the RID (does not +Information RID Lengths: Modem Information + This is the length of JUST the DATA part of the RID (does not include the len or code fields) --------------------------------------------------------------------*/ #define HFA384x_RID_PHYTYPE_LEN ((UINT16)0) @@ -696,11 +696,11 @@ API ENHANCEMENTS (NOT ALREADY IMPLEMENTED) #define HFA384x_RID_CNFEXCLONGPREAMBLE ((UINT16)0xFCB1) #define HFA384x_RID_CNFAUTHRSPTIMEOUT ((UINT16)0xFCB2) #define HFA384x_RID_CNFBASICRATES ((UINT16)0xFCB3) -#define HFA384x_RID_CNFSUPPRATES ((UINT16)0xFCB4) -#define HFA384x_RID_CNFFALLBACKCTRL ((UINT16)0xFCB5) // NEW +#define HFA384x_RID_CNFSUPPRATES ((UINT16)0xFCB4) +#define HFA384x_RID_CNFFALLBACKCTRL ((UINT16)0xFCB5) // NEW #define HFA384x_RID_WEPKEYSTATUS ((UINT16)0xFCB6) // NEW #define HFA384x_RID_WEPKEYMAPINDEX ((UINT16)0xFCB7) // NEW -#define HFA384x_RID_BROADCASTKEYID ((UINT16)0xFCB8) // NEW +#define HFA384x_RID_BROADCASTKEYID ((UINT16)0xFCB8) // NEW #define HFA384x_RID_ENTSECFLAGEYID ((UINT16)0xFCB9) // NEW #define HFA384x_RID_CNFPASSIVESCANCTRL ((UINT16)0xFCBA) // NEW STA #define HFA384x_RID_CNFWPAHANDLING ((UINT16)0xFCBB) // 1.7.0 @@ -711,8 +711,8 @@ API ENHANCEMENTS (NOT ALREADY IMPLEMENTED) #define HFA384x_RID_CAPINFO ((UINT16)0xFCC0) // 1.7.0/1.3.7 #define HFA384x_RID_LISTENINTERVAL ((UINT16)0xFCC1) // 1.7.0/1.3.7 #define HFA384x_RID_DIVERSITYENABLED ((UINT16)0xFCC2) // 1.7.0/1.3.7 -#define HFA384x_RID_LED_CONTROL ((UINT16)0xFCC4) // 1.7.6 -#define HFA384x_RID_HFO_DELAY ((UINT16)0xFCC5) // 1.7.6 +#define HFA384x_RID_LED_CONTROL ((UINT16)0xFCC4) // 1.7.6 +#define HFA384x_RID_HFO_DELAY ((UINT16)0xFCC5) // 1.7.6 #define HFA384x_RID_DISSALOWEDBSSID ((UINT16)0xFCC6) // 1.8.0 #define HFA384x_RID_SCANREQUEST ((UINT16)0xFCE1) #define HFA384x_RID_JOINREQUEST ((UINT16)0xFCE2) @@ -946,7 +946,7 @@ Configuration Record Structures: /* Prototype structure: all configuration record structures start with these members */
-typedef struct hfa384x_record +typedef struct hfa384x_record { UINT16 reclen; UINT16 rid; @@ -1513,7 +1513,7 @@ typedef struct hfa384x_PCFInfo_data } __WLAN_ATTRIB_PACK__ hfa384x_PCFInfo_data_t;
/*-------------------------------------------------------------------- -Information Record Structures: Modem Information Records +Information Record Structures: Modem Information Records --------------------------------------------------------------------*/
/*-- Information Record: PHYType --*/ @@ -1547,7 +1547,7 @@ typedef struct hfa384x_SupportedDataRates } __WLAN_ATTRIB_PACK__ hfa384x_SupportedDataRates_t;
/*-- Information Record: LFOStatus --*/ -typedef struct hfa384x_LFOStatus +typedef struct hfa384x_LFOStatus { UINT16 TestResults; UINT16 LFOResult; @@ -1597,7 +1597,7 @@ Control Info (offset 44-51) #define HFA384x_FD_ADDRESS3_OFF ((UINT16)0x62) #define HFA384x_FD_SEQCONTROL_OFF ((UINT16)0x68) #define HFA384x_FD_ADDRESS4_OFF ((UINT16)0x6A) -#define HFA384x_FD_DATALEN_OFF ((UINT16)0x70) +#define HFA384x_FD_DATALEN_OFF ((UINT16)0x70) /*-------------------------------------------------------------------- 802.3 Header (offset 72-7F) --------------------------------------------------------------------*/ @@ -1948,7 +1948,7 @@ typedef struct hfa384x_AssocRequest
/*-- Unsolicited Frame, MAC Mgmt: MIC Failure (AP Only) --*/
-typedef struct hfa384x_MicFailure +typedef struct hfa384x_MicFailure { UINT8 sender[WLAN_ADDR_LEN]; UINT8 dest[WLAN_ADDR_LEN]; @@ -2402,10 +2402,10 @@ typedef struct hfa384x_statusresult #if (WLAN_HOSTIF == WLAN_USB)
/* USB Control Exchange (CTLX): - * A queue of the structure below is maintained for all of the + * A queue of the structure below is maintained for all of the * Request/Response type USB packets supported by Prism2. */ -/* The following hfa384x_* structures are arguments to +/* The following hfa384x_* structures are arguments to * the usercb() for the different CTLX types. */ typedef hfa384x_cmdresult_t hfa384x_wridresult_t; @@ -2437,7 +2437,7 @@ struct hfa384x; typedef void (*ctlx_cmdcb_t)( struct hfa384x*, const struct hfa384x_usbctlx* );
typedef void (*ctlx_usercb_t)( - struct hfa384x *hw, + struct hfa384x *hw, void *ctlxresult, void *usercb_data);
@@ -2574,8 +2574,8 @@ typedef struct hfa384x #endif
int sniff_fcs; - int sniff_channel; - int sniff_truncate; + int sniff_channel; + int sniff_truncate; int sniffhdr;
wait_queue_head_t cmdq; /* wait queue itself */ @@ -2690,16 +2690,16 @@ typedef struct hfa384x /*--- Function Declarations -----------------------------------*/ /*=============================================================*/ #if (WLAN_HOSTIF == WLAN_USB) -void -hfa384x_create( - hfa384x_t *hw, +void +hfa384x_create( + hfa384x_t *hw, struct usb_device *usb); #else -void -hfa384x_create( - hfa384x_t *hw, - UINT irq, - UINT32 iobase, +void +hfa384x_create( + hfa384x_t *hw, + UINT irq, + UINT32 iobase, UINT8 __iomem *membase); #endif
@@ -2749,7 +2749,7 @@ hfa384x_drvr_scanresults( hfa384x_t *hw); int hfa384x_drvr_setconfig(hfa384x_t *hw, UINT16 rid, void *buf, UINT16 len);
-static inline int +static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, UINT16 rid, void *val) { int result = 0; @@ -2760,7 +2760,7 @@ hfa384x_drvr_getconfig16(hfa384x_t *hw, UINT16 rid, void *val) return result; }
-static inline int +static inline int hfa384x_drvr_getconfig32(hfa384x_t *hw, UINT16 rid, void *val) { int result = 0; @@ -2787,24 +2787,24 @@ hfa384x_drvr_setconfig32(hfa384x_t *hw, UINT16 rid, UINT32 val) return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value)); }
-#if (WLAN_HOSTIF == WLAN_USB) -int -hfa384x_drvr_getconfig_async(hfa384x_t *hw, - UINT16 rid, - ctlx_usercb_t usercb, - void *usercb_data); - -int -hfa384x_drvr_setconfig_async(hfa384x_t *hw, - UINT16 rid, - void *buf, - UINT16 len, - ctlx_usercb_t usercb, - void *usercb_data); +#if (WLAN_HOSTIF == WLAN_USB) +int +hfa384x_drvr_getconfig_async(hfa384x_t *hw, + UINT16 rid, + ctlx_usercb_t usercb, + void *usercb_data); + +int +hfa384x_drvr_setconfig_async(hfa384x_t *hw, + UINT16 rid, + void *buf, + UINT16 len, + ctlx_usercb_t usercb, + void *usercb_data); #else static inline int -hfa384x_drvr_setconfig_async(hfa384x_t *hw, UINT16 rid, void *buf, UINT16 len, - void *ptr1, void *ptr2) +hfa384x_drvr_setconfig_async(hfa384x_t *hw, UINT16 rid, void *buf, UINT16 len, + void *ptr1, void *ptr2) { (void)ptr1; (void)ptr2; @@ -2814,18 +2814,18 @@ hfa384x_drvr_setconfig_async(hfa384x_t *hw, UINT16 rid, void *buf, UINT16 len,
static inline int hfa384x_drvr_setconfig16_async(hfa384x_t *hw, UINT16 rid, UINT16 val) -{ - UINT16 value = host2hfa384x_16(val); - return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value), - NULL , NULL); +{ + UINT16 value = host2hfa384x_16(val); + return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value), + NULL , NULL); }
static inline int hfa384x_drvr_setconfig32_async(hfa384x_t *hw, UINT16 rid, UINT32 val) -{ - UINT32 value = host2hfa384x_32(val); - return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value), - NULL , NULL); +{ + UINT32 value = host2hfa384x_32(val); + return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value), + NULL , NULL); }
@@ -2862,10 +2862,10 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, UINT16 enable); int hfa384x_cmd_download( - hfa384x_t *hw, - UINT16 mode, + hfa384x_t *hw, + UINT16 mode, UINT16 lowaddr, - UINT16 highaddr, + UINT16 highaddr, UINT16 codelen); int hfa384x_cmd_aux_enable(hfa384x_t *hw, int force); @@ -2873,51 +2873,51 @@ int hfa384x_cmd_aux_disable(hfa384x_t *hw); int hfa384x_copy_from_bap( - hfa384x_t *hw, - UINT16 bap, - UINT16 id, - UINT16 offset, + hfa384x_t *hw, + UINT16 bap, + UINT16 id, + UINT16 offset, void *buf, UINT len); int hfa384x_copy_to_bap( - hfa384x_t *hw, - UINT16 bap, - UINT16 id, + hfa384x_t *hw, + UINT16 bap, + UINT16 id, UINT16 offset, - void *buf, + void *buf, UINT len); -void +void hfa384x_copy_from_aux( - hfa384x_t *hw, - UINT32 cardaddr, - UINT32 auxctl, - void *buf, + hfa384x_t *hw, + UINT32 cardaddr, + UINT32 auxctl, + void *buf, UINT len); -void +void hfa384x_copy_to_aux( - hfa384x_t *hw, - UINT32 cardaddr, - UINT32 auxctl, - void *buf, + hfa384x_t *hw, + UINT32 cardaddr, + UINT32 auxctl, + void *buf, UINT len);
#if (WLAN_HOSTIF != WLAN_USB)
-/* +/* HFA384x is a LITTLE ENDIAN part.
the get/setreg functions implicitly byte-swap the data to LE. the _noswap variants do not perform a byte-swap on the data. */
-static inline UINT16 +static inline UINT16 __hfa384x_getreg(hfa384x_t *hw, UINT reg);
-static inline void +static inline void __hfa384x_setreg(hfa384x_t *hw, UINT16 val, UINT reg);
-static inline UINT16 +static inline UINT16 __hfa384x_getreg_noswap(hfa384x_t *hw, UINT reg);
static inline void @@ -2949,7 +2949,7 @@ __hfa384x_setreg_noswap(hfa384x_t *hw, UINT16 val, UINT reg); * Returns: * Value from the register in HOST ORDER!!!! ----------------------------------------------------------------*/ -static inline UINT16 +static inline UINT16 __hfa384x_getreg(hfa384x_t *hw, UINT reg) { /* printk(KERN_DEBUG "Reading from 0x%0x\n", hw->membase + reg); */ @@ -3026,7 +3026,7 @@ __hfa384x_getreg_noswap(hfa384x_t *hw, UINT reg) * Returns: * Nothing ----------------------------------------------------------------*/ -static inline void +static inline void __hfa384x_setreg_noswap(hfa384x_t *hw, UINT16 val, UINT reg) { #if ((WLAN_HOSTIF == WLAN_PCMCIA) || (WLAN_HOSTIF == WLAN_PLX)) @@ -3041,7 +3041,7 @@ __hfa384x_setreg_noswap(hfa384x_t *hw, UINT16 val, UINT reg)
static inline void hfa384x_events_all(hfa384x_t *hw) { - hfa384x_setreg(hw, + hfa384x_setreg(hw, HFA384x_INT_NORMAL #ifdef CMD_IRQ | HFA384x_INTEN_CMD_SET(1) @@ -3053,7 +3053,7 @@ static inline void hfa384x_events_all(hfa384x_t *hw)
static inline void hfa384x_events_nobap(hfa384x_t *hw) { - hfa384x_setreg(hw, + hfa384x_setreg(hw, (HFA384x_INT_NORMAL & ~HFA384x_INT_BAP_OP) #ifdef CMD_IRQ | HFA384x_INTEN_CMD_SET(1) diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/natsemi.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/natsemi.c index 1715428..a51da67 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/natsemi.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/natsemi.c @@ -1,26 +1,26 @@ -/* +/* natsemi.c - iPXE driver for the NatSemi DP8381x series. - + Based on:
natsemi.c: An Etherboot driver for the NatSemi DP8381x series.
Copyright (C) 2001 Entity Cyber, Inc. - - This development of this Etherboot driver was funded by - + + This development of this Etherboot driver was funded by + Sicom Systems: http://www.sicompos.com/ - + Author: Marty Connor mdc@etherboot.org Adapted from a Linux driver which was written by Donald Becker - + This software may be used and distributed according to the terms of the GNU Public License (GPL), incorporated herein by reference. - + Original Copyright Notice: - + Written/copyright 1999-2001 by Donald Becker. - + This software may be used and distributed according to the terms of the GNU General Public License (GPL), incorporated herein by reference. Drivers based on or derived from this code fall under the GPL and must @@ -28,17 +28,17 @@ a complete program and may only be used when the entire operating system is licensed under the GPL. License for under other terms may be available. Contact the original author for details. - + The original author may be reached as becker@scyld.com, or at Scyld Computing Corporation 410 Severn Ave., Suite 210 Annapolis MD 21403 - + Support information and updates available at http://www.scyld.com/network/netsemi.html - + References: - + http://www.scyld.com/expert/100mbps.html http://www.scyld.com/expert/NWay.html Datasheet is available from: @@ -79,10 +79,10 @@ FILE_LICENCE ( GPL_ANY ); #include "natsemi.h"
/* Function Prototypes: */ - + static int natsemi_spi_read_bit ( struct bit_basher *, unsigned int ); -static void natsemi_spi_write_bit ( struct bit_basher *,unsigned int, unsigned long ); -static void natsemi_init_eeprom ( struct natsemi_private * ); +static void natsemi_spi_write_bit ( struct bit_basher *,unsigned int, unsigned long ); +static void natsemi_init_eeprom ( struct natsemi_private * ); static int natsemi_probe (struct pci_device *pci); static void natsemi_reset (struct net_device *netdev); static int natsemi_open (struct net_device *netdev); @@ -137,7 +137,7 @@ static struct bit_basher_operations natsemi_basher_ops = { */ static void natsemi_init_eeprom ( struct natsemi_private *np ) {
- /* Initialise three-wire bus + /* Initialise three-wire bus */ np->spibit.basher.op = &natsemi_basher_ops; np->spibit.bus.mode = SPI_MODE_THREEWIRE; @@ -173,10 +173,10 @@ static int natsemi_probe (struct pci_device *pci) { int i; int rc;
- /* Allocate net device + /* Allocate net device */ netdev = alloc_etherdev (sizeof (*np)); - if (! netdev) + if (! netdev) return -ENOMEM;
netdev_init (netdev, &natsemi_operations); @@ -193,7 +193,7 @@ static int natsemi_probe (struct pci_device *pci) { nvs_read ( &np->eeprom.nvs, EE_MAC-1, prev_bytes, 1 ); nvs_read ( &np->eeprom.nvs, EE_MAC, ll_addr_encoded, ETH_ALEN );
- /* decoding the MAC address read from NVS + /* decoding the MAC address read from NVS * and save it in netdev->ll_addr */ last = prev_bytes[1] >> 7; @@ -225,7 +225,7 @@ err_register_netdev: */ static void natsemi_remove (struct pci_device *pci) { struct net_device *netdev = pci_get_drvdata (pci); - + unregister_netdev (netdev); natsemi_reset (netdev); netdev_nullify ( netdev ); @@ -239,7 +239,7 @@ static void natsemi_remove (struct pci_device *pci) { * * Issues a hardware reset and waits for the reset to complete. */ -static void natsemi_reset (struct net_device *netdev) +static void natsemi_reset (struct net_device *netdev) { struct natsemi_private *np = netdev->priv; int i; @@ -330,9 +330,9 @@ static int natsemi_open (struct net_device *netdev) /* Disable PME: * The PME bit is initialized from the EEPROM contents. * PCI cards probably have PME disabled, but motherboard - * implementations may have PME set to enable WakeOnLan. + * implementations may have PME set to enable WakeOnLan. * With PME set the chip will scan incoming packets but - * nothing will be written to memory. + * nothing will be written to memory. */ outl (inl (np->ioaddr + ClkRun) & ~0x100, np->ioaddr + ClkRun);
@@ -344,7 +344,7 @@ static int natsemi_open (struct net_device *netdev) np->ioaddr + RxFilterData); }
- /* Setup Tx Ring + /* Setup Tx Ring */ np->tx_cur = 0; np->tx_dirty = 0; @@ -365,11 +365,11 @@ static int natsemi_open (struct net_device *netdev) np->iobuf[i] = alloc_iob (RX_BUF_SIZE); if (! np->iobuf[i]) goto memory_alloc_err; - np->rx[i].link = virt_to_bus ((i + 1 < NUM_RX_DESC) + np->rx[i].link = virt_to_bus ((i + 1 < NUM_RX_DESC) ? &np->rx[i + 1] : &np->rx[0]); np->rx[i].cmdsts = RX_BUF_SIZE; np->rx[i].bufptr = virt_to_bus (np->iobuf[i]->data); - DBG (" Address of iobuf [%d] = %p and iobuf->data = %p \n", i, + DBG (" Address of iobuf [%d] = %p and iobuf->data = %p \n", i, &np->iobuf[i], &np->iobuf[i]->data); } outl (virt_to_bus (&np->rx[0]), np->ioaddr + RxRingPtr); @@ -377,14 +377,14 @@ static int natsemi_open (struct net_device *netdev) DBG ("Natsemi Rx descriptor loaded with: %#08x\n", inl (np->ioaddr + RxRingPtr));
- /* Setup RX Filter + /* Setup RX Filter */ outl (RxFilterEnable | AcceptBroadcast | AcceptAllMulticast | AcceptMyPhys, np->ioaddr + RxFilterAddr);
- /* Initialize other registers. - * Configure the PCI bus bursts and FIFO thresholds. - * Configure for standard, in-spec Ethernet. + /* Initialize other registers. + * Configure the PCI bus bursts and FIFO thresholds. + * Configure for standard, in-spec Ethernet. */ if (inl (np->ioaddr + ChipConfig) & 0x20000000) { /* Full duplex */ DBG ("Full duplex\n"); @@ -398,19 +398,19 @@ static int natsemi_open (struct net_device *netdev) outl (tx_config, np->ioaddr + TxConfig); outl (rx_config, np->ioaddr + RxConfig);
- DBG ("Tx config register = %#08x Rx config register = %#08x\n", + DBG ("Tx config register = %#08x Rx config register = %#08x\n", inl (np->ioaddr + TxConfig), inl (np->ioaddr + RxConfig));
/*Set the Interrupt Mask register */ outl((RxOk|RxErr|TxOk|TxErr),np->ioaddr + IntrMask); - /*start the receiver + /*start the receiver */ outl (RxOn, np->ioaddr + ChipCmd); return 0; - + memory_alloc_err:
/* Frees any allocated buffers when memory @@ -429,7 +429,7 @@ memory_alloc_err: * * @v netdev Net device */ -static void natsemi_close (struct net_device *netdev) +static void natsemi_close (struct net_device *netdev) { struct natsemi_private *np = netdev->priv; int i; @@ -441,7 +441,7 @@ static void natsemi_close (struct net_device *netdev) } }
-/** +/** * Transmit packet * * @v netdev Network device @@ -461,9 +461,9 @@ static int natsemi_transmit (struct net_device *netdev, struct io_buffer *iobuf) */ np->tx_iobuf[np->tx_cur] = iobuf;
- /* Pad and align packet has not been used because its not required + /* Pad and align packet has not been used because its not required * by the hardware. - * iob_pad (iobuf, ETH_ZLEN); + * iob_pad (iobuf, ETH_ZLEN); * can be used to achieve it, if required */
@@ -479,14 +479,14 @@ static int natsemi_transmit (struct net_device *netdev, struct io_buffer *iobuf) */ np->tx_cur = (np->tx_cur + 1) % TX_RING_SIZE;
- /*start the transmitter + /*start the transmitter */ outl (TxOn, np->ioaddr + ChipCmd);
return 0; }
-/** +/** * Poll for received packets * * @v netdev Network device @@ -519,7 +519,7 @@ static void natsemi_poll (struct net_device *netdev) DBG ("tx_dirty = %d tx_cur=%d tx_status=%#08x\n", np->tx_dirty, np->tx_cur, tx_status); - if (tx_status & OWN) + if (tx_status & OWN) break;
if (! (tx_status & DescPktOK)) { @@ -536,15 +536,15 @@ static void natsemi_poll (struct net_device *netdev) i = (i + 1) % TX_RING_SIZE; } - /* Process received packets + /* Process received packets */ - rx_status = (unsigned int) np->rx[np->rx_cur].cmdsts; + rx_status = (unsigned int) np->rx[np->rx_cur].cmdsts; while ((rx_status & OWN)) { rx_len = (rx_status & DSIZE) - CRC_SIZE;
DBG ("Received packet, rx_curr = %d, rx_status = %#08x, rx_len = %d\n", np->rx_cur, rx_status, rx_len); - + if ((rx_status & (DescMore | DescPktOK | RxTooLong)) != DescPktOK) { netdev_rx_err (netdev, NULL, -EINVAL);
@@ -559,20 +559,20 @@ static void natsemi_poll (struct net_device *netdev) * try again next poll */ rx_iob = alloc_iob (rx_len); - if (! rx_iob) + if (! rx_iob) goto end; - memcpy (iob_put (rx_iob, rx_len), + memcpy (iob_put (rx_iob, rx_len), np->iobuf[np->rx_cur]->data, rx_len); - /* Add this packet to the receive queue. + /* Add this packet to the receive queue. */ netdev_rx (netdev, rx_iob); } np->rx[np->rx_cur].cmdsts = RX_BUF_SIZE; np->rx_cur = (np->rx_cur + 1) % NUM_RX_DESC; - rx_status = np->rx[np->rx_cur].cmdsts; + rx_status = np->rx[np->rx_cur].cmdsts; } end: - /* re-enable the potentially idle receive state machine + /* re-enable the potentially idle receive state machine */ outl (RxOn, np->ioaddr + ChipCmd); } @@ -588,7 +588,7 @@ static void natsemi_irq (struct net_device *netdev, int enable) struct natsemi_private *np = netdev->priv;
outl ((enable ? (RxOk | RxErr | TxOk|TxErr) : 0), - np->ioaddr + IntrMask); + np->ioaddr + IntrMask); outl ((enable ? 1 : 0), np->ioaddr + IntrEnable); }
diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/natsemi.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/natsemi.h index ae827ba..fd75ac2 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/natsemi.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/natsemi.h @@ -29,13 +29,13 @@ struct natsemi_private { struct natsemi_tx tx[TX_RING_SIZE]; struct natsemi_rx rx[NUM_RX_DESC];
- /* need to add iobuf as we cannot free iobuf->data in close without this - * alternatively substracting sizeof(head) and sizeof(list_head) can also + /* need to add iobuf as we cannot free iobuf->data in close without this + * alternatively substracting sizeof(head) and sizeof(list_head) can also * give the same. */ struct io_buffer *iobuf[NUM_RX_DESC];
- /* netdev_tx_complete needs pointer to the iobuf of the data so as to free + /* netdev_tx_complete needs pointer to the iobuf of the data so as to free * it from the memory. */ struct io_buffer *tx_iobuf[TX_RING_SIZE]; @@ -71,45 +71,45 @@ enum { * device. */ enum register_offsets { - ChipCmd = 0x00, - ChipConfig = 0x04, - EECtrl = 0x08, + ChipCmd = 0x00, + ChipConfig = 0x04, + EECtrl = 0x08, PCIBusCfg = 0x0C, - IntrStatus = 0x10, - IntrMask = 0x14, + IntrStatus = 0x10, + IntrMask = 0x14, IntrEnable = 0x18, - TxRingPtr = 0x20, + TxRingPtr = 0x20, TxConfig = 0x24, RxRingPtr = 0x30, - RxConfig = 0x34, + RxConfig = 0x34, ClkRun = 0x3C, - WOLCmd = 0x40, + WOLCmd = 0x40, PauseCmd = 0x44, - RxFilterAddr = 0x48, + RxFilterAddr = 0x48, RxFilterData = 0x4C, - BootRomAddr = 0x50, - BootRomData = 0x54, - SiliconRev = 0x58, + BootRomAddr = 0x50, + BootRomData = 0x54, + SiliconRev = 0x58, StatsCtrl = 0x5C, - StatsData = 0x60, - RxPktErrs = 0x60, - RxMissed = 0x68, + StatsData = 0x60, + RxPktErrs = 0x60, + RxMissed = 0x68, RxCRCErrs = 0x64, PCIPM = 0x44, - PhyStatus = 0xC0, - MIntrCtrl = 0xC4, + PhyStatus = 0xC0, + MIntrCtrl = 0xC4, MIntrStatus = 0xC8,
- /* These are from the spec, around page 78... on a separate table. + /* These are from the spec, around page 78... on a separate table. */ - PGSEL = 0xCC, - PMDCSR = 0xE4, - TSTDAT = 0xFC, - DSPCFG = 0xF4, + PGSEL = 0xCC, + PMDCSR = 0xE4, + TSTDAT = 0xFC, + DSPCFG = 0xF4, SDCFG = 0x8C, BasicControl = 0x80, BasicStatus = 0x84 - + };
/* the values for the 'magic' registers above (PGSEL=1) */ @@ -124,12 +124,12 @@ enum register_offsets { /* Bit in ChipCmd. */ enum ChipCmdBits { - ChipReset = 0x100, - RxReset = 0x20, - TxReset = 0x10, - RxOff = 0x08, + ChipReset = 0x100, + RxReset = 0x20, + TxReset = 0x10, + RxOff = 0x08, RxOn = 0x04, - TxOff = 0x02, + TxOff = 0x02, TxOn = 0x01 };
@@ -153,9 +153,9 @@ enum rx_mode_bits { AcceptErr = 0x20, AcceptRunt = 0x10, AcceptBroadcast = 0xC0000000, - AcceptMulticast = 0x00200000, + AcceptMulticast = 0x00200000, AcceptAllMulticast = 0x20000000, - AcceptAllPhys = 0x10000000, + AcceptAllPhys = 0x10000000, AcceptMyPhys = 0x08000000, RxFilterEnable = 0x80000000 }; @@ -163,11 +163,11 @@ enum rx_mode_bits { /* Bits in network_desc.status */ enum desc_status_bits { - DescOwn = 0x80000000, - DescMore = 0x40000000, + DescOwn = 0x80000000, + DescMore = 0x40000000, DescIntr = 0x20000000, DescNoCRC = 0x10000000, - DescPktOK = 0x08000000, + DescPktOK = 0x08000000, RxTooLong = 0x00400000 };
@@ -177,7 +177,7 @@ enum Intr_mask_register_bits { RxOk = 0x001, RxErr = 0x004, TxOk = 0x040, - TxErr = 0x100 + TxErr = 0x100 };
enum MIntrCtrl_bits { diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/ns83820.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/ns83820.c index 0b92a91..14b4ec7 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/ns83820.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/ns83820.c @@ -21,7 +21,7 @@ * for Linux kernel 2.4.x. * * Linux Driver Version 0.20, 20020610 -* +* * This development of this Etherboot driver was funded by: * * NXTV: http://www.nxtv.com/ @@ -31,7 +31,7 @@ * * v1.0 02-16-2004 timlegge Initial port of Linux driver * v1.1 02-19-2004 timlegge More rohbust transmit and poll -* +* * Indent Options: indent -kr -i8 ***************************************************************************/
@@ -499,7 +499,7 @@ static void ns83820_setup_rx(struct nic *nic) rx_ring[i].cmdsts = cpu_to_le32(REAL_RX_BUF_SIZE); rx_ring[i].extsts = cpu_to_le32(0); } -// No need to wrap the ring +// No need to wrap the ring // rx_ring[i].link = virt_to_le32desc(&rx_ring[0]); writel(0, ns->base + RXDP_HI); writel(virt_to_le32desc(&rx_ring[0]), ns->base + RXDP); @@ -626,7 +626,7 @@ static void ns83820_run_bist(struct nic *nic __unused, const char *name, }
if (status & fail) - printf("%s failed! (0x%hX & 0x%hX)\n", name, (unsigned int) status, + printf("%s failed! (0x%hX & 0x%hX)\n", name, (unsigned int) status, (unsigned int) fail); else if (timed_out) printf("run_bist %s timed out! (%hX)\n", name, (unsigned int) status); @@ -745,7 +745,7 @@ static void ns83820_disable ( struct nic *nic ) { /* This function serves 3 purposes. * This disables DMA and interrupts so we don't receive * unexpected packets or interrupts from the card after - * etherboot has finished. + * etherboot has finished. * This frees resources so etherboot may use * this driver on another interface * This allows etherboot to reinitialize the interface @@ -915,7 +915,7 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) { writel(ns->CFG_cache | CFG_PHY_RST, ns->base + CFG); writel(ns->CFG_cache, ns->base + CFG); } -#if 0 /* Huh? This sets the PCI latency register. Should be done via +#if 0 /* Huh? This sets the PCI latency register. Should be done via * the PCI layer. FIXME. */ if (readl(dev->base + SRR)) @@ -928,7 +928,7 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) { * can be transmitted is 8192 - FLTH - burst size. * If only the transmit fifo was larger... */ - /* Ramit : 1024 DMA is not a good idea, it ends up banging + /* Ramit : 1024 DMA is not a good idea, it ends up banging * some DELL and COMPAQ SMP systems */ writel(TXCFG_CSI | TXCFG_HBI | TXCFG_ATP | TXCFG_MXDMA512 | ((1600 / 32) * 0x100), ns->base + TXCFG); @@ -936,8 +936,8 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) { /* Set Rx to full duplex, don't accept runt, errored, long or length * range errored packets. Use 512 byte DMA. */ - /* Ramit : 1024 DMA is not a good idea, it ends up banging - * some DELL and COMPAQ SMP systems + /* Ramit : 1024 DMA is not a good idea, it ends up banging + * some DELL and COMPAQ SMP systems * Turn on ALP, only we are accpeting Jumbo Packets */ writel(RXCFG_AEP | RXCFG_ARP | RXCFG_AIRL | RXCFG_RX_FD | RXCFG_STRIPCRC @@ -965,7 +965,7 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) { writel(VTCR_PPCHK, ns->base + VTCR);
/* Ramit : Enable async and sync pause frames */ -// writel(0, ns->base + PCR); +// writel(0, ns->base + PCR); writel((PCR_PS_MCAST | PCR_PS_DA | PCR_PSEN | PCR_FFLO_4K | PCR_FFHI_8K | PCR_STLO_4 | PCR_STHI_8 | PCR_PAUSE_CNT), ns->base + PCR); diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/ns8390.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/ns8390.c index a30f936..def0170 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/ns8390.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/ns8390.c @@ -249,7 +249,7 @@ static void eth_pio_read(unsigned int src __unused, unsigned char *dst __unused /************************************************************************** enable_multycast - Enable Multicast **************************************************************************/ -static void enable_multicast(unsigned short eth_nic_base) +static void enable_multicast(unsigned short eth_nic_base) { unsigned char mcfilter[8]; int i; @@ -978,7 +978,7 @@ struct isa_driver wd_driver __isa_driver = { .type = NIC_DRIVER, .name = "WD", .probe = wd_probe, - .ioaddrs = 0, + .ioaddrs = 0, }; ISA_ROM("wd","WD8003/8013, SMC8216/8416, SMC 83c790 (EtherEZ)"); #endif @@ -988,7 +988,7 @@ struct isa_driver t503_driver __isa_driver = { .type = NIC_DRIVER, .name = "3C503", .probe = t503_probe, - .ioaddrs = 0, + .ioaddrs = 0, }; ISA_ROM("3c503","3Com503, Etherlink II[/16]"); #endif @@ -998,7 +998,7 @@ struct isa_driver ne_driver __isa_driver = { .type = NIC_DRIVER, .name = "NE*000", .probe = ne_probe, - .ioaddrs = 0, + .ioaddrs = 0, }; ISA_ROM("ne","NE1000/2000 and clones"); #endif diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/p80211hdr.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/p80211hdr.h index 8354671..92bc877 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/p80211hdr.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/p80211hdr.h @@ -39,7 +39,7 @@ * * -------------------------------------------------------------------- * -* Portions of the development of this software were funded by +* Portions of the development of this software were funded by * Intersil Corporation as part of PRISM(R) chipset product development. * * -------------------------------------------------------------------- @@ -47,7 +47,7 @@ * This file declares the constants and types used in the interface * between a wlan driver and the user mode utilities. * -* Note: +* Note: * - Constant values are always in HOST byte order. To assign * values to multi-byte fields they _must_ be converted to * ieee byte order. To retrieve multi-byte values from incoming @@ -117,7 +117,7 @@ FILE_LICENCE ( GPL2_ONLY ); #define WLAN_FSTYPE_ASSOCRESP 0x01 #define WLAN_FSTYPE_REASSOCREQ 0x02 #define WLAN_FSTYPE_REASSOCRESP 0x03 -#define WLAN_FSTYPE_PROBEREQ 0x04 +#define WLAN_FSTYPE_PROBEREQ 0x04 #define WLAN_FSTYPE_PROBERESP 0x05 #define WLAN_FSTYPE_BEACON 0x08 #define WLAN_FSTYPE_ATIM 0x09 @@ -204,7 +204,7 @@ FILE_LICENCE ( GPL2_ONLY ); /* Field. */ /*------------------------------------------------------------*/ #define WLAN_GET_SEQ_FRGNUM(n) (((UINT16)(n)) & (BIT0|BIT1|BIT2|BIT3)) -#define WLAN_GET_SEQ_SEQNUM(n) ((((UINT16)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) +#define WLAN_GET_SEQ_SEQNUM(n) ((((UINT16)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
/*--- Data ptr macro -----------------------------------------*/ /* Creates a UINT8* to the data portion of a frame */ @@ -288,8 +288,8 @@ inline static UINT16 p80211_headerlen(UINT16 fctl) } break; case WLAN_FTYPE_CTL: - hdrlen = WLAN_CTL_FRAMELEN(WLAN_GET_FC_FSTYPE(fctl)) - - WLAN_FCS_LEN; + hdrlen = WLAN_CTL_FRAMELEN(WLAN_GET_FC_FSTYPE(fctl)) - + WLAN_FCS_LEN; break; default: hdrlen = WLAN_HDR_A3_LEN; diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/phantom/nxhal_nic_interface.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/phantom/nxhal_nic_interface.h index f487624..64ccfcb 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/phantom/nxhal_nic_interface.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/phantom/nxhal_nic_interface.h @@ -22,14 +22,14 @@ typedef U32 nx_reg_addr_t;
A single set of crbs is used across all physical/virtual functions for capability queries, initialization, and - context creation/destruction. + context creation/destruction.
There are 4 CRBS: Command/Response CRB Argument1 CRB Argument2 CRB Argument3 CRB - Signature CRB + Signature CRB
The cmd/rsp crb is always intiated by the host via a command code and always responded by the card with @@ -37,7 +37,7 @@ typedef U32 nx_reg_addr_t; The sequence of use is always CMD, RSP, CLEAR CMD.
The arguments are for passing in command specific - and response specific parameters/data. + and response specific parameters/data.
The signature is composed of a magic value, the pci function id, and a command sequence id: @@ -46,9 +46,9 @@ typedef U32 nx_reg_addr_t; [31:16] = magic of 0xcafe
The pci function allows the card to take correct - action for the given particular commands. + action for the given particular commands. The firmware will attempt to detect - an errant driver that has died while holding + an errant driver that has died while holding the root crb hardware lock. Such an error condition shows up as the cmd/rsp crb stuck in a non-clear state.
@@ -229,7 +229,7 @@ typedef struct nx_rx_rule_s { /* MSG - REQUIRES TX CONTEXT */
/* The rules can be added/deleted from both the - * host and card sides so rq/rsp are similar. + * host and card sides so rq/rsp are similar. */ typedef struct nx_hostmsg_rx_rule_s { nx_rx_rule_cmd_t cmd; @@ -262,8 +262,8 @@ typedef U32 nx_host_ctx_state_t; #define NX_HOST_CTX_STATE_MAX 5
/* - * Interrupt mask crb use must be set identically on the Tx - * and Rx context configs across a pci function + * Interrupt mask crb use must be set identically on the Tx + * and Rx context configs across a pci function */
/* Rx and Tx have unique interrupt/crb */ @@ -292,7 +292,7 @@ typedef U32 nx_host_ctx_state_t;
/* * Components of the host-request for Tx context creation. - * CRB - DOES NOT REQUIRE Rx/TX CONTEXT + * CRB - DOES NOT REQUIRE Rx/TX CONTEXT */
typedef struct nx_hostrq_cds_ring_s { @@ -334,7 +334,7 @@ typedef struct nx_cardrsp_tx_ctx_s { ( sizeof(HOSTRQ_TX))
#define SIZEOF_CARDRSP_TX(CARDRSP_TX) \ - ( sizeof(CARDRSP_TX)) + ( sizeof(CARDRSP_TX))
/***************************************************************************** * Rx @@ -354,14 +354,14 @@ typedef struct nx_cardrsp_tx_ctx_s { #define NX_HOST_RDS_CRB_MODE_SHARED 1
/* Bit usage is specified per-ring using the - ring's size. Sum of bit lengths must be <= 32. + ring's size. Sum of bit lengths must be <= 32. Packing is [Ring N] ... [Ring 1][Ring 0] */ #define NX_HOST_RDS_CRB_MODE_CUSTOM 2 #define NX_HOST_RDS_CRB_MODE_MAX 3
/* - * RDS Ting Types + * RDS Ting Types */
#define NX_RDS_RING_TYPE_NORMAL 0 @@ -371,7 +371,7 @@ typedef struct nx_cardrsp_tx_ctx_s {
/* * Components of the host-request for Rx context creation. - * CRB - DOES NOT REQUIRE Rx/TX CONTEXT + * CRB - DOES NOT REQUIRE Rx/TX CONTEXT */
typedef struct nx_hostrq_sds_ring_s { @@ -453,16 +453,16 @@ typedef struct nx_cardrsp_rx_ctx_s { *****************************************************************************/
/* - * The model of statistics update to use + * The model of statistics update to use */
#define NX_STATISTICS_MODE_INVALID 0
-/* Permanent setup; Updates are only sent on explicit request +/* Permanent setup; Updates are only sent on explicit request (NX_CDRP_CMD_GET_STATISTICS) */ #define NX_STATISTICS_MODE_PULL 1
-/* Permanent setup; Updates are sent automatically and on +/* Permanent setup; Updates are sent automatically and on explicit request (NX_CDRP_CMD_GET_STATISTICS) */ #define NX_STATISTICS_MODE_PUSH 2
@@ -472,7 +472,7 @@ typedef struct nx_cardrsp_rx_ctx_s { #define NX_STATISTICS_MODE_MAX 4
/* - * What set of stats + * What set of stats */ #define NX_STATISTICS_TYPE_INVALID 0 #define NX_STATISTICS_TYPE_NIC_RX_CORE 1 @@ -484,7 +484,7 @@ typedef struct nx_cardrsp_rx_ctx_s {
/* * Request to setup statistics gathering. - * CRB - DOES NOT REQUIRE Rx/TX CONTEXT + * CRB - DOES NOT REQUIRE Rx/TX CONTEXT */
typedef struct nx_hostrq_stat_setup_s { diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/phantom/phantom.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/phantom/phantom.c index a55319e..1ece99a 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/phantom/phantom.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/phantom/phantom.c @@ -1244,7 +1244,7 @@ static void phantom_close ( struct net_device *netdev ) { } }
-/** +/** * Transmit packet * * @v netdev Network device diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/pnic.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/pnic.c index 4170cc6..ef93628 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/pnic.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/pnic.c @@ -30,11 +30,11 @@ struct pnic { unsigned short ioaddr; };
-/* +/* * Utility functions: issue a PNIC command, retrieve result. Use * pnic_command_quiet if you don't want failure codes to be * automatically printed. Returns the PNIC status code. - * + * * Set output_length to NULL only if you expect to receive exactly * output_max_length bytes, otherwise it'll complain that you didn't * get enough data (on the assumption that if you not interested in diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/pnic_api.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/pnic_api.h index 27e0236..56f642b 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/pnic_api.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/pnic_api.h @@ -1,6 +1,6 @@ /* * Constants etc. for the Bochs/Etherboot pseudo-NIC - * + * * This header file must be valid C and C++. * * Operation of the pseudo-NIC (PNIC) is pretty simple. To write a diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/prism2.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/prism2.c index d216014..174b2bf 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/prism2.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/prism2.c @@ -168,7 +168,7 @@ typedef struct wlan_80211hdr /* * Hardware-level hfa384x functions * These are based on the ones in hfa384x.h (which are ifdef'd out since __KERNEL__ is not defined). - * Basically, these functions are the result of hand-evaluating all the ifdefs and defines in the hfa384x.h versions. + * Basically, these functions are the result of hand-evaluating all the ifdefs and defines in the hfa384x.h versions. */
/* Retrieve the value of one of the MAC registers. */ @@ -192,7 +192,7 @@ static inline void hfa384x_setreg( hfa384x_t *hw, UINT16 val, UINT reg ) return; }
-/* +/* * Noswap versions * Etherboot is i386 only, so swap and noswap are the same... */ @@ -231,7 +231,7 @@ static int hfa384x_docmd_wait( hfa384x_t *hw, UINT16 cmd, UINT16 parm0, UINT16 p { UINT16 reg = 0; UINT16 counter = 0; - + /* wait for the busy bit to clear */ counter = 0; reg = hfa384x_getreg(hw, HFA384x_CMD); @@ -251,7 +251,7 @@ static int hfa384x_docmd_wait( hfa384x_t *hw, UINT16 cmd, UINT16 parm0, UINT16 p hfa384x_setreg(hw, parm2, HFA384x_PARAM2); hw->lastcmd = cmd; hfa384x_setreg(hw, cmd, HFA384x_CMD); - + /* Now wait for completion */ counter = 0; reg = hfa384x_getreg(hw, HFA384x_EVSTAT); @@ -286,7 +286,7 @@ static int hfa384x_docmd_wait( hfa384x_t *hw, UINT16 cmd, UINT16 parm0, UINT16 p * hw device structure * id FID or RID, destined for the select register (host order) * offset An _even_ offset into the buffer for the given FID/RID. - * Returns: + * Returns: * 0 success */ static int hfa384x_prepare_bap(hfa384x_t *hw, UINT16 id, UINT16 offset) @@ -304,7 +304,7 @@ static int hfa384x_prepare_bap(hfa384x_t *hw, UINT16 id, UINT16 offset) udelay(10); hfa384x_setreg(hw, offset, HFA384x_OFFSET0); /* Wait for offset[busy] to clear (see BAP_TIMEOUT) */ - i = 0; + i = 0; do { reg = hfa384x_getreg(hw, HFA384x_OFFSET0); if ( i > 0 ) udelay(2); @@ -330,7 +330,7 @@ static int hfa384x_prepare_bap(hfa384x_t *hw, UINT16 id, UINT16 offset) * offset An _even_ offset into the buffer for the given FID/RID. * buf ptr to array of bytes * len length of data to transfer in bytes - * Returns: + * Returns: * 0 success */ static int hfa384x_copy_from_bap(hfa384x_t *hw, UINT16 id, UINT16 offset, @@ -340,7 +340,7 @@ static int hfa384x_copy_from_bap(hfa384x_t *hw, UINT16 id, UINT16 offset, UINT8 *d = (UINT8*)buf; UINT16 i; UINT16 reg = 0; - + /* Prepare BAP */ result = hfa384x_prepare_bap ( hw, id, offset ); if ( result == 0 ) { @@ -369,7 +369,7 @@ static int hfa384x_copy_from_bap(hfa384x_t *hw, UINT16 id, UINT16 offset, * offset An _even_ offset into the buffer for the given FID/RID. * buf ptr to array of bytes * len length of data to transfer in bytes - * Returns: + * Returns: * 0 success */ static int hfa384x_copy_to_bap(hfa384x_t *hw, UINT16 id, UINT16 offset, @@ -412,7 +412,7 @@ static int hfa384x_copy_to_bap(hfa384x_t *hw, UINT16 id, UINT16 offset, * configuration record. (host order) * rid RID of the record to read/write. (host order) * - * Returns: + * Returns: * 0 success */ static inline int hfa384x_cmd_access(hfa384x_t *hw, UINT16 write, UINT16 rid) @@ -427,11 +427,11 @@ static inline int hfa384x_cmd_access(hfa384x_t *hw, UINT16 write, UINT16 rid) * hw device structure * rid config/info record id (host order) * buf host side record buffer. Upon return it will - * contain the body portion of the record (minus the + * contain the body portion of the record (minus the * RID and len). * len buffer length (in bytes, should match record length) * - * Returns: + * Returns: * 0 success */ static int hfa384x_drvr_getconfig(hfa384x_t *hw, UINT16 rid, void *buf, UINT16 len) @@ -469,7 +469,7 @@ static int hfa384x_drvr_getconfig(hfa384x_t *hw, UINT16 rid, void *buf, UINT16 l * rid config/info record id (in host order) * val ptr to 16/32 bit buffer to receive value (in host order) * - * Returns: + * Returns: * 0 success */ #if 0 /* Not actually used anywhere */ @@ -504,7 +504,7 @@ static int hfa384x_drvr_getconfig32(hfa384x_t *hw, UINT16 rid, void *val) * buf host side record buffer * len buffer length (in bytes) * - * Returns: + * Returns: * 0 success */ static int hfa384x_drvr_setconfig(hfa384x_t *hw, UINT16 rid, void *buf, UINT16 len) @@ -541,7 +541,7 @@ static int hfa384x_drvr_setconfig(hfa384x_t *hw, UINT16 rid, void *buf, UINT16 l * rid config/info record id (in host order) * val 16/32 bit value to store (in host order) * - * Returns: + * Returns: * 0 success */ static int hfa384x_drvr_setconfig16(hfa384x_t *hw, UINT16 rid, UINT16 *val) @@ -573,14 +573,14 @@ static int hfa384x_drvr_setconfig32(hfa384x_t *hw, UINT16 rid, UINT32 *val) * descr Descriptive text string of what is being waited for * (will be printed out if a timeout happens) * - * Returns: - * value of EVSTAT register, or 0 on failure + * Returns: + * value of EVSTAT register, or 0 on failure */ static int hfa384x_wait_for_event(hfa384x_t *hw, UINT16 event_mask, UINT16 event_ack, int wait, int timeout, const char *descr) { UINT16 reg; int count = 0; - + do { reg = hfa384x_getreg(hw, HFA384x_EVSTAT); if ( count > 0 ) udelay(wait); @@ -605,7 +605,7 @@ static int prism2_poll(struct nic *nic, int retrieve) UINT16 result; hfa384x_rx_frame_t rxdesc; hfa384x_t *hw = &hw_global; - + /* Check for received packet */ reg = hfa384x_getreg(hw, HFA384x_EVSTAT); if ( ! HFA384x_EVSTAT_ISRX(reg) ) { @@ -617,7 +617,7 @@ static int prism2_poll(struct nic *nic, int retrieve)
/* Acknowledge RX event */ hfa384x_setreg(hw, HFA384x_EVACK_RX_SET(1), HFA384x_EVACK); - /* Get RX FID */ + /* Get RX FID */ rxfid = hfa384x_getreg(hw, HFA384x_RXFID); /* Get the descriptor (including headers) */ result = hfa384x_copy_from_bap(hw, rxfid, 0, &rxdesc, sizeof(rxdesc)); @@ -675,7 +675,7 @@ static void prism2_transmit(
/* Build Tx frame structure */ memset(&txdesc, 0, sizeof(txdesc)); - txdesc.tx_control = host2hfa384x_16( HFA384x_TX_MACPORT_SET(0) | HFA384x_TX_STRUCTYPE_SET(1) | + txdesc.tx_control = host2hfa384x_16( HFA384x_TX_MACPORT_SET(0) | HFA384x_TX_STRUCTYPE_SET(1) | HFA384x_TX_TXEX_SET(1) | HFA384x_TX_TXOK_SET(1) ); txdesc.frame_control = host2ieee16( WLAN_SET_FC_FTYPE(WLAN_FTYPE_DATA) | WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_DATAONLY) | @@ -687,7 +687,7 @@ static void prism2_transmit( /* Set up SNAP header */ /* Let OUI default to RFC1042 (0x000000) */ p80211hdr.snap.type = htons(t); - + /* Copy txdesc, p80211hdr and payload parts to FID */ result = hfa384x_copy_to_bap(hw, fid, 0, &txdesc, sizeof(txdesc)); if ( result ) return; /* fail */ @@ -702,7 +702,7 @@ static void prism2_transmit( printf("hfa384x: Transmit failed with result %#hx.\n", result); return; } - + /* Wait for transmit completion (or exception) */ result = hfa384x_wait_for_event(hw, HFA384x_EVSTAT_TXEXC | HFA384x_EVSTAT_TX, HFA384x_EVACK_INFO, 200, 500, "Tx to complete\n" ); @@ -820,7 +820,7 @@ static int prism2_probe ( struct nic *nic, hfa384x_t *hw ) { } else { printf ( "Attempting to autojoin to SSID %s (attempt %d)...", &ssid[2], info_count ); } - + if ( !hfa384x_wait_for_event(hw, HFA384x_EVSTAT_INFO, 0, 1000, 2000, "Info event" ) ) return 0; printf("done\n"); infofid = hfa384x_getreg(hw, HFA384x_INFOFID); @@ -843,13 +843,13 @@ static int prism2_probe ( struct nic *nic, hfa384x_t *hw ) { printf ( "Link not connected (status %#hx)\n", inf.info.linkstatus.linkstatus ); } } while ( inf.info.linkstatus.linkstatus != HFA384x_LINK_CONNECTED ); - + /* Retrieve BSSID and print Connected message */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CURRENTBSSID, hw->bssid, WLAN_BSSID_LEN);
DBG ( "Link connected (BSSID %s - ", eth_ntoa ( hw->bssid ) ); DBG ( " MAC address %s)\n", eth_ntoa (nic->node_addr ) ); - + /* point to NIC specific routines */ nic->nic_op = &prism2_operations; return 1; diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/prism2_plx.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/prism2_plx.c index 2098f7f..f5711f9 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/prism2_plx.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/prism2_plx.c @@ -41,7 +41,7 @@ static int prism2_find_plx ( hfa384x_t *hw, struct pci_device *p ) uint32_t iobase = 0; /* Prism2 I/O Base */ unsigned char *cis_tpl = NULL; unsigned char *cis_string; - + /* Obtain all memory and IO base addresses */ pci_read_config_dword( p, PLX_LOCAL_CONFIG_REGISTER_BASE, &plx_lcr); plx_lcr &= PCI_BASE_ADDRESS_IO_MASK; @@ -81,7 +81,7 @@ static int prism2_find_plx ( hfa384x_t *hw, struct pci_device *p )
static int prism2_plx_probe ( struct nic *nic, struct pci_device *pci ) { hfa384x_t *hw = &hw_global; - + /* Find and intialise PLX Prism2 card */ if ( ! prism2_find_plx ( hw, pci ) ) return 0; nic->ioaddr = hw->iobase; diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/rtl8139.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/rtl8139.c index ebe84fb..32b24be 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/rtl8139.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/rtl8139.c @@ -361,7 +361,7 @@ static void rtl_close ( struct net_device *netdev ) { rtl->rx.ring = NULL; }
-/** +/** * Transmit packet * * @v netdev Network device diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/sis900.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/sis900.c index 92eb5ce..eda93e4 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/sis900.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/sis900.c @@ -1,20 +1,20 @@ /* -*- Mode:C; c-basic-offset:4; -*- */
-/* +/* sis900.c: An SiS 900/7016 PCI Fast Ethernet driver for Etherboot Copyright (C) 2001 Entity Cyber, Inc.
Revision: 1.0 March 1, 2001 - + Author: Marty Connor (mdc@etherboot.org)
Adapted from a Linux driver which was written by Donald Becker and modified by Ollie Lho and Chin-Shan Li of SiS Corporation. Rewritten for Etherboot by Marty Connor. - + This software may be used and distributed according to the terms of the GNU Public License (GPL), incorporated herein by reference. - + References: SiS 7016 Fast Ethernet PCI Bus 10/100 Mbps LAN Controller with OnNow Support, preliminary Rev. 1.0 Jan. 14, 1998 @@ -160,7 +160,7 @@ static void sis900_init_rxd(struct nic *nic); static void sis900_set_rx_mode(struct nic *nic); static void sis900_check_mode(struct nic *nic);
-static void sis900_transmit(struct nic *nic, const char *d, +static void sis900_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p); static int sis900_poll(struct nic *nic, int retrieve);
@@ -198,16 +198,16 @@ static int sis900_get_mac_addr(struct pci_device * pci_dev __unused, struct nic /** * sis96x_get_mac_addr: - Get MAC address for SiS962 or SiS963 model * @pci_dev: the sis900 pci device - * @net_dev: the net device to get address for + * @net_dev: the net device to get address for * - * SiS962 or SiS963 model, use EEPROM to store MAC address. And EEPROM + * SiS962 or SiS963 model, use EEPROM to store MAC address. And EEPROM * is shared by - * LAN and 1394. When access EEPROM, send EEREQ signal to hardware first - * and wait for EEGNT. If EEGNT is ON, EEPROM is permitted to be access + * LAN and 1394. When access EEPROM, send EEREQ signal to hardware first + * and wait for EEGNT. If EEGNT is ON, EEPROM is permitted to be access * by LAN, otherwise is not. After MAC address is read from EEPROM, send - * EEDONE signal to refuse EEPROM access by LAN. - * The EEPROM map of SiS962 or SiS963 is different to SiS900. - * The signature field in SiS962 or SiS963 spec is meaningless. + * EEDONE signal to refuse EEPROM access by LAN. + * The EEPROM map of SiS962 or SiS963 is different to SiS900. + * The signature field in SiS962 or SiS963 spec is meaningless. * MAC address is read into @net_dev->dev_addr. */
@@ -319,11 +319,11 @@ static int sis635_get_mac_addr(struct pci_device * pci_dev __unused, struct nic return 1; } -/* +/* * Function: sis900_probe * * Description: initializes initializes the NIC, retrieves the - * MAC address of the card, and sets up some globals required by + * MAC address of the card, and sets up some globals required by * other routines. * * Side effects: @@ -359,9 +359,9 @@ static int sis900_probe ( struct nic *nic, struct pci_device *pci ) { /* get MAC address */ ret = 0; pci_read_config_byte(pci, PCI_REVISION, &revision); - + /* save for use later in sis900_reset() */ - pci_revision = revision; + pci_revision = revision;
if (revision == SIS630E_900_REV) ret = sis630e_get_mac_addr(pci, nic); @@ -396,11 +396,11 @@ static int sis900_probe ( struct nic *nic, struct pci_device *pci ) { if (mii_status == 0xffff || mii_status == 0x0000) /* the mii is not accessable, try next one */ continue; - + phy_id0 = sis900_mdio_read(phy_addr, MII_PHY_ID0); phy_id1 = sis900_mdio_read(phy_addr, MII_PHY_ID1);
- /* search our mii table for the current mii */ + /* search our mii table for the current mii */ for (i = 0; mii_chip_table[i].phy_id1; i++) {
if ((phy_id0 == mii_chip_table[i].phy_id0) && @@ -419,7 +419,7 @@ static int sis900_probe ( struct nic *nic, struct pci_device *pci ) { } } } - + if (found == 0) { printf("sis900_probe: No MII transceivers found!\n"); return 0; @@ -439,9 +439,9 @@ static int sis900_probe ( struct nic *nic, struct pci_device *pci ) {
-/* - * EEPROM Routines: These functions read and write to EEPROM for - * retrieving the MAC address and other configuration information about +/* + * EEPROM Routines: These functions read and write to EEPROM for + * retrieving the MAC address and other configuration information about * the card. */
@@ -459,7 +459,7 @@ static int sis900_probe ( struct nic *nic, struct pci_device *pci ) { * */
-/* Read Serial EEPROM through EEPROM Access Register, Note that location is +/* Read Serial EEPROM through EEPROM Access Register, Note that location is in word (16 bits) unit */ static u16 sis900_read_eeprom(int location) { @@ -493,7 +493,7 @@ static u16 sis900_read_eeprom(int location) retval = (retval << 1) | ((inl(ee_addr) & EEDO) ? 1 : 0); eeprom_delay(); } - + /* Terminate the EEPROM access. */ outl(0, ee_addr); eeprom_delay(); @@ -505,10 +505,10 @@ static u16 sis900_read_eeprom(int location) #define sis900_mdio_delay() inl(mdio_addr)
-/* +/* Read and write the MII management registers using software-generated serial MDIO protocol. Note that the command bits and data bits are - send out seperately + send out seperately */
static void sis900_mdio_idle(long mdio_addr) @@ -591,7 +591,7 @@ static void sis900_mdio_write(int phy_id, int location, int value) sis900_mdio_delay(); } sis900_mdio_delay(); - + /* Clear out extra bits. */ for (i = 2; i > 0; i--) { outb(0, mdio_addr); @@ -609,7 +609,7 @@ static void sis900_mdio_write(int phy_id, int location, int value) * * Description: resets the ethernet controller chip and various * data structures required for sending and receiving packets. - * + * * Arguments: struct nic *nic: NIC data structure * * returns: void. @@ -634,7 +634,7 @@ sis900_init(struct nic *nic) }
-/* +/* * Function: sis900_reset * * Description: disables interrupts and soft resets the controller chip @@ -644,7 +644,7 @@ sis900_init(struct nic *nic) * Returns: void. */
-static void +static void sis900_reset(struct nic *nic __unused) { int i = 0; @@ -682,7 +682,7 @@ sis900_init_rxfilter(struct nic *nic) { u32 rfcrSave; int i; - + rfcrSave = inl(rfcr + ioaddr);
/* disable packet filtering before setting filter */ @@ -706,7 +706,7 @@ sis900_init_rxfilter(struct nic *nic) }
-/* +/* * Function: sis_init_txd * * Description: initializes the Tx descriptor @@ -724,9 +724,9 @@ sis900_init_txd(struct nic *nic __unused) txd.bufptr = virt_to_bus(&txb[0]);
/* load Transmit Descriptor Register */ - outl(virt_to_bus(&txd), ioaddr + txdp); + outl(virt_to_bus(&txd), ioaddr + txdp); if (sis900_debug > 0) - printf("sis900_init_txd: TX descriptor register loaded with: %X\n", + printf("sis900_init_txd: TX descriptor register loaded with: %X\n", inl(ioaddr + txdp)); }
@@ -734,18 +734,18 @@ sis900_init_txd(struct nic *nic __unused) /* Function: sis_init_rxd * * Description: initializes the Rx descriptor ring - * + * * Arguments: struct nic *nic: NIC data structure * * Returns: void. */
-static void -sis900_init_rxd(struct nic *nic __unused) -{ +static void +sis900_init_rxd(struct nic *nic __unused) +{ int i;
- cur_rx = 0; + cur_rx = 0;
/* init RX descriptor */ for (i = 0; i < NUM_RX_DESC; i++) { @@ -753,7 +753,7 @@ sis900_init_rxd(struct nic *nic __unused) rxd[i].cmdsts = (u32) RX_BUF_SIZE; rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); if (sis900_debug > 0) - printf("sis900_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%X\n", + printf("sis900_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%X\n", i, &rxd[i], (unsigned int) rxd[i].link, (unsigned int) rxd[i].cmdsts, (unsigned int) rxd[i].bufptr); } @@ -762,7 +762,7 @@ sis900_init_rxd(struct nic *nic __unused) outl(virt_to_bus(&rxd[0]), ioaddr + rxdp);
if (sis900_debug > 0) - printf("sis900_init_rxd: RX descriptor register loaded with: %X\n", + printf("sis900_init_rxd: RX descriptor register loaded with: %X\n", inl(ioaddr + rxdp));
} @@ -770,10 +770,10 @@ sis900_init_rxd(struct nic *nic __unused) /* Function: sis_init_rxd * - * Description: + * Description: * sets the receive mode to accept all broadcast packets and packets - * with our MAC address, and reject all multicast packets. - * + * with our MAC address, and reject all multicast packets. + * * Arguments: struct nic *nic: NIC data structure * * Returns: void. @@ -782,7 +782,7 @@ sis900_init_rxd(struct nic *nic __unused) static void sis900_set_rx_mode(struct nic *nic __unused) { int i, table_entries; - u32 rx_mode; + u32 rx_mode; u16 mc_filter[16] = {0}; /* 256/128 bits multicast hash table */ if((pci_revision == SIS635A_900_REV) || (pci_revision == SIS900B_900_REV)) @@ -802,7 +802,7 @@ static void sis900_set_rx_mode(struct nic *nic __unused) outl(mc_filter[i], ioaddr + rfdr); }
- /* Accept Broadcast and multicast packets, destination addresses that match + /* Accept Broadcast and multicast packets, destination addresses that match our MAC address */ outl(RFEN | rx_mode, ioaddr + rfcr);
@@ -814,7 +814,7 @@ static void sis900_set_rx_mode(struct nic *nic __unused) * * Description: checks the state of transmit and receive * parameters on the NIC, and updates NIC registers to match - * + * * Arguments: struct nic *nic: NIC data structure * * Returns: void. @@ -860,7 +860,7 @@ sis900_check_mode(struct nic *nic) * * Description: retrieves and displays speed and duplex * parameters from the NIC - * + * * Arguments: struct nic *nic: NIC data structure * * Returns: void. @@ -872,7 +872,7 @@ sis900_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex int i = 0; u32 status; u16 phy_id0, phy_id1; - + /* STSOUT register is Latched on Transition, read operation updates it */ do { status = sis900_mdio_read(phy_addr, MII_STSOUT); @@ -880,7 +880,7 @@ sis900_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex
*speed = HW_SPEED_10_MBPS; *duplex = FDX_CAPABLE_HALF_SELECTED; - + if (status & (MII_NWAY_TX | MII_NWAY_TX_FDX)) *speed = HW_SPEED_100_MBPS; if (status & ( MII_NWAY_TX_FDX | MII_NWAY_T_FDX)) @@ -899,8 +899,8 @@ sis900_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex if (status & MII_STSOUT_LINK_FAIL) printf("sis900_read_mode: Media Link Off\n"); else - printf("sis900_read_mode: Media Link On %s %s-duplex \n", - *speed == HW_SPEED_100_MBPS ? + printf("sis900_read_mode: Media Link On %s %s-duplex \n", + *speed == HW_SPEED_100_MBPS ? "100mbps" : "10mbps", *duplex == FDX_CAPABLE_FULL_SELECTED ? "full" : "half"); @@ -911,7 +911,7 @@ sis900_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex * * Description: retrieves and displays speed and duplex * parameters from the NIC - * + * * Arguments: struct nic *nic: NIC data structure * * Returns: void. @@ -922,7 +922,7 @@ amd79c901_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *dup { int i; u16 status; - + for (i = 0; i < 2; i++) status = sis900_mdio_read(phy_addr, MII_STATUS);
@@ -940,8 +940,8 @@ amd79c901_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *dup *duplex = FDX_CAPABLE_HALF_SELECTED;
if (status & MII_STSSUM_LINK) - printf("amd79c901_read_mode: Media Link On %s %s-duplex \n", - *speed == HW_SPEED_100_MBPS ? + printf("amd79c901_read_mode: Media Link On %s %s-duplex \n", + *speed == HW_SPEED_100_MBPS ? "100mbps" : "10mbps", *duplex == FDX_CAPABLE_FULL_SELECTED ? "full" : "half"); @@ -1096,7 +1096,7 @@ static void vt6103_read_mode(struct nic *nic __unused, int phy_addr, int *speed, * unsigned short t: ethernet protocol type. * unsigned short s: size of the data-part of the packet. * char *p: the data for the packet. - * + * * Returns: void. */
@@ -1109,14 +1109,14 @@ sis900_transmit(struct nic *nic, { u32 to, nstype; volatile u32 tx_status; - + /* Stop the transmitter */ outl(TxDIS | inl(ioaddr + cr), ioaddr + cr);
/* load Transmit Descriptor Register */ - outl(virt_to_bus(&txd), ioaddr + txdp); + outl(virt_to_bus(&txd), ioaddr + txdp); if (sis900_debug > 1) - printf("sis900_transmit: TX descriptor register loaded with: %X\n", + printf("sis900_transmit: TX descriptor register loaded with: %X\n", inl(ioaddr + txdp));
memcpy(txb, d, ETH_ALEN); @@ -1132,7 +1132,7 @@ sis900_transmit(struct nic *nic, printf("sis900_transmit: sending %d bytes ethtype %hX\n", (int) s, t);
/* pad to minimum packet size */ - while (s < ETH_ZLEN) + while (s < ETH_ZLEN) txb[s++] = '\0';
/* set the transmit buffer descriptor and enable Transmit State Machine */ @@ -1151,13 +1151,13 @@ sis900_transmit(struct nic *nic, /* wait */ ;
if (currticks() >= to) { - printf("sis900_transmit: TX Timeout! Tx status %X.\n", + printf("sis900_transmit: TX Timeout! Tx status %X.\n", (unsigned int) tx_status); } - + if (tx_status & (ABORT | UNDERRUN | OWCOLL)) { /* packet unsuccessfully transmited */ - printf("sis900_transmit: Transmit error, Tx status %X.\n", + printf("sis900_transmit: Transmit error, Tx status %X.\n", (unsigned int) tx_status); } /* Disable interrupts by clearing the interrupt mask. */ @@ -1189,7 +1189,7 @@ sis900_poll(struct nic *nic, int retrieve) inl(ioaddr + isr);
if (sis900_debug > 2) - printf("sis900_poll: cur_rx:%d, status:%X\n", cur_rx, + printf("sis900_poll: cur_rx:%d, status:%X\n", cur_rx, (unsigned int) rx_status);
if (!(rx_status & OWN)) @@ -1200,7 +1200,7 @@ sis900_poll(struct nic *nic, int retrieve) cur_rx, (unsigned int) rx_status);
if ( ! retrieve ) return 1; - + nic->packetlen = (rx_status & DSIZE) - CRC_SIZE;
if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) { @@ -1217,7 +1217,7 @@ sis900_poll(struct nic *nic, int retrieve) /* return the descriptor and buffer to receive ring */ rxd[cur_rx].cmdsts = RX_BUF_SIZE; rxd[cur_rx].bufptr = virt_to_bus(&rxb[cur_rx*RX_BUF_SIZE]); - + if (++cur_rx == NUM_RX_DESC) cur_rx = 0;
@@ -1232,7 +1232,7 @@ sis900_poll(struct nic *nic, int retrieve) /* Function: sis900_disable * * Description: Turns off interrupts and stops Tx and Rx engines - * + * * Arguments: struct nic *nic: NIC data structure * * Returns: void. @@ -1246,7 +1246,7 @@ sis900_disable ( struct nic *nic ) { /* Disable interrupts by clearing the interrupt mask. */ outl(0, ioaddr + imr); outl(0, ioaddr + ier); - + /* Stop the chip's Tx and Rx Status Machine */ outl(RxDIS | TxDIS | inl(ioaddr + cr), ioaddr + cr); } @@ -1255,9 +1255,9 @@ sis900_disable ( struct nic *nic ) { /* Function: sis900_irq * * Description: Enable, Disable, or Force, interrupts - * + * * Arguments: struct nic *nic: NIC data structure - * irq_action_t action: Requested action + * irq_action_t action: Requested action * * Returns: void. */ diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/sis900.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/sis900.h index 7a5c6b5..f25ef2c 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/sis900.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/sis900.h @@ -1,6 +1,6 @@ /* -*- Mode:C; c-basic-offset:4; -*- */
-/* Definitions for SiS ethernet controllers including 7014/7016 and 900 +/* Definitions for SiS ethernet controllers including 7014/7016 and 900 * References: * SiS 7016 Fast Ethernet PCI Bus 10/100 Mbps LAN Controller with OnNow Support, * preliminary Rev. 1.0 Jan. 14, 1998 @@ -43,24 +43,24 @@ enum sis900_registers { enum sis900_command_register_bits { RELOAD = 0x00000400, ACCESSMODE = 0x00000200, - RESET = 0x00000100, - SWI = 0x00000080, + RESET = 0x00000100, + SWI = 0x00000080, RxRESET = 0x00000020, - TxRESET = 0x00000010, - RxDIS = 0x00000008, + TxRESET = 0x00000010, + RxDIS = 0x00000008, RxENA = 0x00000004, - TxDIS = 0x00000002, + TxDIS = 0x00000002, TxENA = 0x00000001 };
enum sis900_configuration_register_bits { DESCRFMT = 0x00000100, /* 7016 specific */ - REQALG = 0x00000080, - SB = 0x00000040, - POW = 0x00000020, - EXD = 0x00000010, - PESEL = 0x00000008, - LPM = 0x00000004, + REQALG = 0x00000080, + SB = 0x00000040, + POW = 0x00000020, + EXD = 0x00000010, + PESEL = 0x00000008, + LPM = 0x00000004, BEM = 0x00000001, RND_CNT = 0x00000400, FAIR_BACKOFF = 0x00000200, @@ -68,17 +68,17 @@ enum sis900_configuration_register_bits { };
enum sis900_eeprom_access_reigster_bits { - MDC = 0x00000040, - MDDIR = 0x00000020, - MDIO = 0x00000010, /* 7016 specific */ - EECS = 0x00000008, - EECLK = 0x00000004, + MDC = 0x00000040, + MDDIR = 0x00000020, + MDIO = 0x00000010, /* 7016 specific */ + EECS = 0x00000008, + EECLK = 0x00000004, EEDO = 0x00000002, EEDI = 0x00000001 };
enum sis900_interrupt_register_bits { - WKEVT = 0x10000000, + WKEVT = 0x10000000, TxPAUSEEND = 0x08000000, TxPAUSE = 0x04000000, TxRCMP = 0x02000000, @@ -87,16 +87,16 @@ enum sis900_interrupt_register_bits { SSERR = 0x00400000, RMABT = 0x00200000, RTABT = 0x00100000, - RxSOVR = 0x00010000, - HIBERR = 0x00008000, + RxSOVR = 0x00010000, + HIBERR = 0x00008000, SWINT = 0x00001000, - MIBINT = 0x00000800, + MIBINT = 0x00000800, TxURN = 0x00000400, TxIDLE = 0x00000200, TxERR = 0x00000100, TxDESC = 0x00000080, TxOK = 0x00000040, - RxORN = 0x00000020, + RxORN = 0x00000020, RxIDLE = 0x00000010, RxEARLY = 0x00000008, RxERR = 0x00000004, @@ -142,10 +142,10 @@ enum sis900_transmit_config_register_bits { #define RxDRNT_10 24 /* 3/4 FIFO size */
enum sis900_reveive_config_register_bits { - RxAEP = 0x80000000, - RxARP = 0x40000000, + RxAEP = 0x80000000, + RxARP = 0x40000000, RxATX = 0x10000000, - RxAJAB = 0x08000000, + RxAJAB = 0x08000000, RxDRNT = 0x0000007F };
@@ -153,10 +153,10 @@ enum sis900_reveive_config_register_bits { #define RFADDR_shift 16
enum sis900_receive_filter_control_register_bits { - RFEN = 0x80000000, - RFAAB = 0x40000000, + RFEN = 0x80000000, + RFAAB = 0x40000000, RFAAM = 0x20000000, - RFAAP = 0x10000000, + RFAAP = 0x10000000, RFPromiscuous = (RFAAB|RFAAM|RFAAP) };
@@ -166,23 +166,23 @@ enum sis900_reveive_filter_data_mask {
/* EEPROM Addresses */ enum sis900_eeprom_address { - EEPROMSignature = 0x00, - EEPROMVendorID = 0x02, + EEPROMSignature = 0x00, + EEPROMVendorID = 0x02, EEPROMDeviceID = 0x03, - EEPROMMACAddr = 0x08, + EEPROMMACAddr = 0x08, EEPROMChecksum = 0x0b };
/* The EEPROM commands include the alway-set leading bit. Refer to NM93Cxx datasheet */ enum sis900_eeprom_command { - EEread = 0x0180, - EEwrite = 0x0140, - EEerase = 0x01C0, + EEread = 0x0180, + EEwrite = 0x0140, + EEerase = 0x01C0, EEwriteEnable = 0x0130, EEwriteDisable = 0x0100, EEeraseAll = 0x0120, - EEwriteAll = 0x0110, - EEaddrMask = 0x013F, + EEwriteAll = 0x0110, + EEaddrMask = 0x013F, EEcmdShift = 16 }; /* For SiS962 or SiS963, request the eeprom software access */ @@ -200,24 +200,24 @@ enum sis96x_eeprom_command {
/* Buffer Descriptor Status*/ enum sis900_buffer_status { - OWN = 0x80000000, - MORE = 0x40000000, + OWN = 0x80000000, + MORE = 0x40000000, INTR = 0x20000000, - SUPCRC = 0x10000000, + SUPCRC = 0x10000000, INCCRC = 0x10000000, - OK = 0x08000000, + OK = 0x08000000, DSIZE = 0x00000FFF };
/* Status for TX Buffers */ enum sis900_tx_buffer_status { ABORT = 0x04000000, - UNDERRUN = 0x02000000, + UNDERRUN = 0x02000000, NOCARRIER = 0x01000000, - DEFERD = 0x00800000, - EXCDEFER = 0x00400000, + DEFERD = 0x00800000, + EXCDEFER = 0x00400000, OWCOLL = 0x00200000, - EXCCOLL = 0x00100000, + EXCCOLL = 0x00100000, COLCNT = 0x000F0000 };
@@ -238,7 +238,7 @@ enum sis900_rx_bufer_status {
/* MII register offsets */ enum mii_registers { - MII_CONTROL = 0x0000, + MII_CONTROL = 0x0000, MII_STATUS = 0x0001, MII_PHY_ID0 = 0x0002, MII_PHY_ID1 = 0x0003, @@ -272,7 +272,7 @@ enum ics_mii_registers { /* MII Control register bit definitions. */ enum mii_control_register_bits { MII_CNTL_FDX = 0x0100, - MII_CNTL_RST_AUTO = 0x0200, + MII_CNTL_RST_AUTO = 0x0200, MII_CNTL_ISOLATE = 0x0400, MII_CNTL_PWRDWN = 0x0800, MII_CNTL_AUTO = 0x1000, @@ -284,14 +284,14 @@ enum mii_control_register_bits { /* MII Status register bit */ enum mii_status_register_bits { MII_STAT_EXT = 0x0001, - MII_STAT_JAB = 0x0002, + MII_STAT_JAB = 0x0002, MII_STAT_LINK = 0x0004, - MII_STAT_CAN_AUTO = 0x0008, + MII_STAT_CAN_AUTO = 0x0008, MII_STAT_FAULT = 0x0010, MII_STAT_AUTO_DONE = 0x0020, - MII_STAT_CAN_T = 0x0800, + MII_STAT_CAN_T = 0x0800, MII_STAT_CAN_T_FDX = 0x1000, - MII_STAT_CAN_TX = 0x2000, + MII_STAT_CAN_TX = 0x2000, MII_STAT_CAN_TX_FDX = 0x4000, MII_STAT_CAN_T4 = 0x8000 }; diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/smc9000.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/smc9000.c index 31e418a..6952b43 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/smc9000.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/smc9000.c @@ -758,7 +758,7 @@ static int smc9000_poll(struct nic *nic, int retrieve) SMC_SELECT_BANK(nic->ioaddr, 2); if (inw(nic->ioaddr + FIFO_PORTS) & FP_RXEMPTY) return 0; - + if ( ! retrieve ) return 1;
/* start reading from the start of the packet */ @@ -920,7 +920,7 @@ static int smc9000_probe ( struct nic *nic, struct isa_device *isa ) { }
smc_phy_configure(nic->ioaddr); - + nic->nic_op = &smc9000_operations; return 1; } diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/sundance.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/sundance.c index 63a9ea5..7226964 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/sundance.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/sundance.c @@ -428,7 +428,7 @@ static void sundance_irq ( struct nic *nic, irq_action_t action ) { case ENABLE : intr_status = inw(nic->ioaddr + IntrStatus); intr_status = intr_status & ~DEFAULT_INTR; - if ( action == ENABLE ) + if ( action == ENABLE ) intr_status = intr_status | DEFAULT_INTR; outw(intr_status, nic->ioaddr + IntrEnable); break; @@ -479,7 +479,7 @@ static int sundance_poll(struct nic *nic, int retreive) rx_ring[entry].status = 0; entry++; sdc->cur_rx = entry % RX_RING_SIZE; - outw(DEFAULT_INTR & ~(IntrRxDone|IntrRxDMADone), + outw(DEFAULT_INTR & ~(IntrRxDone|IntrRxDMADone), nic->ioaddr + IntrStatus); return 1; } @@ -621,7 +621,7 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) { mdio_read(nic, phy, MII_ADVERTISE); if ((mii_status & 0x0040) == 0) sdc->mii_preamble_required++; - DBG + DBG ( "%s: MII PHY found at address %d, status " "%hX advertising %hX\n", sdc->nic_name, phy, mii_status, sdc->mii_if.advertising ); } } diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/tg3.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/tg3.c index e1562d4..917a3d4 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/tg3.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/tg3.c @@ -8,7 +8,7 @@
FILE_LICENCE ( GPL2_ONLY );
-/* 11-13-2003 timlegge Fix Issue with NetGear GA302T +/* 11-13-2003 timlegge Fix Issue with NetGear GA302T * 11-18-2003 ebiederm Generalize NetGear Fix to what the code was supposed to be. * 01-06-2005 Alf (Frederic Olivie) Add Dell bcm 5751 (0x1677) support * 04-15-2005 Martin Vogt Add Fujitsu Siemens Computer (FSC) 0x1734 bcm 5751 0x105d support @@ -75,7 +75,7 @@ struct bss { * @dev: - PCI device that we're dealing with * @buffer: - buffer to hold config space context * - * @buffer must be large enough to hold the entire PCI 2.2 config space + * @buffer must be large enough to hold the entire PCI 2.2 config space * (>= 64 bytes). */ static int pci_save_state(struct pci_device *dev, uint32_t *buffer) @@ -86,7 +86,7 @@ static int pci_save_state(struct pci_device *dev, uint32_t *buffer) return 0; }
-/** +/** * pci_restore_state - Restore the saved state of a PCI device * @dev: - PCI device that we're dealing with * @buffer: - saved PCI config space @@ -167,9 +167,9 @@ static void tg3_switch_clocks(struct tg3 *tp) (!((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) && (tp->tg3_flags & TG3_FLAG_ENABLE_ASF))) && (orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE)!=0) { - tw32_carefully(TG3PCI_CLOCK_CTRL, + tw32_carefully(TG3PCI_CLOCK_CTRL, clock_ctrl | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); - tw32_carefully(TG3PCI_CLOCK_CTRL, + tw32_carefully(TG3PCI_CLOCK_CTRL, clock_ctrl | (CLOCK_CTRL_ALTCLK)); } tw32_carefully(TG3PCI_CLOCK_CTRL, clock_ctrl); @@ -545,7 +545,7 @@ static void tg3_link_report(struct tg3 *tp) 1000 : (tp->link_config.active_speed == SPEED_100 ? 100 : 10)), - (tp->link_config.active_duplex == DUPLEX_FULL ? + (tp->link_config.active_duplex == DUPLEX_FULL ? "full" : "half"), (tp->tg3_flags & TG3_FLAG_TX_PAUSE) ? "TX" : "", (tp->tg3_flags & TG3_FLAG_RX_PAUSE) ? "RX" : "", @@ -1427,7 +1427,7 @@ static int tg3_setup_phy(struct tg3 *tp) #define MAX_WAIT_CNT 1000
/* To stop a block, clear the enable bit and poll till it - * clears. + * clears. */ static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, uint32_t enable_bit) { @@ -1656,7 +1656,7 @@ static int tg3_restart_fw(struct tg3 *tp, uint32_t state) uint32_t val; int i; - tg3_write_mem(NIC_SRAM_FIRMWARE_MBOX, + tg3_write_mem(NIC_SRAM_FIRMWARE_MBOX, NIC_SRAM_FIRMWARE_MBOX_MAGIC1); /* Wait for firmware initialization to complete. */ for (i = 0; i < 100000; i++) { @@ -1894,7 +1894,7 @@ static int tg3_setup_hw(struct tg3 *tp) tp->grc_mode |= GRC_MODE_NO_RX_PHDR_CSUM;
tw32(GRC_MODE, - tp->grc_mode | + tp->grc_mode | (GRC_MODE_IRQ_ON_MAC_ATTN | GRC_MODE_HOST_STACKUP));
/* Setup the timer prescalar register. Clock is always 66Mhz. */ @@ -1999,7 +1999,7 @@ static int tg3_setup_hw(struct tg3 *tp) }; TG3_WRITE_SETTINGS(table_all); - tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, + tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, virt_to_bus(tp->rx_std)); if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) { @@ -2606,8 +2606,8 @@ static int tg3_phy_probe(struct tg3 *tp) err = tg3_init_5401phy_dsp(tp); }
- /* Determine the PHY led mode. - * Be careful if this gets set wrong it can result in an inability to + /* Determine the PHY led mode. + * Be careful if this gets set wrong it can result in an inability to * establish a link. */ if (tp->phy_id == PHY_ID_SERDES) { @@ -2896,7 +2896,7 @@ static int tg3_get_invariants(struct tg3 *tp)
/* 5700 chips can get confused if TX buffers straddle the * 4GB address boundary in some cases. - * + * * In etherboot we can ignore the problem as etherboot lives below 4GB. */
@@ -3037,7 +3037,7 @@ static const char * tg3_phy_string(struct tg3 *tp) case PHY_ID_BCM5704: return "5704"; case PHY_ID_BCM5705: return "5705"; case PHY_ID_BCM5750: return "5750"; - case PHY_ID_BCM5751: return "5751"; + case PHY_ID_BCM5751: return "5751"; case PHY_ID_BCM5787: return "5787"; case PHY_ID_BCM8002: return "8002/serdes"; case PHY_ID_SERDES: return "serdes"; @@ -3084,7 +3084,7 @@ static void tg3_ack_irqs(struct tg3 *tp) * NIC to stop sending us irqs, engaging "in-intr-handler" * event coalescing. */ - tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, + tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001); /* * Flush PCI write. This also guarantees that our @@ -3106,7 +3106,7 @@ static int tg3_poll(struct nic *nic, int retrieve)
result = 0;
- if ( (tp->hw_status->idx[0].rx_producer != tp->rx_rcb_ptr) && !retrieve ) + if ( (tp->hw_status->idx[0].rx_producer != tp->rx_rcb_ptr) && !retrieve ) return 1;
tg3_ack_irqs(tp); @@ -3222,7 +3222,7 @@ static void tg3_disable ( struct nic *nic __unused ) { /* This function serves 3 purposes. * This disables DMA and interrupts so we don't receive * unexpected packets or interrupts from the card after - * etherboot has finished. + * etherboot has finished. * This frees resources so etherboot may use * this driver on another interface * This allows etherboot to reinitialize the interface @@ -3293,7 +3293,7 @@ static int tg3_probe ( struct nic *nic, struct pci_device *pdev ) { tp->rx_mode = 0; tp->tx_mode = 0; tp->mi_mode = MAC_MI_MODE_BASE; - tp->tg3_flags = 0 & ~TG3_FLAG_INIT_COMPLETE; + tp->tg3_flags = 0 & ~TG3_FLAG_INIT_COMPLETE; /* The word/byte swap controls here control register access byte * swapping. DMA data byte swapping is controlled in the GRC_MODE @@ -3357,10 +3357,10 @@ static int tg3_probe ( struct nic *nic, struct pci_device *pdev ) { ((tp->tg3_flags & TG3_FLAG_PCI_32BIT) ? "32-bit" : "64-bit"));
- err = tg3_setup_hw(tp); + err = tg3_setup_hw(tp); if (err) { goto err_out_disable; - } + } tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE;
/* Wait for a reasonable time for the link to come up */ diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/tlan.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/tlan.c index b1a09d1..5e760ce 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/tlan.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/tlan.c @@ -33,8 +33,8 @@ * v1.1 07-27-2003 timlegge Sync 5.0 and 5.1 versions * v1.2 08-19-2003 timlegge Implement Multicast Support * v1.3 08-23-2003 timlegge Fix the transmit Function -* v1.4 01-17-2004 timlegge Initial driver output cleanup -* +* v1.4 01-17-2004 timlegge Initial driver output cleanup +* * Indent Options: indent -kr -i8 ***************************************************************************/
@@ -249,8 +249,8 @@ static void TLan_ResetLists(struct nic *nic __unused) for (i = 0; i < TLAN_NUM_TX_LISTS; i++) { list = &tx_ring[i]; list->cStat = TLAN_CSTAT_UNUSED; - list->buffer[0].address = virt_to_bus(txb + - (i * TLAN_MAX_FRAME_SIZE)); + list->buffer[0].address = virt_to_bus(txb + + (i * TLAN_MAX_FRAME_SIZE)); list->buffer[2].count = 0; list->buffer[2].address = 0; list->buffer[9].address = 0; @@ -428,7 +428,7 @@ void TLan_FinishReset(struct nic *nic) tlphy_par & TLAN_PHY_DUPLEX_FULL ? "Full" : "Half" ); } else { - DBG + DBG ( "AutoNegotiation enabled, at 10%sMbps %s-Duplex\n", tlphy_par & TLAN_PHY_SPEED_100 ? "" : "0", @@ -473,7 +473,7 @@ void TLan_FinishReset(struct nic *nic) outl(virt_to_bus(&rx_ring), BASE + TLAN_CH_PARM); outl(TLAN_HC_GO | TLAN_HC_RT, BASE + TLAN_HOST_CMD); } else { - DBG + DBG ( "TLAN: %s: Link inactive, will retry in 10 secs...\n", priv->nic_name ); /* TLan_SetTimer( nic, (10*HZ), TLAN_TIMER_FINISH_RESET ); */ @@ -517,14 +517,14 @@ static int tlan_poll(struct nic *nic, int retrieve)
nic->packetlen = framesize;
- DBG ( ".%d.", (unsigned int) framesize ); - + DBG ( ".%d.", (unsigned int) framesize ); + memcpy(nic->packet, rxb + (priv->cur_rx * TLAN_MAX_FRAME_SIZE), nic->packetlen);
rx_ring[entry].cStat = 0;
- DBG ( "%d", entry ); + DBG ( "%d", entry );
entry = (entry + 1) % TLAN_NUM_RX_LISTS; priv->cur_rx = entry; @@ -539,7 +539,7 @@ static int tlan_poll(struct nic *nic, int retrieve) host_cmd = TLAN_HC_ACK | ack | (0x000C0000); outl(host_cmd, BASE + TLAN_HOST_CMD); - DBG ( "AC: 0x%hX\n", inw(BASE + TLAN_CH_PARM) ); + DBG ( "AC: 0x%hX\n", inw(BASE + TLAN_CH_PARM) ); DBG ( "PI-2: 0x%hX\n", inw(BASE + TLAN_HOST_INT) ); } refill_rx(nic); @@ -667,7 +667,7 @@ static void tlan_transmit(struct nic *nic, const char *d, /* Destination */ while ((tail_list->cStat == TLAN_CSTAT_READY) && currticks() < to);
head_list = priv->txList + priv->txHead; - while (((tmpCStat = head_list->cStat) & TLAN_CSTAT_FRM_CMP) + while (((tmpCStat = head_list->cStat) & TLAN_CSTAT_FRM_CMP) && (ack < 255)) { ack++; if(tmpCStat & TLAN_CSTAT_EOC) @@ -823,7 +823,7 @@ static int tlan_probe ( struct nic *nic, struct pci_device *pci ) { printf ( "TLAN: %s: Error reading MAC from eeprom: %d\n", pci->id->name, err); } else { - DBG ( "%s: %s at ioaddr %#lX, ", + DBG ( "%s: %s at ioaddr %#lX, ", pci->id->name, eth_ntoa ( nic->node_addr ), pci->ioaddr ); }
@@ -838,7 +838,7 @@ static int tlan_probe ( struct nic *nic, struct pci_device *pci ) { outw(data, BASE + TLAN_HOST_CMD);
TLan_SetMulticastList(nic); - udelay(100); + udelay(100); priv->txList = tx_ring;
/* if (board_found && valid_link) @@ -1362,7 +1362,7 @@ void TLan_PhyDetect(struct nic *nic) TLan_MiiReadReg(nic, phy, MII_PHYSID2, &lo); if ((control != 0xFFFF) || (hi != 0xFFFF) || (lo != 0xFFFF)) { - printf("PHY found at %hX %hX %hX %hX\n", + printf("PHY found at %hX %hX %hX %hX\n", (unsigned int) phy, control, hi, lo); if ((priv->phy[1] == TLAN_PHY_NONE) && (phy != TLAN_PHY_MAX_ADDR)) { @@ -1615,12 +1615,12 @@ void TLan_PhyFinishAutoNeg(struct nic *nic) || (an_adv & an_lpa & 0x0040)) { TLan_MiiWriteReg(nic, phy, MII_BMCR, BMCR_ANENABLE | BMCR_FULLDPLX); - DBG + DBG ( "TLAN: Starting internal PHY with FULL-DUPLEX\n" ); } else { TLan_MiiWriteReg(nic, phy, MII_BMCR, BMCR_ANENABLE); - DBG + DBG ( "TLAN: Starting internal PHY with HALF-DUPLEX\n" ); } } diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/tulip.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/tulip.c index 7a23b7e..515b742 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/tulip.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/tulip.c @@ -9,8 +9,8 @@ This software may be used and distributed according to the terms of the GNU Public License, incorporated herein by reference.
- As of April 2001 this driver should support most tulip cards that - the Linux tulip driver supports because Donald Becker's Linux media + As of April 2001 this driver should support most tulip cards that + the Linux tulip driver supports because Donald Becker's Linux media detection code is now included.
Based on Ken Yap's Tulip Etherboot Driver and Donald Becker's @@ -70,14 +70,14 @@ FILE_LICENCE ( GPL_ANY ); need more reset time before card comes back to a usable state. 26 Feb 2000 mdc 0.75b6 Added a 1 second delay after initializing the transmitter because - some cards seem to need the time or they drop the first packet + some cards seem to need the time or they drop the first packet transmitted. 23 Feb 2000 mdc 0.75b5 removed udelay code and used currticks() for more reliable delay code in reset pause and sanity timeouts. Added function prototypes and TX debugging code. 21 Feb 2000 mdc patch to Etherboot 4.4.3 - Incorporated patches from Bob Edwards and Paul Mackerras of + Incorporated patches from Bob Edwards and Paul Mackerras of Linuxcare's OZLabs to deal with inefficiencies in tulip_transmit and udelay. We now wait for packet transmission to complete (or sanity timeout). @@ -246,24 +246,24 @@ static struct tulip_chip_table { { "Digital DC21040 Tulip", 0}, { "Digital DC21041 Tulip", HAS_MEDIA_TABLE | HAS_NWAY }, { "Digital DS21140 Tulip", HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM }, - { "Digital DS21143 Tulip", HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII + { "Digital DS21143 Tulip", HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII | HAS_PWRDWN | HAS_NWAY | HAS_INTR_MITIGATION }, { "Lite-On 82c168 PNIC", HAS_MII | HAS_PNICNWAY }, { "Macronix 98713 PMAC", HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM }, { "Macronix 98715 PMAC", HAS_MEDIA_TABLE }, { "Macronix 98725 PMAC", HAS_MEDIA_TABLE }, - { "ASIX AX88140", HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM + { "ASIX AX88140", HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | MC_HASH_ONLY | IS_ASIX }, - { "ASIX AX88141", HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | MC_HASH_ONLY + { "ASIX AX88141", HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | MC_HASH_ONLY | IS_ASIX }, { "Lite-On PNIC-II", HAS_MII | HAS_NWAY | HAS_8023X }, { "ADMtek Comet", HAS_MII | MC_HASH_ONLY }, { "Compex 9881 PMAC", HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM }, - { "Intel DS21145 Tulip", HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII + { "Intel DS21145 Tulip", HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII | HAS_PWRDWN | HAS_NWAY }, - { "Xircom tulip work-alike", HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII + { "Xircom tulip work-alike", HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII | HAS_PWRDWN | HAS_NWAY }, - { "SGThomson STE10/100A", HAS_MII | MC_HASH_ONLY }, /*Ramesh Chander*/ + { "SGThomson STE10/100A", HAS_MII | MC_HASH_ONLY }, /*Ramesh Chander*/ { 0, 0 }, };
@@ -906,7 +906,7 @@ static void set_rx_mode(struct nic *nic __unused) { int csr6 = inl(ioaddr + CSR6) & ~0x00D5;
tp->csr6 &= ~0x00D5; - + /* !IFF_PROMISC */ tp->csr6 |= AcceptAllMulticast; csr6 |= AcceptAllMulticast; @@ -934,7 +934,7 @@ static void tulip_reset(struct nic *nic) if (tp->mii_cnt || (tp->mtable && tp->mtable->has_mii)) { outl(0x814C0000, ioaddr + CSR6); } - + /* Reset the chip, holding bit 0 set at least 50 PCI cycles. */ outl(0x00000001, ioaddr + CSR0); tulip_wait(1); @@ -985,7 +985,7 @@ static void tulip_reset(struct nic *nic)
/* construct perfect filter frame with mac address as first match and broadcast address for all others */ - for (i=0; i<192; i++) + for (i=0; i<192; i++) txb[i] = 0xFF; txb[0] = nic->node_addr[0]; txb[1] = nic->node_addr[1]; @@ -1028,7 +1028,7 @@ static void tulip_reset(struct nic *nic) tulip_check_duplex(nic);
set_rx_mode(nic); - + /* enable transmit and receive */ outl(tp->csr6 | 0x00002002, ioaddr + CSR6); } @@ -1059,11 +1059,11 @@ static void tulip_transmit(struct nic *nic, const char *d, unsigned int t, s &= 0x0FFF;
/* pad to minimum packet size */ - while (s < ETH_ZLEN) + while (s < ETH_ZLEN) txb[s++] = '\0';
DBG2("%s: sending %d bytes ethtype %hX\n", tp->nic_name, s, t); - + /* setup the transmit descriptor */ /* 0x60000000 = no interrupt on completion */ tx_ring[0].length = cpu_to_le32(0x60000000 | s); @@ -1216,9 +1216,9 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) { /* Figure out which chip we're dealing with */ i = 0; chip_idx = -1; - + while (pci_id_tbl[i].name) { - if ( (((u32) tp->dev_id << 16) | tp->vendor_id) == + if ( (((u32) tp->dev_id << 16) | tp->vendor_id) == (pci_id_tbl[i].id.pci & pci_id_tbl[i].id.pci_mask) ) { chip_idx = pci_id_tbl[i].drv_flags; break; @@ -1239,7 +1239,7 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) { tp->pci_id_idx, pci_id_tbl[tp->pci_id_idx].name); DBG2 ("%s: chip_idx == %d, name == %s\n", tp->nic_name, chip_idx, tulip_tbl[chip_idx].chip_name); - + /* Bring the 21041/21143 out of sleep mode. Caution: Snooze mode does not work with some boards! */ if (tp->flags & HAS_PWRDWN) @@ -1250,7 +1250,7 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) { tp->nic_name, (unsigned int) ioaddr); return 0; } - + pci_read_config_byte(pci, PCI_REVISION, &chip_rev);
DBG("%s: [chip: %s] rev %d at %hX\n", tp->nic_name, @@ -1334,7 +1334,7 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) { for (i = 0; i < ETH_ALEN; i++) last_phys_addr[i] = nic->node_addr[i];
- DBG ( "%s: %s at ioaddr %hX\n", tp->nic_name, eth_ntoa ( nic->node_addr ), + DBG ( "%s: %s at ioaddr %hX\n", tp->nic_name, eth_ntoa ( nic->node_addr ), (unsigned int) ioaddr );
tp->chip_id = chip_idx; @@ -1883,9 +1883,9 @@ static int tulip_check_duplex(struct nic *nic)
if (bmsr == 0xffff) return -2; - if ((bmsr & 4) == 0) { - int new_bmsr = mdio_read(nic, tp->phys[0], 1); - if ((new_bmsr & 4) == 0) { + if ((bmsr & 4) == 0) { + int new_bmsr = mdio_read(nic, tp->phys[0], 1); + if ((new_bmsr & 4) == 0) { DBG2("%s: No link beat on the MII interface," " status %#x.\n", tp->nic_name, new_bmsr); @@ -1897,9 +1897,9 @@ static int tulip_check_duplex(struct nic *nic) new_csr6 = tp->csr6; negotiated = lpa & tp->advertising[0];
- if(negotiated & 0x380) new_csr6 &= ~0x400000; + if(negotiated & 0x380) new_csr6 &= ~0x400000; else new_csr6 |= 0x400000; - if (tp->full_duplex) new_csr6 |= 0x200; + if (tp->full_duplex) new_csr6 |= 0x200; else new_csr6 &= ~0x200;
if (new_csr6 != tp->csr6) { diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/tulip.txt b/qemu-0.15.x/roms/ipxe/src/drivers/net/tulip.txt index b4f6756..66eefbf 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/tulip.txt +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/tulip.txt @@ -29,13 +29,13 @@ some of the pricier cards, and can lower the cost of building/adapting thin client workstations substantially while giving a considerable performance increase.
-On some PCI tulip clone chipsets (MX987x5, LC82C115, LC82C168) this driver +On some PCI tulip clone chipsets (MX987x5, LC82C115, LC82C168) this driver lets the card choose the fastest speed it can negotiate with the peer device. On other cards, it chooses 10mbit half-duplex.
I burned an AM27C256 (32KByte) EPROM with mx987x5.lzrom and it worked. According to the data sheet the MX98715A supports up to 64K (27C512) -EPROMs, +EPROMs,
I've liberally commented the code and header files in the hope that it will help the next person who hacks the code or needs to support some diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/via-rhine.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/via-rhine.c index 439a4a5..27a59c4 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/via-rhine.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/via-rhine.c @@ -926,7 +926,7 @@ enum intr_status_bits { IntrTxErrSummary=0x082218, }; #define DEFAULT_INTR (IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow | \ - IntrRxDropped | IntrRxNoBuf) + IntrRxDropped | IntrRxNoBuf)
/*************************************************************************** IRQ - PXE IRQ Handler @@ -948,7 +948,7 @@ void rhine_irq ( struct nic *nic, irq_action_t action ) { if( tp->chip_revision < 0x80 && tp->chip_revision >=0x40 ) intr_status |= inb(nic->ioaddr + IntrStatus2) << 16; intr_status = (intr_status & ~DEFAULT_INTR); - if ( action == ENABLE ) + if ( action == ENABLE ) intr_status = intr_status | DEFAULT_INTR; outw(intr_status, nic->ioaddr + IntrEnable); break; @@ -1004,7 +1004,7 @@ rhine_probe1 (struct nic *nic, struct pci_device *pci, int ioaddr, int chip_id, unsigned int timeout; int FDXFlag; int byMIIvalue, LineSpeed, MIICRbak; - uint8_t revision_id; + uint8_t revision_id; unsigned char mode3_reg;
if (rhine_debug > 0 && did_version++ == 0) @@ -1112,7 +1112,7 @@ rhine_probe1 (struct nic *nic, struct pci_device *pci, int ioaddr, int chip_id, } #endif
- + /* query MII to know LineSpeed,duplex mode */ byMIIvalue = inb (ioaddr + 0x6d); LineSpeed = byMIIvalue & MIISR_SPEED; @@ -1169,7 +1169,7 @@ rhine_probe1 (struct nic *nic, struct pci_device *pci, int ioaddr, int chip_id, return; }
-static void +static void rhine_disable ( struct nic *nic ) {
struct rhine_private *tp = (struct rhine_private *) nic->priv_data; @@ -1362,7 +1362,7 @@ rhine_transmit (struct nic *nic,
memcpy (tp->tx_buffs[entry], d, ETH_ALEN); /* dst */ memcpy (tp->tx_buffs[entry] + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ - + nstype=htons(t); memcpy(tp->tx_buffs[entry] + 2 * ETH_ALEN, (char*)&nstype, 2);
diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/via-velocity.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/via-velocity.c index fa90f9b..af6ff62 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/via-velocity.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/via-velocity.c @@ -18,8 +18,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * This driver is based on: -* via-velocity.c: VIA Velocity VT6120, VT6122 Ethernet driver -* The changes are (c) Copyright 2004, Red Hat Inc. +* via-velocity.c: VIA Velocity VT6120, VT6122 Ethernet driver +* The changes are (c) Copyright 2004, Red Hat Inc. * alan@redhat.com * Additional fixes and clean up: Francois Romieu * @@ -27,14 +27,14 @@ * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. * All rights reserved. * Author: Chuang Liang-Shing, AJ Jiang -* +* * Linux Driver Version 2.6.15.4 -* +* * REVISION HISTORY: * ================ * * v1.0 03-06-2006 timlegge Initial port of Linux driver -* +* * Indent Options: indent -kr -i8 *************************************************************************/
@@ -194,13 +194,13 @@ VELOCITY_PARAM(int_works, "Number of packets per interrupt services"); /* The descriptors for this card are required to be aligned on 64 byte boundaries. As the align attribute does not guarantee alignment greater than the alignment of the start address (which for Etherboot -is 16 bytes of alignment) it requires some extra steps. Add 64 to the +is 16 bytes of alignment) it requires some extra steps. Add 64 to the size of the array and the init_ring adjusts the alignment */
/* Define the TX Descriptor */ static u8 tx_ring[TX_DESC_DEF * sizeof(struct tx_desc) + 64];
-/* Create a static buffer of size PKT_BUF_SZ for each TX Descriptor. +/* Create a static buffer of size PKT_BUF_SZ for each TX Descriptor. All descriptors point to a part of this buffer */ static u8 txb[(TX_DESC_DEF * PKT_BUF_SZ) + 64];
@@ -606,7 +606,7 @@ static void velocity_disable(struct nic *nic __unused) /* This function serves 3 purposes. * This disables DMA and interrupts so we don't receive * unexpected packets or interrupts from the card after - * etherboot has finished. + * etherboot has finished. * This frees resources so etherboot may use * this driver on another interface * This allows etherboot to reinitialize the interface @@ -712,7 +712,7 @@ static int velocity_probe( struct nic *nic, struct pci_device *pci)
velocity_get_options(&vptr->options, 0, pci->id->name);
- /* + /* * Mask out the options cannot be set to the chip */ vptr->options.flags &= 0x00FFFFFFUL; //info->flags = 0x00FFFFFFUL; @@ -1009,7 +1009,7 @@ static void velocity_init_registers(struct nic *nic,
mac_clear_isr(regs); writel(CR0_STOP, ®s->CR0Clr); - //writel((CR0_DPOLL | CR0_TXON | CR0_RXON | CR0_STRT), + //writel((CR0_DPOLL | CR0_TXON | CR0_RXON | CR0_STRT), writel((CR0_DPOLL | CR0_TXON | CR0_RXON | CR0_STRT), ®s->CR0Set); break; @@ -1317,7 +1317,7 @@ static void mii_init(struct velocity_info *vptr, u32 mii_status __unused) vptr->mac_regs); /* * Turn on ECHODIS bit in NWay-forced full mode and turn it - * off it in NWay-forced half mode for NWay-forced v.s. + * off it in NWay-forced half mode for NWay-forced v.s. * legacy-forced issue. */ if (vptr->mii_status & VELOCITY_DUPLEX_FULL) @@ -1340,7 +1340,7 @@ static void mii_init(struct velocity_info *vptr, u32 mii_status __unused) vptr->mac_regs); /* * Turn on ECHODIS bit in NWay-forced full mode and turn it - * off it in NWay-forced half mode for NWay-forced v.s. + * off it in NWay-forced half mode for NWay-forced v.s. * legacy-forced issue */ if (vptr->mii_status & VELOCITY_DUPLEX_FULL) @@ -1354,11 +1354,11 @@ static void mii_init(struct velocity_info *vptr, u32 mii_status __unused) case PHYID_MARVELL_1000: case PHYID_MARVELL_1000S: /* - * Assert CRS on Transmit + * Assert CRS on Transmit */ MII_REG_BITS_ON(PSCR_ACRSTX, MII_REG_PSCR, vptr->mac_regs); /* - * Reset to hardware default + * Reset to hardware default */ MII_REG_BITS_ON((ANAR_ASMDIR | ANAR_PAUSE), MII_REG_ANAR, vptr->mac_regs); @@ -1844,10 +1844,10 @@ static void enable_flow_control_ability(struct velocity_info *vptr) * @dev: PCI device to be suspended * @state: Power state we're entering * - * Transition a device to a new power state, using the Power Management + * Transition a device to a new power state, using the Power Management * Capabilities in the device's config space. * - * RETURN VALUE: + * RETURN VALUE: * -EINVAL if trying to enter a lower state than we're already in. * 0 if we're already in the requested state. * -EIO if device does not support PCI PM. @@ -1865,7 +1865,7 @@ int pci_set_power_state(struct pci_device *dev, int state) state = 3;
/* Validate current state: - * Can enter D0 from any state, but if we can only go deeper + * Can enter D0 from any state, but if we can only go deeper * to sleep if we're already in a low power state */ if (state > 0 && current_state > state) diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/via-velocity.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/via-velocity.h index b657224..ad1ce1e 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/via-velocity.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/via-velocity.h @@ -20,7 +20,7 @@ * * Date: Jan 24, 2003 * - * Changes for Etherboot Port: + * Changes for Etherboot Port: * Copyright (c) 2006 by Timothy Legge tlegge@rogers.com */
diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/w89c840.c b/qemu-0.15.x/roms/ipxe/src/drivers/net/w89c840.c index b314955..7b82944 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/w89c840.c +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/w89c840.c @@ -45,7 +45,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); * using timer2 routines. Proposed * by Ken Yap to eliminate CPU speed * dependency. - * Dec 12 2003 V0.94 timlegge Fixed issues in 5.2, removed + * Dec 12 2003 V0.94 timlegge Fixed issues in 5.2, removed * interrupt usage, enabled * multicast support * @@ -470,7 +470,7 @@ static int w89c840_poll(struct nic *nic, int retrieve) entry = (++w840private.cur_rx) % RX_RING_SIZE; w840private.rx_head_desc = &w840private.rx_ring[entry]; } while (0); - + return packet_received; }
@@ -569,7 +569,7 @@ static void w89c840_transmit(
/* Transmit timed out... */
- printf("winbond-840 : transmission TIMEOUT : status %X\n", + printf("winbond-840 : transmission TIMEOUT : status %X\n", (unsigned int) w840private.tx_ring[entry].status);
return; @@ -876,7 +876,7 @@ static void check_duplex(void)
duplex = (negotiated & 0x0100) || (negotiated & 0x01C0) == 0x0040; if (w840private.full_duplex != duplex) { - w840private.full_duplex = duplex; + w840private.full_duplex = duplex;
#if defined(W89C840_DEBUG) printf("winbond-840 : Setting %s-duplex based on MII # %d negotiated capability %X\n", @@ -897,7 +897,7 @@ static void set_rx_mode(void) memset(mc_filter, 0xff, sizeof(mc_filter));
/* - * works OK with multicast enabled. + * works OK with multicast enabled. */
rx_mode = AcceptBroadcast | AcceptMyPhys | AcceptMulticast; diff --git a/qemu-0.15.x/roms/ipxe/src/drivers/net/wlan_compat.h b/qemu-0.15.x/roms/ipxe/src/drivers/net/wlan_compat.h index 9b7693b..6831a63 100644 --- a/qemu-0.15.x/roms/ipxe/src/drivers/net/wlan_compat.h +++ b/qemu-0.15.x/roms/ipxe/src/drivers/net/wlan_compat.h @@ -39,7 +39,7 @@ * * -------------------------------------------------------------------- * -* Portions of the development of this software were funded by +* Portions of the development of this software were funded by * Intersil Corporation as part of PRISM(R) chipset product development. * * -------------------------------------------------------------------- @@ -109,7 +109,7 @@ FILE_LICENCE ( GPL2_ONLY ); /* Lets try to figure out what we've got. Kernel mode or User mode? */ #if defined(__KERNEL__) #define WLAN_OS WLAN_LINUX_KERNEL -#else +#else #define WLAN_OS WLAN_LINUX_USER #endif
@@ -179,8 +179,8 @@ FILE_LICENCE ( GPL2_ONLY ); Linux/PPC on PowerMacs (PCI) Arm/Intel Xscale (PCI)
- This may also affect PLX boards and other BE &| PPC platforms; - as new ones are discovered, add them below. + This may also affect PLX boards and other BE &| PPC platforms; + as new ones are discovered, add them below. */
#if (WLAN_HOSTIF == WLAN_PCI) @@ -312,11 +312,11 @@ typedef signed long long INT64; #define WLAN_LOG_DEBUG5(l,x,n1,n2,n3,n4,n5) if ( WLAN_DBVAR >= (l)) printk(KERN_DEBUG "%s: " x , __FUNCTION__ , (n1), (n2), (n3), (n4), (n5)); #define WLAN_LOG_DEBUG6(l,x,n1,n2,n3,n4,n5,n6) if ( WLAN_DBVAR >= (l)) printk(KERN_DEBUG "%s: " x , __FUNCTION__ , (n1), (n2), (n3), (n4), (n5), (n6)); #else - #define WLAN_ASSERT(c) + #define WLAN_ASSERT(c) #define WLAN_HEX_DUMP( l, s, p, n)
- #define DBFENTER - #define DBFEXIT + #define DBFENTER + #define DBFEXIT
#define WLAN_LOG_DEBUG0(l, s) #define WLAN_LOG_DEBUG1(l, s,n) @@ -344,11 +344,11 @@ typedef signed long long INT64; #define WLAN_LOG_NOTICE3(s,n1,n2,n3) #define WLAN_LOG_NOTICE4(s,n1,n2,n3,n4)
- #define WLAN_ASSERT(c) + #define WLAN_ASSERT(c) #define WLAN_HEX_DUMP( l, s, p, n)
- #define DBFENTER - #define DBFEXIT + #define DBFENTER + #define DBFEXIT
#define WLAN_LOG_INFO0(s) #define WLAN_LOG_INFO1(s,n) diff --git a/qemu-0.15.x/roms/ipxe/src/hci/editstring.c b/qemu-0.15.x/roms/ipxe/src/hci/editstring.c index 996528f..aa8414d 100644 --- a/qemu-0.15.x/roms/ipxe/src/hci/editstring.c +++ b/qemu-0.15.x/roms/ipxe/src/hci/editstring.c @@ -30,7 +30,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); */
static void insert_delete ( struct edit_string *string, size_t delete_len, - const char *insert_text ) + const char *insert_text ) __attribute__ (( nonnull (1) )); static void insert_character ( struct edit_string *string, unsigned int character ) __nonnull; diff --git a/qemu-0.15.x/roms/ipxe/src/hci/mucurses/kb.c b/qemu-0.15.x/roms/ipxe/src/hci/mucurses/kb.c index cada729..0d224c6 100644 --- a/qemu-0.15.x/roms/ipxe/src/hci/mucurses/kb.c +++ b/qemu-0.15.x/roms/ipxe/src/hci/mucurses/kb.c @@ -11,7 +11,7 @@ #define INPUT_DELAY 200 // half-blocking delay timer resolution (ms) #define INPUT_DELAY_TIMEOUT 1000 // half-blocking delay timeout
-int m_delay; /* +int m_delay; /* < 0 : blocking read 0 : non-blocking read > 0 : timed blocking read diff --git a/qemu-0.15.x/roms/ipxe/src/hci/mucurses/slk.c b/qemu-0.15.x/roms/ipxe/src/hci/mucurses/slk.c index 600658e..81ca255 100644 --- a/qemu-0.15.x/roms/ipxe/src/hci/mucurses/slk.c +++ b/qemu-0.15.x/roms/ipxe/src/hci/mucurses/slk.c @@ -22,7 +22,7 @@ struct _softlabel { // label string char label[SLK_MAX_LABEL_LEN]; - /* Format of soft label + /* Format of soft label 0: left justify 1: centre justify 2: right justify @@ -87,13 +87,13 @@ static void _print_label ( struct _softlabel sl ) { /* we need to pad the label with varying amounts of leading pad depending on the format of the label */ if ( sl.fmt == 1 ) { - memset( str, space_ch, - (size_t)(slks->max_label_len + memset( str, space_ch, + (size_t)(slks->max_label_len - strlen(sl.label)) / 2 ); } if ( sl.fmt == 2 ) { memset( str, space_ch, - (size_t)(slks->max_label_len + (size_t)(slks->max_label_len - strlen(sl.label)) ); } strcat(str,sl.label); @@ -123,7 +123,7 @@ attr_t slk_attr ( void ) { * @ret rc return status code */ int slk_attroff ( const chtype attrs ) { - if ( slks == NULL ) + if ( slks == NULL ) return ERR; slks->attrs &= ~( attrs & A_ATTRIBUTES ); return OK; @@ -149,7 +149,7 @@ int slk_attron ( const chtype attrs ) { * @ret rc return status code */ int slk_attrset ( const chtype attrs ) { - if ( slks == NULL ) + if ( slks == NULL ) return ERR; slks->attrs = ( attrs & A_ATTRIBUTES ); return OK; @@ -187,7 +187,7 @@ int slk_attr_on ( attr_t attrs, void *opts __unused ) { */ int slk_attr_set ( const attr_t attrs, short colour_pair_number, void *opts __unused ) { - if ( slks == NULL ) + if ( slks == NULL ) return ERR;
if ( ( unsigned short )colour_pair_number > COLORS ) @@ -218,7 +218,7 @@ int slk_clear ( void ) { * Set soft label colour pair */ int slk_colour ( short colour_pair_number ) { - if ( slks == NULL ) + if ( slks == NULL ) return ERR; if ( ( unsigned short )colour_pair_number > COLORS ) return ERR; @@ -273,7 +273,7 @@ int slk_init ( int fmt ) { // determine maximum label length and major space size available_width = COLS - ( ( MIN_SPACE_SIZE * nmaj ) + nmin ); slks->max_label_len = available_width / nblocks; - slks->maj_space_len = MIN_SPACE_SIZE + + slks->maj_space_len = MIN_SPACE_SIZE + ( available_width % nblocks ) / nmaj; slks->num_spaces = nmaj; slks->num_labels = nblocks; @@ -291,7 +291,7 @@ int slk_init ( int fmt ) { * @ret label return label */ char* slk_label ( int labnum ) { - if ( slks == NULL ) + if ( slks == NULL ) return NULL;
return slks->fkeys[labnum].label; @@ -348,7 +348,7 @@ int slk_restore ( void ) { * @ret rc return status code */ int slk_set ( int labnum, const char *label, int fmt ) { - if ( slks == NULL ) + if ( slks == NULL ) return ERR; if ( (unsigned short)labnum >= slks->num_labels ) return ERR; diff --git a/qemu-0.15.x/roms/ipxe/src/hci/mucurses/winattrs.c b/qemu-0.15.x/roms/ipxe/src/hci/mucurses/winattrs.c index f549d75..b6a2be2 100644 --- a/qemu-0.15.x/roms/ipxe/src/hci/mucurses/winattrs.c +++ b/qemu-0.15.x/roms/ipxe/src/hci/mucurses/winattrs.c @@ -63,7 +63,7 @@ int wattrset ( WINDOW *win, int attrs ) { * @v *opts undefined (for future implementation) * @ret rc return status cude */ -int wattr_get ( WINDOW *win, attr_t *attrs, short *pair, +int wattr_get ( WINDOW *win, attr_t *attrs, short *pair, void *opts __unused ) { *attrs = win->attrs & A_ATTRIBUTES; *pair = PAIR_NUMBER ( win->attrs ); @@ -78,7 +78,7 @@ int wattr_get ( WINDOW *win, attr_t *attrs, short *pair, * @v *opts undefined (for future implementation) * @ret rc return status code */ -int wattr_off ( WINDOW *win, attr_t attrs, +int wattr_off ( WINDOW *win, attr_t attrs, void *opts __unused ) { wattroff( win, attrs ); return OK; @@ -92,7 +92,7 @@ int wattr_off ( WINDOW *win, attr_t attrs, * @v *opts undefined (for future implementation) * @ret rc return status code */ -int wattr_on ( WINDOW *win, attr_t attrs, +int wattr_on ( WINDOW *win, attr_t attrs, void *opts __unused ) { wattron( win, attrs ); return OK; @@ -107,7 +107,7 @@ int wattr_on ( WINDOW *win, attr_t attrs, * @v *opts undefined (for future implementation) * @ret rc return status code */ -int wattr_set ( WINDOW *win, attr_t attrs, short cpair, +int wattr_set ( WINDOW *win, attr_t attrs, short cpair, void *opts __unused ) { wattrset( win, attrs | COLOUR_PAIR ( cpair ) ); return OK; @@ -121,7 +121,7 @@ int wattr_set ( WINDOW *win, attr_t attrs, short cpair, * @v *opts undefined (for future implementation) * @ret rc return status code */ -int wcolour_set ( WINDOW *win, short colour_pair_number, +int wcolour_set ( WINDOW *win, short colour_pair_number, void *opts __unused ) { if ( ( unsigned short )colour_pair_number > COLOUR_PAIRS ) return ERR; diff --git a/qemu-0.15.x/roms/ipxe/src/hci/mucurses/windows.c b/qemu-0.15.x/roms/ipxe/src/hci/mucurses/windows.c index 63d0af0..2d1dbe5 100644 --- a/qemu-0.15.x/roms/ipxe/src/hci/mucurses/windows.c +++ b/qemu-0.15.x/roms/ipxe/src/hci/mucurses/windows.c @@ -53,7 +53,7 @@ WINDOW *derwin ( WINDOW *parent, int nlines, int ncols, return NULL; if ( ( child = malloc( sizeof( WINDOW ) ) ) == NULL ) return NULL; - if ( ( (unsigned)ncols > parent->width ) || + if ( ( (unsigned)ncols > parent->width ) || ( (unsigned)nlines > parent->height ) ) return NULL; child->ori_y = parent->ori_y + begin_y; diff --git a/qemu-0.15.x/roms/ipxe/src/hci/strerror.c b/qemu-0.15.x/roms/ipxe/src/hci/strerror.c index 9356e9e..bba15de 100644 --- a/qemu-0.15.x/roms/ipxe/src/hci/strerror.c +++ b/qemu-0.15.x/roms/ipxe/src/hci/strerror.c @@ -43,7 +43,7 @@ static struct errortab * find_error ( int errno ) { * @v errno Error number * @ret errortab Error description, or NULL * - * + * */ static struct errortab * find_closest_error ( int errno ) { struct errortab *errortab; diff --git a/qemu-0.15.x/roms/ipxe/src/include/assert.h b/qemu-0.15.x/roms/ipxe/src/include/assert.h index 40a00a2..c88be65 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/assert.h +++ b/qemu-0.15.x/roms/ipxe/src/include/assert.h @@ -28,7 +28,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); * references to the assert_printf symbol are collapsed into references * to the printf symbol. */ -extern int __attribute__ (( format ( printf, 1, 2 ) )) +extern int __attribute__ (( format ( printf, 1, 2 ) )) assert_printf ( const char *fmt, ... ) asm ( "printf" );
/** diff --git a/qemu-0.15.x/roms/ipxe/src/include/bootp.h b/qemu-0.15.x/roms/ipxe/src/include/bootp.h index 0e65477..6b48680 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/bootp.h +++ b/qemu-0.15.x/roms/ipxe/src/include/bootp.h @@ -117,7 +117,7 @@ #define RFC3679_PXE_CLIENT_ARCH_ARCX86 0,4 #define RFC3679_PXE_CLIENT_ARCH_INTELLEAN 0,5
-/* +/* * Only one valid value of NDI type (must be 1) and UNDI version (must * be 2.1) */ diff --git a/qemu-0.15.x/roms/ipxe/src/include/btext.h b/qemu-0.15.x/roms/ipxe/src/include/btext.h index 1d3f9e5..16e8fd4 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/btext.h +++ b/qemu-0.15.x/roms/ipxe/src/include/btext.h @@ -3,7 +3,7 @@ * (for MacOS) when it is used to boot Linux. * * Written by Benjamin Herrenschmidt. - * + * * Move to LinuxBIOS by LYH yhlu@tyan.com * */ diff --git a/qemu-0.15.x/roms/ipxe/src/include/coff.h b/qemu-0.15.x/roms/ipxe/src/include/coff.h index a73fda5..eabcceb 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/coff.h +++ b/qemu-0.15.x/roms/ipxe/src/include/coff.h @@ -39,7 +39,7 @@ COFF_filehdr; /* * Optional header. */ -typedef struct +typedef struct { unsigned short magic; /* type of file */ unsigned short vstamp; /* version stamp */ @@ -55,7 +55,7 @@ COFF_opthdr; /* * Section header. */ -typedef struct +typedef struct { char s_name[8]; /* section name */ unsigned long s_paddr; /* physical address, aliased s_nlib */ diff --git a/qemu-0.15.x/roms/ipxe/src/include/compiler.h b/qemu-0.15.x/roms/ipxe/src/include/compiler.h index feea516..07dbce1 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/compiler.h +++ b/qemu-0.15.x/roms/ipxe/src/include/compiler.h @@ -270,7 +270,7 @@ REQUEST_EXPANDED ( CONFIG_SYMBOL ); * references to the dbg_printf symbol are collapsed into references * to the printf symbol. */ -extern int __attribute__ (( format ( printf, 1, 2 ) )) +extern int __attribute__ (( format ( printf, 1, 2 ) )) dbg_printf ( const char *fmt, ... ) asm ( "printf" );
extern void dbg_autocolourise ( unsigned long id ); diff --git a/qemu-0.15.x/roms/ipxe/src/include/curses.h b/qemu-0.15.x/roms/ipxe/src/include/curses.h index 2069779..4abfd6a 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/curses.h +++ b/qemu-0.15.x/roms/ipxe/src/include/curses.h @@ -218,14 +218,14 @@ extern int beep ( void ); extern int box ( WINDOW *, chtype, chtype ) __nonnull; //extern bool can_change_colour ( void ); #define can_change_color() can_change_colour() -extern int cbreak ( void ); +extern int cbreak ( void ); //extern int clrtobot ( void ); //extern int clrtoeol ( void ); extern int colour_content ( short, short *, short *, short * ) __nonnull; #define color_content( c, r, g, b ) colour_content( (c), (r), (g), (b) ) //extern int colour_set ( short, void * ); #define color_set( cpno, opts ) colour_set( (cpno), (opts) ) -extern int copywin ( const WINDOW *, WINDOW *, int, int, int, +extern int copywin ( const WINDOW *, WINDOW *, int, int, int, int, int, int, int ); extern int curs_set ( int ); extern int def_prog_mode ( void ); diff --git a/qemu-0.15.x/roms/ipxe/src/include/i82365.h b/qemu-0.15.x/roms/ipxe/src/include/i82365.h index a6f2b17..ba24f3d 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/i82365.h +++ b/qemu-0.15.x/roms/ipxe/src/include/i82365.h @@ -7,7 +7,7 @@ * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and - * limitations under the License. + * limitations under the License. * * The initial developer of the original code is David A. Hinds * dahinds@users.sourceforge.net. Portions created by David A. Hinds diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/ansiesc.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/ansiesc.h index 35438e4..dde2fde 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/ansiesc.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/ansiesc.h @@ -23,7 +23,7 @@ * separated by semicolons. The Intermediate Bytes (in the range 0x20 * to 0x2f) and the Final Byte (in the range 0x40 to 0x4f) determine * the control function. - * + * */
FILE_LICENCE ( GPL2_OR_LATER ); @@ -78,7 +78,7 @@ struct ansiesc_context { * Will be zero when not currently in an escape sequence. */ unsigned int count; - /** Parameter list */ + /** Parameter list */ int params[ANSIESC_MAX_PARAMS]; /** Control function identifier */ unsigned int function; diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/aoe.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/aoe.h index 60f3bd9..84ebc13 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/aoe.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/aoe.h @@ -100,7 +100,7 @@ struct aoehdr { #define AOE_ERR_CONFIG_EXISTS 4 /**< Config string present */ #define AOE_ERR_BAD_VERSION 5 /**< Unsupported version */
-#define AOE_STATUS_ERR_MASK 0x0f /**< Error portion of status code */ +#define AOE_STATUS_ERR_MASK 0x0f /**< Error portion of status code */ #define AOE_STATUS_PENDING 0x80 /**< Command pending */
/** AoE tag magic marker */ diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/bitbash.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/bitbash.h index 62b54b1..f85f15e 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/bitbash.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/bitbash.h @@ -19,7 +19,7 @@ struct bit_basher_operations { * @v basher Bit-bashing interface * @v bit_id Bit number * @v data Value to write - * + * * @c data will be 0 if a logic 0 should be written (i.e. the * bit should be cleared), or -1UL if a logic 1 should be * written (i.e. the bit should be set). This is done so that diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/dhcp.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/dhcp.h index 148e3d6..de3f2c6 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/dhcp.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/dhcp.h @@ -478,7 +478,7 @@ struct dhcp_netdev_desc { * * DHCP options consist of a mandatory tag, a length field that is * mandatory for all options except @c DHCP_PAD and @c DHCP_END, and a - * payload. + * payload. */ struct dhcp_option { /** Tag diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/dhcppkt.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/dhcppkt.h index 3179a6b..387c741 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/dhcppkt.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/dhcppkt.h @@ -65,7 +65,7 @@ extern int dhcppkt_store ( struct dhcp_packet *dhcppkt, unsigned int tag, const void *data, size_t len ); extern int dhcppkt_fetch ( struct dhcp_packet *dhcppkt, unsigned int tag, void *data, size_t len ); -extern void dhcppkt_init ( struct dhcp_packet *dhcppkt, +extern void dhcppkt_init ( struct dhcp_packet *dhcppkt, struct dhcphdr *data, size_t len );
#endif /* _IPXE_DHCPPKT_H */ diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/ibft.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/ibft.h index 7337212..923c5f1 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/ibft.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/ibft.h @@ -88,7 +88,7 @@ struct ibft_header { uint8_t version; /** Length, including this header */ uint16_t length; - /** Index + /** Index * * This is the number of the NIC or Target, when applicable. */ diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/isa_ids.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/isa_ids.h index 1faf114..549e494 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/isa_ids.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/isa_ids.h @@ -1,7 +1,7 @@ #ifndef ISA_IDS_H #define ISA_IDS_H
-/* +/* * This file defines IDs as used by ISAPnP and EISA devices. These * IDs have the format: * diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/keys.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/keys.h index 8b13550..eae068b 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/keys.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/keys.h @@ -49,7 +49,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define ESC 0x1b
/* - * Special keys outside the normal ASCII range + * Special keys outside the normal ASCII range * * * The names are chosen to match those used by curses. The values are diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/pci.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/pci.h index 960454d..baa892f 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/pci.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/pci.h @@ -80,7 +80,7 @@ FILE_LICENCE ( GPL2_ONLY ); /* Header type 0 (normal devices) */ #define PCI_CARDBUS_CIS 0x28 #define PCI_SUBSYSTEM_VENDOR_ID 0x2c -#define PCI_SUBSYSTEM_ID 0x2e +#define PCI_SUBSYSTEM_ID 0x2e
#define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */ #define PCI_BASE_ADDRESS_1 0x14 /* 32 bits */ diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/spi_bit.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/spi_bit.h index 9cfa7b8..01ab002 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/spi_bit.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/spi_bit.h @@ -45,7 +45,7 @@ enum { * Determine bit index for a particular slave * * @v slave Slave number - * @ret index Bit index (i.e. SPI_BIT_SSN, where N=slave) + * @ret index Bit index (i.e. SPI_BIT_SSN, where N=slave) */ #define SPI_BIT_SS( slave ) ( SPI_BIT_SS0 + (slave) )
diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/tcpip.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/tcpip.h index cdf554e..54ae756 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/tcpip.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/tcpip.h @@ -44,7 +44,7 @@ struct sockaddr_tcpip { ( sizeof ( sa_family_t ) + sizeof ( uint16_t ) ) ]; } __attribute__ (( may_alias ));
-/** +/** * A transport-layer protocol of the TCP/IP stack (eg. UDP, TCP, etc) */ struct tcpip_protocol { @@ -63,7 +63,7 @@ struct tcpip_protocol { */ int ( * rx ) ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src, struct sockaddr_tcpip *st_dest, uint16_t pshdr_csum ); - /** + /** * Transport-layer protocol number * * This is a constant of the type IP_XXX diff --git a/qemu-0.15.x/roms/ipxe/src/include/ipxe/tftp.h b/qemu-0.15.x/roms/ipxe/src/include/ipxe/tftp.h index 38be0d4..ccf9690 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/ipxe/tftp.h +++ b/qemu-0.15.x/roms/ipxe/src/include/ipxe/tftp.h @@ -45,7 +45,7 @@ struct tftp_data { uint16_t block; uint8_t data[0]; } __attribute__ (( packed )); - + /** A TFTP acknowledgement (ACK) packet */ struct tftp_ack { uint16_t opcode; diff --git a/qemu-0.15.x/roms/ipxe/src/include/sys_info.h b/qemu-0.15.x/roms/ipxe/src/include/sys_info.h index 7127c64..2e86e42 100644 --- a/qemu-0.15.x/roms/ipxe/src/include/sys_info.h +++ b/qemu-0.15.x/roms/ipxe/src/include/sys_info.h @@ -13,7 +13,7 @@ struct sys_info { char *command_line; /* command line given to us */ #if 0 //By LYH -//Will use meminfo in Etherboot +//Will use meminfo in Etherboot /* memory map */ int n_memranges; struct memrange { diff --git a/qemu-0.15.x/roms/ipxe/src/net/ethernet.c b/qemu-0.15.x/roms/ipxe/src/net/ethernet.c index d14cfef..2353a5b 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/ethernet.c +++ b/qemu-0.15.x/roms/ipxe/src/net/ethernet.c @@ -73,7 +73,7 @@ static int eth_push ( struct net_device *netdev __unused, * @ret net_proto Network-layer protocol, in network-byte order * @ret rc Return status code */ -static int eth_pull ( struct net_device *netdev __unused, +static int eth_pull ( struct net_device *netdev __unused, struct io_buffer *iobuf, const void **ll_dest, const void **ll_source, uint16_t *net_proto ) { struct ethhdr *ethhdr = iobuf->data; diff --git a/qemu-0.15.x/roms/ipxe/src/net/ipv4.c b/qemu-0.15.x/roms/ipxe/src/net/ipv4.c index b2d51ad..7a12c88 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/ipv4.c +++ b/qemu-0.15.x/roms/ipxe/src/net/ipv4.c @@ -135,7 +135,7 @@ static struct ipv4_miniroute * ipv4_route ( struct in_addr *dest ) { * Fragment reassembly counter timeout * * @v timer Retry timer - * @v over If asserted, the timer is greater than @c MAX_TIMEOUT + * @v over If asserted, the timer is greater than @c MAX_TIMEOUT */ static void ipv4_frag_expired ( struct retry_timer *timer __unused, int over ) { @@ -172,12 +172,12 @@ static struct io_buffer * ipv4_reassemble ( struct io_buffer * iobuf ) { fragbuf->src.s_addr == iphdr->src.s_addr ) { /** * Check if the packet is the expected fragment - * + * * The offset of the new packet must be equal to the * length of the data accumulated so far (the length of * the reassembled I/O buffer */ - if ( iob_len ( fragbuf->frag_iob ) == + if ( iob_len ( fragbuf->frag_iob ) == ( iphdr->frags & IP_MASK_OFFSET ) ) { /** * Append the contents of the fragment to the @@ -377,7 +377,7 @@ static int ipv4_tx ( struct io_buffer *iobuf, * @v ll_dest Link-layer destination address * @v ll_source Link-layer destination source * - * This function expects an IP4 network datagram. It processes the headers + * This function expects an IP4 network datagram. It processes the headers * and sends it to the transport layer. */ static int ipv4_rx ( struct io_buffer *iobuf, @@ -447,7 +447,7 @@ static int ipv4_rx ( struct io_buffer *iobuf, iob_pull ( iobuf, hdrlen );
/* Fragment reassembly */ - if ( ( iphdr->frags & htons ( IP_MASK_MOREFRAGS ) ) || + if ( ( iphdr->frags & htons ( IP_MASK_MOREFRAGS ) ) || ( ( iphdr->frags & htons ( IP_MASK_OFFSET ) ) != 0 ) ) { /* Pass the fragment to ipv4_reassemble() which either * returns a fully reassembled I/O buffer or NULL. @@ -478,7 +478,7 @@ static int ipv4_rx ( struct io_buffer *iobuf, return -EINVAL; }
-/** +/** * Check existence of IPv4 address for ARP * * @v netdev Network device diff --git a/qemu-0.15.x/roms/ipxe/src/net/ipv6.c b/qemu-0.15.x/roms/ipxe/src/net/ipv6.c index 712aa49..a89a0a3 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/ipv6.c +++ b/qemu-0.15.x/roms/ipxe/src/net/ipv6.c @@ -50,7 +50,7 @@ static LIST_HEAD ( miniroutes ); * @v gateway Gateway address (or ::0 for no gateway) * @ret miniroute Routing table entry, or NULL */ -static struct ipv6_miniroute * __malloc +static struct ipv6_miniroute * __malloc add_ipv6_miniroute ( struct net_device *netdev, struct in6_addr prefix, int prefix_len, struct in6_addr address, struct in6_addr gateway ) { @@ -263,17 +263,17 @@ static int ipv6_tx ( struct io_buffer *iobuf, static int ipv6_process_nxt_hdr ( struct io_buffer *iobuf, uint8_t nxt_hdr, struct sockaddr_tcpip *src, struct sockaddr_tcpip *dest ) { switch ( nxt_hdr ) { - case IP6_HOPBYHOP: - case IP6_ROUTING: - case IP6_FRAGMENT: - case IP6_AUTHENTICATION: - case IP6_DEST_OPTS: - case IP6_ESP: + case IP6_HOPBYHOP: + case IP6_ROUTING: + case IP6_FRAGMENT: + case IP6_AUTHENTICATION: + case IP6_DEST_OPTS: + case IP6_ESP: DBG ( "Function not implemented for header %d\n", nxt_hdr ); return -ENOSYS; - case IP6_ICMP6: + case IP6_ICMP6: break; - case IP6_NO_HEADER: + case IP6_NO_HEADER: DBG ( "No next header\n" ); return 0; } diff --git a/qemu-0.15.x/roms/ipxe/src/net/ndp.c b/qemu-0.15.x/roms/ipxe/src/net/ndp.c index 4d37133..0a6010e 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/ndp.c +++ b/qemu-0.15.x/roms/ipxe/src/net/ndp.c @@ -49,7 +49,7 @@ ndp_find_entry ( struct in6_addr *in6 ) { struct ndp_entry *ndp;
for ( ndp = ndp_table ; ndp < ndp_table_end ; ndp++ ) { - if ( IP6_EQUAL ( ( *in6 ), ndp->in6 ) && + if ( IP6_EQUAL ( ( *in6 ), ndp->in6 ) && ( ndp->state != NDP_STATE_INVALID ) ) { return ndp; } @@ -59,13 +59,13 @@ ndp_find_entry ( struct in6_addr *in6 ) {
/** * Add NDP entry - * + * * @v netdev Network device * @v in6 IP6 address * @v ll_addr Link-layer address * @v state State of the entry - one of the NDP_STATE_XXX values */ -static void +static void add_ndp_entry ( struct net_device *netdev, struct in6_addr *in6, void *ll_addr, int state ) { struct ndp_entry *ndp; @@ -144,7 +144,7 @@ int ndp_resolve ( struct net_device *netdev, struct in6_addr *dest, * * @v iobuf I/O buffer * @v st_src Source address - * @v st_dest Destination address + * @v st_dest Destination address */ int ndp_process_advert ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src __unused, struct sockaddr_tcpip *st_dest __unused ) { diff --git a/qemu-0.15.x/roms/ipxe/src/net/retry.c b/qemu-0.15.x/roms/ipxe/src/net/retry.c index 082be39..f71f8be 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/retry.c +++ b/qemu-0.15.x/roms/ipxe/src/net/retry.c @@ -35,7 +35,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); * This implementation of the timer is designed to satisfy RFC 2988 * and therefore be usable as a TCP retransmission timer. * - * + * */
/* The theoretical minimum that the algorithm in stop_timer() can diff --git a/qemu-0.15.x/roms/ipxe/src/net/tcp.c b/qemu-0.15.x/roms/ipxe/src/net/tcp.c index fbcf279..3f90cc9 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/tcp.c +++ b/qemu-0.15.x/roms/ipxe/src/net/tcp.c @@ -437,7 +437,7 @@ static size_t tcp_process_tx_queue ( struct tcp_connection *tcp, size_t max_len, * Transmit any outstanding data * * @v tcp TCP connection - * + * * Transmits any outstanding data on the connection. * * Note that even if an error is returned, the retransmission timer diff --git a/qemu-0.15.x/roms/ipxe/src/net/tcp/ftp.c b/qemu-0.15.x/roms/ipxe/src/net/tcp/ftp.c index 957f05c..4da107f 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/tcp/ftp.c +++ b/qemu-0.15.x/roms/ipxe/src/net/tcp/ftp.c @@ -477,7 +477,7 @@ static int ftp_open ( struct interface *xfer, struct uri *uri ) { return 0;
err: - DBGC ( ftp, "FTP %p could not create request: %s\n", + DBGC ( ftp, "FTP %p could not create request: %s\n", ftp, strerror ( rc ) ); ftp_done ( ftp, rc ); ref_put ( &ftp->refcnt ); diff --git a/qemu-0.15.x/roms/ipxe/src/net/tcp/http.c b/qemu-0.15.x/roms/ipxe/src/net/tcp/http.c index 20f14e6..3c5058e 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/tcp/http.c +++ b/qemu-0.15.x/roms/ipxe/src/net/tcp/http.c @@ -537,7 +537,7 @@ int http_open_filter ( struct interface *xfer, struct uri *uri, return 0;
err: - DBGC ( http, "HTTP %p could not create request: %s\n", + DBGC ( http, "HTTP %p could not create request: %s\n", http, strerror ( rc ) ); http_done ( http, rc ); ref_put ( &http->refcnt ); diff --git a/qemu-0.15.x/roms/ipxe/src/net/tcp/iscsi.c b/qemu-0.15.x/roms/ipxe/src/net/tcp/iscsi.c index cde3ed6..837b337 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/tcp/iscsi.c +++ b/qemu-0.15.x/roms/ipxe/src/net/tcp/iscsi.c @@ -1353,7 +1353,7 @@ static int iscsi_tx_bhs ( struct iscsi_session *iscsi ) { * * @v iscsi iSCSI session * @ret rc Return status code - * + * * Handle transmission of part of a PDU data segment. iscsi::tx_bhs * will be valid when this is called. */ @@ -1376,7 +1376,7 @@ static int iscsi_tx_data ( struct iscsi_session *iscsi ) { * * @v iscsi iSCSI session * @ret rc Return status code - * + * * Handle transmission of any data padding in a PDU data segment. * iscsi::tx_bhs will be valid when this is called. */ @@ -1424,7 +1424,7 @@ static void iscsi_tx_done ( struct iscsi_session *iscsi ) { * @v iscsi iSCSI session * @v buf Temporary data buffer * @v len Length of temporary data buffer - * + * * Constructs data to be sent for the current TX state */ static void iscsi_tx_step ( struct process *process ) { diff --git a/qemu-0.15.x/roms/ipxe/src/net/tcpip.c b/qemu-0.15.x/roms/ipxe/src/net/tcpip.c index 4451bf1..99e417a 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/tcpip.c +++ b/qemu-0.15.x/roms/ipxe/src/net/tcpip.c @@ -31,7 +31,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); * address family and the network-layer addresses, but leave the ports * and the rest of the structures as zero). */ -int tcpip_rx ( struct io_buffer *iobuf, uint8_t tcpip_proto, +int tcpip_rx ( struct io_buffer *iobuf, uint8_t tcpip_proto, struct sockaddr_tcpip *st_src, struct sockaddr_tcpip *st_dest, uint16_t pshdr_csum ) { diff --git a/qemu-0.15.x/roms/ipxe/src/net/udp/dns.c b/qemu-0.15.x/roms/ipxe/src/net/udp/dns.c index d1435e7..ce63622 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/udp/dns.c +++ b/qemu-0.15.x/roms/ipxe/src/net/udp/dns.c @@ -113,7 +113,7 @@ static void dns_done ( struct dns_request *dns, int rc ) { * @ret non-zero Names do not match */ static int dns_name_cmp ( struct dns_request *dns, - const struct dns_header *reply, + const struct dns_header *reply, const char *rname ) { const char *qname = dns->query.payload; int i; diff --git a/qemu-0.15.x/roms/ipxe/src/net/udp/slam.c b/qemu-0.15.x/roms/ipxe/src/net/udp/slam.c index 0de138c..a31f8ab 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/udp/slam.c +++ b/qemu-0.15.x/roms/ipxe/src/net/udp/slam.c @@ -360,7 +360,7 @@ static void slam_slave_timer_expired ( struct retry_timer *timer, * @v value Value to fill in, or NULL to ignore value * @ret rc Return status code * - * Reads a variable-length value from the start of the I/O buffer. + * Reads a variable-length value from the start of the I/O buffer. */ static int slam_pull_value ( struct slam_request *slam, struct io_buffer *iobuf, @@ -722,7 +722,7 @@ static int slam_open ( struct interface *xfer, struct uri *uri ) {
/* Open multicast socket */ memcpy ( &multicast, &default_multicast, sizeof ( multicast ) ); - if ( uri->path && + if ( uri->path && ( ( rc = slam_parse_multicast_address ( slam, uri->path, &multicast ) ) != 0 ) ) { goto err; diff --git a/qemu-0.15.x/roms/ipxe/src/net/udp/tftp.c b/qemu-0.15.x/roms/ipxe/src/net/udp/tftp.c index 7cd211e..2c46d83 100644 --- a/qemu-0.15.x/roms/ipxe/src/net/udp/tftp.c +++ b/qemu-0.15.x/roms/ipxe/src/net/udp/tftp.c @@ -363,7 +363,7 @@ static int tftp_send_rrq ( struct tftp_request *tftp ) { len = ( sizeof ( *rrq ) + strlen ( path ) + 1 /* NUL */ + 5 + 1 /* "octet" + NUL */ + 7 + 1 + 5 + 1 /* "blksize" + NUL + ddddd + NUL */ - + 5 + 1 + 1 + 1 /* "tsize" + NUL + "0" + NUL */ + + 5 + 1 + 1 + 1 /* "tsize" + NUL + "0" + NUL */ + 9 + 1 + 1 /* "multicast" + NUL + NUL */ ); iobuf = xfer_alloc_iob ( &tftp->socket, len ); if ( ! iobuf ) diff --git a/qemu-0.15.x/roms/ipxe/src/tests/linebuf_test.c b/qemu-0.15.x/roms/ipxe/src/tests/linebuf_test.c index e06ac7d..84f2d7f 100644 --- a/qemu-0.15.x/roms/ipxe/src/tests/linebuf_test.c +++ b/qemu-0.15.x/roms/ipxe/src/tests/linebuf_test.c @@ -3,7 +3,7 @@ #include <stdio.h> #include <ipxe/linebuf.h>
-static const char data1[] = +static const char data1[] = "Hello world\r\n" "This is a reasonably nice set of lines\n" "with not many different terminators\r\n\r\n" diff --git a/qemu-0.15.x/roms/ipxe/src/util/Option/ROM.pm b/qemu-0.15.x/roms/ipxe/src/util/Option/ROM.pm index 9fea4d3..0ba3e7e 100644 --- a/qemu-0.15.x/roms/ipxe/src/util/Option/ROM.pm +++ b/qemu-0.15.x/roms/ipxe/src/util/Option/ROM.pm @@ -416,7 +416,7 @@ sub new { my $self = tied ( %$hash ); $self->{length} = $hash->{struct_length};
- return $hash; + return $hash; }
############################################################################## @@ -460,7 +460,7 @@ sub new { my $self = tied ( %$hash ); $self->{length} = ( $hash->{struct_length} * 16 );
- return $hash; + return $hash; }
sub checksum { diff --git a/qemu-0.15.x/roms/ipxe/src/util/catrom.pl b/qemu-0.15.x/roms/ipxe/src/util/catrom.pl index fe37e6b..1a810d6 100755 --- a/qemu-0.15.x/roms/ipxe/src/util/catrom.pl +++ b/qemu-0.15.x/roms/ipxe/src/util/catrom.pl @@ -34,7 +34,7 @@ while ( my $romfile = shift @romfiles ) { if $pci >= $len; die "No PCIR signature in $romfile\n" unless substr ( $romdata, $pci, 4 ) eq "PCIR"; - + ( my $indicator ) = unpack ( 'C', substr ( $romdata, $pci + INDICATOR_OFF, 1 ) ); my $msg = sprintf ( "$romfile: indicator was %02x, ", $indicator ); diff --git a/qemu-0.15.x/roms/ipxe/src/util/nrv2b.c b/qemu-0.15.x/roms/ipxe/src/util/nrv2b.c index 6bac4cd..27370b3 100644 --- a/qemu-0.15.x/roms/ipxe/src/util/nrv2b.c +++ b/qemu-0.15.x/roms/ipxe/src/util/nrv2b.c @@ -25,10 +25,10 @@ library from upx. That code is: Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer And is distributed under the terms of the GPL. - The conversion was performed + The conversion was performed by Eric Biederman ebiederman@lnxi.com. 20 August 2002 - + **************************************************************/ #define UCLPACK_COMPAT 0 #define NDEBUG 1 @@ -1394,7 +1394,7 @@ void Decode(void) /* recover */ if (!src) Error("Can't malloc"); src_len = fread(src, 1, max_src_len, infile); - if (src_len <= 0) + if (src_len <= 0) Error("Can't read");
for(;;) { @@ -1424,7 +1424,7 @@ void Decode(void) /* recover */ } m_len = GETBIT(bb, src, ilen); m_len = m_len*2 + GETBIT(bb, src, ilen); - if (m_len == 0) + if (m_len == 0) { m_len++; do { diff --git a/qemu-0.15.x/roms/seabios/COPYING.LESSER b/qemu-0.15.x/roms/seabios/COPYING.LESSER index fc8a5de..cca7fc2 100644 --- a/qemu-0.15.x/roms/seabios/COPYING.LESSER +++ b/qemu-0.15.x/roms/seabios/COPYING.LESSER @@ -10,7 +10,7 @@ the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
- 0. Additional Definitions. + 0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU @@ -111,7 +111,7 @@ the following: a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked - Version. + Version.
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the diff --git a/qemu-0.15.x/roms/seabios/src/acpi-dsdt.hex b/qemu-0.15.x/roms/seabios/src/acpi-dsdt.hex index 4fbb7e9..dc7be50 100644 --- a/qemu-0.15.x/roms/seabios/src/acpi-dsdt.hex +++ b/qemu-0.15.x/roms/seabios/src/acpi-dsdt.hex @@ -1,12 +1,12 @@ /* - * + * * Intel ACPI Component Architecture * ASL Optimizing Compiler version 20100528 [Jul 1 2010] * Copyright (c) 2000 - 2010 Intel Corporation * Supports ACPI Specification Revision 4.0a - * + * * Compilation of "out/acpi-dsdt.dsl.i" - Wed Jan 5 21:21:12 2011 - * + * * C source code output * AML code block contains 0x2560 bytes * diff --git a/qemu-0.15.x/roms/seabios/src/jpeg.c b/qemu-0.15.x/roms/seabios/src/jpeg.c index 1068291..3b795dc 100644 --- a/qemu-0.15.x/roms/seabios/src/jpeg.c +++ b/qemu-0.15.x/roms/seabios/src/jpeg.c @@ -2,9 +2,9 @@ * Copyright (C) 2001, Novell Inc. * Copyright (C) 2010 Kevin O'Connor kevin@koconnor.net * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions + * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright @@ -14,10 +14,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * 3. Neither the name of Novell nor the names of the contributors may + * 3. Neither the name of Novell nor the names of the contributors may * be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -25,11 +25,11 @@ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * + * */
/* diff --git a/qemu-0.15.x/roms/seabios/src/lzmadecode.c b/qemu-0.15.x/roms/seabios/src/lzmadecode.c index 65819b5..1cf647d 100644 --- a/qemu-0.15.x/roms/seabios/src/lzmadecode.c +++ b/qemu-0.15.x/roms/seabios/src/lzmadecode.c @@ -1,21 +1,21 @@ /* LzmaDecode.c LZMA Decoder (optimized for Speed version) - + LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01) http://www.7-zip.org/
LZMA SDK is licensed under two licenses: 1) GNU Lesser General Public License (GNU LGPL) 2) Common Public License (CPL) - It means that you can select one of these two licenses and + It means that you can select one of these two licenses and follow rules of that license.
SPECIAL EXCEPTION: - Igor Pavlov, as the author of this Code, expressly permits you to - statically or dynamically link your Code (or bind by name) to the - interfaces of this file without subjecting your linked Code to the - terms of the CPL or GNU LGPL. Any modifications or additions + Igor Pavlov, as the author of this Code, expressly permits you to + statically or dynamically link your Code (or bind by name) to the + interfaces of this file without subjecting your linked Code to the + terms of the CPL or GNU LGPL. Any modifications or additions to this file, however, are subject to the LGPL or CPL terms. */
@@ -37,7 +37,7 @@ #define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2 - +
#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
@@ -47,9 +47,9 @@
#define RC_GET_BIT2(p, mi, A0, A1) IfBit0(p) \ { UpdateBit0(p); mi <<= 1; A0; } else \ - { UpdateBit1(p); mi = (mi + mi) + 1; A1; } - -#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;) + { UpdateBit1(p); mi = (mi + mi) + 1; A1; } + +#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;)
#define RangeDecoderBitTreeDecode(probs, numLevels, res) \ { int i = numLevels; res = 1; \ @@ -72,7 +72,7 @@ #define LenLow (LenChoice2 + 1) #define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits)) #define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) -#define kNumLenProbs (LenHigh + kLenNumHighSymbols) +#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
#define kNumStates 12 @@ -161,7 +161,7 @@ int LzmaDecode(CLzmaDecoderState *vs, for (i = 0; i < numProbs; i++) p[i] = kBitModelTotal >> 1; } - + RC_INIT(inStream, inSize);
@@ -170,7 +170,7 @@ int LzmaDecode(CLzmaDecoderState *vs, CProb *prob; UInt32 bound; int posState = (int)( - (nowPos + (nowPos ) & posStateMask);
@@ -179,9 +179,9 @@ int LzmaDecode(CLzmaDecoderState *vs, { int symbol = 1; UpdateBit0(prob) - prob = p + Literal + (LZMA_LIT_SIZE * + prob = p + Literal + (LZMA_LIT_SIZE * ((( - (nowPos + (nowPos ) & literalPosMask) << lc) + (previousByte >> (8 - lc))));
@@ -212,7 +212,7 @@ int LzmaDecode(CLzmaDecoderState *vs, else if (state < 10) state -= 3; else state -= 6; } - else + else { UpdateBit1(prob); prob = p + IsRep + state; @@ -236,10 +236,10 @@ int LzmaDecode(CLzmaDecoderState *vs, IfBit0(prob) { UpdateBit0(prob); - + if (nowPos == 0) return LZMA_RESULT_DATA_ERROR; - + state = state < kNumLitStates ? 9 : 11; previousByte = outStream[nowPos - rep0]; outStream[nowPos++] = previousByte; @@ -261,7 +261,7 @@ int LzmaDecode(CLzmaDecoderState *vs, UpdateBit0(prob); distance = rep1; } - else + else { UpdateBit1(prob); prob = p + IsRepG2 + state; @@ -322,7 +322,7 @@ int LzmaDecode(CLzmaDecoderState *vs, int posSlot; state += kNumLitStates; prob = p + PosSlot + - ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); RangeDecoderBitTreeDecode(prob, kNumPosSlotBits, posSlot); if (posSlot >= kStartPosModelIndex) diff --git a/qemu-0.15.x/roms/seabios/src/lzmadecode.h b/qemu-0.15.x/roms/seabios/src/lzmadecode.h index dedde0d..34c9f14 100644 --- a/qemu-0.15.x/roms/seabios/src/lzmadecode.h +++ b/qemu-0.15.x/roms/seabios/src/lzmadecode.h @@ -1,4 +1,4 @@ -/* +/* LzmaDecode.h LZMA Decoder interface
@@ -8,14 +8,14 @@ LZMA SDK is licensed under two licenses: 1) GNU Lesser General Public License (GNU LGPL) 2) Common Public License (CPL) - It means that you can select one of these two licenses and + It means that you can select one of these two licenses and follow rules of that license.
SPECIAL EXCEPTION: - Igor Pavlov, as the author of this code, expressly permits you to - statically or dynamically link your code (or bind by name) to the - interfaces of this file without subjecting your linked code to the - terms of the CPL or GNU LGPL. Any modifications or additions + Igor Pavlov, as the author of this code, expressly permits you to + statically or dynamically link your code (or bind by name) to the + interfaces of this file without subjecting your linked code to the + terms of the CPL or GNU LGPL. Any modifications or additions to this file, however, are subject to the LGPL or CPL terms. */
diff --git a/qemu-0.15.x/roms/seabios/src/pci_ids.h b/qemu-0.15.x/roms/seabios/src/pci_ids.h index e1cded2..eec5956 100644 --- a/qemu-0.15.x/roms/seabios/src/pci_ids.h +++ b/qemu-0.15.x/roms/seabios/src/pci_ids.h @@ -804,7 +804,7 @@
#define PCI_VENDOR_ID_ANIGMA 0x1051 #define PCI_DEVICE_ID_ANIGMA_MC145575 0x0100 - + #define PCI_VENDOR_ID_EFAR 0x1055 #define PCI_DEVICE_ID_EFAR_SLC90E66_1 0x9130 #define PCI_DEVICE_ID_EFAR_SLC90E66_3 0x9463 @@ -1426,7 +1426,7 @@
#define PCI_VENDOR_ID_ZIATECH 0x1138 #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 - +
#define PCI_VENDOR_ID_SYSKONNECT 0x1148 #define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 @@ -1581,9 +1581,9 @@ #define PCI_DEVICE_ID_URP8INTF 0x0802 #define PCI_DEVICE_ID_URP16INTF 0x0803 #define PCI_DEVICE_ID_URP8OCTA 0x0805 -#define PCI_DEVICE_ID_UPCI_RM3_8PORT 0x080C +#define PCI_DEVICE_ID_UPCI_RM3_8PORT 0x080C #define PCI_DEVICE_ID_UPCI_RM3_4PORT 0x080D -#define PCI_DEVICE_ID_CRP16INTF 0x0903 +#define PCI_DEVICE_ID_CRP16INTF 0x0903
#define PCI_VENDOR_ID_CYCLADES 0x120e #define PCI_DEVICE_ID_CYCLOM_Y_Lo 0x0100 @@ -2093,7 +2093,7 @@ #define PCI_DEVICE_ID_RASTEL_2PORT 0x2000
#define PCI_VENDOR_ID_ZOLTRIX 0x15b0 -#define PCI_DEVICE_ID_ZOLTRIX_2BD0 0x2bd0 +#define PCI_DEVICE_ID_ZOLTRIX_2BD0 0x2bd0
#define PCI_VENDOR_ID_MELLANOX 0x15b3 #define PCI_DEVICE_ID_MELLANOX_TAVOR 0x5a44 @@ -2312,7 +2312,7 @@ #define PCI_DEVICE_ID_INTEL_82815_MC 0x1130 #define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132 #define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 -#define PCI_DEVICE_ID_INTEL_7505_0 0x2550 +#define PCI_DEVICE_ID_INTEL_7505_0 0x2550 #define PCI_DEVICE_ID_INTEL_7205_0 0x255d #define PCI_DEVICE_ID_INTEL_82437 0x122d #define PCI_DEVICE_ID_INTEL_82371FB_0 0x122e diff --git a/qemu-0.15.x/roms/seabios/src/vgahooks.c b/qemu-0.15.x/roms/seabios/src/vgahooks.c index eb4dfa8..bb6fbd1 100644 --- a/qemu-0.15.x/roms/seabios/src/vgahooks.c +++ b/qemu-0.15.x/roms/seabios/src/vgahooks.c @@ -183,7 +183,7 @@ via_155f(struct bregs *regs) #define BOOT_DISPLAY_TV2 (1 << 5) #define BOOT_DISPLAY_EFP2 (1 << 6) #define BOOT_DISPLAY_LCD2 (1 << 7) - + static void roda_155f35(struct bregs *regs) { diff --git a/qemu-0.15.x/roms/seabios/tools/kconfig/lex.zconf.c_shipped b/qemu-0.15.x/roms/seabios/tools/kconfig/lex.zconf.c_shipped index 6eb0397..a44dd0b 100644 --- a/qemu-0.15.x/roms/seabios/tools/kconfig/lex.zconf.c_shipped +++ b/qemu-0.15.x/roms/seabios/tools/kconfig/lex.zconf.c_shipped @@ -52,7 +52,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -69,7 +69,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t;
@@ -189,7 +189,7 @@ extern FILE *zconfin, *zconfout; #define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -251,7 +251,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -901,7 +901,7 @@ extern int zconfwrap (void ); #endif
static void yyunput (int c,char *buf_ptr ); - + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -1011,7 +1011,7 @@ YY_DECL register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; - + int str = 0; int ts, i;
@@ -1622,7 +1622,7 @@ static int yy_get_next_buffer (void) { register yy_state_type yy_current_state; register char *yy_cp; - + yy_current_state = (yy_start);
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) @@ -1641,7 +1641,7 @@ static int yy_get_next_buffer (void) static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; - + yy_current_state = yy_nxt[yy_current_state][1]; yy_is_jam = (yy_current_state <= 0);
@@ -1651,7 +1651,7 @@ static int yy_get_next_buffer (void) static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; - + yy_cp = (yy_c_buf_p);
/* undo effects of setting up zconftext */ @@ -1694,7 +1694,7 @@ static int yy_get_next_buffer (void)
{ int c; - + *(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) @@ -1761,12 +1761,12 @@ static int yy_get_next_buffer (void)
/** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ void zconfrestart (FILE * input_file ) { - + if ( ! YY_CURRENT_BUFFER ){ zconfensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = @@ -1779,11 +1779,11 @@ static int yy_get_next_buffer (void)
/** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { - + /* TODO. We should be able to replace this entire function body * with * zconfpop_buffer_state(); @@ -1823,13 +1823,13 @@ static void zconf_load_buffer_state (void) /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * + * * @return the allocated buffer state. */ YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); @@ -1852,11 +1852,11 @@ static void zconf_load_buffer_state (void)
/** Destroy the buffer. * @param b a buffer created with zconf_create_buffer() - * + * */ void zconf_delete_buffer (YY_BUFFER_STATE b ) { - + if ( ! b ) return;
@@ -1877,7 +1877,7 @@ static void zconf_load_buffer_state (void)
{ int oerrno = errno; - + zconf_flush_buffer(b );
b->yy_input_file = file; @@ -1893,13 +1893,13 @@ static void zconf_load_buffer_state (void) }
b->yy_is_interactive = 0; - + errno = oerrno; }
/** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ void zconf_flush_buffer (YY_BUFFER_STATE b ) { @@ -1928,7 +1928,7 @@ static void zconf_load_buffer_state (void) * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) { @@ -1958,7 +1958,7 @@ void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
/** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ void zconfpop_buffer_state (void) { @@ -1982,7 +1982,7 @@ void zconfpop_buffer_state (void) static void zconfensure_buffer_stack (void) { int num_to_alloc; - + if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this @@ -1995,7 +1995,7 @@ static void zconfensure_buffer_stack (void) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; @@ -2025,13 +2025,13 @@ static void zconfensure_buffer_stack (void) /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. + * + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -2060,14 +2060,14 @@ YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to zconflex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * zconf_scan_bytes() instead. */ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) { - + return zconf_scan_bytes(yystr,strlen(yystr) ); }
@@ -2075,7 +2075,7 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len ) @@ -2084,7 +2084,7 @@ YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len ) char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) zconfalloc(n ); @@ -2138,16 +2138,16 @@ static void yy_fatal_error (yyconst char* msg ) /* Accessor methods (get/set functions) to struct members. */
/** Get the current line number. - * + * */ int zconfget_lineno (void) { - + return zconflineno; }
/** Get the input stream. - * + * */ FILE *zconfget_in (void) { @@ -2155,7 +2155,7 @@ FILE *zconfget_in (void) }
/** Get the output stream. - * + * */ FILE *zconfget_out (void) { @@ -2163,7 +2163,7 @@ FILE *zconfget_out (void) }
/** Get the length of the current token. - * + * */ int zconfget_leng (void) { @@ -2171,7 +2171,7 @@ int zconfget_leng (void) }
/** Get the current token. - * + * */
char *zconfget_text (void) @@ -2181,18 +2181,18 @@ char *zconfget_text (void)
/** Set the current line number. * @param line_number - * + * */ void zconfset_lineno (int line_number ) { - + zconflineno = line_number; }
/** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. - * + * * @see zconf_switch_to_buffer */ void zconfset_in (FILE * in_str ) @@ -2246,7 +2246,7 @@ static int yy_init_globals (void) /* zconflex_destroy is for both reentrant and non-reentrant scanners. */ int zconflex_destroy (void) { - + /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ zconf_delete_buffer(YY_CURRENT_BUFFER ); diff --git a/qemu-0.15.x/roms/seabios/tools/kconfig/lxdialog/BIG.FAT.WARNING b/qemu-0.15.x/roms/seabios/tools/kconfig/lxdialog/BIG.FAT.WARNING index a8999d8..7cb5a7e 100644 --- a/qemu-0.15.x/roms/seabios/tools/kconfig/lxdialog/BIG.FAT.WARNING +++ b/qemu-0.15.x/roms/seabios/tools/kconfig/lxdialog/BIG.FAT.WARNING @@ -1,4 +1,4 @@ This is NOT the official version of dialog. This version has been significantly modified from the original. It is for use by the Linux -kernel configuration script. Please do not bother Savio Lam with +kernel configuration script. Please do not bother Savio Lam with questions about this program. diff --git a/qemu-0.15.x/roms/seabios/tools/kconfig/lxdialog/menubox.c b/qemu-0.15.x/roms/seabios/tools/kconfig/lxdialog/menubox.c index 1d60473..5df7bba 100644 --- a/qemu-0.15.x/roms/seabios/tools/kconfig/lxdialog/menubox.c +++ b/qemu-0.15.x/roms/seabios/tools/kconfig/lxdialog/menubox.c @@ -26,7 +26,7 @@ * * *) A bugfix for the Page-Down problem * - * *) Formerly when I used Page Down and Page Up, the cursor would be set + * *) Formerly when I used Page Down and Page Up, the cursor would be set * to the first position in the menu box. Now lxdialog is a bit * smarter and works more like other menu systems (just have a look at * it). diff --git a/qemu-0.15.x/roms/seabios/tools/kconfig/zconf.tab.c_shipped b/qemu-0.15.x/roms/seabios/tools/kconfig/zconf.tab.c_shipped index 4c5495e..7292eed 100644 --- a/qemu-0.15.x/roms/seabios/tools/kconfig/zconf.tab.c_shipped +++ b/qemu-0.15.x/roms/seabios/tools/kconfig/zconf.tab.c_shipped @@ -2,20 +2,20 @@ /* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison's Yacc-like parsers in C - + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. */
@@ -28,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */
diff --git a/qemu-0.15.x/roms/vgabios/COPYING b/qemu-0.15.x/roms/vgabios/COPYING index 223ede7..7c8d84f 100644 --- a/qemu-0.15.x/roms/vgabios/COPYING +++ b/qemu-0.15.x/roms/vgabios/COPYING @@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an diff --git a/qemu-0.15.x/roms/vgabios/Makefile b/qemu-0.15.x/roms/vgabios/Makefile index 578721a..027c201 100644 --- a/qemu-0.15.x/roms/vgabios/Makefile +++ b/qemu-0.15.x/roms/vgabios/Makefile @@ -2,7 +2,7 @@ SHELL = /bin/sh
CC = gcc CFLAGS = -g -O2 -Wall -Wstrict-prototypes -LDFLAGS = +LDFLAGS =
GCC = gcc BCC = bcc @@ -39,7 +39,7 @@ VBE_FILES := vbe.h vbe.c vbetables.h # build flags vgabios.bin : VGAFLAGS := -DVBE -DPCI_VID=0x1234 vgabios.debug.bin : VGAFLAGS := -DVBE -DPCI_VID=0x1234 -DDEBUG -vgabios-cirrus.bin : VGAFLAGS := -DCIRRUS -DPCIBIOS +vgabios-cirrus.bin : VGAFLAGS := -DCIRRUS -DPCIBIOS vgabios-cirrus.debug.bin : VGAFLAGS := -DCIRRUS -DPCIBIOS -DCIRRUS_DEBUG vgabios-stdvga.bin : VGAFLAGS := -DVBE -DPCIBIOS -DPCI_VID=0x1234 -DPCI_DID=0x1111 vgabios-stdvga.debug.bin : VGAFLAGS := -DVBE -DPCIBIOS -DPCI_VID=0x1234 -DPCI_DID=0x1111 -DDEBUG @@ -83,7 +83,7 @@ vgabios-qxl.debug.bin : $(VGA_FILES) $(VBE_FILES) biossums ./biossums $(DISTNAME) ls -l $(DISTNAME)
-release: +release: VGABIOS_VERS="-DVGABIOS_VERS=\"$(RELVERS)\"" make bios cirrus-bios /bin/rm -f *.o *.s *.ld86 \ temp.awk.* vgabios.*.orig _vgabios_.*.c core *.bak .#* diff --git a/qemu-0.15.x/roms/vgabios/README b/qemu-0.15.x/roms/vgabios/README index c68b573..4874287 100644 --- a/qemu-0.15.x/roms/vgabios/README +++ b/qemu-0.15.x/roms/vgabios/README @@ -145,12 +145,12 @@ vgabios-0.5a : Mar 07 2005 vgabios-0.4c : Nov 06 2003 - Christophe . fix font problem on initial screen of NT4 Loader - + vgabios-0.4b : Nov 04 2003 - Volker . fix offset of character tables . optimizations of CRT controller accesses - . VBE i/o registers changed to 0x01CE/CF + . VBE i/o registers changed to 0x01CE/CF (suggestion from Daniel Gimpelevich) . "noclear" flag stored in BIOS area . fix character height returned by get_font_info function diff --git a/qemu-0.15.x/roms/vgabios/clext.c b/qemu-0.15.x/roms/vgabios/clext.c index b0b6834..deb38a8 100644 --- a/qemu-0.15.x/roms/vgabios/clext.c +++ b/qemu-0.15.x/roms/vgabios/clext.c @@ -16,7 +16,7 @@ // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +//
//#define CIRRUS_VESA3_PMINFO #ifdef VBE @@ -1498,7 +1498,7 @@ cirrus_clear_vram_1: mov ax, si mov cx, #8192 cld - rep + rep stosw pop ax inc ah diff --git a/qemu-0.15.x/roms/vgabios/vbe.c b/qemu-0.15.x/roms/vgabios/vbe.c index 1fab2f9..cce465d 100644 --- a/qemu-0.15.x/roms/vgabios/vbe.c +++ b/qemu-0.15.x/roms/vgabios/vbe.c @@ -1,5 +1,5 @@ // ============================================================================================ -// +// // Copyright (C) 2002 Jeroen Janssen // // This library is free software; you can redistribute it and/or @@ -15,14 +15,14 @@ // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +// // ============================================================================================ -// -// This VBE is part of the VGA Bios specific to the plex86/bochs Emulated VGA card. -// You can NOT drive any physical vga card with it. +// +// This VBE is part of the VGA Bios specific to the plex86/bochs Emulated VGA card. +// You can NOT drive any physical vga card with it. // // ============================================================================================ -// +// // This VBE Bios is based on information taken from : // - VESA BIOS EXTENSION (VBE) Core Functions Standard Version 3.0 located at www.vesa.org // @@ -130,7 +130,7 @@ vesa_pm_set_display_start: mov ax, #0x0100 ret vesa_pm_set_display_start1: -; convert offset to (X, Y) coordinate +; convert offset to (X, Y) coordinate ; (would be simpler to change Bochs VBE API...) push eax push ecx @@ -755,7 +755,7 @@ lmulul: ASM_END
/** Function 00h - Return VBE Controller Information - * + * * Input: * AX = 4F00h * ES:DI = Pointer to buffer in which to place VbeInfoBlock structure @@ -763,7 +763,7 @@ ASM_END * the info block is 512 bytes in size) * Output: * AX = VBE Return Status - * + * */ void vbe_biosfn_return_controller_information(AX, ES, DI) Bit16u *AX;Bit16u ES;Bit16u DI; @@ -886,14 +886,14 @@ Bit16u *AX;Bit16u ES;Bit16u DI;
/** Function 01h - Return VBE Mode Information - * + * * Input: * AX = 4F01h * CX = Mode Number * ES:DI = Pointer to buffer in which to place ModeInfoBlock structure * Output: * AX = VBE Return Status - * + * */ void vbe_biosfn_return_mode_information(AX, CX, ES, DI) Bit16u *AX;Bit16u CX; Bit16u ES;Bit16u DI; @@ -958,14 +958,14 @@ Bit16u *AX;Bit16u CX; Bit16u ES;Bit16u DI; }
/** Function 02h - Set VBE Mode - * + * * Input: * AX = 4F02h * BX = Desired Mode to set * ES:DI = Pointer to CRTCInfoBlock structure * Output: * AX = VBE Return Status - * + * */ void vbe_biosfn_set_mode(AX, BX, ES, DI) Bit16u *AX;Bit16u BX; Bit16u ES;Bit16u DI; @@ -1048,13 +1048,13 @@ Bit16u *AX;Bit16u BX; Bit16u ES;Bit16u DI; }
/** Function 03h - Return Current VBE Mode - * + * * Input: * AX = 4F03h * Output: * AX = VBE Return Status * BX = Current VBE Mode - * + * */ ASM_START vbe_biosfn_return_current_mode: @@ -1094,7 +1094,7 @@ void vbe_biosfn_save_video_state(ES, BX) enable = inw(VBE_DISPI_IOPORT_DATA); write_word(ES, BX, enable); BX += 2; - if (!(enable & VBE_DISPI_ENABLED)) + if (!(enable & VBE_DISPI_ENABLED)) return; for(i = VBE_DISPI_INDEX_XRES; i <= VBE_DISPI_INDEX_Y_OFFSET; i++) { if (i != VBE_DISPI_INDEX_ENABLE) { @@ -1139,7 +1139,7 @@ void vbe_biosfn_restore_video_state(ES, BX) }
/** Function 04h - Save/Restore State - * + * * Input: * AX = 4F04h * DL = 00h Return Save/Restore State buffer size @@ -1150,7 +1150,7 @@ void vbe_biosfn_restore_video_state(ES, BX) * Output: * AX = VBE Return Status * BX = Number of 64-byte blocks to hold the state buffer (if DL=00h) - * + * */ void vbe_biosfn_save_restore_state(AX, CX, DX, ES, BX) Bit16u *AX; Bit16u CX; Bit16u DX; Bit16u ES; Bit16u *BX; @@ -1196,7 +1196,7 @@ Bit16u *AX; Bit16u CX; Bit16u DX; Bit16u ES; Bit16u *BX; }
/** Function 05h - Display Window Control - * + * * Input: * AX = 4F05h * (16-bit) BH = 00h Set memory window @@ -1209,7 +1209,7 @@ Bit16u *AX; Bit16u CX; Bit16u DX; Bit16u ES; Bit16u *BX; * Note: * If this function is called while in a linear frame buffer mode, * this function must fail with completion code AH=03h - * + * * Output: * AX = VBE Return Status * DX = Window number in window granularity units @@ -1254,13 +1254,13 @@ ASM_END * CX = If BL=00h Desired Width in Pixels * If BL=02h Desired Width in Bytes * (Ignored for Get Functions) - * - * Output: + * + * Output: * AX = VBE Return Status * BX = Bytes Per Scan Line * CX = Actual Pixels Per Scan Line * (truncated to nearest complete pixel) - * DX = Maximum Number of Scan Lines + * DX = Maximum Number of Scan Lines */ ASM_START vbe_biosfn_set_get_logical_scan_line_length: @@ -1308,7 +1308,7 @@ ASM_END
/** Function 07h - Set/Get Display Start - * + * * Input(16-bit): * AX = 4F07h * BH = 00h Reserved and must be 00h @@ -1335,13 +1335,13 @@ ASM_END * If BL=04h 0 if flip has not occurred, not 0 if it has * DX = If BL=01h First Displayed Scan Line * - * Input(32-bit): + * Input(32-bit): * BH = 00h Reserved and must be 00h * BL = 00h Set Display Start * = 80h Set Display Start during Vertical Retrace * CX = Bits 0-15 of display start address * DX = Bits 16-31 of display start address - * ES = Selector for memory mapped registers + * ES = Selector for memory mapped registers */ ASM_START vbe_biosfn_set_get_display_start: @@ -1368,10 +1368,10 @@ get_display_start: mov ax, #0x004f ret ASM_END - +
/** Function 08h - Set/Get Dac Palette Format - * + * * Input: * AX = 4F08h * BL = 00h set DAC palette width @@ -1416,7 +1416,7 @@ ASM_END
/** Function 09h - Set/Get Palette Data - * + * * Input: * AX = 4F09h * Output: diff --git a/qemu-0.15.x/roms/vgabios/vbe.h b/qemu-0.15.x/roms/vgabios/vbe.h index 72cb045..57f4606 100644 --- a/qemu-0.15.x/roms/vgabios/vbe.h +++ b/qemu-0.15.x/roms/vgabios/vbe.h @@ -20,7 +20,7 @@ void vbe_biosfn_return_protected_mode_interface(AX);
// The official VBE Information Block typedef struct VbeInfoBlock -{ +{ Bit8u VbeSignature[4]; Bit16u VbeVersion; Bit16u OemStringPtr_Off; @@ -94,7 +94,7 @@ typedef struct ModeInfoBlockCompact Bit8u LinRsvdMaskSize; Bit8u LinRsvdFieldPosition; Bit32u MaxPixelClock; -// Bit8u Reserved[189]; // DO NOT PUT THIS IN HERE because of Compact Mode Info storage in bios +// Bit8u Reserved[189]; // DO NOT PUT THIS IN HERE because of Compact Mode Info storage in bios } ModeInfoBlockCompact;
typedef struct ModeInfoBlock diff --git a/qemu-0.15.x/roms/vgabios/vbe_display_api.txt b/qemu-0.15.x/roms/vgabios/vbe_display_api.txt index fddb78b..430eb13 100644 --- a/qemu-0.15.x/roms/vgabios/vbe_display_api.txt +++ b/qemu-0.15.x/roms/vgabios/vbe_display_api.txt @@ -2,11 +2,11 @@ VBE Display API ------------------------------------------------------------------------------------------------------------- This document is part of the Bochs/VBEBios documentation, it specifies the bochs host <-> vbebios client communication. - + That means, the display code implementation and the vbebios code depend very heavily on each other. As such, this documents needs be synchronised between bochs CVS and the vgabios CVS. - + This document does not describe how the VBEBios implements the VBE2/3 spec. This document does not describe how the Bochs display code will display gfx based upon this spec.
@@ -59,7 +59,7 @@ Todo ---- Version 0.6+ [random order] - Add lots of different (A)RGB formats - + References ---------- [VBE3] VBE 3 Specification at diff --git a/qemu-0.15.x/roms/vgabios/vbetables-gen.c b/qemu-0.15.x/roms/vgabios/vbetables-gen.c index 550935a..802cdc5 100644 --- a/qemu-0.15.x/roms/vgabios/vbetables-gen.c +++ b/qemu-0.15.x/roms/vgabios/vbetables-gen.c @@ -98,17 +98,17 @@ int main(int argc, char **argv) pitch = pm->width * ((pm->depth + 7) / 8); pages = vram_size / (pm->height * pitch); if (pages > 0) { - printf("{ 0x%04x, /* %dx%dx%d */\n", + printf("{ 0x%04x, /* %dx%dx%d */\n", pm->mode, pm->width, pm->height, pm->depth); if (pm->depth == 4) - printf("{ /*Bit16u ModeAttributes*/ %s,\n", + printf("{ /*Bit16u ModeAttributes*/ %s,\n", "VBE_MODE_ATTRIBUTE_SUPPORTED | " "VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | " "VBE_MODE_ATTRIBUTE_COLOR_MODE | " "VBE_MODE_ATTRIBUTE_TTY_BIOS_SUPPORT | " "VBE_MODE_ATTRIBUTE_GRAPHICS_MODE"); else - printf("{ /*Bit16u ModeAttributes*/ %s,\n", + printf("{ /*Bit16u ModeAttributes*/ %s,\n", "VBE_MODE_ATTRIBUTE_SUPPORTED | " "VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | " "VBE_MODE_ATTRIBUTE_COLOR_MODE | " @@ -144,7 +144,7 @@ int main(int argc, char **argv) printf("/*Bit8u NumberOfPlanes*/ %d,\n", 1); } printf("/*Bit8u BitsPerPixel*/ %d,\n", pm->depth); - printf("/*Bit8u NumberOfBanks*/ %d,\n", + printf("/*Bit8u NumberOfBanks*/ %d,\n", (pm->height * pitch + 65535) / 65536);
if (pm->depth == 4) @@ -215,14 +215,14 @@ int main(int argc, char **argv) break; }
- printf("/*Bit8u RedMaskSize*/ %d,\n", r_size); - printf("/*Bit8u RedFieldPosition*/ %d,\n", r_pos); - printf("/*Bit8u GreenMaskSize*/ %d,\n", g_size); - printf("/*Bit8u GreenFieldPosition*/ %d,\n", g_pos); - printf("/*Bit8u BlueMaskSize*/ %d,\n", b_size); - printf("/*Bit8u BlueFieldPosition*/ %d,\n", b_pos); - printf("/*Bit8u RsvdMaskSize*/ %d,\n", a_size); - printf("/*Bit8u RsvdFieldPosition*/ %d,\n", a_pos); + printf("/*Bit8u RedMaskSize*/ %d,\n", r_size); + printf("/*Bit8u RedFieldPosition*/ %d,\n", r_pos); + printf("/*Bit8u GreenMaskSize*/ %d,\n", g_size); + printf("/*Bit8u GreenFieldPosition*/ %d,\n", g_pos); + printf("/*Bit8u BlueMaskSize*/ %d,\n", b_size); + printf("/*Bit8u BlueFieldPosition*/ %d,\n", b_pos); + printf("/*Bit8u RsvdMaskSize*/ %d,\n", a_size); + printf("/*Bit8u RsvdFieldPosition*/ %d,\n", a_pos); if (pm->depth == 32) printf("/*Bit8u DirectColorModeInfo*/ %s,\n", "VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE"); diff --git a/qemu-0.15.x/roms/vgabios/vgabios.c b/qemu-0.15.x/roms/vgabios/vgabios.c index c1e312b..825f58f 100644 --- a/qemu-0.15.x/roms/vgabios/vgabios.c +++ b/qemu-0.15.x/roms/vgabios/vgabios.c @@ -3,7 +3,7 @@ * vgabios.c */ // ============================================================================================ -// +// // Copyright (C) 2001-2008 the LGPL VGABios developers Team // // This library is free software; you can redistribute it and/or @@ -19,21 +19,21 @@ // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +// // ============================================================================================ -// -// This VGA Bios is specific to the plex86/bochs Emulated VGA card. -// You can NOT drive any physical vga card with it. -// +// +// This VGA Bios is specific to the plex86/bochs Emulated VGA card. +// You can NOT drive any physical vga card with it. +// // ============================================================================================ -// +// // This file contains code ripped from : -// - rombios.c of plex86 +// - rombios.c of plex86 // // This VGA Bios contains fonts from : // - fntcol16.zip (c) by Joseph Gil avalable at : // ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip -// These fonts are public domain +// These fonts are public domain // // This VGA Bios is based on information taken from : // - Kevin Lawton's vga card emulation for bochs/plex86 @@ -146,7 +146,7 @@ vgabios_start:
vgabios_entry_point: - + jmp vgabios_init_func
#ifdef PCIBIOS @@ -243,9 +243,9 @@ vgabios_init_func: ;; init basic bios vars call init_bios_area
-#ifdef VBE +#ifdef VBE ;; init vbe functions - call vbe_init + call vbe_init #endif
;; set int10 vect @@ -265,9 +265,9 @@ vgabios_init_func: ;; show info call _display_info
-#ifdef VBE +#ifdef VBE ;; show vbe info - call vbe_display_info + call vbe_display_info #endif
#ifdef CIRRUS @@ -414,7 +414,7 @@ ASM_END #include "vgafonts.h"
/* - * Boot time harware inits + * Boot time harware inits */ ASM_START init_vga_card: @@ -449,7 +449,7 @@ ASM_END
// -------------------------------------------------------------------------------------------- /* - * Boot time bios area inits + * Boot time bios area inits */ ASM_START init_bios_area: @@ -472,7 +472,7 @@ init_bios_area: mov al, #0x10 mov [bx], al
-;; Clear the screen +;; Clear the screen mov bx, # BIOSMEM_VIDEO_CTL mov al, #0x60 mov [bx], al @@ -541,7 +541,7 @@ ASM_START call _display_string mov si,#vgabios_version call _display_string - + ;;mov si,#vgabios_copyright ;;call _display_string ;;mov si,#crlf @@ -565,7 +565,7 @@ ASM_START not cx xor al,al cld - repne + repne scasb not cx dec cx @@ -574,7 +574,7 @@ ASM_START mov ax,#0x0300 mov bx,#0x0000 int #0x10 - + pop cx mov ax,#0x1301 mov bx,#0x000b @@ -608,7 +608,7 @@ static void int10_func(DI, SI, BP, SP, BX, DX, CX, AX, DS, ES, FLAGS) case 0x00: biosfn_set_video_mode(GET_AL()); switch(GET_AL()&0x7F) - {case 6: + {case 6: SET_AL(0x3F); break; case 0: @@ -718,7 +718,7 @@ static void int10_func(DI, SI, BP, SP, BX, DX, CX, AX, DS, ES, FLAGS) unknown(); #endif } - + break; case 0x12: switch(GET_BL()) @@ -767,7 +767,7 @@ static void int10_func(DI, SI, BP, SP, BX, DX, CX, AX, DS, ES, FLAGS) SET_AL(0x1C); break;
-#ifdef VBE +#ifdef VBE case 0x4f: if (vbe_has_vbe_display()) { switch(GET_AL()) @@ -803,7 +803,7 @@ static void int10_func(DI, SI, BP, SP, BX, DX, CX, AX, DS, ES, FLAGS) default: #ifdef DEBUG unknown(); -#endif +#endif // function failed AX=0x100; } @@ -823,12 +823,12 @@ static void int10_func(DI, SI, BP, SP, BX, DX, CX, AX, DS, ES, FLAGS) }
// ============================================================================================ -// +// // BIOS functions -// +// // ============================================================================================
-static void biosfn_set_video_mode(mode) Bit8u mode; +static void biosfn_set_video_mode(mode) Bit8u mode; {// mode: Bit 7 is 1 if no clear screen
// Should we clear the screen ? @@ -837,13 +837,13 @@ static void biosfn_set_video_mode(mode) Bit8u mode; Bit16u i,twidth,theightm1,cheight; Bit8u modeset_ctl,video_ctl,vga_switches; Bit16u crtc_addr; - + #ifdef VBE - if (vbe_has_vbe_display()) { + if (vbe_has_vbe_display()) { dispi_set_enable(VBE_DISPI_DISABLED); } #endif // def VBE - + // The real mode mode=mode&0x7f;
@@ -861,7 +861,7 @@ static void biosfn_set_video_mode(mode) Bit8u mode; twidth=video_param_table[vpti].twidth; theightm1=video_param_table[vpti].theightm1; cheight=video_param_table[vpti].cheight; - + // Read the bios vga control video_ctl=read_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL);
@@ -941,7 +941,7 @@ static void biosfn_set_video_mode(mode) Bit8u mode; outb(VGAREG_GRDC_DATA,video_param_table[vpti].grdc_regs[i]); }
- // Set CRTC address VGA or MDA + // Set CRTC address VGA or MDA crtc_addr=vga_modes[line].memmodel==MTEXT?VGAREG_MDA_CRTC_ADDRESS:VGAREG_VGA_CRTC_ADDRESS;
// Disable CRTC write protection @@ -1001,7 +1001,7 @@ static void biosfn_set_video_mode(mode) Bit8u mode; // FIXME write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MSR,0x00); // Unavailable on vanilla vga, but... write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_PAL,0x00); // Unavailable on vanilla vga, but... - + // Set cursor shape if(vga_modes[line].class==TEXT) { @@ -1017,7 +1017,7 @@ static void biosfn_set_video_mode(mode) Bit8u mode;
// Write the fonts in memory if(vga_modes[line].class==TEXT) - { + { ASM_START ;; copy and activate 8x16 font mov ax, #0x1104 @@ -1054,8 +1054,8 @@ ASM_END }
// -------------------------------------------------------------------------------------------- -static void biosfn_set_cursor_shape (CH,CL) -Bit8u CH;Bit8u CL; +static void biosfn_set_cursor_shape (CH,CL) +Bit8u CH;Bit8u CL; {Bit16u cheight,curs,crtc_addr; Bit8u modeset_ctl;
@@ -1089,7 +1089,7 @@ Bit8u CH;Bit8u CL; }
// -------------------------------------------------------------------------------------------- -static void biosfn_set_cursor_pos (page, cursor) +static void biosfn_set_cursor_pos (page, cursor) Bit8u page;Bit16u cursor; { Bit8u xcurs,ycurs,current; @@ -1110,10 +1110,10 @@ Bit8u page;Bit16u cursor; nbrows=read_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1;
xcurs=cursor&0x00ff;ycurs=(cursor&0xff00)>>8; - + // Calculate the address knowing nbcols nbrows and page num address=SCREEN_IO_START(nbcols,nbrows,page)+xcurs+ycurs*nbcols; - + // CRTC regs 0x0e and 0x0f crtc_addr=read_word(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS); outb(crtc_addr,0x0e); @@ -1124,7 +1124,7 @@ Bit8u page;Bit16u cursor; }
// -------------------------------------------------------------------------------------------- -static void biosfn_get_cursor_pos (page,shape, pos) +static void biosfn_get_cursor_pos (page,shape, pos) Bit8u page;Bit16u *shape;Bit16u *pos; { Bit16u ss=get_SS(); @@ -1140,7 +1140,7 @@ Bit8u page;Bit16u *shape;Bit16u *pos; }
// -------------------------------------------------------------------------------------------- -static void biosfn_set_active_page (page) +static void biosfn_set_active_page (page) Bit8u page; { Bit16u cursor,dummy,crtc_addr; @@ -1154,7 +1154,7 @@ Bit8u page; line=find_vga_entry(mode); if(line==0xFF)return;
- // Get pos curs pos for the right page + // Get pos curs pos for the right page biosfn_get_cursor_pos(page,&dummy,&cursor);
if(vga_modes[line].class==TEXT) @@ -1162,7 +1162,7 @@ Bit8u page; // Get the dimensions nbcols=read_word(BIOSMEM_SEG,BIOSMEM_NB_COLS); nbrows=read_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1; - + // Calculate the address knowing nbcols nbrows and page num address=SCREEN_MEM_START(nbcols,nbrows,page); write_word(BIOSMEM_SEG,BIOSMEM_CURRENT_START,address); @@ -1410,7 +1410,7 @@ Bit8u nblines;Bit8u attr;Bit8u rul;Bit8u cul;Bit8u rlr;Bit8u clr;Bit8u page;Bit8 }
// -------------------------------------------------------------------------------------------- -static void biosfn_read_char_attr (page,car) +static void biosfn_read_char_attr (page,car) Bit8u page;Bit16u *car; {Bit16u ss=get_SS(); Bit8u xcurs,ycurs,mode,line; @@ -1611,7 +1611,7 @@ Bit8u car;Bit8u attr;Bit8u xcurs;Bit8u ycurs;Bit8u nbcols; }
// -------------------------------------------------------------------------------------------- -static void biosfn_write_char_attr (car,page,attr,count) +static void biosfn_write_char_attr (car,page,attr,count) Bit8u car;Bit8u page;Bit8u attr;Bit16u count; { Bit8u cheight,xcurs,ycurs,mode,line,bpp; @@ -1942,7 +1942,7 @@ static void biosfn_read_pixel (BH,CX,DX,AX) Bit8u BH;Bit16u CX;Bit16u DX;Bit16u }
// -------------------------------------------------------------------------------------------- -static void biosfn_write_teletype (car, page, attr, flag) +static void biosfn_write_teletype (car, page, attr, flag) Bit8u car;Bit8u page;Bit8u attr;Bit8u flag; {// flag = WITH_ATTR / NO_ATTR
@@ -1998,10 +1998,10 @@ Bit8u car;Bit8u page;Bit8u attr;Bit8u flag;
if(vga_modes[line].class==TEXT) { - // Compute the address + // Compute the address address=SCREEN_MEM_START(nbcols,nbrows,page)+(xcurs+ycurs*nbcols)*2;
- // Write the char + // Write the char write_byte(vga_modes[line].sstart,address,car);
if(flag==WITH_ATTR) @@ -2556,7 +2556,7 @@ get_dac_16_page: ASM_END
// -------------------------------------------------------------------------------------------- -static void biosfn_perform_gray_scale_summing (start,count) +static void biosfn_perform_gray_scale_summing (start,count) Bit16u start;Bit16u count; {Bit8u r,g,b; Bit16u i; @@ -2565,7 +2565,7 @@ Bit16u start;Bit16u count; inb(VGAREG_ACTL_RESET); outb(VGAREG_ACTL_ADDRESS,0x00);
- for( index = 0; index < count; index++ ) + for( index = 0; index < count; index++ ) { // set read address and switch to read mode outb(VGAREG_DAC_READ_ADDRESS,start); @@ -2578,7 +2578,7 @@ Bit16u start;Bit16u count; i = ( ( 77*r + 151*g + 28*b ) + 0x80 ) >> 8;
if(i>0x3f)i=0x3f; - + // set write address and switch to write mode outb(VGAREG_DAC_WRITE_ADDRESS,start); // write new intensity value @@ -2586,7 +2586,7 @@ Bit16u start;Bit16u count; outb( VGAREG_DAC_DATA, i&0xff ); outb( VGAREG_DAC_DATA, i&0xff ); start++; - } + } inb(VGAREG_ACTL_RESET); outb(VGAREG_ACTL_ADDRESS,0x20); } @@ -2801,10 +2801,10 @@ static void biosfn_load_gfx_8_16_chars (BL) Bit8u BL; #endif } // -------------------------------------------------------------------------------------------- -static void biosfn_get_font_info (BH,ES,BP,CX,DX) +static void biosfn_get_font_info (BH,ES,BP,CX,DX) Bit8u BH;Bit16u *ES;Bit16u *BP;Bit16u *CX;Bit16u *DX; {Bit16u ss=get_SS(); - + switch(BH) {case 0x00: write_word(ss,ES,read_word(0x00,0x1f*4)); @@ -3058,7 +3058,7 @@ static void biosfn_enable_video_refresh_control (AL) Bit8u AL; }
// -------------------------------------------------------------------------------------------- -static void biosfn_write_string (flag,page,attr,count,row,col,seg,offset) +static void biosfn_write_string (flag,page,attr,count,row,col,seg,offset) Bit8u flag;Bit8u page;Bit8u attr;Bit16u count;Bit8u row;Bit8u col;Bit16u seg;Bit16u offset; { Bit16u newcurs,oldcurs,dummy; @@ -3075,7 +3075,7 @@ Bit8u flag;Bit8u page;Bit8u attr;Bit16u count;Bit8u row;Bit8u col;Bit16u seg;Bit
newcurs=row; newcurs<<=8; newcurs+=col; biosfn_set_cursor_pos(page,newcurs); - + while(count--!=0) { car=read_byte(seg,offset++); @@ -3084,8 +3084,8 @@ Bit8u flag;Bit8u page;Bit8u attr;Bit16u count;Bit8u row;Bit8u col;Bit16u seg;Bit
biosfn_write_teletype(car,page,attr,WITH_ATTR); } - - // Set back curs pos + + // Set back curs pos if((flag&0x01)==0) biosfn_set_cursor_pos(page,oldcurs); } @@ -3146,7 +3146,7 @@ msg_alt_dcc: ASM_END
// -------------------------------------------------------------------------------------------- -static void biosfn_read_state_info (BX,ES,DI) +static void biosfn_read_state_info (BX,ES,DI) Bit16u BX;Bit16u ES;Bit16u DI; { // Address of static functionality table @@ -3156,7 +3156,7 @@ Bit16u BX;Bit16u ES;Bit16u DI; // Hard coded copy from BIOS area. Should it be cleaner ? memcpyb(ES,DI+0x04,BIOSMEM_SEG,0x49,30); memcpyb(ES,DI+0x22,BIOSMEM_SEG,0x84,3); - + write_byte(ES,DI+0x25,read_byte(BIOSMEM_SEG,BIOSMEM_DCC_INDEX)); write_byte(ES,DI+0x26,0); write_byte(ES,DI+0x27,16); @@ -3167,13 +3167,13 @@ Bit16u BX;Bit16u ES;Bit16u DI; write_byte(ES,DI+0x2c,0); write_byte(ES,DI+0x31,3); write_byte(ES,DI+0x32,0); - + memsetb(ES,DI+0x33,0,13); }
// -------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------- -static Bit16u biosfn_read_video_state_size2 (CX) +static Bit16u biosfn_read_video_state_size2 (CX) Bit16u CX; { Bit16u size; @@ -3190,14 +3190,14 @@ static Bit16u biosfn_read_video_state_size2 (CX) return size; }
-static void biosfn_read_video_state_size (CX, BX) +static void biosfn_read_video_state_size (CX, BX) Bit16u CX; Bit16u *BX; { Bit16u ss=get_SS(); write_word(ss, BX, biosfn_read_video_state_size2(CX)); }
-static Bit16u biosfn_save_video_state (CX,ES,BX) +static Bit16u biosfn_save_video_state (CX,ES,BX) Bit16u CX;Bit16u ES;Bit16u BX; { Bit16u i, v, crtc_addr, ar_index; @@ -3282,7 +3282,7 @@ static Bit16u biosfn_save_video_state (CX,ES,BX) return BX; }
-static Bit16u biosfn_restore_video_state (CX,ES,BX) +static Bit16u biosfn_restore_video_state (CX,ES,BX) Bit16u CX;Bit16u ES;Bit16u BX; { Bit16u i, crtc_addr, v, addr1, ar_index; @@ -3294,7 +3294,7 @@ static Bit16u biosfn_restore_video_state (CX,ES,BX) crtc_addr = read_word(ES, BX + 0x40); addr1 = BX; BX += 5; - + for(i=1;i<=4;i++){ outb(VGAREG_SEQU_ADDRESS, i); outb(VGAREG_SEQU_DATA, read_byte(ES, BX)); BX++; @@ -3321,7 +3321,7 @@ static Bit16u biosfn_restore_video_state (CX,ES,BX) // enable write protection if needed outb(crtc_addr, 0x11); outb(crtc_addr+1, read_byte(ES, BX - 0x18 + 0x11)); - + // Set Attribute Ctl ar_index = read_byte(ES, addr1 + 0x03); inb(VGAREG_ACTL_RESET); @@ -3331,14 +3331,14 @@ static Bit16u biosfn_restore_video_state (CX,ES,BX) } outb(VGAREG_ACTL_ADDRESS, ar_index); inb(VGAREG_ACTL_RESET); - + for(i=0;i<=8;i++) { outb(VGAREG_GRDC_ADDRESS,i); outb(VGAREG_GRDC_DATA, read_byte(ES, BX)); BX++; } BX += 2; /* crtc_addr */ BX += 4; /* plane latches */ - + outb(VGAREG_SEQU_ADDRESS, read_byte(ES, addr1)); addr1++; outb(crtc_addr, read_byte(ES, addr1)); addr1++; outb(VGAREG_GRDC_ADDRESS, read_byte(ES, addr1)); addr1++; @@ -3388,9 +3388,9 @@ static Bit16u biosfn_restore_video_state (CX,ES,BX) // Video Utils // // ============================================================================================ - + // -------------------------------------------------------------------------------------------- -static Bit8u find_vga_entry(mode) +static Bit8u find_vga_entry(mode) Bit8u mode; { Bit8u i,line=0xFF; @@ -3910,7 +3910,7 @@ ASM_END
// --------------------------------------------------------------------------------------------
-ASM_START +ASM_START ;; DATA_SEG_DEFS_HERE ASM_END
diff --git a/qemu-0.15.x/roms/vgabios/vgafonts.h b/qemu-0.15.x/roms/vgabios/vgafonts.h index 0c213e6..fc8db8a 100644 --- a/qemu-0.15.x/roms/vgabios/vgafonts.h +++ b/qemu-0.15.x/roms/vgabios/vgafonts.h @@ -2,7 +2,7 @@ * These fonts come from ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip * The package is (c) by Joseph Gil * The individual fonts are public domain - */ + */ static Bit8u vgafont8[256*8]= { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/qemu-0.15.x/roms/vgabios/vgatables.h b/qemu-0.15.x/roms/vgabios/vgatables.h index 3ac96bb..fcbfad8 100644 --- a/qemu-0.15.x/roms/vgabios/vgatables.h +++ b/qemu-0.15.x/roms/vgabios/vgatables.h @@ -1,6 +1,6 @@ /* * - * BIOS Memory + * BIOS Memory * */ #define BIOSMEM_SEG 0x40 @@ -126,7 +126,7 @@ static VGAMODES vga_modes[MODE_MAX+1]=
/* convert index in vga_modes[] to index in video_param_table[] */ static Bit8u line_to_vpti[MODE_MAX+1]={ - 0x17, 0x17, 0x18, 0x18, 0x04, 0x05, 0x06, 0x07, + 0x17, 0x17, 0x18, 0x18, 0x04, 0x05, 0x06, 0x07, 0x0d, 0x0e, 0x11, 0x12, 0x1a, 0x1b, 0x1c, 0x1d, };
@@ -538,7 +538,7 @@ static Bit8u palette0[63+1][3]= 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, - 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f + 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f };
static Bit8u palette1[63+1][3]= @@ -550,7 +550,7 @@ static Bit8u palette1[63+1][3]= 0x00,0x00,0x00, 0x00,0x00,0x2a, 0x00,0x2a,0x00, 0x00,0x2a,0x2a, 0x2a,0x00,0x00, 0x2a,0x00,0x2a, 0x2a,0x15,0x00, 0x2a,0x2a,0x2a, 0x00,0x00,0x00, 0x00,0x00,0x2a, 0x00,0x2a,0x00, 0x00,0x2a,0x2a, 0x2a,0x00,0x00, 0x2a,0x00,0x2a, 0x2a,0x15,0x00, 0x2a,0x2a,0x2a, 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f, 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f, - 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f, 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f + 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f, 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f };
static Bit8u palette2[63+1][3]= @@ -562,7 +562,7 @@ static Bit8u palette2[63+1][3]= 0x15,0x00,0x00, 0x15,0x00,0x2a, 0x15,0x2a,0x00, 0x15,0x2a,0x2a, 0x3f,0x00,0x00, 0x3f,0x00,0x2a, 0x3f,0x2a,0x00, 0x3f,0x2a,0x2a, 0x15,0x00,0x15, 0x15,0x00,0x3f, 0x15,0x2a,0x15, 0x15,0x2a,0x3f, 0x3f,0x00,0x15, 0x3f,0x00,0x3f, 0x3f,0x2a,0x15, 0x3f,0x2a,0x3f, 0x15,0x15,0x00, 0x15,0x15,0x2a, 0x15,0x3f,0x00, 0x15,0x3f,0x2a, 0x3f,0x15,0x00, 0x3f,0x15,0x2a, 0x3f,0x3f,0x00, 0x3f,0x3f,0x2a, - 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f, 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f + 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f, 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f };
static Bit8u palette3[256][3]= diff --git a/qemu-0.15.x/savevm.c b/qemu-0.15.x/savevm.c index 79db4cb..1ce57e4 100644 --- a/qemu-0.15.x/savevm.c +++ b/qemu-0.15.x/savevm.c @@ -260,10 +260,10 @@ QEMUFile *qemu_popen(FILE *stdio_file, const char *mode) s->stdio_file = stdio_file;
if(mode[0] == 'r') { - s->file = qemu_fopen_ops(s, NULL, stdio_get_buffer, stdio_pclose, + s->file = qemu_fopen_ops(s, NULL, stdio_get_buffer, stdio_pclose, NULL, NULL, NULL); } else { - s->file = qemu_fopen_ops(s, stdio_put_buffer, NULL, stdio_pclose, + s->file = qemu_fopen_ops(s, stdio_put_buffer, NULL, stdio_pclose, NULL, NULL, NULL); } return s->file; @@ -309,10 +309,10 @@ QEMUFile *qemu_fdopen(int fd, const char *mode) goto fail;
if(mode[0] == 'r') { - s->file = qemu_fopen_ops(s, NULL, stdio_get_buffer, stdio_fclose, + s->file = qemu_fopen_ops(s, NULL, stdio_get_buffer, stdio_fclose, NULL, NULL, NULL); } else { - s->file = qemu_fopen_ops(s, stdio_put_buffer, NULL, stdio_fclose, + s->file = qemu_fopen_ops(s, stdio_put_buffer, NULL, stdio_fclose, NULL, NULL, NULL); } return s->file; @@ -327,7 +327,7 @@ QEMUFile *qemu_fopen_socket(int fd) QEMUFileSocket *s = qemu_mallocz(sizeof(QEMUFileSocket));
s->fd = fd; - s->file = qemu_fopen_ops(s, NULL, socket_get_buffer, socket_close, + s->file = qemu_fopen_ops(s, NULL, socket_get_buffer, socket_close, NULL, NULL, NULL); return s->file; } @@ -363,12 +363,12 @@ QEMUFile *qemu_fopen(const char *filename, const char *mode) s->stdio_file = fopen(filename, mode); if (!s->stdio_file) goto fail; - + if(mode[0] == 'w') { - s->file = qemu_fopen_ops(s, file_put_buffer, NULL, stdio_fclose, + s->file = qemu_fopen_ops(s, file_put_buffer, NULL, stdio_fclose, NULL, NULL, NULL); } else { - s->file = qemu_fopen_ops(s, NULL, file_get_buffer, stdio_fclose, + s->file = qemu_fopen_ops(s, NULL, file_get_buffer, stdio_fclose, NULL, NULL, NULL); } return s->file; @@ -397,7 +397,7 @@ static int bdrv_fclose(void *opaque) static QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int is_writable) { if (is_writable) - return qemu_fopen_ops(bs, block_put_buffer, NULL, bdrv_fclose, + return qemu_fopen_ops(bs, block_put_buffer, NULL, bdrv_fclose, NULL, NULL, NULL); return qemu_fopen_ops(bs, NULL, block_get_buffer, bdrv_fclose, NULL, NULL, NULL); } @@ -1472,7 +1472,7 @@ int qemu_savevm_state_begin(Monitor *mon, QEMUFile *f, int blk_enable, } se->set_params(blk_enable, shared, se->opaque); } - + qemu_put_be32(f, QEMU_VM_FILE_MAGIC); qemu_put_be32(f, QEMU_VM_FILE_VERSION);
diff --git a/qemu-0.15.x/serialice.c b/qemu-0.15.x/serialice.c index 793951f..ca975b1 100644 --- a/qemu-0.15.x/serialice.c +++ b/qemu-0.15.x/serialice.c @@ -125,7 +125,7 @@ void serialice_log_load(int caught, uint32_t addr, uint32_t result, }
/* This function can grab Qemu load ops and forward them to the SerialICE - * target. + * target. * * @return 0: pass on to Qemu; 1: handled locally. */ diff --git a/qemu-0.15.x/slirp/slirp.c b/qemu-0.15.x/slirp/slirp.c index df787ea..868b526 100644 --- a/qemu-0.15.x/slirp/slirp.c +++ b/qemu-0.15.x/slirp/slirp.c @@ -732,7 +732,7 @@ void if_encap(Slirp *slirp, const uint8_t *ip_data, int ip_data_len)
if (ip_data_len + ETH_HLEN > sizeof(buf)) return; - + if (!memcmp(slirp->client_ethaddr, zero_ethaddr, ETH_ALEN)) { uint8_t arp_req[ETH_HLEN + sizeof(struct arphdr)]; struct ethhdr *reh = (struct ethhdr *)arp_req; diff --git a/qemu-0.15.x/softmmu_template.h b/qemu-0.15.x/softmmu_template.h index ae42044..c192e61 100644 --- a/qemu-0.15.x/softmmu_template.h +++ b/qemu-0.15.x/softmmu_template.h @@ -251,7 +251,7 @@ void REGPARM glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr, int index;
#ifdef CONFIG_SERIALICE - if (serialice_active && serialice_handle_store((uint32_t)addr, + if (serialice_active && serialice_handle_store((uint32_t)addr, (uint32_t)val, (unsigned int) DATA_SIZE)) { /* The memory catch mechanism does not work particularly well * because of the softmmu is optimizing all accesses to Qemu diff --git a/qemu-0.15.x/target-cris/helper.c b/qemu-0.15.x/target-cris/helper.c index 962d214..c801e99 100644 --- a/qemu-0.15.x/target-cris/helper.c +++ b/qemu-0.15.x/target-cris/helper.c @@ -105,8 +105,8 @@ int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw, } if (r > 0) D_LOG("%s returns %d irqreq=%x addr=%x" - " phy=%x ismmu=%d vec=%x pc=%x\n", - __func__, r, env->interrupt_request, + " phy=%x ismmu=%d vec=%x pc=%x\n", + __func__, r, env->interrupt_request, address, res.phy, is_softmmu, res.bf_vec, env->pc); return r; } @@ -159,10 +159,10 @@ static void do_interruptv10(CPUState *env) env->pc = ldl_code(env->pregs[PR_EBP] + ex_vec * 4); env->locked_irq = 1;
- qemu_log_mask(CPU_LOG_INT, "%s isr=%x vec=%x ccs=%x pid=%d erp=%x\n", - __func__, env->pc, ex_vec, + qemu_log_mask(CPU_LOG_INT, "%s isr=%x vec=%x ccs=%x pid=%d erp=%x\n", + __func__, env->pc, ex_vec, env->pregs[PR_CCS], - env->pregs[PR_PID], + env->pregs[PR_PID], env->pregs[PR_ERP]); }
@@ -246,7 +246,7 @@ void do_interrupt(CPUState *env) D_LOG("%s isr=%x vec=%x ccs=%x pid=%d erp=%x\n", __func__, env->pc, ex_vec, env->pregs[PR_CCS], - env->pregs[PR_PID], + env->pregs[PR_PID], env->pregs[PR_ERP]); }
diff --git a/qemu-0.15.x/target-cris/mmu.c b/qemu-0.15.x/target-cris/mmu.c index d481e39..3ab7c8d 100644 --- a/qemu-0.15.x/target-cris/mmu.c +++ b/qemu-0.15.x/target-cris/mmu.c @@ -96,7 +96,7 @@ static uint32_t cris_mmu_translate_seg(CPUState *env, int seg) #define EXTRACT_FIELD(src, start, end) \ (((src) >> start) & ((1 << (end - start + 1)) - 1))
-static inline void set_field(uint32_t *dst, unsigned int val, +static inline void set_field(uint32_t *dst, unsigned int val, unsigned int offset, unsigned int width) { uint32_t mask; @@ -124,7 +124,7 @@ static void dump_tlb(CPUState *env, int mmu) tlb_vpn = EXTRACT_FIELD(hi, 13, 31); tlb_pfn = EXTRACT_FIELD(lo, 13, 31);
- printf ("TLB: [%d][%d] hi=%x lo=%x v=%x p=%x\n", + printf ("TLB: [%d][%d] hi=%x lo=%x v=%x p=%x\n", set, idx, hi, lo, tlb_vpn, tlb_pfn); } } @@ -175,7 +175,7 @@ static int cris_mmu_translate_page(struct cris_mmu_result *res, tlb_vpn = EXTRACT_FIELD(hi, 13, 31); tlb_pfn = EXTRACT_FIELD(lo, 13, 31);
- printf ("TLB: [%d][%d] hi=%x lo=%x v=%x p=%x\n", + printf ("TLB: [%d][%d] hi=%x lo=%x v=%x p=%x\n", set, idx, hi, lo, tlb_vpn, tlb_pfn); } } @@ -191,7 +191,7 @@ static int cris_mmu_translate_page(struct cris_mmu_result *res, tlb_pid = EXTRACT_FIELD(hi, 0, 7); tlb_g = EXTRACT_FIELD(lo, 4, 4);
- D_LOG("TLB[%d][%d][%d] v=%x vpage=%x lo=%x hi=%x\n", + D_LOG("TLB[%d][%d][%d] v=%x vpage=%x lo=%x hi=%x\n", mmu, set, idx, tlb_vpn, vpage, lo, hi); if ((tlb_g || (tlb_pid == pid)) && tlb_vpn == vpage) { @@ -224,18 +224,18 @@ static int cris_mmu_translate_page(struct cris_mmu_result *res, set_exception_vector(0x0b, d_mmu_write); */ if (cfg_k && tlb_k && usermode) { - D(printf ("tlb: kernel protected %x lo=%x pc=%x\n", + D(printf ("tlb: kernel protected %x lo=%x pc=%x\n", vaddr, lo, env->pc)); match = 0; res->bf_vec = vect_base + 2; } else if (rw == 1 && cfg_w && !tlb_w) { - D(printf ("tlb: write protected %x lo=%x pc=%x\n", + D(printf ("tlb: write protected %x lo=%x pc=%x\n", vaddr, lo, env->pc)); match = 0; /* write accesses never go through the I mmu. */ res->bf_vec = vect_base + 3; } else if (rw == 2 && cfg_x && !tlb_x) { - D(printf ("tlb: exec protected %x lo=%x pc=%x\n", + D(printf ("tlb: exec protected %x lo=%x pc=%x\n", vaddr, lo, env->pc)); match = 0; res->bf_vec = vect_base + 3; @@ -283,7 +283,7 @@ static int cris_mmu_translate_page(struct cris_mmu_result *res, " %x cause=%x sel=%x sp=%x %x %x\n", __func__, rw, match, env->pc, vaddr, vpage, - tlb_vpn, tlb_pfn, tlb_pid, + tlb_vpn, tlb_pfn, tlb_pid, pid, r_cause, env->sregs[SFR_RW_MM_TLB_SEL], @@ -318,7 +318,7 @@ void cris_mmu_flush_pid(CPUState *env, uint32_t pid)
if (tlb_v && !tlb_g && (tlb_pid == pid)) { vaddr = tlb_vpn << TARGET_PAGE_BITS; - D_LOG("flush pid=%x vaddr=%x\n", + D_LOG("flush pid=%x vaddr=%x\n", pid, vaddr); tlb_flush_page(env, vaddr); } diff --git a/qemu-0.15.x/target-cris/op_helper.c b/qemu-0.15.x/target-cris/op_helper.c index b3ddd33..2db8bad 100644 --- a/qemu-0.15.x/target-cris/op_helper.c +++ b/qemu-0.15.x/target-cris/op_helper.c @@ -66,7 +66,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr) saved_env = env; env = cpu_single_env;
- D_LOG("%s pc=%x tpc=%x ra=%x\n", __func__, + D_LOG("%s pc=%x tpc=%x ra=%x\n", __func__, env->pc, env->debug1, retaddr); ret = cpu_cris_handle_mmu_fault(env, addr, is_write, mmu_idx, 1); if (unlikely(ret)) { @@ -132,7 +132,7 @@ void helper_movl_sreg_reg (uint32_t sreg, uint32_t reg) #if !defined(CONFIG_USER_ONLY) if (srs == 1 || srs == 2) { if (sreg == 6) { - /* Writes to tlb-hi write to mm_cause as a side + /* Writes to tlb-hi write to mm_cause as a side effect. */ env->sregs[SFR_RW_MM_TLB_HI] = env->regs[reg]; env->sregs[SFR_R_MM_CAUSE] = env->regs[reg]; @@ -162,7 +162,7 @@ void helper_movl_sreg_reg (uint32_t sreg, uint32_t reg) env->tlbsets[srs - 1][set][idx].lo = lo; env->tlbsets[srs - 1][set][idx].hi = hi;
- D_LOG("tlb flush vaddr=%x v=%d pc=%x\n", + D_LOG("tlb flush vaddr=%x v=%d pc=%x\n", vaddr, tlb_v, env->pc); if (tlb_v) { tlb_flush_page(env, vaddr); @@ -221,7 +221,7 @@ void helper_rfe(void) { int rflag = env->pregs[PR_CCS] & R_FLAG;
- D_LOG("rfe: erp=%x pid=%x ccs=%x btarget=%x\n", + D_LOG("rfe: erp=%x pid=%x ccs=%x btarget=%x\n", env->pregs[PR_ERP], env->pregs[PR_PID], env->pregs[PR_CCS], env->btarget); @@ -237,7 +237,7 @@ void helper_rfn(void) { int rflag = env->pregs[PR_CCS] & R_FLAG;
- D_LOG("rfn: erp=%x pid=%x ccs=%x btarget=%x\n", + D_LOG("rfn: erp=%x pid=%x ccs=%x btarget=%x\n", env->pregs[PR_ERP], env->pregs[PR_PID], env->pregs[PR_CCS], env->btarget); @@ -363,9 +363,9 @@ uint32_t helper_evaluate_flags_mcp(uint32_t ccs, { if (res == 0L) flags |= Z_FLAG; - if (src & dst) + if (src & dst) flags |= V_FLAG; - if (dst | src) + if (dst | src) flags |= R_FLAG; }
@@ -392,9 +392,9 @@ uint32_t helper_evaluate_flags_alu_4(uint32_t ccs, { if (res == 0L) flags |= Z_FLAG; - if (src & dst) + if (src & dst) flags |= V_FLAG; - if (dst | src) + if (dst | src) flags |= C_FLAG; }
@@ -421,9 +421,9 @@ uint32_t helper_evaluate_flags_sub_4(uint32_t ccs, { if (res == 0L) flags |= Z_FLAG; - if (src & dst) + if (src & dst) flags |= V_FLAG; - if (dst | src) + if (dst | src) flags |= C_FLAG; }
diff --git a/qemu-0.15.x/target-cris/translate.c b/qemu-0.15.x/target-cris/translate.c index dd85859..0c69bff 100644 --- a/qemu-0.15.x/target-cris/translate.c +++ b/qemu-0.15.x/target-cris/translate.c @@ -123,7 +123,7 @@ typedef struct DisasContext { #define JMP_DIRECT 1 #define JMP_DIRECT_CC 2 #define JMP_INDIRECT 3 - int jmp; /* 0=nojmp, 1=direct, 2=indirect. */ + int jmp; /* 0=nojmp, 1=direct, 2=indirect. */ uint32_t jmp_pc;
int delayed_branch; @@ -217,9 +217,9 @@ static inline void t_gen_mov_preg_TN(DisasContext *dc, int r, TCGv tn) else if (r == PR_SRS) tcg_gen_andi_tl(cpu_PR[r], tn, 3); else { - if (r == PR_PID) + if (r == PR_PID) gen_helper_tlb_flush_pid(tn); - if (dc->tb_flags & S_FLAG && r == PR_SPC) + if (dc->tb_flags & S_FLAG && r == PR_SPC) gen_helper_spc_write(tn); else if (r == PR_CCS) dc->cpustate_changed = 1; @@ -384,7 +384,7 @@ static void t_gen_cris_dstep(TCGv d, TCGv a, TCGv b)
l1 = gen_new_label();
- /* + /* * d <<= 1 * if (d >= s) * d -= s; @@ -399,7 +399,7 @@ static void t_gen_cris_mstep(TCGv d, TCGv a, TCGv b, TCGv ccs) { TCGv t;
- /* + /* * d <<= 1 * if (n) * d += s; @@ -433,7 +433,7 @@ static inline void t_gen_addx_carry(DisasContext *dc, TCGv d) if (dc->flagx_known) { if (dc->flags_x) { TCGv c; - + c = tcg_temp_new(); t_gen_mov_TN_preg(c, PR_CCS); /* C flag is already at bit 0. */ @@ -455,7 +455,7 @@ static inline void t_gen_addx_carry(DisasContext *dc, TCGv d) tcg_gen_shri_tl(x, x, 4);
tcg_gen_and_tl(x, x, c); - tcg_gen_add_tl(d, d, x); + tcg_gen_add_tl(d, d, x); tcg_temp_free(x); tcg_temp_free(c); } @@ -466,7 +466,7 @@ static inline void t_gen_subx_carry(DisasContext *dc, TCGv d) if (dc->flagx_known) { if (dc->flags_x) { TCGv c; - + c = tcg_temp_new(); t_gen_mov_TN_preg(c, PR_CCS); /* C flag is already at bit 0. */ @@ -695,10 +695,10 @@ static void cris_evaluate_flags(DisasContext *dc)
if (dc->flagx_known) { if (dc->flags_x) - tcg_gen_ori_tl(cpu_PR[PR_CCS], + tcg_gen_ori_tl(cpu_PR[PR_CCS], cpu_PR[PR_CCS], X_FLAG); else if (dc->cc_op == CC_OP_FLAGS) - tcg_gen_andi_tl(cpu_PR[PR_CCS], + tcg_gen_andi_tl(cpu_PR[PR_CCS], cpu_PR[PR_CCS], ~X_FLAG); } dc->flags_uptodate = 1; @@ -713,7 +713,7 @@ static void cris_cc_mask(DisasContext *dc, unsigned int mask) return; }
- /* Check if we need to evaluate the condition codes due to + /* Check if we need to evaluate the condition codes due to CC overlaying. */ ovl = (dc->cc_mask ^ mask) & ~mask; if (ovl) { @@ -747,7 +747,7 @@ static inline void cris_update_cc_x(DisasContext *dc) }
/* Update cc prior to executing ALU op. Needs source operands untouched. */ -static void cris_pre_alu_update_cc(DisasContext *dc, int op, +static void cris_pre_alu_update_cc(DisasContext *dc, int op, TCGv dst, TCGv src, int size) { if (dc->update_cc) { @@ -775,7 +775,7 @@ static inline void cris_update_result(DisasContext *dc, TCGv res) }
/* Returns one if the write back stage should execute. */ -static void cris_alu_op_exec(DisasContext *dc, int op, +static void cris_alu_op_exec(DisasContext *dc, int op, TCGv dst, TCGv a, TCGv b, int size) { /* Emit the ALU insns. */ @@ -951,7 +951,7 @@ static void gen_tst_cc (DisasContext *dc, TCGv cc, int cond) } else { cris_evaluate_flags(dc); - tcg_gen_andi_tl(cc, + tcg_gen_andi_tl(cc, cpu_PR[PR_CCS], Z_FLAG); } break; @@ -1129,7 +1129,7 @@ static void cris_store_direct_jmp(DisasContext *dc) } }
-static void cris_prepare_cc_branch (DisasContext *dc, +static void cris_prepare_cc_branch (DisasContext *dc, int offset, int cond) { /* This helps us re-schedule the micro-code to insns in delay-slots @@ -1168,7 +1168,7 @@ static void gen_load64(DisasContext *dc, TCGv_i64 dst, TCGv addr) tcg_gen_qemu_ld64(dst, addr, mem_index); }
-static void gen_load(DisasContext *dc, TCGv dst, TCGv addr, +static void gen_load(DisasContext *dc, TCGv dst, TCGv addr, unsigned int size, int sign) { int mem_index = cpu_mmu_index(dc->env); @@ -2635,7 +2635,7 @@ static int dec_move_pm(DisasContext *dc) memsize = preg_sizes[dc->op2];
LOG_DIS("move.%c $p%u, [$r%u%s\n", - memsize_char(memsize), + memsize_char(memsize), dc->op2, dc->op1, dc->postinc ? "+]" : "]");
/* prepare store. Address in T0, value in T1. */ @@ -2930,7 +2930,7 @@ static int dec_rfe_etc(DisasContext *dc) tcg_gen_movi_tl(env_pc, dc->pc + 2);
/* Breaks start at 16 in the exception vector. */ - t_gen_mov_env_TN(trap_vector, + t_gen_mov_env_TN(trap_vector, tcg_const_tl(dc->op1 + 16)); t_gen_raise_exception(EXCP_BREAK); dc->is_jmp = DISAS_UPDATE; @@ -3147,27 +3147,27 @@ static void check_breakpoint(CPUState *env, DisasContext *dc) * to give SW a hint that the exception actually hit on the dslot. * * CRIS expects all PC addresses to be 16-bit aligned. The lsb is ignored by - * the core and any jmp to an odd addresses will mask off that lsb. It is + * the core and any jmp to an odd addresses will mask off that lsb. It is * simply there to let sw know there was an exception on a dslot. * * When the software returns from an exception, the branch will re-execute. * On QEMU care needs to be taken when a branch+delayslot sequence is broken * and the branch and delayslot dont share pages. * - * The TB contaning the branch insn will set up env->btarget and evaluate - * env->btaken. When the translation loop exits we will note that the branch + * The TB contaning the branch insn will set up env->btarget and evaluate + * env->btaken. When the translation loop exits we will note that the branch * sequence is broken and let env->dslot be the size of the branch insn (those * vary in length). * * The TB contaning the delayslot will have the PC of its real insn (i.e no lsb - * set). It will also expect to have env->dslot setup with the size of the - * delay slot so that env->pc - env->dslot point to the branch insn. This TB - * will execute the dslot and take the branch, either to btarget or just one + * set). It will also expect to have env->dslot setup with the size of the + * delay slot so that env->pc - env->dslot point to the branch insn. This TB + * will execute the dslot and take the branch, either to btarget or just one * insn ahead. * - * When exceptions occur, we check for env->dslot in do_interrupt to detect + * When exceptions occur, we check for env->dslot in do_interrupt to detect * broken branch sequences and setup $erp accordingly (i.e let it point to the - * branch and set lsb). Then env->dslot gets cleared so that the exception + * branch and set lsb). Then env->dslot gets cleared so that the exception * handler can enter. When returning from exceptions (jump $erp) the lsb gets * masked off and we will reexecute the branch insn. * @@ -3245,7 +3245,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb, search_pc, dc->pc, dc->ppc, (uint64_t)tb->flags, env->btarget, (unsigned)tb->flags & 7, - env->pregs[PR_CCS], + env->pregs[PR_CCS], env->pregs[PR_PID], env->pregs[PR_USP], env->regs[0], env->regs[1], env->regs[2], env->regs[3], env->regs[4], env->regs[5], env->regs[6], env->regs[7], @@ -3306,7 +3306,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb, if (dc->delayed_branch == 0) { if (tb->flags & 7) - t_gen_mov_env_TN(dslot, + t_gen_mov_env_TN(dslot, tcg_const_tl(0)); if (dc->cpustate_changed || !dc->flagx_known || (dc->flags_x != (tb->flags & X_FLAG))) { @@ -3339,7 +3339,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb, dc->is_jmp = DISAS_TB_JUMP; dc->jmp = JMP_NOJMP; } else { - t_gen_cc_jmp(env_btarget, + t_gen_cc_jmp(env_btarget, tcg_const_tl(dc->pc)); dc->is_jmp = DISAS_JUMP; } @@ -3366,7 +3366,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb, gen_io_end(); /* Force an update if the per-tb cpu state has changed. */ if (dc->is_jmp == DISAS_NEXT - && (dc->cpustate_changed || !dc->flagx_known + && (dc->cpustate_changed || !dc->flagx_known || (dc->flags_x != (tb->flags & X_FLAG)))) { dc->is_jmp = DISAS_UPDATE; tcg_gen_movi_tl(env_pc, npc); @@ -3533,7 +3533,7 @@ CPUCRISState *cpu_cris_init (const char *cpu_model)
if (env->pregs[PR_VR] < 32) { cpu_crisv10_init(env); - return env; + return env; }
@@ -3557,7 +3557,7 @@ CPUCRISState *cpu_cris_init (const char *cpu_model) offsetof(CPUState, cc_mask), "cc_mask");
- env_pc = tcg_global_mem_new(TCG_AREG0, + env_pc = tcg_global_mem_new(TCG_AREG0, offsetof(CPUState, pc), "pc"); env_btarget = tcg_global_mem_new(TCG_AREG0, diff --git a/qemu-0.15.x/target-cris/translate_v10.c b/qemu-0.15.x/target-cris/translate_v10.c index 637ac20..37c79eb 100644 --- a/qemu-0.15.x/target-cris/translate_v10.c +++ b/qemu-0.15.x/target-cris/translate_v10.c @@ -239,7 +239,7 @@ static unsigned int dec10_quick_imm(DisasContext *dc)
op = CC_OP_LSL; if (imm & (1 << 5)) { - op = CC_OP_LSR; + op = CC_OP_LSR; } imm &= 0x1f; cris_cc_mask(dc, CC_MASK_NZVC); @@ -275,7 +275,7 @@ static unsigned int dec10_quick_imm(DisasContext *dc) LOG_DIS("b%s %d\n", cc_name(dc->cond), imm);
cris_cc_mask(dc, 0); - cris_prepare_cc_branch(dc, imm, dc->cond); + cris_prepare_cc_branch(dc, imm, dc->cond); break;
default: @@ -426,7 +426,7 @@ static void dec10_reg_mov_pr(DisasContext *dc) return; } if (dc->dst == PR_CCS) { - cris_evaluate_flags(dc); + cris_evaluate_flags(dc); } cris_alu(dc, CC_OP_MOVE, cpu_R[dc->src], cpu_R[dc->src], cpu_PR[dc->dst], preg_sizes_v10[dc->dst]); @@ -1217,7 +1217,7 @@ static CPUCRISState *cpu_crisv10_init (CPUState *env) offsetof(CPUState, cc_mask), "cc_mask");
- env_pc = tcg_global_mem_new(TCG_AREG0, + env_pc = tcg_global_mem_new(TCG_AREG0, offsetof(CPUState, pc), "pc"); env_btarget = tcg_global_mem_new(TCG_AREG0, diff --git a/qemu-0.15.x/target-i386/TODO b/qemu-0.15.x/target-i386/TODO index c8ada07..8dfd463 100644 --- a/qemu-0.15.x/target-i386/TODO +++ b/qemu-0.15.x/target-i386/TODO @@ -1,7 +1,7 @@ Correctness issues:
- some eflags manipulation incorrectly reset the bit 0x2. -- SVM: test, cpu save/restore, SMM save/restore. +- SVM: test, cpu save/restore, SMM save/restore. - x86_64: lcall/ljmp intel/amd differences ? - better code fetch (different exception handling + CS.limit support) - user/kernel PUSHL/POPL in helper.c @@ -9,7 +9,7 @@ Correctness issues: - return UD exception if LOCK prefix incorrectly used - test ldt limit < 7 ? - fix some 16 bit sp push/pop overflow (pusha/popa, lcall lret) -- full support of segment limit/rights +- full support of segment limit/rights - full x87 exception support - improve x87 bit exactness (use bochs code ?) - DRx register support diff --git a/qemu-0.15.x/target-i386/cpu.h b/qemu-0.15.x/target-i386/cpu.h index 86d9e3b..db46714 100644 --- a/qemu-0.15.x/target-i386/cpu.h +++ b/qemu-0.15.x/target-i386/cpu.h @@ -181,7 +181,7 @@ #define HF2_VINTR_SHIFT 3 /* value of V_INTR_MASKING bit */
#define HF2_GIF_MASK (1 << HF2_GIF_SHIFT) -#define HF2_HIF_MASK (1 << HF2_HIF_SHIFT) +#define HF2_HIF_MASK (1 << HF2_HIF_SHIFT) #define HF2_NMI_MASK (1 << HF2_NMI_SHIFT) #define HF2_VINTR_MASK (1 << HF2_VINTR_SHIFT)
@@ -743,7 +743,7 @@ typedef struct CPUX86State { uint32_t cpuid_kvm_features; uint32_t cpuid_svm_features; bool tsc_valid; - + /* in order to simplify APIC support, we leave this pointer to the user */ struct DeviceState *apic_state; diff --git a/qemu-0.15.x/target-i386/helper.c b/qemu-0.15.x/target-i386/helper.c index e9be104..7f66e75 100644 --- a/qemu-0.15.x/target-i386/helper.c +++ b/qemu-0.15.x/target-i386/helper.c @@ -852,7 +852,7 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr, error_code |= PG_ERROR_I_D_MASK; if (env->intercept_exceptions & (1 << EXCP0E_PAGE)) { /* cr2 is not modified in case of exceptions */ - stq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2), + stq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2), addr); } else { env->cr[2] = addr; diff --git a/qemu-0.15.x/target-i386/op_helper.c b/qemu-0.15.x/target-i386/op_helper.c index 1823c74..6379ddc 100644 --- a/qemu-0.15.x/target-i386/op_helper.c +++ b/qemu-0.15.x/target-i386/op_helper.c @@ -1966,7 +1966,7 @@ void helper_cmpxchg8b(target_ulong a0) eflags |= CC_Z; } else { /* always do the store */ - stq(a0, d); + stq(a0, d); EDX = (uint32_t)(d >> 32); EAX = (uint32_t)d; eflags &= ~CC_Z; @@ -1991,8 +1991,8 @@ void helper_cmpxchg16b(target_ulong a0) eflags |= CC_Z; } else { /* always do the store */ - stq(a0, d0); - stq(a0 + 8, d1); + stq(a0, d0); + stq(a0 + 8, d1); EDX = d1; EAX = d0; eflags &= ~CC_Z; @@ -2398,7 +2398,7 @@ void helper_lcall_real(int new_cs, target_ulong new_eip1, }
/* protected mode call */ -void helper_lcall_protected(int new_cs, target_ulong new_eip, +void helper_lcall_protected(int new_cs, target_ulong new_eip, int shift, int next_eip_addend) { int new_stack, i; @@ -3079,7 +3079,7 @@ void helper_rdpmc(void) raise_exception(EXCP0D_GPF); } helper_svm_check_intercept_param(SVM_EXIT_RDPMC, 0); - + /* currently unimplemented */ raise_exception_err(EXCP06_ILLOP, 0); } @@ -4519,7 +4519,7 @@ void helper_fxsave(target_ulong ptr, int data64) if (data64) { stq(ptr + 0x08, 0); /* rip */ stq(ptr + 0x10, 0); /* rdp */ - } else + } else #endif { stl(ptr + 0x08, 0); /* eip */ @@ -4781,7 +4781,7 @@ void helper_hlt(int next_eip_addend) { helper_svm_check_intercept_param(SVM_EXIT_HLT, 0); EIP += next_eip_addend; - + do_hlt(); }
@@ -4945,16 +4945,16 @@ void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr) #if defined(CONFIG_USER_ONLY)
void helper_vmrun(int aflag, int next_eip_addend) -{ +{ } -void helper_vmmcall(void) -{ +void helper_vmmcall(void) +{ } void helper_vmload(int aflag) -{ +{ } void helper_vmsave(int aflag) -{ +{ } void helper_stgi(void) { @@ -4962,14 +4962,14 @@ void helper_stgi(void) void helper_clgi(void) { } -void helper_skinit(void) -{ +void helper_skinit(void) +{ } void helper_invlpga(int aflag) -{ +{ } -void helper_vmexit(uint32_t exit_code, uint64_t exit_info_1) -{ +void helper_vmexit(uint32_t exit_code, uint64_t exit_info_1) +{ } void helper_svm_check_intercept_param(uint32_t type, uint64_t param) { @@ -4979,7 +4979,7 @@ void svm_check_intercept(CPUState *env1, uint32_t type) { }
-void helper_svm_check_io(uint32_t port, uint32_t param, +void helper_svm_check_io(uint32_t port, uint32_t param, uint32_t next_eip_addend) { } @@ -4988,16 +4988,16 @@ void helper_svm_check_io(uint32_t port, uint32_t param, static inline void svm_save_seg(target_phys_addr_t addr, const SegmentCache *sc) { - stw_phys(addr + offsetof(struct vmcb_seg, selector), + stw_phys(addr + offsetof(struct vmcb_seg, selector), sc->selector); - stq_phys(addr + offsetof(struct vmcb_seg, base), + stq_phys(addr + offsetof(struct vmcb_seg, base), sc->base); - stl_phys(addr + offsetof(struct vmcb_seg, limit), + stl_phys(addr + offsetof(struct vmcb_seg, limit), sc->limit); - stw_phys(addr + offsetof(struct vmcb_seg, attrib), + stw_phys(addr + offsetof(struct vmcb_seg, attrib), ((sc->flags >> 8) & 0xff) | ((sc->flags >> 12) & 0x0f00)); } - + static inline void svm_load_seg(target_phys_addr_t addr, SegmentCache *sc) { unsigned int flags; @@ -5009,7 +5009,7 @@ static inline void svm_load_seg(target_phys_addr_t addr, SegmentCache *sc) sc->flags = ((flags & 0xff) << 8) | ((flags & 0x0f00) << 12); }
-static inline void svm_load_seg_cache(target_phys_addr_t addr, +static inline void svm_load_seg_cache(target_phys_addr_t addr, CPUState *env, int seg_reg) { SegmentCache sc1, *sc = &sc1; @@ -5052,13 +5052,13 @@ void helper_vmrun(int aflag, int next_eip_addend) stq_phys(env->vm_hsave + offsetof(struct vmcb, save.efer), env->efer); stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rflags), compute_eflags());
- svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.es), + svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.es), &env->segs[R_ES]); - svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.cs), + svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.cs), &env->segs[R_CS]); - svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.ss), + svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.ss), &env->segs[R_SS]); - svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.ds), + svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.ds), &env->segs[R_DS]);
stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rip), @@ -5102,7 +5102,7 @@ void helper_vmrun(int aflag, int next_eip_addend) env->hflags2 |= HF2_HIF_MASK; }
- cpu_load_efer(env, + cpu_load_efer(env, ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.efer))); env->eflags = 0; load_eflags(ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rflags)), @@ -5246,13 +5246,13 @@ void helper_vmsave(int aflag) addr, ldq_phys(addr + offsetof(struct vmcb, save.fs.base)), env->segs[R_FS].base);
- svm_save_seg(addr + offsetof(struct vmcb, save.fs), + svm_save_seg(addr + offsetof(struct vmcb, save.fs), &env->segs[R_FS]); - svm_save_seg(addr + offsetof(struct vmcb, save.gs), + svm_save_seg(addr + offsetof(struct vmcb, save.gs), &env->segs[R_GS]); - svm_save_seg(addr + offsetof(struct vmcb, save.tr), + svm_save_seg(addr + offsetof(struct vmcb, save.tr), &env->tr); - svm_save_seg(addr + offsetof(struct vmcb, save.ldtr), + svm_save_seg(addr + offsetof(struct vmcb, save.ldtr), &env->ldt);
#ifdef TARGET_X86_64 @@ -5290,7 +5290,7 @@ void helper_invlpga(int aflag) { target_ulong addr; helper_svm_check_intercept_param(SVM_EXIT_INVLPGA, 0); - + if (aflag == 2) addr = EAX; else @@ -5379,7 +5379,7 @@ void svm_check_intercept(CPUState *env1, uint32_t type) env = saved_env; }
-void helper_svm_check_io(uint32_t port, uint32_t param, +void helper_svm_check_io(uint32_t port, uint32_t param, uint32_t next_eip_addend) { if (env->intercept & (1ULL << (SVM_EXIT_IOIO - SVM_EXIT_INTR))) { @@ -5388,7 +5388,7 @@ void helper_svm_check_io(uint32_t port, uint32_t param, uint16_t mask = (1 << ((param >> 4) & 7)) - 1; if(lduw_phys(addr + port / 8) & (mask << (port & 7))) { /* next EIP */ - stq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2), + stq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2), env->eip + next_eip_addend); helper_vmexit(SVM_EXIT_IOIO, param | (port << 16)); } @@ -5413,13 +5413,13 @@ void helper_vmexit(uint32_t exit_code, uint64_t exit_info_1) }
/* Save the VM state in the vmcb */ - svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.es), + svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.es), &env->segs[R_ES]); - svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.cs), + svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.cs), &env->segs[R_CS]); - svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.ss), + svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.ss), &env->segs[R_SS]); - svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.ds), + svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.ds), &env->segs[R_DS]);
stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.gdtr.base), env->gdt.base); @@ -5468,7 +5468,7 @@ void helper_vmexit(uint32_t exit_code, uint64_t exit_info_1) cpu_x86_update_cr3(env, ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr3))); /* we need to set the efer after the crs so the hidden flags get set properly */ - cpu_load_efer(env, + cpu_load_efer(env, ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.efer))); env->eflags = 0; load_eflags(ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.rflags)), diff --git a/qemu-0.15.x/target-i386/translate.c b/qemu-0.15.x/target-i386/translate.c index ccef381..ece44c5 100644 --- a/qemu-0.15.x/target-i386/translate.c +++ b/qemu-0.15.x/target-i386/translate.c @@ -370,7 +370,7 @@ static inline void gen_op_addq_A0_im(int64_t val) tcg_gen_addi_tl(cpu_A0, cpu_A0, val); } #endif - + static void gen_add_A0_im(DisasContext *s, int val) { #ifdef TARGET_X86_64 @@ -642,7 +642,7 @@ static inline void gen_string_movl_A0_EDI(DisasContext *s) } }
-static inline void gen_op_movl_T0_Dshift(int ot) +static inline void gen_op_movl_T0_Dshift(int ot) { tcg_gen_ld32s_tl(cpu_T[0], cpu_env, offsetof(CPUState, df)); tcg_gen_shli_tl(cpu_T[0], cpu_T[0], ot); @@ -933,7 +933,7 @@ static inline void gen_jcc1(DisasContext *s, int cc_op, int b, int l1) case CC_OP_SUBW: case CC_OP_SUBL: case CC_OP_SUBQ: - + size = cc_op - CC_OP_SUBB; switch(jcc_op) { case JCC_Z: @@ -964,28 +964,28 @@ static inline void gen_jcc1(DisasContext *s, int cc_op, int b, int l1) switch(size) { case 0: tcg_gen_andi_tl(cpu_tmp0, cpu_cc_dst, 0x80); - tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, + tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, 0, l1); break; case 1: tcg_gen_andi_tl(cpu_tmp0, cpu_cc_dst, 0x8000); - tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, + tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, 0, l1); break; #ifdef TARGET_X86_64 case 2: tcg_gen_andi_tl(cpu_tmp0, cpu_cc_dst, 0x80000000); - tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, + tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, 0, l1); break; #endif default: - tcg_gen_brcondi_tl(inv ? TCG_COND_GE : TCG_COND_LT, cpu_cc_dst, + tcg_gen_brcondi_tl(inv ? TCG_COND_GE : TCG_COND_LT, cpu_cc_dst, 0, l1); break; } break; - + case JCC_B: cond = inv ? TCG_COND_GEU : TCG_COND_LTU; goto fast_jcc_b; @@ -1017,7 +1017,7 @@ static inline void gen_jcc1(DisasContext *s, int cc_op, int b, int l1) } tcg_gen_brcond_tl(cond, cpu_tmp4, t0, l1); break; - + case JCC_L: cond = inv ? TCG_COND_GE : TCG_COND_LT; goto fast_jcc_l; @@ -1049,48 +1049,48 @@ static inline void gen_jcc1(DisasContext *s, int cc_op, int b, int l1) } tcg_gen_brcond_tl(cond, cpu_tmp4, t0, l1); break; - + default: goto slow_jcc; } break; - + /* some jumps are easy to compute */ case CC_OP_ADDB: case CC_OP_ADDW: case CC_OP_ADDL: case CC_OP_ADDQ: - + case CC_OP_ADCB: case CC_OP_ADCW: case CC_OP_ADCL: case CC_OP_ADCQ: - + case CC_OP_SBBB: case CC_OP_SBBW: case CC_OP_SBBL: case CC_OP_SBBQ: - + case CC_OP_LOGICB: case CC_OP_LOGICW: case CC_OP_LOGICL: case CC_OP_LOGICQ: - + case CC_OP_INCB: case CC_OP_INCW: case CC_OP_INCL: case CC_OP_INCQ: - + case CC_OP_DECB: case CC_OP_DECW: case CC_OP_DECL: case CC_OP_DECQ: - + case CC_OP_SHLB: case CC_OP_SHLW: case CC_OP_SHLL: case CC_OP_SHLQ: - + case CC_OP_SARB: case CC_OP_SARW: case CC_OP_SARL: @@ -1109,7 +1109,7 @@ static inline void gen_jcc1(DisasContext *s, int cc_op, int b, int l1) default: slow_jcc: gen_setcc_slow_T0(s, jcc_op); - tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, + tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_T[0], 0, l1); break; } @@ -1401,7 +1401,7 @@ static void gen_inc(DisasContext *s1, int ot, int d, int c) tcg_gen_mov_tl(cpu_cc_dst, cpu_T[0]); }
-static void gen_shift_rm_T1(DisasContext *s, int ot, int op1, +static void gen_shift_rm_T1(DisasContext *s, int ot, int op1, int is_right, int is_arith) { target_ulong mask; @@ -1443,7 +1443,7 @@ static void gen_shift_rm_T1(DisasContext *s, int ot, int op1, gen_op_st_T0_A0(ot + s->mem_index); else gen_op_mov_reg_T0(ot, op1); - + /* update eflags if non zero shift */ if (s->cc_op != CC_OP_DYNAMIC) gen_op_set_cc_op(s->cc_op); @@ -1464,7 +1464,7 @@ static void gen_shift_rm_T1(DisasContext *s, int ot, int op1, tcg_gen_movi_i32(cpu_cc_op, CC_OP_SARB + ot); else tcg_gen_movi_i32(cpu_cc_op, CC_OP_SHLB + ot); - + gen_set_label(shift_label); s->cc_op = CC_OP_DYNAMIC; /* cannot predict flags after */
@@ -1476,7 +1476,7 @@ static void gen_shift_rm_im(DisasContext *s, int ot, int op1, int op2, int is_right, int is_arith) { int mask; - + if (ot == OT_QUAD) mask = 0x3f; else @@ -1511,7 +1511,7 @@ static void gen_shift_rm_im(DisasContext *s, int ot, int op1, int op2, gen_op_st_T0_A0(ot + s->mem_index); else gen_op_mov_reg_T0(ot, op1); - + /* update eflags if non zero shift */ if (op2 != 0) { tcg_gen_mov_tl(cpu_cc_src, cpu_tmp4); @@ -1531,7 +1531,7 @@ static inline void tcg_gen_lshift(TCGv ret, TCGv arg1, target_long arg2) tcg_gen_shri_tl(ret, arg1, -arg2); }
-static void gen_rot_rm_T1(DisasContext *s, int ot, int op1, +static void gen_rot_rm_T1(DisasContext *s, int ot, int op1, int is_right) { target_ulong mask; @@ -1565,12 +1565,12 @@ static void gen_rot_rm_T1(DisasContext *s, int ot, int op1, shifts. */ label1 = gen_new_label(); tcg_gen_brcondi_tl(TCG_COND_EQ, t1, 0, label1); - + if (ot <= OT_WORD) tcg_gen_andi_tl(cpu_tmp0, t1, (1 << (3 + ot)) - 1); else tcg_gen_mov_tl(cpu_tmp0, t1); - + gen_extu(ot, t0); tcg_gen_mov_tl(t2, t0);
@@ -1595,7 +1595,7 @@ static void gen_rot_rm_T1(DisasContext *s, int ot, int op1, } else { gen_op_mov_reg_v(ot, op1, t0); } - + /* update eflags */ if (s->cc_op != CC_OP_DYNAMIC) gen_op_set_cc_op(s->cc_op); @@ -1614,10 +1614,10 @@ static void gen_rot_rm_T1(DisasContext *s, int ot, int op1, } tcg_gen_andi_tl(t0, t0, CC_C); tcg_gen_or_tl(cpu_cc_src, cpu_cc_src, t0); - + tcg_gen_discard_tl(cpu_cc_dst); tcg_gen_movi_i32(cpu_cc_op, CC_OP_EFLAGS); - + gen_set_label(label2); s->cc_op = CC_OP_DYNAMIC; /* cannot predict flags after */
@@ -1705,7 +1705,7 @@ static void gen_rot_rm_im(DisasContext *s, int ot, int op1, int op2, }
/* XXX: add faster immediate = 1 case */ -static void gen_rotc_rm_T1(DisasContext *s, int ot, int op1, +static void gen_rotc_rm_T1(DisasContext *s, int ot, int op1, int is_right) { int label1; @@ -1718,7 +1718,7 @@ static void gen_rotc_rm_T1(DisasContext *s, int ot, int op1, gen_op_ld_T0_A0(ot + s->mem_index); else gen_op_mov_TN_reg(ot, 0, op1); - + if (is_right) { switch (ot) { case 0: gen_helper_rcrb(cpu_T[0], cpu_T[0], cpu_T[1]); break; @@ -1751,13 +1751,13 @@ static void gen_rotc_rm_T1(DisasContext *s, int ot, int op1, tcg_gen_mov_tl(cpu_cc_src, cpu_cc_tmp); tcg_gen_discard_tl(cpu_cc_dst); tcg_gen_movi_i32(cpu_cc_op, CC_OP_EFLAGS); - + gen_set_label(label1); s->cc_op = CC_OP_DYNAMIC; /* cannot predict flags after */ }
/* XXX: add faster immediate case */ -static void gen_shiftd_rm_T1_T3(DisasContext *s, int ot, int op1, +static void gen_shiftd_rm_T1_T3(DisasContext *s, int ot, int op1, int is_right) { int label1, label2, data_bits; @@ -1791,7 +1791,7 @@ static void gen_shiftd_rm_T1_T3(DisasContext *s, int ot, int op1, shifts. */ label1 = gen_new_label(); tcg_gen_brcondi_tl(TCG_COND_EQ, t2, 0, label1); - + tcg_gen_addi_tl(cpu_tmp5, t2, -1); if (ot == OT_WORD) { /* Note: we implement the Intel behaviour for shift count > 16 */ @@ -1802,7 +1802,7 @@ static void gen_shiftd_rm_T1_T3(DisasContext *s, int ot, int op1, tcg_gen_ext32u_tl(t0, t0);
tcg_gen_shr_tl(cpu_tmp4, t0, cpu_tmp5); - + /* only needed if count > 16, but a test would complicate */ tcg_gen_subfi_tl(cpu_tmp5, 32, t2); tcg_gen_shl_tl(cpu_tmp0, t0, cpu_tmp5); @@ -1816,7 +1816,7 @@ static void gen_shiftd_rm_T1_T3(DisasContext *s, int ot, int op1, tcg_gen_shli_tl(t1, t1, 16); tcg_gen_or_tl(t1, t1, t0); tcg_gen_ext32u_tl(t1, t1); - + tcg_gen_shl_tl(cpu_tmp4, t0, cpu_tmp5); tcg_gen_subfi_tl(cpu_tmp0, 32, cpu_tmp5); tcg_gen_shr_tl(cpu_tmp5, t1, cpu_tmp0); @@ -1839,13 +1839,13 @@ static void gen_shiftd_rm_T1_T3(DisasContext *s, int ot, int op1, tcg_gen_subfi_tl(cpu_tmp5, data_bits, t2); tcg_gen_shl_tl(t1, t1, cpu_tmp5); tcg_gen_or_tl(t0, t0, t1); - + } else { if (ot == OT_LONG) tcg_gen_ext32u_tl(t1, t1);
tcg_gen_shl_tl(cpu_tmp4, t0, cpu_tmp5); - + tcg_gen_shl_tl(t0, t0, t2); tcg_gen_subfi_tl(cpu_tmp5, data_bits, t2); tcg_gen_shr_tl(t1, t1, cpu_tmp5); @@ -1861,7 +1861,7 @@ static void gen_shiftd_rm_T1_T3(DisasContext *s, int ot, int op1, } else { gen_op_mov_reg_v(ot, op1, t0); } - + /* update eflags */ if (s->cc_op != CC_OP_DYNAMIC) gen_op_set_cc_op(s->cc_op); @@ -2291,7 +2291,7 @@ static inline void gen_jcc(DisasContext *s, int b, if (s->jmp_opt) { l1 = gen_new_label(); gen_jcc1(s, cc_op, b, l1); - + gen_goto_tb(s, 0, next_eip);
gen_set_label(l1); @@ -2344,17 +2344,17 @@ static void gen_setcc(DisasContext *s, int b)
static inline void gen_op_movl_T0_seg(int seg_reg) { - tcg_gen_ld32u_tl(cpu_T[0], cpu_env, + tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,segs[seg_reg].selector)); }
static inline void gen_op_movl_seg_T0_vm(int seg_reg) { tcg_gen_andi_tl(cpu_T[0], cpu_T[0], 0xffff); - tcg_gen_st32_tl(cpu_T[0], cpu_env, + tcg_gen_st32_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,segs[seg_reg].selector)); tcg_gen_shli_tl(cpu_T[0], cpu_T[0], 4); - tcg_gen_st_tl(cpu_T[0], cpu_env, + tcg_gen_st_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,segs[seg_reg].base)); }
@@ -2657,7 +2657,7 @@ static void gen_interrupt(DisasContext *s, int intno, if (s->cc_op != CC_OP_DYNAMIC) gen_op_set_cc_op(s->cc_op); gen_jmp_im(cur_eip); - gen_helper_raise_interrupt(tcg_const_i32(intno), + gen_helper_raise_interrupt(tcg_const_i32(intno), tcg_const_i32(next_eip - cur_eip)); s->is_jmp = DISAS_TB_JUMP; } @@ -3169,7 +3169,7 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) #endif { gen_ldst_modrm(s, modrm, OT_LONG, OR_TMP0, 0); - tcg_gen_addi_ptr(cpu_ptr0, cpu_env, + tcg_gen_addi_ptr(cpu_ptr0, cpu_env, offsetof(CPUX86State,fpregs[reg].mmx)); tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]); gen_helper_movl_mm_T0_mmx(cpu_ptr0, cpu_tmp2_i32); @@ -3179,14 +3179,14 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) #ifdef TARGET_X86_64 if (s->dflag == 2) { gen_ldst_modrm(s, modrm, OT_QUAD, OR_TMP0, 0); - tcg_gen_addi_ptr(cpu_ptr0, cpu_env, + tcg_gen_addi_ptr(cpu_ptr0, cpu_env, offsetof(CPUX86State,xmm_regs[reg])); gen_helper_movq_mm_T0_xmm(cpu_ptr0, cpu_T[0]); } else #endif { gen_ldst_modrm(s, modrm, OT_LONG, OR_TMP0, 0); - tcg_gen_addi_ptr(cpu_ptr0, cpu_env, + tcg_gen_addi_ptr(cpu_ptr0, cpu_env, offsetof(CPUX86State,xmm_regs[reg])); tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]); gen_helper_movl_mm_T0_xmm(cpu_ptr0, cpu_tmp2_i32); @@ -3337,13 +3337,13 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) case 0x7e: /* movd ea, mm */ #ifdef TARGET_X86_64 if (s->dflag == 2) { - tcg_gen_ld_i64(cpu_T[0], cpu_env, + tcg_gen_ld_i64(cpu_T[0], cpu_env, offsetof(CPUX86State,fpregs[reg].mmx)); gen_ldst_modrm(s, modrm, OT_QUAD, OR_TMP0, 1); } else #endif { - tcg_gen_ld32u_tl(cpu_T[0], cpu_env, + tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,fpregs[reg].mmx.MMX_L(0))); gen_ldst_modrm(s, modrm, OT_LONG, OR_TMP0, 1); } @@ -3351,13 +3351,13 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) case 0x17e: /* movd ea, xmm */ #ifdef TARGET_X86_64 if (s->dflag == 2) { - tcg_gen_ld_i64(cpu_T[0], cpu_env, + tcg_gen_ld_i64(cpu_T[0], cpu_env, offsetof(CPUX86State,xmm_regs[reg].XMM_Q(0))); gen_ldst_modrm(s, modrm, OT_QUAD, OR_TMP0, 1); } else #endif { - tcg_gen_ld32u_tl(cpu_T[0], cpu_env, + tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,xmm_regs[reg].XMM_L(0))); gen_ldst_modrm(s, modrm, OT_LONG, OR_TMP0, 1); } @@ -3476,7 +3476,7 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) break; case 0x050: /* movmskps */ rm = (modrm & 7) | REX_B(s); - tcg_gen_addi_ptr(cpu_ptr0, cpu_env, + tcg_gen_addi_ptr(cpu_ptr0, cpu_env, offsetof(CPUX86State,xmm_regs[rm])); gen_helper_movmskps(cpu_tmp2_i32, cpu_ptr0); tcg_gen_extu_i32_tl(cpu_T[0], cpu_tmp2_i32); @@ -3484,7 +3484,7 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) break; case 0x150: /* movmskpd */ rm = (modrm & 7) | REX_B(s); - tcg_gen_addi_ptr(cpu_ptr0, cpu_env, + tcg_gen_addi_ptr(cpu_ptr0, cpu_env, offsetof(CPUX86State,xmm_regs[rm])); gen_helper_movmskpd(cpu_tmp2_i32, cpu_ptr0); tcg_gen_extu_i32_tl(cpu_T[0], cpu_tmp2_i32); @@ -4625,12 +4625,12 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) gen_jmp_im(pc_start - s->cs_base); tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]); gen_helper_lcall_protected(cpu_tmp2_i32, cpu_T[1], - tcg_const_i32(dflag), + tcg_const_i32(dflag), tcg_const_i32(s->pc - pc_start)); } else { tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]); gen_helper_lcall_real(cpu_tmp2_i32, cpu_T[1], - tcg_const_i32(dflag), + tcg_const_i32(dflag), tcg_const_i32(s->pc - s->cs_base)); } gen_eob(s); @@ -4894,7 +4894,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) gen_lea_modrm(s, modrm, ®_addr, &offset_addr); gen_helper_cmpxchg16b(cpu_A0); } else -#endif +#endif { if (!(s->cpuid_features & CPUID_CX8)) goto illegal_op; @@ -5470,7 +5470,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) gen_helper_fildl_FT0(cpu_tmp2_i32); break; case 2: - tcg_gen_qemu_ld64(cpu_tmp1_i64, cpu_A0, + tcg_gen_qemu_ld64(cpu_tmp1_i64, cpu_A0, (s->mem_index >> 2) - 1); gen_helper_fldl_FT0(cpu_tmp1_i64); break; @@ -5509,7 +5509,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) gen_helper_fildl_ST0(cpu_tmp2_i32); break; case 2: - tcg_gen_qemu_ld64(cpu_tmp1_i64, cpu_A0, + tcg_gen_qemu_ld64(cpu_tmp1_i64, cpu_A0, (s->mem_index >> 2) - 1); gen_helper_fldl_ST0(cpu_tmp1_i64); break; @@ -5531,7 +5531,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) break; case 2: gen_helper_fisttll_ST0(cpu_tmp1_i64); - tcg_gen_qemu_st64(cpu_tmp1_i64, cpu_A0, + tcg_gen_qemu_st64(cpu_tmp1_i64, cpu_A0, (s->mem_index >> 2) - 1); break; case 3: @@ -5557,7 +5557,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) break; case 2: gen_helper_fstl_ST0(cpu_tmp1_i64); - tcg_gen_qemu_st64(cpu_tmp1_i64, cpu_A0, + tcg_gen_qemu_st64(cpu_tmp1_i64, cpu_A0, (s->mem_index >> 2) - 1); break; case 3: @@ -5639,13 +5639,13 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) gen_helper_fpop(); break; case 0x3d: /* fildll */ - tcg_gen_qemu_ld64(cpu_tmp1_i64, cpu_A0, + tcg_gen_qemu_ld64(cpu_tmp1_i64, cpu_A0, (s->mem_index >> 2) - 1); gen_helper_fildll_ST0(cpu_tmp1_i64); break; case 0x3f: /* fistpll */ gen_helper_fistll_ST0(cpu_tmp1_i64); - tcg_gen_qemu_st64(cpu_tmp1_i64, cpu_A0, + tcg_gen_qemu_st64(cpu_tmp1_i64, cpu_A0, (s->mem_index >> 2) - 1); gen_helper_fpop(); break; @@ -6033,7 +6033,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) ot = dflag ? OT_LONG : OT_WORD; gen_op_mov_TN_reg(OT_WORD, 0, R_EDX); gen_op_andl_T0_ffff(); - gen_check_io(s, ot, pc_start - s->cs_base, + gen_check_io(s, ot, pc_start - s->cs_base, SVM_IOIO_TYPE_MASK | svm_is_rep(prefixes) | 4); if (prefixes & (PREFIX_REPZ | PREFIX_REPNZ)) { gen_repz_ins(s, ot, pc_start - s->cs_base, s->pc - s->cs_base); @@ -6224,7 +6224,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) if (s->cc_op != CC_OP_DYNAMIC) gen_op_set_cc_op(s->cc_op); gen_jmp_im(pc_start - s->cs_base); - gen_helper_iret_protected(tcg_const_i32(s->dflag), + gen_helper_iret_protected(tcg_const_i32(s->dflag), tcg_const_i32(s->pc - s->cs_base)); s->cc_op = CC_OP_EFLAGS; } @@ -7111,7 +7111,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) break; case 4: /* STGI */ if ((!(s->flags & HF_SVME_MASK) && - !(s->cpuid_ext3_features & CPUID_EXT3_SKINIT)) || + !(s->cpuid_ext3_features & CPUID_EXT3_SKINIT)) || !s->pe) goto illegal_op; if (s->cpl != 0) { @@ -7132,8 +7132,8 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) } break; case 6: /* SKINIT */ - if ((!(s->flags & HF_SVME_MASK) && - !(s->cpuid_ext3_features & CPUID_EXT3_SKINIT)) || + if ((!(s->flags & HF_SVME_MASK) && + !(s->cpuid_ext3_features & CPUID_EXT3_SKINIT)) || !s->pe) goto illegal_op; gen_helper_skinit(); diff --git a/qemu-0.15.x/target-microblaze/mmu.c b/qemu-0.15.x/target-microblaze/mmu.c index 281fc8d..5968ae7 100644 --- a/qemu-0.15.x/target-microblaze/mmu.c +++ b/qemu-0.15.x/target-microblaze/mmu.c @@ -55,7 +55,7 @@ static void mmu_flush_idx(CPUState *env, unsigned int idx) } }
-static void mmu_change_pid(CPUState *env, unsigned int newpid) +static void mmu_change_pid(CPUState *env, unsigned int newpid) { struct microblaze_mmu *mmu = &env->mmu; unsigned int i; diff --git a/qemu-0.15.x/target-microblaze/translate.c b/qemu-0.15.x/target-microblaze/translate.c index 31e8306..99ca4a9 100644 --- a/qemu-0.15.x/target-microblaze/translate.c +++ b/qemu-0.15.x/target-microblaze/translate.c @@ -676,7 +676,7 @@ static void dec_div(DisasContext *dc) { unsigned int u;
- u = dc->imm & 2; + u = dc->imm & 2; LOG_DIS("div\n");
if ((dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK) @@ -1859,13 +1859,13 @@ CPUState *cpu_mb_init (const char *cpu_model)
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
- env_debug = tcg_global_mem_new(TCG_AREG0, + env_debug = tcg_global_mem_new(TCG_AREG0, offsetof(CPUState, debug), "debug0"); - env_iflags = tcg_global_mem_new(TCG_AREG0, + env_iflags = tcg_global_mem_new(TCG_AREG0, offsetof(CPUState, iflags), "iflags"); - env_imm = tcg_global_mem_new(TCG_AREG0, + env_imm = tcg_global_mem_new(TCG_AREG0, offsetof(CPUState, imm), "imm"); env_btarget = tcg_global_mem_new(TCG_AREG0, diff --git a/qemu-0.15.x/target-mips/op_helper.c b/qemu-0.15.x/target-mips/op_helper.c index 01315ef..82634fe 100644 --- a/qemu-0.15.x/target-mips/op_helper.c +++ b/qemu-0.15.x/target-mips/op_helper.c @@ -51,7 +51,7 @@ static void do_restore_state (void *pc_ptr) { TranslationBlock *tb; unsigned long pc = (unsigned long) pc_ptr; - + tb = tb_find_pc (pc); if (tb) { cpu_restore_state(tb, env, pc); diff --git a/qemu-0.15.x/target-ppc/translate_init.c b/qemu-0.15.x/target-ppc/translate_init.c index f542b8e..1a325fb 100644 --- a/qemu-0.15.x/target-ppc/translate_init.c +++ b/qemu-0.15.x/target-ppc/translate_init.c @@ -4552,7 +4552,7 @@ static void init_proc_601 (CPUPPCState *env) 0x00000000); /* Memory management */ init_excp_601(env); - /* XXX: beware that dcache line size is 64 + /* XXX: beware that dcache line size is 64 * but dcbz uses 32 bytes "sectors" * XXX: this breaks clcs instruction ! */ diff --git a/qemu-0.15.x/target-sh4/helper.c b/qemu-0.15.x/target-sh4/helper.c index 20e9b13..37209bf 100644 --- a/qemu-0.15.x/target-sh4/helper.c +++ b/qemu-0.15.x/target-sh4/helper.c @@ -719,7 +719,7 @@ void cpu_sh4_write_mmaped_utlb_addr(CPUSH4State *s, target_phys_addr_t addr,
if (needs_tlb_flush) tlb_flush_page(s, vpn << 10); - + } else { int index = (addr & 0x00003f00) >> 8; tlb_t * entry = &s->utlb[index]; diff --git a/qemu-0.15.x/target-sh4/op_helper.c b/qemu-0.15.x/target-sh4/op_helper.c index a932225..c3c8202 100644 --- a/qemu-0.15.x/target-sh4/op_helper.c +++ b/qemu-0.15.x/target-sh4/op_helper.c @@ -156,7 +156,7 @@ void helper_discard_movcal_backup(void) env->movcal_backup = current = next; if (current == NULL) env->movcal_backup_tail = &(env->movcal_backup); - } + } }
void helper_ocbi(uint32_t address) @@ -169,7 +169,7 @@ void helper_ocbi(uint32_t address) { memory_content *next = (*current)->next; stl(a, (*current)->value); - + if (next == NULL) { env->movcal_backup_tail = current; diff --git a/qemu-0.15.x/target-sh4/translate.c b/qemu-0.15.x/target-sh4/translate.c index 569bc73..3f8050b 100644 --- a/qemu-0.15.x/target-sh4/translate.c +++ b/qemu-0.15.x/target-sh4/translate.c @@ -1596,7 +1596,7 @@ static void _decode_opc(DisasContext * ctx) { TCGv val = tcg_temp_new(); tcg_gen_qemu_ld32u(val, REG(B11_8), ctx->memidx); - gen_helper_movcal (REG(B11_8), val); + gen_helper_movcal (REG(B11_8), val); tcg_gen_qemu_st32(REG(0), REG(B11_8), ctx->memidx); } ctx->has_movcal = 1; diff --git a/qemu-0.15.x/tcg/README b/qemu-0.15.x/tcg/README index cfdfd96..396bb58 100644 --- a/qemu-0.15.x/tcg/README +++ b/qemu-0.15.x/tcg/README @@ -4,7 +4,7 @@ Tiny Code Generator - Fabrice Bellard.
TCG (Tiny Code Generator) began as a generic backend for a C compiler. It was simplified to be used in QEMU. It also has its roots -in the QOP code generator written by Paul Brook. +in the QOP code generator written by Paul Brook.
2) Definitions
@@ -30,7 +30,7 @@ or a memory location which is stored in a register outside QEMU TBs (not implemented yet).
A TCG "basic block" corresponds to a list of instructions terminated -by a branch instruction. +by a branch instruction.
3) Intermediate representation
@@ -99,7 +99,7 @@ optimizations: - Single instructions are simplified, e.g.
and_i32 t0, t0, $0xffffffff - + is suppressed.
- A liveness analysis is done at the basic block level. The @@ -337,7 +337,7 @@ ld32s_i64 t0, t1, offset ld32u_i64 t0, t1, offset
t0 = read(t1 + offset) -Load 8, 16, 32 or 64 bits with or without sign extension from host memory. +Load 8, 16, 32 or 64 bits with or without sign extension from host memory. offset must be a constant.
* st_i32/i64 t0, t1, offset @@ -475,7 +475,7 @@ register. - The stack grows downwards. - The first N parameters are passed in registers. - The next parameters are passed on the stack by storing them as words. -- Some registers are clobbered during the call. +- Some registers are clobbered during the call. - The function can return 0 or 1 value in registers. On a 32 bit target, functions must be able to return 2 values in registers for 64 bit return type. diff --git a/qemu-0.15.x/tcg/TODO b/qemu-0.15.x/tcg/TODO index 0747847..2bc2785 100644 --- a/qemu-0.15.x/tcg/TODO +++ b/qemu-0.15.x/tcg/TODO @@ -1,6 +1,6 @@ - Add new instructions such as: clz, ctz, popcnt.
-- See if it is worth exporting mul2, mulu2, div2, divu2. +- See if it is worth exporting mul2, mulu2, div2, divu2.
- Support of globals saved in fixed registers between TBs.
diff --git a/qemu-0.15.x/tcg/i386/tcg-target.h b/qemu-0.15.x/tcg/i386/tcg-target.h index bfafbfc..9bf970b 100644 --- a/qemu-0.15.x/tcg/i386/tcg-target.h +++ b/qemu-0.15.x/tcg/i386/tcg-target.h @@ -70,7 +70,7 @@ enum { #define TCG_CT_CONST_U32 0x200
/* used for function call generation */ -#define TCG_REG_CALL_STACK TCG_REG_ESP +#define TCG_REG_CALL_STACK TCG_REG_ESP #define TCG_TARGET_STACK_ALIGN 16 #define TCG_TARGET_CALL_STACK_OFFSET 0
diff --git a/qemu-0.15.x/tcg/tcg-op.h b/qemu-0.15.x/tcg/tcg-op.h index ebf5e13..5bf8217 100644 --- a/qemu-0.15.x/tcg/tcg-op.h +++ b/qemu-0.15.x/tcg/tcg-op.h @@ -1456,7 +1456,7 @@ static inline void tcg_gen_bswap16_i32(TCGv_i32 ret, TCGv_i32 arg) tcg_gen_op2_i32(INDEX_op_bswap16_i32, ret, arg); #else TCGv_i32 t0 = tcg_temp_new_i32(); - + tcg_gen_ext8u_i32(t0, arg); tcg_gen_shli_i32(t0, t0, 8); tcg_gen_shri_i32(ret, arg, 8); @@ -1473,17 +1473,17 @@ static inline void tcg_gen_bswap32_i32(TCGv_i32 ret, TCGv_i32 arg) TCGv_i32 t0, t1; t0 = tcg_temp_new_i32(); t1 = tcg_temp_new_i32(); - + tcg_gen_shli_i32(t0, arg, 24); - + tcg_gen_andi_i32(t1, arg, 0x0000ff00); tcg_gen_shli_i32(t1, t1, 8); tcg_gen_or_i32(t0, t0, t1); - + tcg_gen_shri_i32(t1, arg, 8); tcg_gen_andi_i32(t1, t1, 0x0000ff00); tcg_gen_or_i32(t0, t0, t1); - + tcg_gen_shri_i32(t1, arg, 24); tcg_gen_or_i32(ret, t0, t1); tcg_temp_free_i32(t0); @@ -1703,13 +1703,13 @@ static inline void tcg_gen_bswap64_i64(TCGv_i64 ret, TCGv_i64 arg) #else TCGv_i64 t0 = tcg_temp_new_i64(); TCGv_i64 t1 = tcg_temp_new_i64(); - + tcg_gen_shli_i64(t0, arg, 56); - + tcg_gen_andi_i64(t1, arg, 0x0000ff00); tcg_gen_shli_i64(t1, t1, 40); tcg_gen_or_i64(t0, t0, t1); - + tcg_gen_andi_i64(t1, arg, 0x00ff0000); tcg_gen_shli_i64(t1, t1, 24); tcg_gen_or_i64(t0, t0, t1); @@ -1721,7 +1721,7 @@ static inline void tcg_gen_bswap64_i64(TCGv_i64 ret, TCGv_i64 arg) tcg_gen_shri_i64(t1, arg, 8); tcg_gen_andi_i64(t1, t1, 0xff000000); tcg_gen_or_i64(t0, t0, t1); - + tcg_gen_shri_i64(t1, arg, 24); tcg_gen_andi_i64(t1, t1, 0x00ff0000); tcg_gen_or_i64(t0, t0, t1); @@ -2169,7 +2169,7 @@ static inline void tcg_gen_debug_insn_start(uint64_t pc) { /* XXX: must really use a 32 bit size for TCGArg in all cases */ #if TARGET_LONG_BITS > TCG_TARGET_REG_BITS - tcg_gen_op2ii(INDEX_op_debug_insn_start, + tcg_gen_op2ii(INDEX_op_debug_insn_start, (uint32_t)(pc), (uint32_t)(pc >> 32)); #else tcg_gen_op1i(INDEX_op_debug_insn_start, pc); diff --git a/qemu-0.15.x/tcg/tcg.c b/qemu-0.15.x/tcg/tcg.c index c05413b..a59b8ae 100644 --- a/qemu-0.15.x/tcg/tcg.c +++ b/qemu-0.15.x/tcg/tcg.c @@ -64,7 +64,7 @@
static void tcg_target_init(TCGContext *s); static void tcg_target_qemu_prologue(TCGContext *s); -static void patch_reloc(uint8_t *code_ptr, int type, +static void patch_reloc(uint8_t *code_ptr, int type, tcg_target_long value, tcg_target_long addend);
static TCGOpDef tcg_op_defs[] = { @@ -108,7 +108,7 @@ static void tcg_out_reloc(TCGContext *s, uint8_t *code_ptr, int type, l = &s->labels[label_index]; if (l->has_value) { /* FIXME: This may break relocations on RISC targets that - modify instruction fields in place. The caller may not have + modify instruction fields in place. The caller may not have written the initial value. */ patch_reloc(code_ptr, type, l->u.value, addend); } else { @@ -122,7 +122,7 @@ static void tcg_out_reloc(TCGContext *s, uint8_t *code_ptr, int type, } }
-static void tcg_out_label(TCGContext *s, int label_index, +static void tcg_out_label(TCGContext *s, int label_index, tcg_target_long value) { TCGLabel *l; @@ -162,7 +162,7 @@ void *tcg_malloc_internal(TCGContext *s, int size) { TCGPool *p; int pool_size; - + if (size > TCG_POOL_CHUNK_SIZE) { /* big malloc: insert a new pool (XXX: could optimize) */ p = qemu_malloc(sizeof(TCGPool) + size); @@ -185,7 +185,7 @@ void *tcg_malloc_internal(TCGContext *s, int size) p = qemu_malloc(sizeof(TCGPool) + pool_size); p->size = pool_size; p->next = NULL; - if (s->pool_current) + if (s->pool_current) s->pool_current->next = p; else s->pool_first = p; @@ -216,7 +216,7 @@ void tcg_context_init(TCGContext *s) memset(s, 0, sizeof(*s)); s->temps = s->static_temps; s->nb_globals = 0; - + /* Count total number of arguments and allocate the corresponding space */ total_args = 0; @@ -237,7 +237,7 @@ void tcg_context_init(TCGContext *s) sorted_args += n; args_ct += n; } - + tcg_target_init(s); }
@@ -247,7 +247,7 @@ void tcg_prologue_init(TCGContext *s) s->code_buf = code_gen_prologue; s->code_ptr = s->code_buf; tcg_target_qemu_prologue(s); - flush_icache_range((unsigned long)s->code_buf, + flush_icache_range((unsigned long)s->code_buf, (unsigned long)s->code_ptr); }
@@ -781,7 +781,7 @@ static char *tcg_get_arg_str_idx(TCGContext *s, char *buf, int buf_size, if (idx < s->nb_globals) { pstrcpy(buf, buf_size, ts->name); } else { - if (ts->temp_local) + if (ts->temp_local) snprintf(buf, buf_size, "loc%d", idx - s->nb_globals); else snprintf(buf, buf_size, "tmp%d", idx - s->nb_globals); @@ -819,7 +819,7 @@ static TCGHelperInfo *tcg_find_helper(TCGContext *s, tcg_target_ulong val) tcg_target_ulong v;
if (unlikely(!s->helpers_sorted)) { - qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo), + qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo), helper_cmp); s->helpers_sorted = 1; } @@ -879,7 +879,7 @@ void tcg_dump_ops(TCGContext *s, FILE *outfile) #else pc = args[0]; #endif - if (!first_insn) + if (!first_insn) fprintf(outfile, "\n"); fprintf(outfile, " ---- 0x%" PRIx64, pc); first_insn = 0; @@ -919,7 +919,7 @@ void tcg_dump_ops(TCGContext *s, FILE *outfile) tcg_get_arg_str_idx(s, buf, sizeof(buf), args[nb_oargs + i])); } } - } else if (c == INDEX_op_movi_i32 + } else if (c == INDEX_op_movi_i32 #if TCG_TARGET_REG_BITS == 64 || c == INDEX_op_movi_i64 #endif @@ -930,7 +930,7 @@ void tcg_dump_ops(TCGContext *s, FILE *outfile) nb_oargs = def->nb_oargs; nb_iargs = def->nb_iargs; nb_cargs = def->nb_cargs; - fprintf(outfile, " %s %s,$", def->name, + fprintf(outfile, " %s %s,$", def->name, tcg_get_arg_str_idx(s, buf, sizeof(buf), args[0])); val = args[1]; th = tcg_find_helper(s, val); @@ -954,7 +954,7 @@ void tcg_dump_ops(TCGContext *s, FILE *outfile) nb_iargs = def->nb_iargs; nb_cargs = def->nb_cargs; } - + k = 0; for(i = 0; i < nb_oargs; i++) { if (k != 0) @@ -1152,7 +1152,7 @@ void tcg_add_target_add_op_defs(const TCGTargetOpDef *tdefs) #ifdef USE_LIVENESS_ANALYSIS
/* set a nop for an operation using 'nb_args' */ -static inline void tcg_set_nop(TCGContext *s, uint16_t *opc_ptr, +static inline void tcg_set_nop(TCGContext *s, uint16_t *opc_ptr, TCGArg *args, int nb_args) { if (nb_args == 0) { @@ -1203,13 +1203,13 @@ static void tcg_liveness_analysis(TCGContext *s) const TCGOpDef *def; uint8_t *dead_temps; unsigned int dead_args; - + gen_opc_ptr++; /* skip end */
nb_ops = gen_opc_ptr - gen_opc_buf;
s->op_dead_args = tcg_malloc(nb_ops * sizeof(uint16_t)); - + dead_temps = tcg_malloc(s->nb_temps); memset(dead_temps, 1, s->nb_temps);
@@ -1238,7 +1238,7 @@ static void tcg_liveness_analysis(TCGContext *s) if (!dead_temps[arg]) goto do_not_remove_call; } - tcg_set_nop(s, gen_opc_buf + op_index, + tcg_set_nop(s, gen_opc_buf + op_index, args - 1, nb_args); } else { do_not_remove_call: @@ -1252,7 +1252,7 @@ static void tcg_liveness_analysis(TCGContext *s) } dead_temps[arg] = 1; } - + if (!(call_flags & TCG_CALL_CONST)) { /* globals are live (they may be used by the call) */ memset(dead_temps, 0, s->nb_globals); @@ -1394,8 +1394,8 @@ static void dump_regs(TCGContext *s)
for(i = 0; i < TCG_TARGET_NB_REGS; i++) { if (s->reg_to_temp[i] >= 0) { - printf("%s: %s\n", - tcg_target_reg_names[i], + printf("%s: %s\n", + tcg_target_reg_names[i], tcg_get_arg_str_idx(s, buf, sizeof(buf), s->reg_to_temp[i])); } } @@ -1413,7 +1413,7 @@ static void check_regs(TCGContext *s) ts = &s->temps[k]; if (ts->val_type != TEMP_VAL_REG || ts->reg != reg) { - printf("Inconsistency for register %s:\n", + printf("Inconsistency for register %s:\n", tcg_target_reg_names[reg]); goto fail; } @@ -1424,7 +1424,7 @@ static void check_regs(TCGContext *s) if (ts->val_type == TEMP_VAL_REG && !ts->fixed_reg && s->reg_to_temp[ts->reg] != k) { - printf("Inconsistency for temp %s:\n", + printf("Inconsistency for temp %s:\n", tcg_get_arg_str_idx(s, buf, sizeof(buf), k)); fail: printf("reg state:\n"); @@ -1465,7 +1465,7 @@ static void tcg_reg_free(TCGContext *s, int reg) ts = &s->temps[temp]; assert(ts->val_type == TEMP_VAL_REG); if (!ts->mem_coherent) { - if (!ts->mem_allocated) + if (!ts->mem_allocated) temp_allocate_frame(s, temp); tcg_out_st(s, ts->type, reg, ts->mem_reg, ts->mem_offset); } @@ -1518,9 +1518,9 @@ static void temp_save(TCGContext *s, int temp, TCGRegSet allocated_regs) ts->val_type = TEMP_VAL_MEM; break; case TEMP_VAL_CONST: - reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], + reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], allocated_regs); - if (!ts->mem_allocated) + if (!ts->mem_allocated) temp_allocate_frame(s, temp); tcg_out_movi(s, ts->type, reg, ts->val); tcg_out_st(s, ts->type, reg, ts->mem_reg, ts->mem_offset); @@ -1650,7 +1650,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def, ots->mem_coherent = 0; }
-static void tcg_reg_alloc_op(TCGContext *s, +static void tcg_reg_alloc_op(TCGContext *s, const TCGOpDef *def, TCGOpcode opc, const TCGArg *args, unsigned int dead_args) @@ -1667,11 +1667,11 @@ static void tcg_reg_alloc_op(TCGContext *s, nb_iargs = def->nb_iargs;
/* copy constants */ - memcpy(new_args + nb_oargs + nb_iargs, - args + nb_oargs + nb_iargs, + memcpy(new_args + nb_oargs + nb_iargs, + args + nb_oargs + nb_iargs, sizeof(TCGArg) * def->nb_cargs);
- /* satisfy input constraints */ + /* satisfy input constraints */ tcg_regset_set(allocated_regs, s->reserved_regs); for(k = 0; k < nb_iargs; k++) { i = def->sorted_args[nb_oargs + k]; @@ -1722,7 +1722,7 @@ static void tcg_reg_alloc_op(TCGContext *s, /* nothing to do : the constraint is satisfied */ } else { allocate_in_reg: - /* allocate a new register matching the constraint + /* allocate a new register matching the constraint and move the temporary register into it */ reg = tcg_reg_alloc(s, arg_ct->u.regs, allocated_regs); tcg_out_mov(s, ts->type, reg, ts->reg); @@ -1732,7 +1732,7 @@ static void tcg_reg_alloc_op(TCGContext *s, tcg_regset_set_reg(allocated_regs, reg); iarg_end: ; } - + if (def->flags & TCG_OPF_BB_END) { tcg_reg_alloc_bb_end(s, allocated_regs); } else { @@ -1748,9 +1748,9 @@ static void tcg_reg_alloc_op(TCGContext *s, } } } - + if (def->flags & TCG_OPF_CALL_CLOBBER) { - /* XXX: permit generic clobber register list ? */ + /* XXX: permit generic clobber register list ? */ for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) { if (tcg_regset_test_reg(tcg_target_call_clobber_regs, reg)) { tcg_reg_free(s, reg); @@ -1758,12 +1758,12 @@ static void tcg_reg_alloc_op(TCGContext *s, } /* XXX: for load/store we could do that only for the slow path (i.e. when a memory callback is called) */ - + /* store globals and free associated registers (we assume the insn can modify any global. */ save_globals(s, allocated_regs); } - + /* satisfy the output constraints */ tcg_regset_set(allocated_regs, s->reserved_regs); for(k = 0; k < nb_oargs; k++) { @@ -1805,7 +1805,7 @@ static void tcg_reg_alloc_op(TCGContext *s,
/* emit instruction */ tcg_out_op(s, opc, new_args, const_args); - + /* move the outputs in the correct register if needed */ for(i = 0; i < nb_oargs; i++) { ts = &s->temps[args[i]]; @@ -1848,7 +1848,7 @@ static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def,
/* assign stack slots first */ call_stack_size = (nb_params - nb_regs) * sizeof(tcg_target_long); - call_stack_size = (call_stack_size + TCG_TARGET_STACK_ALIGN - 1) & + call_stack_size = (call_stack_size + TCG_TARGET_STACK_ALIGN - 1) & ~(TCG_TARGET_STACK_ALIGN - 1); allocate_args = (call_stack_size > TCG_STATIC_CALL_ARGS_SIZE); if (allocate_args) { @@ -1868,13 +1868,13 @@ static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def, if (ts->val_type == TEMP_VAL_REG) { tcg_out_st(s, ts->type, ts->reg, TCG_REG_CALL_STACK, stack_offset); } else if (ts->val_type == TEMP_VAL_MEM) { - reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], + reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], s->reserved_regs); /* XXX: not correct if reading values from the stack */ tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset); tcg_out_st(s, ts->type, reg, TCG_REG_CALL_STACK, stack_offset); } else if (ts->val_type == TEMP_VAL_CONST) { - reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], + reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], s->reserved_regs); /* XXX: sign extend may be needed on some targets */ tcg_out_movi(s, ts->type, reg, ts->val); @@ -1887,7 +1887,7 @@ static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def, stack_offset += sizeof(tcg_target_long); #endif } - + /* assign input registers */ tcg_regset_set(allocated_regs, s->reserved_regs); for(i = 0; i < nb_regs; i++) { @@ -1911,7 +1911,7 @@ static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def, tcg_regset_set_reg(allocated_regs, reg); } } - + /* assign function address */ func_arg = args[nb_oargs + nb_iargs - 1]; arg_ct = &def->args_ct[0]; @@ -1944,8 +1944,8 @@ static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def, } else { tcg_abort(); } - - + + /* mark dead temporaries and free the associated registers */ for(i = nb_oargs; i < nb_iargs + nb_oargs; i++) { arg = args[i]; @@ -1958,14 +1958,14 @@ static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def, } } } - + /* clobber call registers */ for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) { if (tcg_regset_test_reg(tcg_target_call_clobber_regs, reg)) { tcg_reg_free(s, reg); } } - + /* store globals and free associated registers (we assume the call can modify any global. */ if (!(flags & TCG_CALL_CONST)) { @@ -1997,7 +1997,7 @@ static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def, } } } - + return nb_iargs + nb_oargs + def->nb_cargs + 1; }
@@ -2158,7 +2158,7 @@ int tcg_gen_code(TCGContext *s, uint8_t *gen_code_buf) tcg_gen_code_common(s, gen_code_buf, -1);
/* flush instruction cache */ - flush_icache_range((unsigned long)gen_code_buf, + flush_icache_range((unsigned long)gen_code_buf, (unsigned long)s->code_ptr); return s->code_ptr - gen_code_buf; } @@ -2181,33 +2181,33 @@ void tcg_dump_info(FILE *f, fprintf_function cpu_fprintf) tot = s->interm_time + s->code_time; cpu_fprintf(f, "JIT cycles %" PRId64 " (%0.3f s at 2.4 GHz)\n", tot, tot / 2.4e9); - cpu_fprintf(f, "translated TBs %" PRId64 " (aborted=%" PRId64 " %0.1f%%)\n", - s->tb_count, + cpu_fprintf(f, "translated TBs %" PRId64 " (aborted=%" PRId64 " %0.1f%%)\n", + s->tb_count, s->tb_count1 - s->tb_count, s->tb_count1 ? (double)(s->tb_count1 - s->tb_count) / s->tb_count1 * 100.0 : 0); - cpu_fprintf(f, "avg ops/TB %0.1f max=%d\n", + cpu_fprintf(f, "avg ops/TB %0.1f max=%d\n", s->tb_count ? (double)s->op_count / s->tb_count : 0, s->op_count_max); cpu_fprintf(f, "deleted ops/TB %0.2f\n", - s->tb_count ? + s->tb_count ? (double)s->del_op_count / s->tb_count : 0); cpu_fprintf(f, "avg temps/TB %0.2f max=%d\n", - s->tb_count ? + s->tb_count ? (double)s->temp_count / s->tb_count : 0, s->temp_count_max); - - cpu_fprintf(f, "cycles/op %0.1f\n", + + cpu_fprintf(f, "cycles/op %0.1f\n", s->op_count ? (double)tot / s->op_count : 0); - cpu_fprintf(f, "cycles/in byte %0.1f\n", + cpu_fprintf(f, "cycles/in byte %0.1f\n", s->code_in_len ? (double)tot / s->code_in_len : 0); - cpu_fprintf(f, "cycles/out byte %0.1f\n", + cpu_fprintf(f, "cycles/out byte %0.1f\n", s->code_out_len ? (double)tot / s->code_out_len : 0); if (tot == 0) tot = 1; - cpu_fprintf(f, " gen_interm time %0.1f%%\n", + cpu_fprintf(f, " gen_interm time %0.1f%%\n", (double)s->interm_time / tot * 100.0); - cpu_fprintf(f, " gen_code time %0.1f%%\n", + cpu_fprintf(f, " gen_code time %0.1f%%\n", (double)s->code_time / tot * 100.0); - cpu_fprintf(f, "liveness/code time %0.1f%%\n", + cpu_fprintf(f, "liveness/code time %0.1f%%\n", (double)s->la_time / (s->code_time ? s->code_time : 1) * 100.0); cpu_fprintf(f, "cpu_restore count %" PRId64 "\n", s->restore_count); diff --git a/qemu-0.15.x/tcg/tcg.h b/qemu-0.15.x/tcg/tcg.h index a2dd8b8..bd45c81 100644 --- a/qemu-0.15.x/tcg/tcg.h +++ b/qemu-0.15.x/tcg/tcg.h @@ -70,7 +70,7 @@ typedef struct TCGRelocation { int type; uint8_t *ptr; tcg_target_long addend; -} TCGRelocation; +} TCGRelocation;
typedef struct TCGLabel { int has_value; @@ -207,7 +207,7 @@ typedef int TCGv_i64; /* A pure function only reads its arguments and TCG global variables and cannot raise exceptions. Hence a call to a pure function can be safely suppressed if the return value is not used. */ -#define TCG_CALL_PURE 0x0010 +#define TCG_CALL_PURE 0x0010 /* A const function only reads its arguments and does not use TCG global variables. Hence a call to such a function does not save TCG global variables back to their canonical location. */ @@ -291,7 +291,7 @@ struct TCGContext { int nb_globals; int nb_temps; /* index of free temps, -1 if none */ - int first_free_temp[TCG_TYPE_COUNT * 2]; + int first_free_temp[TCG_TYPE_COUNT * 2];
/* goto_tb support */ uint8_t *code_buf; @@ -302,7 +302,7 @@ struct TCGContext { /* liveness analysis */ uint16_t *op_dead_args; /* for each operation, each bit tells if the corresponding argument is dead */ - + /* tells in which temporary a given register is. It does not take into account fixed registers */ int reg_to_temp[TCG_TARGET_NB_REGS]; @@ -442,7 +442,7 @@ typedef struct TCGArgConstraint {
#define TCG_OPF_BB_END 0x01 /* instruction defines the end of a basic block */ -#define TCG_OPF_CALL_CLOBBER 0x02 /* instruction clobbers call registers +#define TCG_OPF_CALL_CLOBBER 0x02 /* instruction clobbers call registers and potentially update globals. */ #define TCG_OPF_SIDE_EFFECTS 0x04 /* instruction has side effects : it cannot be removed if its output @@ -458,7 +458,7 @@ typedef struct TCGOpDef { int used; #endif } TCGOpDef; - + typedef struct TCGTargetOpDef { TCGOpcode op; const char *args_ct_str[TCG_MAX_OP_ARGS]; diff --git a/qemu-0.15.x/tests/test-mmap.c b/qemu-0.15.x/tests/test-mmap.c index c67174a..459742b 100644 --- a/qemu-0.15.x/tests/test-mmap.c +++ b/qemu-0.15.x/tests/test-mmap.c @@ -17,7 +17,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, see http://www.gnu.org/licenses/. */ @@ -63,15 +63,15 @@ void check_aligned_anonymous_unfixed_mmaps(void) size_t len;
len = pagesize + (pagesize * i & 7); - p1 = mmap(NULL, len, PROT_READ, + p1 = mmap(NULL, len, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - p2 = mmap(NULL, len, PROT_READ, + p2 = mmap(NULL, len, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - p3 = mmap(NULL, len, PROT_READ, + p3 = mmap(NULL, len, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - p4 = mmap(NULL, len, PROT_READ, + p4 = mmap(NULL, len, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - p5 = mmap(NULL, len, PROT_READ, + p5 = mmap(NULL, len, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
/* Make sure we get pages aligned with the pagesize. The @@ -118,7 +118,7 @@ void check_large_anonymous_unfixed_mmap(void) fprintf (stderr, "%s", __func__);
len = 0x02000000; - p1 = mmap(NULL, len, PROT_READ, + p1 = mmap(NULL, len, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
/* Make sure we get pages aligned with the pagesize. The @@ -145,14 +145,14 @@ void check_aligned_anonymous_unfixed_colliding_mmaps(void) for (i = 0; i < 0x2fff; i++) { int nlen; - p1 = mmap(NULL, pagesize, PROT_READ, + p1 = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); fail_unless (p1 != MAP_FAILED); p = (uintptr_t) p1; fail_unless ((p & pagemask) == 0); memcpy (dummybuf, p1, pagesize);
- p2 = mmap(NULL, pagesize, PROT_READ, + p2 = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); fail_unless (p2 != MAP_FAILED); p = (uintptr_t) p2; @@ -162,12 +162,12 @@ void check_aligned_anonymous_unfixed_colliding_mmaps(void)
munmap (p1, pagesize); nlen = pagesize * 8; - p3 = mmap(NULL, nlen, PROT_READ, + p3 = mmap(NULL, nlen, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); fail_unless (p3 != MAP_FAILED);
/* Check if the mmaped areas collide. */ - if (p3 < p2 + if (p3 < p2 && (p3 + nlen) > p2) fail_unless (0);
@@ -191,7 +191,7 @@ void check_aligned_anonymous_fixed_mmaps(void) int i;
/* Find a suitable address to start with. */ - addr = mmap(NULL, pagesize * 40, PROT_READ | PROT_WRITE, + addr = mmap(NULL, pagesize * 40, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); fprintf (stderr, "%s addr=%p", __func__, addr); @@ -200,10 +200,10 @@ void check_aligned_anonymous_fixed_mmaps(void) for (i = 0; i < 40; i++) { /* Create submaps within our unfixed map. */ - p1 = mmap(addr, pagesize, PROT_READ, + p1 = mmap(addr, pagesize, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); - /* Make sure we get pages aligned with the pagesize. + /* Make sure we get pages aligned with the pagesize. The target expects this. */ p = (uintptr_t) p1; fail_unless (p1 == addr); @@ -231,10 +231,10 @@ void check_aligned_anonymous_fixed_mmaps_collide_with_host(void) for (i = 0; i < 20; i++) { /* Create submaps within our unfixed map. */ - p1 = mmap(addr, pagesize, PROT_READ | PROT_WRITE, + p1 = mmap(addr, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); - /* Make sure we get pages aligned with the pagesize. + /* Make sure we get pages aligned with the pagesize. The target expects this. */ p = (uintptr_t) p1; fail_unless (p1 == addr); @@ -258,14 +258,14 @@ void check_file_unfixed_mmaps(void) size_t len;
len = pagesize; - p1 = mmap(NULL, len, PROT_READ, - MAP_PRIVATE, + p1 = mmap(NULL, len, PROT_READ, + MAP_PRIVATE, test_fd, 0); - p2 = mmap(NULL, len, PROT_READ, - MAP_PRIVATE, + p2 = mmap(NULL, len, PROT_READ, + MAP_PRIVATE, test_fd, pagesize); - p3 = mmap(NULL, len, PROT_READ, - MAP_PRIVATE, + p3 = mmap(NULL, len, PROT_READ, + MAP_PRIVATE, test_fd, pagesize * 2);
fail_unless (p1 != MAP_FAILED); @@ -307,9 +307,9 @@ void check_file_unfixed_eof_mmaps(void) fprintf (stderr, "%s", __func__); for (i = 0; i < 0x10; i++) { - p1 = mmap(NULL, pagesize, PROT_READ, - MAP_PRIVATE, - test_fd, + p1 = mmap(NULL, pagesize, PROT_READ, + MAP_PRIVATE, + test_fd, (test_fsize - sizeof *p1) & ~pagemask);
fail_unless (p1 != MAP_FAILED); @@ -339,7 +339,7 @@ void check_file_fixed_eof_mmaps(void) int i;
/* Find a suitable address to start with. */ - addr = mmap(NULL, pagesize * 44, PROT_READ, + addr = mmap(NULL, pagesize * 44, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
@@ -349,9 +349,9 @@ void check_file_fixed_eof_mmaps(void) for (i = 0; i < 0x10; i++) { /* Create submaps within our unfixed map. */ - p1 = mmap(addr, pagesize, PROT_READ, - MAP_PRIVATE | MAP_FIXED, - test_fd, + p1 = mmap(addr, pagesize, PROT_READ, + MAP_PRIVATE | MAP_FIXED, + test_fd, (test_fsize - sizeof *p1) & ~pagemask);
fail_unless (p1 != MAP_FAILED); @@ -381,7 +381,7 @@ void check_file_fixed_mmaps(void) int i;
/* Find a suitable address to start with. */ - addr = mmap(NULL, pagesize * 40 * 4, PROT_READ, + addr = mmap(NULL, pagesize * 40 * 4, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); fprintf (stderr, "%s addr=%p", __func__, (void *)addr); @@ -389,20 +389,20 @@ void check_file_fixed_mmaps(void)
for (i = 0; i < 40; i++) { - p1 = mmap(addr, pagesize, PROT_READ, + p1 = mmap(addr, pagesize, PROT_READ, MAP_PRIVATE | MAP_FIXED, test_fd, 0); - p2 = mmap(addr + pagesize, pagesize, PROT_READ, + p2 = mmap(addr + pagesize, pagesize, PROT_READ, MAP_PRIVATE | MAP_FIXED, test_fd, pagesize); - p3 = mmap(addr + pagesize * 2, pagesize, PROT_READ, + p3 = mmap(addr + pagesize * 2, pagesize, PROT_READ, MAP_PRIVATE | MAP_FIXED, test_fd, pagesize * 2); - p4 = mmap(addr + pagesize * 3, pagesize, PROT_READ, + p4 = mmap(addr + pagesize * 3, pagesize, PROT_READ, MAP_PRIVATE | MAP_FIXED, test_fd, pagesize * 3);
- /* Make sure we get pages aligned with the pagesize. + /* Make sure we get pages aligned with the pagesize. The target expects this. */ fail_unless (p1 == (void *)addr); fail_unless (p2 == (void *)addr + pagesize); @@ -452,7 +452,7 @@ int main(int argc, char **argv) /* Fill the file with int's counting from zero and up. */ for (i = 0; i < (pagesize * 4) / sizeof i; i++) write (test_fd, &i, sizeof i); - /* Append a few extra writes to make the file end at non + /* Append a few extra writes to make the file end at non page boundary. */ write (test_fd, &i, sizeof i); i++; write (test_fd, &i, sizeof i); i++; diff --git a/qemu-0.15.x/translate-all.c b/qemu-0.15.x/translate-all.c index 041c108..b272d22 100644 --- a/qemu-0.15.x/translate-all.c +++ b/qemu-0.15.x/translate-all.c @@ -42,7 +42,7 @@ uint8_t gen_opc_instr_start[OPC_BUF_SIZE];
void cpu_gen_init(void) { - tcg_context_init(&tcg_ctx); + tcg_context_init(&tcg_ctx); }
/* return non zero if the very first instruction is invalid so that diff --git a/qemu-0.15.x/ui/curses.c b/qemu-0.15.x/ui/curses.c index d29b6cf..ee294ed 100644 --- a/qemu-0.15.x/ui/curses.c +++ b/qemu-0.15.x/ui/curses.c @@ -1,8 +1,8 @@ /* * QEMU curses/ncurses display driver - * + * * Copyright (c) 2005 Andrzej Zaborowski balrog@zabor.org - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights diff --git a/qemu-0.15.x/ui/curses_keys.h b/qemu-0.15.x/ui/curses_keys.h index c0d5eb4..cdaf6ac 100644 --- a/qemu-0.15.x/ui/curses_keys.h +++ b/qemu-0.15.x/ui/curses_keys.h @@ -1,8 +1,8 @@ /* * Keycode and keysyms conversion tables for curses - * + * * Copyright (c) 2005 Andrzej Zaborowski balrog@zabor.org - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights diff --git a/qemu-0.15.x/ui/sdl.c b/qemu-0.15.x/ui/sdl.c index 9efcda5..ab49b67 100644 --- a/qemu-0.15.x/ui/sdl.c +++ b/qemu-0.15.x/ui/sdl.c @@ -77,7 +77,7 @@ static void sdl_update(DisplayState *ds, int x, int y, int w, int h) exit(1); } } - } + } SDL_UpdateRect(real_screen, rec.x, rec.y, rec.w, rec.h); }
@@ -107,7 +107,7 @@ static void do_sdl_resize(int new_width, int new_height, int bpp) height = new_height; real_screen = SDL_SetVideoMode(width, height, bpp, flags); if (!real_screen) { - fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width, + fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width, height, bpp, SDL_GetError()); exit(1); } diff --git a/qemu-0.15.x/ui/sdl_zoom.c b/qemu-0.15.x/ui/sdl_zoom.c index a986c7c..91af8bb 100644 --- a/qemu-0.15.x/ui/sdl_zoom.c +++ b/qemu-0.15.x/ui/sdl_zoom.c @@ -1,6 +1,6 @@ /* * SDL_zoom - surface scaling - * + * * Copyright (c) 2009 Citrix Systems, Inc. * * Derived from: SDL_rotozoom, LGPL (c) A. Schiffler from the SDL_gfx library. diff --git a/qemu-0.15.x/ui/sdl_zoom.h b/qemu-0.15.x/ui/sdl_zoom.h index 74955bc..a32779c 100644 --- a/qemu-0.15.x/ui/sdl_zoom.h +++ b/qemu-0.15.x/ui/sdl_zoom.h @@ -1,6 +1,6 @@ /* * SDL_zoom - surface scaling - * + * * Copyright (c) 2009 Citrix Systems, Inc. * * Derived from: SDL_rotozoom, LGPL (c) A. Schiffler from the SDL_gfx library. diff --git a/qemu-0.15.x/ui/sdl_zoom_template.h b/qemu-0.15.x/ui/sdl_zoom_template.h index 64bbca8..e0012fb 100644 --- a/qemu-0.15.x/ui/sdl_zoom_template.h +++ b/qemu-0.15.x/ui/sdl_zoom_template.h @@ -1,6 +1,6 @@ /* * SDL_zoom_template - surface scaling - * + * * Copyright (c) 2009 Citrix Systems, Inc. * * Derived from: SDL_rotozoom, LGPL (c) A. Schiffler from the SDL_gfx library. @@ -19,7 +19,7 @@ #error unsupport depth #endif
-/* +/* * Simple helper functions to make the code looks nicer * * Assume spf = source SDL_PixelFormat @@ -60,7 +60,7 @@ static int glue(sdl_zoom_rgb, BPP)(SDL_Surface *src, SDL_Surface *dst, int smoot SDL_PixelFormat *spf = src->format; SDL_PixelFormat *dpf = dst->format;
- if (smooth) { + if (smooth) { /* For interpolation: assume source dimension is one pixel. * Smaller here to avoid overflow on right and bottom edge. */ @@ -111,10 +111,10 @@ static int glue(sdl_zoom_rgb, BPP)(SDL_Surface *src, SDL_Surface *dst, int smoot }
/* Calculate sstep_jump */ - csax = sax; + csax = sax; sstep_jump = 0; for (x = 0; x < dst_rect->x; x++) { - csax++; + csax++; sstep = (*csax >> 16); sstep_jump += sstep; } @@ -125,7 +125,7 @@ static int glue(sdl_zoom_rgb, BPP)(SDL_Surface *src, SDL_Surface *dst, int smoot c01 = c00 + 1; c10 = (SDL_TYPE *) ((Uint8 *) csp + src->pitch) + sstep_jump; c11 = c10 + 1; - csax = sax + dst_rect->x; + csax = sax + dst_rect->x;
for (x = 0; x < dst_rect->w; x++) {
@@ -151,10 +151,10 @@ static int glue(sdl_zoom_rgb, BPP)(SDL_Surface *src, SDL_Surface *dst, int smoot getAlpha(*c00)) & (dpf->Amask >> dpf->Ashift); t2 = ((((getAlpha(*c11) - getAlpha(*c10)) * ex) >> 16) + getAlpha(*c10)) & (dpf->Amask >> dpf->Ashift); - setAlpha((((t2 - t1) * ey) >> 16) + t1, dp); + setAlpha((((t2 - t1) * ey) >> 16) + t1, dp);
/* Advance source pointers */ - csax++; + csax++; sstep = (*csax >> 16); c00 += sstep; c01 += sstep; @@ -181,10 +181,10 @@ static int glue(sdl_zoom_rgb, BPP)(SDL_Surface *src, SDL_Surface *dst, int smoot }
/* Calculate sstep_jump */ - csax = sax; + csax = sax; sstep_jump = 0; for (x = 0; x < dst_rect->x; x++) { - csax++; + csax++; sstep = (*csax >> 16); sstep_jump += sstep; } diff --git a/qemu-0.15.x/ui/vnc.c b/qemu-0.15.x/ui/vnc.c index f1e27d9..6792114 100644 --- a/qemu-0.15.x/ui/vnc.c +++ b/qemu-0.15.x/ui/vnc.c @@ -1775,7 +1775,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) static void set_pixel_conversion(VncState *vs) { if ((vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) == - (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) && + (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) && !memcmp(&(vs->clientds.pf), &(vs->ds->surface->pf), sizeof(PixelFormat))) { vs->write_pixels = vnc_write_pixels_copy; vnc_hextile_set_pixel_conversion(vs, 0); @@ -1861,7 +1861,7 @@ static void vnc_colordepth(VncState *vs) vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE); vnc_write_u8(vs, 0); vnc_write_u16(vs, 1); /* number of rects */ - vnc_framebuffer_update(vs, 0, 0, ds_get_width(vs->ds), + vnc_framebuffer_update(vs, 0, 0, ds_get_width(vs->ds), ds_get_height(vs->ds), VNC_ENCODING_WMVi); pixel_format_message(vs); vnc_unlock_output(vs); @@ -2694,7 +2694,7 @@ int vnc_display_pw_expire(DisplayState *ds, time_t expires) char *vnc_display_local_addr(DisplayState *ds) { VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display; - + return vnc_socket_local_addr("%s:%s", vs->lsock); }
diff --git a/qemu-0.15.x/vl.c b/qemu-0.15.x/vl.c index c75385c..4ea7bcf 100644 --- a/qemu-0.15.x/vl.c +++ b/qemu-0.15.x/vl.c @@ -1886,7 +1886,7 @@ static int virtcon_parse(const char *devname) }
static int debugcon_parse(const char *devname) -{ +{ QemuOpts *opts;
if (!qemu_chr_open("debugcon", devname, NULL)) {