Blue Swirl
eacdccbb3e
alpha: fix compile
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-12-20 10:27:44 +00:00
Blue Swirl
2a90358f8a
Sparc64: handle MMU global bit and nucleus context
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-12-05 11:14:55 +00:00
Blue Swirl
dd5121bd8a
monitor: fix use of plain integer as NULL pointer, spotted by Sparse
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-12-04 20:52:02 +00:00
Blue Swirl
d05ac8faf5
Add "static" to please Sparse
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-12-04 20:44:44 +00:00
Blue Swirl
407f879abb
scsi: fix incorrect ?: use
...
Fixes OpenBSD build.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-12-04 18:08:59 +00:00
Blue Swirl
d08d6f04d6
monitor: use qemu_gettimeofday(), not gettimeofday()
...
Fix mingw32 build.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-12-04 18:06:39 +00:00
Blue Swirl
08fd0fa9f1
win32: fix variable use before initialization
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-12-04 18:06:20 +00:00
Blue Swirl
242cd0030a
monitor: rename EVENT_* to QEVENT_* to avoid conflict on mingw32
...
Partially fixes mingw32 build.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-12-04 18:05:45 +00:00
Blue Swirl
31a68d5766
Sparc64: fix compilation with DEBUG_MMU
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-12-04 16:16:33 +00:00
Blue Swirl
22a2bdcbae
Fix OpenBSD build of qemu-io
...
GCC 3.3.5 generates warnings for static forward declarations of data, so
rearrange code to use static forward declarations of functions instead.
Use <getopt.h> for optind instead of local definition.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-21 09:06:46 +00:00
Blue Swirl
9cf55765b9
Fix typo
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-17 21:27:18 +00:00
Blue Swirl
50035d3db1
Fix mingw32 build
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-17 21:00:38 +00:00
Blue Swirl
9c7a420265
Prevent configuring for a user emulator on a different type of OS
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-17 20:52:56 +00:00
Blue Swirl
d27d06f21f
PPC64: map Uni-North AGP bus aka fix Linux boot
...
Uni-North AGP device mapping was accidentally dropped in
2e29bd0478 .
Map the device.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-15 17:42:17 +00:00
Blue Swirl
603987488c
PPC64: Partial fix to Linux crash: revert to old devfn
...
Before 2e29bd0478 , Uni-North host and AGP
bridge were using the same devfn, 11 << 3. The net effect was that only
AGP bridge was visible. This was changed in the commit to 13 << 3 for AGP.
Some of the later crashes happened due to NULL pointer dereferences generated
by 07b7d05377 and insufficient return value
checks.
Disable host device and revert AGP to 11 << 3.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-15 14:30:56 +00:00
Blue Swirl
c364c974d9
PCI: make duplicate devfn allocation fatal
...
Only two callers of pci_create_simple/pci_register_device bothered
to check the return value. Other cases were prone to crashing with
spurious NULL pointer dereferences.
Make QEMU exit with an error message when devfn is attempted to
be duplicated, also applies to case when the bus is full. Remove
checks.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-15 14:30:03 +00:00
Blue Swirl
51cc2e783a
mips: fix cpu_reset memory leak
...
Remove cpu_mips_register()
- move mmu_init(), fpu_init() and mvp_init() into cpu_mips_init()
- move the other parts in cpu_mips_init()
Reported-by: Blue Swirl <blauwirbel@gmail.com >
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net >
2009-11-14 02:25:52 +01:00
Blue Swirl
bc90ff7742
Fix PPC crash
...
Because of a typo, structure field vga_bios_size was not initialized
properly and a bogus BAR6 for the nonexistent VGA BIOS appeared.
The bug was uncovered by c169998802 .
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-13 19:00:11 +00:00
Blue Swirl
b4558d7481
(x86/Sparc/PPC)-user: fix cpu_copy
...
b55a37c981 moved the call to cpu_reset
to user emulators. But cpu_copy also initializes a CPU structure, so add the
call also there.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-07 16:34:12 +00:00
Blue Swirl
4a64356397
IDE: Fix reset handling
...
Problem: x86 systems could not survive a few system_resets.
Clear most of IDE state when reset. Implement the missing reset handlers.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-07 14:13:05 +00:00
Blue Swirl
b55a37c981
user: move CPU reset call to main.c for x86/PPC/Sparc
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-07 10:37:06 +00:00
Blue Swirl
d84bda46de
PPC: rename cpu_ppc_reset to cpu_reset for consistency
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-07 10:36:04 +00:00
Blue Swirl
44a9935465
Sparc64/x86: remove unneeded calls to device reset
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-07 10:05:03 +00:00
Blue Swirl
e43941318d
PPC: remove unneeded calls to device reset
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-07 09:32:21 +00:00
Blue Swirl
a01d6ef446
sparc32 (mostly): remove unneeded calls to device reset
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-11-07 08:55:24 +00:00
Blue Swirl
f79ca11027
sparc32: tcx: remove unused include directive
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-25 15:04:43 +00:00
Blue Swirl
b280fcdfde
sparc32: convert sbi to VMState, vmsd and vmstate reset
...
Also remove unused include directive.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 20:08:43 +00:00
Blue Swirl
9a2070d3c0
sparc32: convert Sun4c interrupt controller to reset + vmsd
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 19:49:15 +00:00
Blue Swirl
78971d57bb
sparc32: convert interrupt controller to reset + vmsd
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 19:44:37 +00:00
Blue Swirl
1a522e8a67
sparc32: convert IOMMU to reset + vmsd
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 19:39:17 +00:00
Blue Swirl
49ef6c9055
sparc32: convert DMA controller to reset + vmsd, fix reset on init
...
Add a missing call to reset on device init.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 19:35:32 +00:00
Blue Swirl
285e468d64
m48t59: convert to vmstate reset
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 19:22:56 +00:00
Blue Swirl
0e0bfeea68
sparc32: convert slavio_timer to reset + vmsd
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 17:35:13 +00:00
Blue Swirl
2be3783328
fdc: convert to reset + vmsd
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 16:56:20 +00:00
Blue Swirl
63235df8a1
esp: convert to reset + vmsd
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 16:34:21 +00:00
Blue Swirl
82d4c6e683
sparc32: convert cs4231 to VMState, vmsd and reset
...
Also remove unused include directive.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 16:20:32 +00:00
Blue Swirl
09330e90fe
escc: add chipset docs
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 16:09:01 +00:00
Blue Swirl
bdb78cae61
escc: convert to VMState, vmsd and reset
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 16:07:10 +00:00
Blue Swirl
5ac574c4d3
sparc32: add chipset docs for eccmemctl
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 15:27:28 +00:00
Blue Swirl
1795057a8f
sparc32: convert slavio_misc to reset + vmsd
...
Also remove unused include directive.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 15:27:23 +00:00
Blue Swirl
0284dc5410
sparc32: convert eccmemctl to reset + vmsd
...
Also remove unused include directive.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 14:14:39 +00:00
Blue Swirl
1c6a50e71c
sparc64: remove unused variables
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-24 09:15:22 +00:00
Blue Swirl
544f4f0b5a
bsd-user: fix breakage by 78cfb07fe0
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-18 18:44:38 +00:00
Blue Swirl
747bbdf79f
Suppress warnings about 'warn_unused_result' attribute directive
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-18 16:26:06 +00:00
Blue Swirl
976b2037e5
x86: add 'static' to please Sparse
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-18 14:51:10 +00:00
Blue Swirl
5afe3f042a
Only IDE needs limits for CHS configuration
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-17 09:08:47 +00:00
Blue Swirl
930f3fe11f
Add some chipset doc links
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-13 18:56:27 +00:00
Blue Swirl
6a8a280364
user: fix libuser build messages
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-13 16:57:32 +00:00
Blue Swirl
fa58948d1f
Use GNU ld to link roms on OpenSolaris
...
OpenSolaris ld seems to miss the equivalent of GNU ld's "-Ttext 0".
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-02 19:38:25 +00:00
Blue Swirl
8d32cf0eb4
Fix warning about undefined madvise() on OpenSolaris
...
OpenSolaris headers can't export madvise() with a sane set of #defines.
For background, see MySQL bug #7156 (http://bugs.mysql.com/bug.php?id=7156 )
for discussion about Solaris header problems.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-10-02 19:32:12 +00:00
Blue Swirl
20889d4ef7
Win32: avoid a warning
...
GetLastError() returns a DWORD.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-27 20:03:56 +00:00
Blue Swirl
032e51d7f0
BSD user: suppress a warning
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-27 19:30:56 +00:00
Blue Swirl
2fa5d9ba56
BSD user: implement GUEST_BASE
...
Based on 379f6698d7 .
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-27 19:30:51 +00:00
Blue Swirl
add16157d7
Compile some user files only once for all targets
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-27 16:26:02 +00:00
Blue Swirl
b461cdc9b3
Don't compile roms if not building system targets
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-27 14:35:44 +00:00
Blue Swirl
05d00df4e1
Fix user emulator breakage
...
Fix breakage in the following conditions:
- use in-tree building
- build user targets after system targets
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-27 13:56:55 +00:00
Blue Swirl
3f600fa030
Revert "This files are compiled in libqemu.a now"
...
This reverts commit fe6549dfd7 .
tcg-runtime and host-utils are needed on 32 bit host and they are not part
of libqemu.a.
Thanks to Stefan Weil for reporting.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-25 19:21:06 +00:00
Blue Swirl
39b7f20eec
Fix device tree compile broken by ca20cf32ab
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-23 08:41:45 +02:00
Blue Swirl
16d55035d7
Fix Sparse warning about invalid access past the end of 'mode'
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-21 20:21:53 +00:00
Blue Swirl
284b08f174
Fix Sparse warning about obsolete struct initializer
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-21 19:50:05 +00:00
Blue Swirl
d4fa8d909c
Export tables properly to avoid a Sparse warning
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-21 18:40:57 +00:00
Blue Swirl
6f4fc3679c
Add 'static' to please Sparse
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-21 18:39:26 +00:00
Blue Swirl
b9d38e9510
Fix Sparse warnings about using plain integer as NULL pointer
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-21 18:11:34 +00:00
Blue Swirl
52d946208e
Fix user targets broken by 96e132e24e
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-21 15:24:07 +00:00
Blue Swirl
c2b023b627
Compile host-utils only once
...
See also facd285778 and
34005a0060 .
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-20 19:20:05 +00:00
Blue Swirl
96e132e24e
Compile TCG runtime library only once
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-20 19:06:34 +00:00
Blue Swirl
bd390e6425
Compile ne2000 only once
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-20 16:19:32 +00:00
Blue Swirl
afcea8cbde
ioports: remove unused env parameter and compile only once
...
The CPU state parameter is not used, remove it and adjust callers. Now we
can compile ioport.c once for all targets.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-20 16:05:47 +00:00
Blue Swirl
5e520a7d50
Compile msix only once
...
Get page size in device init.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-20 15:35:55 +00:00
Blue Swirl
ca20cf32ab
Compile loader only once
...
Callers must pass ELF machine, byte swapping and symbol LSB clearing
information to ELF loader. A.out loader needs page size information, pass
that too as a parameter.
Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw.
Adjust callers. Also use target_phys_addr_t instead of target_ulong for
addresses: loader addresses aren't virtual.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-20 14:58:02 +00:00
Blue Swirl
a333cd7166
Compile qemu-config only once
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-20 08:28:29 +00:00
Blue Swirl
9801c7b436
Compile wdt_i6300esb only once
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-20 08:02:28 +00:00
Blue Swirl
8756aa7260
Fix mingw32 compile
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-20 07:51:06 +00:00
Blue Swirl
5f6b9e8fd5
Probe for fdatasync()
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-20 06:56:26 +00:00
Blue Swirl
cdd0935cbd
PPC: make system bus parent of PCI bus
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-19 17:59:10 +00:00
Blue Swirl
cc9952f3ac
ESP: convert to VMState
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-19 15:44:50 +00:00
Blue Swirl
5c637a20e9
Fix breakage by f80237d450 for ISA-less targets
...
Move ISA bus to HW library.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-14 18:34:54 +00:00
Blue Swirl
f80237d450
Add an ISA bus version of m48t59
...
Many thanks to Gerd Hoffmann for finding and fixing a bug in the initial
version.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-14 15:33:28 +00:00
Blue Swirl
50108930b8
Revert "Fix Sparc/Linux host breakage by df70204db53e3611af986f434e74a882bce190ca"
...
This reverts commit 91b40c5be8 .
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-13 19:38:48 +00:00
Blue Swirl
240324f612
Fix sparc.ld
...
Makes 91b40c5be8 unnecessary.
Acked-by: Kirill A. Shutemov <kirill@shutemov.name >
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-13 19:38:43 +00:00
Blue Swirl
91b40c5be8
Fix Sparc/Linux host breakage by df70204db5
...
While i386, x86_64 and Sparc64/OpenBSD still worked after
df70204db5 , Sparc32 and Sparc64 Linux hosts
broke.
Partially revert the commit: make the restored code conditional to
!CONFIG_USER_PIE.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-13 13:33:05 +00:00
Blue Swirl
c5ff6d5472
Sparc64: make system bus parent of PCI bus
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-13 08:32:40 +00:00
Blue Swirl
075cd324df
x86: move a declaration to header
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-13 08:32:39 +00:00
Blue Swirl
675d6f8210
x86: add 'const'
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-13 08:32:37 +00:00
Blue Swirl
aba1d00a41
Work around OpenSolaris sys/regset.h namespace pollution
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-12 12:36:11 +00:00
Blue Swirl
a2a45a26c9
Fix signedness warnings on OpenSolaris
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-12 12:36:09 +00:00
Blue Swirl
d741429a9b
Add #defines needed by OpenSolaris, fix breakage by the #defines
...
We need to define _XOPEN_SOURCE and __EXTENSIONS__ macros in order to get
CMSG_ and TIOCWIN macros defined. But then _POSIX_C_SOURCE gets defined, which
is (incorrectly) used as an indicator for existence of posix_memalign() in osdep.c.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-12 12:36:04 +00:00
Blue Swirl
31ff504d2a
Fix OpenSolaris build breaking typos
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-12 12:33:07 +00:00
Blue Swirl
c139090369
Add 'static'
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-12 09:58:51 +00:00
Blue Swirl
de5071c551
Fix a Sparse warning about redefinition of offsetof()
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-12 09:58:46 +00:00
Blue Swirl
72cf2d4f0e
Fix sys-queue.h conflict for good
...
Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc923584 ,
f40d753718 ,
96555a96d7 and
3990d09adf but the fixes were fragile.
Solution: Avoid the conflict entirely by renaming the functions and the
file. Revert the previous hacks.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-12 07:36:22 +00:00
Blue Swirl
620150dc9c
Try to fix BSD breakage by 806b602482
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-12 06:19:16 +00:00
Blue Swirl
15cc923584
Include sys-queue.h early to override system queue definitions on BSD
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-12 06:19:15 +00:00
Blue Swirl
47faadc676
Unbreak BSD: use qemu_fdatasync instead of fdatasync
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-12 06:19:14 +00:00
Blue Swirl
179da8afe6
USB: use opaque parameter passing for monitor handle
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-07 19:00:18 +00:00
Blue Swirl
1e43a8e4d2
Sparc64: use ISA bus for i8042
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-06 16:34:18 +00:00
Blue Swirl
5bc89ef61b
Sparc64: remove unused variables
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-06 16:32:34 +00:00
Blue Swirl
1dde6fcca7
Make ioport default tables const
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-06 16:32:13 +00:00
Blue Swirl
82663ee220
Fix indentation
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-06 16:31:58 +00:00
Blue Swirl
1e6eec8b33
Fix Sparse warnings: add "static"
...
Signed-off-by: Blue Swirl <blauwirbel@gmail.com >
2009-09-05 10:14:07 +00:00