Skip to content

Commit

Permalink
Upstream 368b90d
Browse files Browse the repository at this point in the history
May 21, 2009
  • Loading branch information
gdwnldsKSC committed Feb 25, 2024
1 parent 8701fcb commit 87da671
Show file tree
Hide file tree
Showing 102 changed files with 2,234 additions and 1,472 deletions.
Binary file modified TESTFILES/WinQemu.dll
Binary file not shown.
Binary file modified TESTFILES/WinQemu.pdb
Binary file not shown.
Binary file modified TESTFILES/WinQemuTest.exe
Binary file not shown.
Binary file modified TESTFILES/WinQemuTest.pdb
Binary file not shown.
6 changes: 5 additions & 1 deletion WinQemu.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<Optimization>Disabled</Optimization>
<OmitFramePointers>false</OmitFramePointers>
<AdditionalIncludeDirectories>.\pxwc\inc;.\zlib;.\SDL\include;.\fmod api 3.75\api\inc;.\qemu\target-i386;.\qemu\fpu;.\qemu\tcg;.\qemu\tcg\i386;.\qemu;.\qemu\slirp;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;WINQEMU_EXPORTS;NEED_CPU_H;__i386__;TARGET_I386;TARGET_ALPHA;CONFIG_SOFTMMU;DATA_BITS=32;DATA_SIZE=4;WIN32_AIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;WINQEMU_EXPORTS;NEED_CPU_H;__i386__;TARGET_I386;TARGET_ALPHA;CONFIG_SOFTMMU;DATA_BITS=32;TARGET_PHYS_ADDR_BITS=32;DATA_SIZE=4;WIN32_AIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>UninitializedLocalUsageCheck</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FloatingPointModel>Precise</FloatingPointModel>
Expand Down Expand Up @@ -187,6 +187,7 @@
<ClCompile Include="qemu\hw\smbios.c" />
<ClCompile Include="qemu\hw\ssi.c" />
<ClCompile Include="qemu\hw\sysbus.c" />
<ClCompile Include="qemu\hw\virtio-pci.c" />
<ClCompile Include="qemu\hw\watchdog.c" />
<ClCompile Include="qemu\hw\wdt_i6300esb.c" />
<ClCompile Include="qemu\hw\wdt_ib700.c" />
Expand Down Expand Up @@ -1082,6 +1083,8 @@
<ClInclude Include="clock_gettime.h" />
<ClInclude Include="float80-port.h" />
<ClInclude Include="qemu\acl.h" />
<ClInclude Include="qemu\cpu-common.h" />
<ClInclude Include="qemu\hw\poison.h" />
<ClInclude Include="qemu\hw\qdev.h" />
<ClInclude Include="qemu\hw\smbios.h" />
<ClInclude Include="qemu\hw\ssi.h" />
Expand Down Expand Up @@ -1112,6 +1115,7 @@
<ClInclude Include="qemu\target-i386\ops_sse.h" />
<ClInclude Include="qemu\target-i386\ops_sse_header.h" />
<ClInclude Include="qemu\target-i386\svm.h" />
<ClInclude Include="qemu\targphys.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="qemu\a.out.h" />
Expand Down
12 changes: 12 additions & 0 deletions WinQemu.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,9 @@
<ClCompile Include="qemu\hw\ssi.c">
<Filter>qemu\hw\src</Filter>
</ClCompile>
<ClCompile Include="qemu\hw\virtio-pci.c">
<Filter>qemu\hw\src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="float80-port.h">
Expand Down Expand Up @@ -1733,6 +1736,15 @@
<ClInclude Include="qemu\hw\ssi.h">
<Filter>qemu\hw\inc</Filter>
</ClInclude>
<ClInclude Include="qemu\cpu-common.h">
<Filter>qemu\inc</Filter>
</ClInclude>
<ClInclude Include="qemu\targphys.h">
<Filter>qemu\inc</Filter>
</ClInclude>
<ClInclude Include="qemu\hw\poison.h">
<Filter>qemu\inc</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.md" />
Expand Down
8 changes: 5 additions & 3 deletions qemu/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Makefile for QEMU.

ifneq ($(wildcard config-host.mak),)
# Put the all: rule here so that config-host.mak can contain dependencies.
all: build-all
include config-host.mak
include $(SRC_PATH)/rules.mak
else
Expand Down Expand Up @@ -41,7 +43,7 @@ ifdef CONFIG_WIN32
LIBS+=-lwinmm -lws2_32 -liphlpapi
endif

all: $(TOOLS) $(DOCS) recurse-all
build-all: $(TOOLS) $(DOCS) recurse-all

config-host.mak: configure
ifneq ($(wildcard config-host.mak),)
Expand Down Expand Up @@ -237,14 +239,14 @@ clean:
rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
$(MAKE) -C tests clean
for d in $(TARGET_DIRS); do \
for d in $(TARGET_DIRS) libhw32 libhw64; do \
$(MAKE) -C $$d $@ || exit 1 ; \
done

distclean: clean
rm -f config-host.mak config-host.h $(DOCS) qemu-options.texi
rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
for d in $(TARGET_DIRS); do \
for d in $(TARGET_DIRS) libhw32 libhw64; do \
rm -rf $$d || exit 1 ; \
done

Expand Down
36 changes: 36 additions & 0 deletions qemu/Makefile.hw
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Makefile for qemu target independent devices.

include config.mak
include ../config-host.mak
include $(SRC_PATH)/rules.mak

.PHONY: all

VPATH=$(SRC_PATH):$(SRC_PATH)/hw

CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS)
LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS)

CPPFLAGS += -I. -I.. -I$(SRC_PATH) -MMD -MP -MT $@
CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
CPPFLAGS+=-I$(SRC_PATH)/fpu

OBJS=
OBJS+= virtio.o virtio-pci.o
OBJS+= fw_cfg.o
OBJS+= watchdog.o
OBJS+= nand.o ecc.o

OBJS+= m48t59.o

OBJS+= dma-helpers.o sysbus.o

all: $(HWLIB)

$(HWLIB): $(OBJS)

clean:
rm -f *.o *.d *.a *~

# Include automatically generated dependency files
-include $(wildcard *.d */*.d)
25 changes: 12 additions & 13 deletions qemu/Makefile.target
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,11 @@ endif #CONFIG_BSD_USER
# System emulator target
ifndef CONFIG_USER_ONLY

OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o dma-helpers.o \
gdbstub.o gdbstub-xml.o sysbus.o
OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o \
gdbstub.o gdbstub-xml.o
# virtio has to be here due to weird dependency between PCI and virtio-net.
# need to fix this properly
OBJS+=virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
OBJS+=fw_cfg.o
OBJS+=virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
ifdef CONFIG_KVM
OBJS+=kvm.o kvm-all.o
endif
Expand Down Expand Up @@ -563,7 +562,6 @@ OBJS += rtl8139.o
OBJS += e1000.o

# Generic watchdog support and some watchdog devices
OBJS += watchdog.o
OBJS += wdt_ib700.o wdt_i6300esb.o

ifeq ($(TARGET_BASE_ARCH), i386)
Expand All @@ -580,7 +578,7 @@ CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
# shared objects
OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o
# PREP target
OBJS+= pckbd.o serial.o i8259.o i8254.o fdc.o m48t59.o mc146818rtc.o
OBJS+= pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o
OBJS+= prep_pci.o ppc_prep.o
# Mac shared devices
OBJS+= macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o escc.o
Expand Down Expand Up @@ -614,7 +612,7 @@ CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
endif
ifeq ($(TARGET_BASE_ARCH), cris)
# Boards
OBJS+= etraxfs.o axis_dev88.o
OBJS+= cris_pic_cpu.o etraxfs.o axis_dev88.o

# IO blocks
OBJS+= etraxfs_dma.o
Expand All @@ -623,15 +621,15 @@ OBJS+= etraxfs_eth.o
OBJS+= etraxfs_timer.o
OBJS+= etraxfs_ser.o

OBJS+= pflash_cfi02.o nand.o
OBJS+= pflash_cfi02.o
endif
ifeq ($(TARGET_BASE_ARCH), sparc)
ifeq ($(TARGET_ARCH), sparc64)
OBJS+= sun4u.o ide.o pckbd.o vga.o apb_pci.o
OBJS+= fdc.o mc146818rtc.o serial.o m48t59.o
OBJS+= fdc.o mc146818rtc.o serial.o
OBJS+= cirrus_vga.o parallel.o
else
OBJS+= sun4m.o tcx.o iommu.o m48t59.o slavio_intctl.o
OBJS+= sun4m.o tcx.o iommu.o slavio_intctl.o
OBJS+= slavio_timer.o escc.o slavio_misc.o fdc.o sparc32_dma.o
OBJS+= cs4231.o eccmemctl.o sbi.o sun4c_intctl.o
endif
Expand All @@ -647,7 +645,7 @@ OBJS+= arm-semi.o
OBJS+= pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
OBJS+= pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
OBJS+= pflash_cfi01.o gumstix.o
OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o
OBJS+= zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o
OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o
OBJS+= omap2.o omap_dss.o soc_dma.o
OBJS+= omap_sx1.o palm.o tsc210x.o
Expand All @@ -657,6 +655,7 @@ OBJS+= musicpal.o pflash_cfi02.o
OBJS+= framebuffer.o
OBJS+= syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
OBJS+= syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
OBJS+= syborg_virtio.o
CPPFLAGS += -DHAS_AUDIO
endif
ifeq ($(TARGET_BASE_ARCH), sh4)
Expand Down Expand Up @@ -715,8 +714,8 @@ endif
vl.o: qemu-options.h

$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
$(QEMU_PROG): ARLIBS=../libqemu_common.a libqemu.a
$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
$(QEMU_PROG): ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a $(HWLIB)
$(call LINK,$(OBJS))

endif # !CONFIG_USER_ONLY
Expand Down
5 changes: 5 additions & 0 deletions qemu/block/qcow2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2281,6 +2281,11 @@ static int qcow_snapshot_list(BlockDriverState *bs,
QCowSnapshot *sn;
int i;

if (!s->nb_snapshots) {
*psn_tab = NULL;
return s->nb_snapshots;
}

sn_tab = qemu_mallocz(s->nb_snapshots * sizeof(QEMUSnapshotInfo));
for(i = 0; i < s->nb_snapshots; i++) {
sn_info = sn_tab + i;
Expand Down
Loading

0 comments on commit 87da671

Please sign in to comment.