Commit Graph

366 Commits

Author SHA1 Message Date
ths f3e3285dcd Fix some compiler warnings.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3520 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-03 15:12:16 +00:00
j_mayer f10c315f8f Fix incorrect PowerPC instruction fetch exception dump.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3517 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-03 13:22:08 +00:00
ths 89343ecde5 EFAULT - update __get_user() __put_user(), by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3508 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-02 20:24:22 +00:00
ths 80210bcd71 Fix compiler warnings, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3507 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-02 19:08:57 +00:00
ths 3d97b40b05 EFAULT - verify pages are in cache and are read/write, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3506 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-02 19:02:07 +00:00
ths 33189d3115 Add new files fir strace support, missed in earlier commit.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3504 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-01 00:13:36 +00:00
ths b92c47c1cc Strace for userland emulation, by Stuart Anderson and Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3502 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-01 00:07:38 +00:00
balrog 12bc92ab8a Do not make NETLINK socket connections possible (Alexander Graf).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3488 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-30 21:06:14 +00:00
ths 623a930ec3 Implement missing MIPS supervisor mode bits.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3472 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-28 19:45:05 +00:00
j_mayer 7c58044c0a Fix PowerPC FPSCR update and floating-point exception generation
in most useful cases.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3458 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-27 17:54:30 +00:00
j_mayer a32ff1ad95 PowerPC user-mode fix: MSR is now entirelly set-up in the cpu_reset routine.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3457 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-27 17:29:35 +00:00
j_mayer 0411a97258 Gprof prooved the PowerPC emulation spent too much time in MSR load and store
routines. Coming back to a raw MSR storage model then speed-up the emulation.
Improve fast MSR updates (wrtee wrteei and mtriee cases).
Share rfi family instructions helpers code to avoid bug in duplicated code.
Allow entering halt mode as the result of a rfi instruction.
Add a new helper_regs.h file to avoid duplication of special registers
 manipulation routines (currently XER and MSR).


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3436 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-25 21:35:50 +00:00
ths 0da46a6e2e Syscall target errno fixes, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3418 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-20 20:23:07 +00:00
j_mayer f85e9a6870 Use TARGET_ABI_DIR feature to unify PowerPC and PowerPC 64 definitions.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3410 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-18 20:51:49 +00:00
j_mayer e85e7c6ea4 Use the new TARGET_ABI32 feature to implement a ppc64abi32-linux-user target
(PowerPC 64 running in 32 bits mode).
Use the new TARGET_ABI_DIR feature to implement a ppcemb-linux-user target
  (PowerPC 32 with 64 bits GPRs and vector extensions).


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3409 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-18 19:59:49 +00:00
blueswir1 952a328ff5 SuperSparc MXCC support (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3397 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-14 16:29:21 +00:00
blueswir1 992f48a036 Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3396 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-14 16:27:31 +00:00
j_mayer c732abe222 Unify '-cpu ?' option.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3380 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-12 06:47:46 +00:00
blueswir1 cb33da57aa Support for executing 32 bit SPARC32PLUS files for Sparc64 user emulator
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3378 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-09 16:34:29 +00:00
ths c6cda17aca getpriority() shouldn't use libc wrapper, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3376 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-09 03:42:34 +00:00
ths 48733d195b CRIS Linux userland emulation, part 2. By Edgar E. Iglesias.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3367 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-08 13:36:46 +00:00
ths e69b406510 CRIS Linux usermode emulation, part 1. By Edgar E. Iglesias.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3366 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-08 13:35:05 +00:00
j_mayer 3d17787055 Fix host and target longs confusions (continued).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3345 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-07 16:06:13 +00:00
j_mayer 863cf0b72c Fix confusions between host and target long types.
Fix start_data computation.
Fix auxiliary infos setup.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3344 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-07 15:59:45 +00:00
blueswir1 5bfb56b264 Implement sparc64_[gs]et_context
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3334 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-05 17:01:51 +00:00
j_mayer 1cc8e6f067 We must reset the PowerPC CPU _after_ registering it, as hardware reset
effect is implementation dependant.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3323 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-04 01:54:44 +00:00
j_mayer 56ba31ff0b Fix missing case in the new PowerPC exception model.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3294 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-30 15:15:18 +00:00
ths a5b85f7959 Fix mmap to handle differing host/target page sizes, by Edgar E. Iglesias.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3291 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-30 14:32:45 +00:00
ths 0574b6fb10 Add get_sp_from_cpustate implementation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3290 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-30 13:49:22 +00:00
ths 540635ba65 Code provision for n32/n64 mips userland emulation. Not functional yet.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3284 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-30 01:58:33 +00:00
j_mayer a062e36c58 Implement the PowerPC alternate time-base, following the 2.04 specification.
Share most code with the time-base management routines.
Remove time-base write routines from user-mode emulation environments.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3277 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-30 00:38:38 +00:00
j_mayer 8bb1f9c51c Provision for x86_64-linux-user target: needs get_sp_from_cpustate
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3262 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-29 13:12:58 +00:00
j_mayer e1833e1f96 Rework PowerPC exceptions model to make it more versatile:
* don't use exception vectors as the exception number.
  Use vectors numbers as defined in the PowerPC embedded specification instead
  and extend this model to cover all emulated PowerPC variants exceptions.
* add some missing exceptions definitions, from PowerPC 2.04 specification
  and actual PowerPC implementations.
* add code provision for hypervisor exceptions handling.
* define exception vectors and prefix in CPUPPCState to emulate BookE exception
  vectors without any hacks.
* define per CPU model valid exception vectors.
* handle all known exceptions in user-mode only emulations.
* fix hardware interrupts priorities in most cases.
* change RET_EXCP macros name into GEN_EXCP as they don't return.
* do not stop translation on most instructions that are not defined as
  context-synchronizing in PowerPC specification.
* fix PowerPC 64 jump targets and link register update when in 32 bits mode.
* Fix PowerPC 464 and 464F definitions.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3261 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-29 13:06:16 +00:00
ths df0d373665 Build fix, ppc64 needs also a get_sp_from_cpustate function now.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3254 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-28 18:45:59 +00:00
ths 198a74de4c Move get_sp_from_cpustate from cpu.h to target_signal.h.
Enable sigaltstack processing for more architectures.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3253 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-27 16:44:32 +00:00
ths a04e134ad1 linux-user sigaltstack() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3252 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-27 13:57:58 +00:00
j_mayer 4118a97030 memset string pages to zero to avoid putting random data on the stack
that may make some program crash at startup.
Fix unsigned long / target_ulong confusion (more to do).
Fix missing g2h macros.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3249 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-27 04:10:43 +00:00
j_mayer 92a343da3f New ppc64-linux-user target.
Allow use of PowerPC 970 for debugging (softmmu would not run, for now).


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3246 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-27 01:14:15 +00:00
j_mayer a750fc0b91 Great rework and cleanups to ease PowerPC implementations definitions.
* cleanup cpu.h, removing definitions used only in translate.c/translate_init.c
* add new flags to define instructions sets more precisely
* various changes in MMU models definitions
* add definitions for PowerPC 440/460 support (insns and SPRs).
* add definitions for PowerPC 401/403 and 620 input pins model
* Fix definitions for most PowerPC 401, 403, 405, 440, 601, 602, 603 and 7x0
* Preliminary support for PowerPC 74xx (aka G4) without altivec.
* Code provision for other PowerPC support (7x5, 970, ...).
* New SPR and PVR defined, from PowerPC 2.04 specification and other sources
* Misc code bugs, error messages and styles fixes.
* Update status files for PowerPC cores support.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3244 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-26 23:54:22 +00:00
j_mayer 324071035f Convert syscall arguments and return value from long to int or target_long.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3241 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-26 23:01:49 +00:00
ths 9007f0ef73 linux-user utimensat() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3240 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-25 17:50:37 +00:00
ths b51eaa8218 Check if the hosts defines a symlinkat syscall.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3236 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-25 16:09:22 +00:00
ths 92a34c10b5 linux-user faccessat() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3227 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-24 09:27:49 +00:00
ths 814d79771f linux-user fchmodat() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3226 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-24 09:26:51 +00:00
ths 5e0ccb18da linux-user readlinkat() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3225 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-24 09:26:10 +00:00
ths f0b6243d5d linux-user symlinkat() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3224 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-24 09:25:40 +00:00
ths 64f0ce4c0d linux-user linkat() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3223 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-24 09:25:06 +00:00
ths 722183f69b linux-user renameat() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3222 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-24 09:24:37 +00:00
ths 8170f56baf linux-user unlinkat() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3221 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-24 09:24:11 +00:00
ths ccfa72b7da linux-user fchownat() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3220 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-24 09:23:34 +00:00