diff -Nurb qemu-0.8.2-solaris/Makefile qemu-0.8.2-solaris__20061010x11/Makefile --- qemu-0.8.2-solaris/Makefile 2006-10-02 11:49:47.000000000 -0500 +++ qemu-0.8.2-solaris__20061010x11/Makefile 2006-10-10 06:15:18.000000000 -0500 @@ -9,9 +9,6 @@ ifdef CONFIG_DARWIN CFLAGS+= -mdynamic-no-pic endif -ifeq ($(ARCH),sparc) -CFLAGS+=-mcpu=ultrasparc -endif LDFLAGS+=-g LIBS= DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE diff -Nurb qemu-0.8.2-solaris/Makefile.target qemu-0.8.2-solaris__20061010x11/Makefile.target --- qemu-0.8.2-solaris/Makefile.target 2006-10-02 11:49:47.000000000 -0500 +++ qemu-0.8.2-solaris__20061010x11/Makefile.target 2006-10-10 18:37:07.000000000 -0500 @@ -108,11 +108,11 @@ ifeq ($(ARCH),sparc) ifeq ($(CONFIG_SOLARIS),yes) -CFLAGS+=-mcpu=ultrasparc -m32 -ffixed-g2 -ffixed-g3 +CFLAGS+=-m32 -ffixed-g2 -ffixed-g3 LDFLAGS+=-m32 OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -fno-omit-frame-pointer -ffixed-i0 else -CFLAGS+=-mcpu=ultrasparc -m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 +CFLAGS+=-m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 LDFLAGS+=-m32 OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat @@ -122,11 +122,16 @@ endif ifeq ($(ARCH),sparc64) -CFLAGS+=-mcpu=ultrasparc -m64 -ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7 +CFLAGS+=-mcpu=ultrasparc -m64 -ffixed-g1 -ffixed-g2 -ffixed-g4 -ffixed-g5 -ffixed-g6 -ffixed-g7 -ffixed-l0 -ffixed-l1 -ffixed-l2 -ffixed-l3 +DEFINES+=-D__sparc_v9__ +ifeq ($(CONFIG_SOLARIS),yes) LDFLAGS+=-m64 -LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc64.ld +OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -fno-omit-frame-pointer -ffixed-i0 +else +LDFLAGS+=-m64 -Wl,-T,$(SRC_PATH)/sparc64.ld OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 endif +endif ifeq ($(ARCH),alpha) # -msmall-data is not used because we want two-instruction relocations @@ -416,8 +421,11 @@ endif ifeq ($(ARCH),sparc64) +ifeq ($(CONFIG_SOLARIS),yes) VL_LDFLAGS+=-m64 -VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc64.ld +else +VL_LDFLAGS+=-m64 -Wl,-T,$(SRC_PATH)/sparc64.ld +endif endif ifeq ($(CONFIG_SOLARIS),yes) diff -Nurb qemu-0.8.2-solaris/arm-softmmu/config.h qemu-0.8.2-solaris__20061010x11/arm-softmmu/config.h --- qemu-0.8.2-solaris/arm-softmmu/config.h 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/arm-softmmu/config.h 2006-10-11 09:13:20.000000000 -0500 @@ -0,0 +1,8 @@ +/* Automatically generated by configure - do not modify */ +#include "../config-host.h" +#define CONFIG_QEMU_PREFIX "/usr/gnemul/qemu-arm" +#define TARGET_ARCH "arm" +#define TARGET_ARM 1 +#define CONFIG_SOFTMMU 1 +#define CONFIG_SOFTFLOAT 1 +#define CONFIG_SDL 1 diff -Nurb qemu-0.8.2-solaris/arm-softmmu/config.mak qemu-0.8.2-solaris__20061010x11/arm-softmmu/config.mak --- qemu-0.8.2-solaris/arm-softmmu/config.mak 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/arm-softmmu/config.mak 2006-10-11 09:13:20.000000000 -0500 @@ -0,0 +1,8 @@ +# Automatically generated by configure - do not modify +include ../config-host.mak +TARGET_ARCH=arm +CONFIG_SOFTMMU=yes +CONFIG_SOFTFLOAT=yes +CONFIG_SDL=yes +SDL_LIBS=-L/opt/sfw/lib -R/opt/sfw/lib -lSDL -lpthread -lposix4 +SDL_CFLAGS=-I/opt/sfw/include/SDL -D_REENTRANT diff -Nurb qemu-0.8.2-solaris/configure qemu-0.8.2-solaris__20061010x11/configure --- qemu-0.8.2-solaris/configure 2006-10-02 11:49:47.000000000 -0500 +++ qemu-0.8.2-solaris__20061010x11/configure 2006-10-10 18:41:16.000000000 -0500 @@ -24,8 +24,19 @@ cc="gcc" host_cc="gcc" ar="ar" -make="make" -install="install" + +uname_s=`uname -s` +case "$uname_s" in + SunOS|AnyNonGNU_OS) +make="gmake" +install="ginstall" +;; + *) + make="make" + install="install" + ;; +esac + strip="strip" cpu=`uname -m` target_list="" @@ -51,7 +62,7 @@ s390) cpu="s390" ;; - sparc|sun4[muv]) + sparc|sun4[cdmuv]) cpu="sparc" ;; sparc64) @@ -98,6 +109,12 @@ build_acpi_tables="no" force_64bit="no" force_64bitflags="" +build_for_sparcv7="no" +build_for_sparcv7flags="" +build_for_sparcv8="no" +build_for_sparcv8flags="" +build_for_sparcv8plus="no" +build_for_sparcv8plusflags="" uname_release="" # OS specific @@ -247,23 +264,40 @@ ;; --force-64bit) force_64bit="yes" - CFLAGS="$CFLAGS -m64 -mpreferred-stack-boundary=4 -fomit-frame-pointer" LDFLAGS="$LDFLAGS -m64" force_64bitflags="-m64" case "$cpu" in i386) - echo "Forcing 64-bit mode, changing CPU from $cpu to x86_64" + echo "Forcing 64-bit mode, changing HOST-CPU from $cpu to x86_64" cpu="x86_64" + CFLAGS="$CFLAGS -m64 -mpreferred-stack-boundary=4 -fomit-frame-pointer" ;; sparc*) - echo "Forcing 64-bit mode, changing CPU from $cpu to sparc64" + echo "Developers only: Forcing 64-bit mode, changing HOST-CPU from $cpu to sparc64" + cpu="sparc64" + CFLAGS="$CFLAGS -m64 -fomit-frame-pointer" ;; *) echo "Forcing 64-bit mode" ;; esac ;; + --build_for_sparcv7) + build_for_sparcv7="yes" + CFLAGS="$CFLAGS -m32 -mcpu=v7 -fomit-frame-pointer" + LDFLAGS="$LDFLAGS -m32" + ;; + --build_for_sparcv8) + build_for_sparcv8="yes" + CFLAGS="$CFLAGS -m32 -mcpu=v8 -fomit-frame-pointer" + LDFLAGS="$LDFLAGS -m32" + ;; + --build_for_sparcv8plus) + build_for_sparcv8plus="yes" + CFLAGS="$CFLAGS -m32 -mcpu=ultrasparc -fomit-frame-pointer" + LDFLAGS="$LDFLAGS -m32" + ;; esac done @@ -314,6 +348,9 @@ echo " --enable-uname-release=R Return R for uname -r in usermode emulation" echo " --enable-iasl compilation of ACPI tables with the IASL compiler" echo " --force-64bit force 64-bit compilation (Solaris x86/x64 only)" +echo " --build_for_sparcv7 force compilation for sparcv7 HOST-CPU" +echo " --build_for_sparcv8 force compilation for sparcv8 HOST-CPU" +echo " --build_for_sparcv8plus force compilation for sparcv8plus HOST-CPU" echo "" echo "NOTE: The object files are build at the place where configure is launched" exit 1 @@ -489,7 +526,8 @@ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } EOF -if $cc $force_64bitflags -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then +if $cc $force_64bitflags $build_for_sparcv7flags $build_for_sparcv8flags $build_for_sparcv8plusflags -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then + _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` if test "$_sdlversion" -lt 121 ; then sdl_too_old=yes @@ -680,6 +718,14 @@ echo "CONFIG_SOLARIS=yes" >> $config_mak echo "#define HOST_SOLARIS $solarisrev" >> $config_h fi +if test "$build_for_sparcv8plus" = "yes" ; then + echo "CONFIG___sparc_v8plus__=yes" >> $config_mak + echo "#define __sparc_v8plus__" >> $config_h +fi +if test "$cpu" = "sparc64" ; then + echo "CONFIG___sparc_v9__=yes" >> $config_mak +# echo "#define __sparc_v9__" >> $config_h +fi if test "$gdbstub" = "yes" ; then echo "CONFIG_GDBSTUB=yes" >> $config_mak echo "#define CONFIG_GDBSTUB 1" >> $config_h diff -Nurb qemu-0.8.2-solaris/cpu-all.h qemu-0.8.2-solaris__20061010x11/cpu-all.h --- qemu-0.8.2-solaris/cpu-all.h 2006-10-02 11:49:47.000000000 -0500 +++ qemu-0.8.2-solaris__20061010x11/cpu-all.h 2006-10-10 18:06:03.000000000 -0500 @@ -971,7 +971,8 @@ return val; } -#elif defined(__sparc_v9__) +/* see vl.c:576 for #defined(__sparc__) */ +#elif defined(__sparc_v8plus__) || defined(__sparc_v9__) static inline int64_t cpu_get_real_ticks (void) { diff -Nurb qemu-0.8.2-solaris/dyngen-exec.h qemu-0.8.2-solaris__20061010x11/dyngen-exec.h --- qemu-0.8.2-solaris/dyngen-exec.h 2006-10-02 11:49:47.000000000 -0500 +++ qemu-0.8.2-solaris__20061010x11/dyngen-exec.h 2006-10-11 12:21:22.000000000 -0500 @@ -38,7 +38,7 @@ // Linux/Sparc64 defines uint64_t #if !(defined (__sparc_v9__) && defined(__linux__)) /* XXX may be done for all 64 bits targets ? */ -#if defined (__x86_64__) || defined(__ia64) +#if defined (__x86_64__) || defined(__ia64) || defined(__sparc_v9__) typedef unsigned long uint64_t; #else typedef unsigned long long uint64_t; @@ -55,7 +55,7 @@ typedef signed int int32_t; // Linux/Sparc64 defines int64_t #if !(defined (__sparc_v9__) && defined(__linux__)) -#if defined (__x86_64__) || defined(__ia64) +#if defined (__x86_64__) || defined(__ia64) || defined(__sparc_v9__) typedef signed long int64_t; #else typedef signed long long int64_t; @@ -133,12 +133,18 @@ #define AREG2 "g4" #define AREG3 "g5" #define AREG4 "g6" -#else -#ifdef __sparc_v9__ -#define AREG0 "g1" -#define AREG1 "g4" -#define AREG2 "g5" -#define AREG3 "g7" +/* + * Solaris sparcv8/v8plus versus sparcv9 ABI: g0 is always 0, g1 gets clobbered + * after function call, g2 cannot be used on v9 due to ABI and libm warning, g7 + * gets clobbered, g3 does _not_ give libm caused /usr/ccs/bin/ld MSG_STO_REGISTERG3 warning + * anymore (see http://cvs.opensolaris.org/source/raw/on/usr/src/cmd/sgs/libld/common/libld.sparc.msg), + * now that we manually define -D__sparc_v9__ and therefore g3 potentially could be a usable candidate now; + * inputs or outputs cannot be used at all, due to shifting rw, + * locals can potentially be used, if they are saved and restored each time + * (see cpu-exec.c) + * + */ + #else #define AREG0 "g6" #define AREG1 "g1" @@ -153,7 +159,6 @@ #define AREG10 "l6" #define AREG11 "l7" #endif -#endif #define USE_FP_CONVERT #endif #ifdef __s390__ diff -Nurb qemu-0.8.2-solaris/dyngen.c qemu-0.8.2-solaris__20061010x11/dyngen.c --- qemu-0.8.2-solaris/dyngen.c 2006-10-02 11:49:47.000000000 -0500 +++ qemu-0.8.2-solaris__20061010x11/dyngen.c 2006-10-10 08:25:26.000000000 -0500 @@ -2270,6 +2270,32 @@ reloc_offset, reloc_offset, name, addend, reloc_offset); break; + case R_SPARC_HH22: + fprintf(outfile, + " *(uint32_t *)(gen_code_ptr + %d) = " + "((*(uint32_t *)(gen_code_ptr + %d)) " + " & ~0x00000000) " + " | (((%s + %d) >> 42) & 0x00000000);\n", + reloc_offset, reloc_offset, name, addend); + break; + + case R_SPARC_LM22: + fprintf(outfile, + " *(uint32_t *)(gen_code_ptr + %d) = " + "((*(uint32_t *)(gen_code_ptr + %d)) " + " & ~0x00000000) " + " | (((%s + %d) >> 10) & 0x00000000);\n", + reloc_offset, reloc_offset, name, addend); + break; + + case R_SPARC_HM10: + fprintf(outfile, + " *(uint32_t *)(gen_code_ptr + %d) = " + "((*(uint32_t *)(gen_code_ptr + %d)) " + " & ~0x00000000) " + " | ((((%s + %d) >> 32 & 0x3ff)) & 0x00000000);\n", + reloc_offset, reloc_offset, name, addend); + break; default: error("unsupported sparc64 relocation (%d) for symbol %s", type, name); } diff -Nurb qemu-0.8.2-solaris/elf.h qemu-0.8.2-solaris__20061010x11/elf.h --- qemu-0.8.2-solaris/elf.h 2006-10-02 11:49:47.000000000 -0500 +++ qemu-0.8.2-solaris__20061010x11/elf.h 2006-10-10 08:26:57.000000000 -0500 @@ -328,6 +328,9 @@ #define R_SPARC_11 31 #define R_SPARC_64 32 #define R_SPARC_OLO10 33 +#define R_SPARC_HH22 34 +#define R_SPARC_HM10 35 +#define R_SPARC_LM22 36 #define R_SPARC_WDISP16 40 #define R_SPARC_WDISP19 41 #define R_SPARC_7 43 diff -Nurb qemu-0.8.2-solaris/hw/ide.c qemu-0.8.2-solaris__20061010x11/hw/ide.c --- qemu-0.8.2-solaris/hw/ide.c 2006-10-02 11:49:47.000000000 -0500 +++ qemu-0.8.2-solaris__20061010x11/hw/ide.c 2006-10-11 02:19:22.000000000 -0500 @@ -391,6 +391,9 @@ } PCIIDEState; static void ide_dma_start(IDEState *s, IDEDMAFunc *dma_cb); +static int ide_atapi_cmd_read_dma_cb(IDEState *s, + target_phys_addr_t phys_addr, + int transfer_size1); static void padstr(char *str, const char *src, int len) { @@ -454,7 +457,7 @@ put_le16(p + 49, (1 << 11) | (1 << 9) | (1 << 8)); /* DMA and LBA supported */ put_le16(p + 51, 0x200); /* PIO transfer cycle */ put_le16(p + 52, 0x200); /* DMA transfer cycle */ - put_le16(p + 53, 1 | (1 << 1) | (1 << 2)); /* words 54-58,64-70,88 are valid */ + put_le16(p + 53, 1 | 1 << 1 | 1 << 2); /* words 54-58,64-70,88 are valid */ put_le16(p + 54, s->cylinders); put_le16(p + 55, s->heads); put_le16(p + 56, s->sectors); @@ -465,6 +468,8 @@ put_le16(p + 59, 0x100 | s->mult_sectors); put_le16(p + 60, s->nb_sectors); put_le16(p + 61, s->nb_sectors >> 16); + put_le16(p + 63, 0x07 | 0x4 << 8); /* multiword dma supported */ + put_le16(p + 64, 0x03); /* pio3 and 4 supported */ put_le16(p + 63, 0x07); /* mdma0-2 supported */ put_le16(p + 65, 120); put_le16(p + 66, 120); @@ -480,8 +485,8 @@ /* 13=flush_cache_ext,12=flush_cache,10=lba48 */ put_le16(p + 86, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10)); put_le16(p + 87, (1 << 14)); - put_le16(p + 88, 0x3f | (1 << 13)); /* udma5 set and supported */ - put_le16(p + 93, 1 | (1 << 14) | 0x2000); + put_le16(p + 88, 0x3f /*| 0x20 << 8*/); /* udma5 supported and set */ + put_le16(p + 93, 1 | (1 << 1) | (1 << 3) | (1 << 13) | (1 << 14)); put_le16(p + 100, s->nb_sectors); put_le16(p + 101, s->nb_sectors >> 16); put_le16(p + 102, s->nb_sectors >> 32); @@ -513,11 +518,11 @@ padstr((uint8_t *)(p + 23), QEMU_VERSION, 8); /* firmware version */ padstr((uint8_t *)(p + 27), "QEMU CD-ROM", 40); /* model */ put_le16(p + 48, 1); /* dword I/O (XXX: should not be set on CDROM) */ - put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */ - put_le16(p + 53, 3); /* words 64-70, 54-58 valid */ - put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */ - put_le16(p + 64, 1); /* PIO modes */ - put_le16(p + 65, 0xb4); /* minimum DMA multiword tx cycle time */ + put_le16(p + 49, 1 << 8 | 1 << 9); /* dma and lba are supported */ + put_le16(p + 53, 7); /* words 64-70, 54-58, 88 valid */ + put_le16(p + 63, 0x07 | 0x4 << 8); /* multiword dma supported / chosen */ + put_le16(p + 64, 0x03); /* pio3 and 4 supported */ + put_le16(p + 65, 0xb4); /* minimum dma multiword tx cycle time */ put_le16(p + 66, 0xb4); /* recommended DMA multiword tx cycle time */ put_le16(p + 67, 0x12c); /* minimum PIO cycle time without flow control */ put_le16(p + 68, 0xb4); /* minimum PIO cycle time with IORDY flow control */ @@ -526,6 +531,7 @@ put_le16(p + 72, 30); /* in ns */ put_le16(p + 80, 0x1e); /* support up to ATA/ATAPI-4 */ + put_le16(p + 88, 0x3f /*| 0x20 << 8*/); /* udma supported and set */ memcpy(s->identify_data, p, sizeof(s->identify_data)); s->identify_set = 1; @@ -559,6 +565,7 @@ { BMDMAState *bm = s->bmdma; if (!(s->cmd & IDE_CMD_DISABLE_IRQ)) { + BMDMAState *bm = s->bmdma; if (bm) { bm->status |= BM_STATUS_INT; } @@ -994,8 +1001,13 @@ s->elementary_transfer_size = 0; s->io_buffer_index = 0; + if (s->atapi_dma) { + s->status = READY_STAT | DRQ_STAT; + ide_dma_start(s, ide_atapi_cmd_read_dma_cb); + } else { s->status = READY_STAT; ide_atapi_cmd_reply_end(s); + } } /* start a CD-CDROM read command */ @@ -1026,6 +1038,9 @@ #endif if (s->packet_transfer_size <= 0) break; + if (s->lba == -1) + len = s->packet_transfer_size; + else { len = s->cd_sector_size - s->io_buffer_index; if (len <= 0) { /* transfert next data */ @@ -1034,6 +1049,7 @@ s->io_buffer_index = 0; len = s->cd_sector_size; } + } if (len > transfer_size) len = transfer_size; cpu_physical_memory_write(phys_addr, @@ -2372,6 +2388,11 @@ cmd646_set_irq, d, 1); } +/* pci 0x04(word): command; 0x06(word): status */ +#define PCI_COMMAND_IOACCESS 0x0001 +#define PCI_COMMAND_MEMACCESS 0x0002 +#define PCI_COMMAND_BUSMASTER 0x0004 + /* hd_table must contain 4 block drivers */ /* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */ void pci_piix3_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn) @@ -2392,6 +2413,8 @@ pci_conf[0x02] = 0x10; pci_conf[0x03] = 0x70; pci_conf[0x09] = 0x80; // legacy ATA mode + pci_conf[0x04] = PCI_COMMAND_IOACCESS | PCI_COMMAND_MEMACCESS | PCI_COMMAND_BUSMASTER; + pci_conf[0x09] = 0x8a; // PCI_IDE bus master API pci_conf[0x0a] = 0x01; // class_sub = PCI_IDE pci_conf[0x0b] = 0x01; // class_base = PCI_mass_storage pci_conf[0x0e] = 0x00; // header_type diff -Nurb qemu-0.8.2-solaris/i386-softmmu/config.h qemu-0.8.2-solaris__20061010x11/i386-softmmu/config.h --- qemu-0.8.2-solaris/i386-softmmu/config.h 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/i386-softmmu/config.h 2006-10-11 09:13:20.000000000 -0500 @@ -0,0 +1,7 @@ +/* Automatically generated by configure - do not modify */ +#include "../config-host.h" +#define CONFIG_QEMU_PREFIX "/usr/gnemul/qemu-i386" +#define TARGET_ARCH "i386" +#define TARGET_I386 1 +#define CONFIG_SOFTMMU 1 +#define CONFIG_SDL 1 diff -Nurb qemu-0.8.2-solaris/i386-softmmu/config.mak qemu-0.8.2-solaris__20061010x11/i386-softmmu/config.mak --- qemu-0.8.2-solaris/i386-softmmu/config.mak 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/i386-softmmu/config.mak 2006-10-11 09:13:20.000000000 -0500 @@ -0,0 +1,7 @@ +# Automatically generated by configure - do not modify +include ../config-host.mak +TARGET_ARCH=i386 +CONFIG_SOFTMMU=yes +CONFIG_SDL=yes +SDL_LIBS=-L/opt/sfw/lib -R/opt/sfw/lib -lSDL -lpthread -lposix4 +SDL_CFLAGS=-I/opt/sfw/include/SDL -D_REENTRANT diff -Nurb qemu-0.8.2-solaris/mips-softmmu/config.h qemu-0.8.2-solaris__20061010x11/mips-softmmu/config.h --- qemu-0.8.2-solaris/mips-softmmu/config.h 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/mips-softmmu/config.h 2006-10-11 09:13:20.000000000 -0500 @@ -0,0 +1,9 @@ +/* Automatically generated by configure - do not modify */ +#include "../config-host.h" +#define CONFIG_QEMU_PREFIX "/usr/gnemul/qemu-mips" +#define TARGET_ARCH "mips" +#define TARGET_MIPS 1 +#define CONFIG_SOFTFLOAT 1 +#define TARGET_WORDS_BIGENDIAN 1 +#define CONFIG_SOFTMMU 1 +#define CONFIG_SDL 1 diff -Nurb qemu-0.8.2-solaris/mips-softmmu/config.mak qemu-0.8.2-solaris__20061010x11/mips-softmmu/config.mak --- qemu-0.8.2-solaris/mips-softmmu/config.mak 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/mips-softmmu/config.mak 2006-10-11 09:13:20.000000000 -0500 @@ -0,0 +1,9 @@ +# Automatically generated by configure - do not modify +include ../config-host.mak +TARGET_ARCH=mips +CONFIG_SOFTFLOAT=yes +TARGET_WORDS_BIGENDIAN=yes +CONFIG_SOFTMMU=yes +CONFIG_SDL=yes +SDL_LIBS=-L/opt/sfw/lib -R/opt/sfw/lib -lSDL -lpthread -lposix4 +SDL_CFLAGS=-I/opt/sfw/include/SDL -D_REENTRANT diff -Nurb qemu-0.8.2-solaris/mipsel-softmmu/config.h qemu-0.8.2-solaris__20061010x11/mipsel-softmmu/config.h --- qemu-0.8.2-solaris/mipsel-softmmu/config.h 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/mipsel-softmmu/config.h 2006-10-11 09:13:20.000000000 -0500 @@ -0,0 +1,8 @@ +/* Automatically generated by configure - do not modify */ +#include "../config-host.h" +#define CONFIG_QEMU_PREFIX "/usr/gnemul/qemu-mipsel" +#define TARGET_ARCH "mips" +#define TARGET_MIPS 1 +#define CONFIG_SOFTFLOAT 1 +#define CONFIG_SOFTMMU 1 +#define CONFIG_SDL 1 diff -Nurb qemu-0.8.2-solaris/mipsel-softmmu/config.mak qemu-0.8.2-solaris__20061010x11/mipsel-softmmu/config.mak --- qemu-0.8.2-solaris/mipsel-softmmu/config.mak 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/mipsel-softmmu/config.mak 2006-10-11 09:13:20.000000000 -0500 @@ -0,0 +1,8 @@ +# Automatically generated by configure - do not modify +include ../config-host.mak +TARGET_ARCH=mips +CONFIG_SOFTFLOAT=yes +CONFIG_SOFTMMU=yes +CONFIG_SDL=yes +SDL_LIBS=-L/opt/sfw/lib -R/opt/sfw/lib -lSDL -lpthread -lposix4 +SDL_CFLAGS=-I/opt/sfw/include/SDL -D_REENTRANT diff -Nurb qemu-0.8.2-solaris/ppc-softmmu/config.h qemu-0.8.2-solaris__20061010x11/ppc-softmmu/config.h --- qemu-0.8.2-solaris/ppc-softmmu/config.h 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/ppc-softmmu/config.h 2006-10-11 09:13:20.000000000 -0500 @@ -0,0 +1,8 @@ +/* Automatically generated by configure - do not modify */ +#include "../config-host.h" +#define CONFIG_QEMU_PREFIX "/usr/gnemul/qemu-ppc" +#define TARGET_ARCH "ppc" +#define TARGET_PPC 1 +#define TARGET_WORDS_BIGENDIAN 1 +#define CONFIG_SOFTMMU 1 +#define CONFIG_SDL 1 diff -Nurb qemu-0.8.2-solaris/ppc-softmmu/config.mak qemu-0.8.2-solaris__20061010x11/ppc-softmmu/config.mak --- qemu-0.8.2-solaris/ppc-softmmu/config.mak 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/ppc-softmmu/config.mak 2006-10-11 09:13:20.000000000 -0500 @@ -0,0 +1,8 @@ +# Automatically generated by configure - do not modify +include ../config-host.mak +TARGET_ARCH=ppc +TARGET_WORDS_BIGENDIAN=yes +CONFIG_SOFTMMU=yes +CONFIG_SDL=yes +SDL_LIBS=-L/opt/sfw/lib -R/opt/sfw/lib -lSDL -lpthread -lposix4 +SDL_CFLAGS=-I/opt/sfw/include/SDL -D_REENTRANT diff -Nurb qemu-0.8.2-solaris/target-i386/helper2.c qemu-0.8.2-solaris__20061010x11/target-i386/helper2.c --- qemu-0.8.2-solaris/target-i386/helper2.c 2006-10-02 11:49:47.000000000 -0500 +++ qemu-0.8.2-solaris__20061010x11/target-i386/helper2.c 2006-10-10 18:10:24.000000000 -0500 @@ -92,7 +92,7 @@ env->cpuid_vendor1 = 0x756e6547; /* "Genu" */ env->cpuid_vendor2 = 0x49656e69; /* "ineI" */ env->cpuid_vendor3 = 0x6c65746e; /* "ntel" */ -#if 0 +#if (0==1) /* pentium 75-200 */ family = 5; model = 2; diff -Nurb qemu-0.8.2-solaris/vl.c qemu-0.8.2-solaris__20061010x11/vl.c --- qemu-0.8.2-solaris/vl.c 2006-10-02 11:49:47.000000000 -0500 +++ qemu-0.8.2-solaris__20061010x11/vl.c 2006-10-10 18:15:32.000000000 -0500 @@ -572,6 +572,44 @@ #endif /***********************************************************/ + +#if defined(__sparc__) && !defined(__sparc_v8plus__) && !defined(__sparc_v9__) + /* + * Derived from: "m68k updates #2" by Richard Zidlicky + * "crude hack to get some sort of rdtsc support" + * + * Cannot go into header file and therefore went into + * historical location in vl.c,rather than into cpu-all.h + * + * Allows you to easily set the guest's virtual core clock to an + * almost arbitrary value (that is, as how fast the virtual cpus + * should identifiy themselves to the guest OS / guest software). + * + */ + +#include +static int64_t cputicks=0; +static struct timeval lastcptcall={0,0}; + +// assume 4.0 GHz virtual cpu, min 80 ticks between rdtsc calls + +int64_t cpu_get_real_ticks(void) + { + struct timeval tp; + gettimeofday(&tp,(void*)0); + if (tp.tv_sec == lastcptcall.tv_sec && + tp.tv_usec == lastcptcall.tv_usec ){ + cputicks += 1; + } else { + cputicks=0; + lastcptcall=tp; + } + return ((int64_t)tp.tv_sec*1000000+tp.tv_usec)*4000+cputicks; + } + +#endif + + /* guest cycle counter */ static int64_t cpu_ticks_prev; diff -Nurb qemu-0.8.2-solaris/x86-64_softmmu/config.h qemu-0.8.2-solaris__20061010x11/x86-64_softmmu/config.h --- qemu-0.8.2-solaris/x86-64_softmmu/config.h 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/x86-64_softmmu/config.h 2006-10-10 10:08:33.000000000 -0500 @@ -0,0 +1,3 @@ +/* Automatically generated by configure - do not modify */ +#include "../config-host.h" +#define CONFIG_QEMU_PREFIX "/usr/gnemul/qemu-x86" diff -Nurb qemu-0.8.2-solaris/x86-64_softmmu/config.mak qemu-0.8.2-solaris__20061010x11/x86-64_softmmu/config.mak --- qemu-0.8.2-solaris/x86-64_softmmu/config.mak 1969-12-31 18:00:00.000000000 -0600 +++ qemu-0.8.2-solaris__20061010x11/x86-64_softmmu/config.mak 2006-10-10 10:08:33.000000000 -0500 @@ -0,0 +1,2 @@ +# Automatically generated by configure - do not modify +include ../config-host.mak