Stanislav Shwartsman
07739173f5
add --show-ips to all configs for future releases (it is not ON by default ?)
...
Bit32u -> bx_phy_address in debugger and some other places
2007-10-09 19:49:23 +00:00
Stanislav Shwartsman
2d981562c4
changes Bit32u -> bx_phy_address in dbg paging method
2007-10-08 20:45:30 +00:00
Stanislav Shwartsman
2548c05537
Enable SSE4_2 in CPUID
2007-10-01 21:08:26 +00:00
Stanislav Shwartsman
dbb91069f4
Added SSE4_2 instructions emulation
2007-10-01 19:59:37 +00:00
Stanislav Shwartsman
a0d0de9fd4
Fixed ARPL issue mentioned in
...
Attacks on Virtual Machine Emulators
document by Symantec
2007-09-30 18:47:41 +00:00
Stanislav Shwartsman
071c5c1a26
A lot of changes but everything is really trivial.
...
Make save/restore default feature, the configure option for save/restore removed from configure script and save/restore made available forever. All code now assume it is exists. Bochs save/restore tree previosly called "save_restore" renamed to "bochs" tree and it will be havily used everywhere, starting from save/restore and ending by various bochs debugger functions. I am going to rework debugger code to get rid of debug CPU access functions and use this "bochs" param tree instead
2007-09-28 19:52:08 +00:00
Stanislav Shwartsman
02b7d8b43d
Remove 'result' variable where it is definitelly not needed - simplify sse code
2007-09-27 16:23:29 +00:00
Stanislav Shwartsman
d9005b88c1
Added error code for exception debug messages - help to debug
2007-09-27 16:22:14 +00:00
Stanislav Shwartsman
deb79e9675
[Bochs-developers] [PATCH] avoid RCX without BX_SUPPORT_X86_64
2007-09-27 16:11:32 +00:00
Stanislav Shwartsman
7e629dedad
remove dbg print
2007-09-26 19:10:41 +00:00
Stanislav Shwartsman
44a04a5fa3
readability/writeability bit should not be checked in 64-bit mode
2007-09-26 19:09:10 +00:00
Stanislav Shwartsman
dcb0335ae9
Debug first instruction in exception handler after exception
2007-09-26 18:07:39 +00:00
Stanislav Shwartsman
e812f81e7b
Fixes in zero upper ECX
2007-09-25 16:11:32 +00:00
Stanislav Shwartsman
3e3254ecc4
some speedup for SSE code - achived by code simplification
2007-09-20 22:55:03 +00:00
Stanislav Shwartsman
91e6ca8d5c
Implemented MTRR support
...
Fixes in #PF exception priority
2007-09-20 17:33:35 +00:00
Stanislav Shwartsman
0dc4badfbb
Added SSE4A and SSE4_2 to disassembler
...
Implemented POPCNT instruction
2007-09-19 19:38:10 +00:00
Stanislav Shwartsman
70f513b07b
Make efer control MSR separate register
2007-09-10 20:47:08 +00:00
Stanislav Shwartsman
b4df87c9b0
Added CVS id
2007-09-10 16:04:41 +00:00
Stanislav Shwartsman
412eeeeb7c
Get crregs definition to separate file from cpu.h
2007-09-10 16:00:15 +00:00
Stanislav Shwartsman
016660698e
just code cleanup, preparation for future
2007-08-31 18:09:34 +00:00
Stanislav Shwartsman
5ac1bb6646
rewrite page fault
2007-08-30 16:48:10 +00:00
Stanislav Shwartsman
b64fc08c54
implement prefetch hint opcodes
2007-08-23 16:47:51 +00:00
Stanislav Shwartsman
4555cc9be3
ud2b opcode should have modrm byte
2007-08-18 13:51:16 +00:00
Stanislav Shwartsman
895891b673
Implemented #AC check under configure option
...
Fixes in misaligned SSE support
2007-07-31 20:25:52 +00:00
Stanislav Shwartsman
58a2595bca
Misaligned SSE support
2007-07-15 19:03:39 +00:00
Stanislav Shwartsman
38d1f39c77
Converted CR0 bits to one register similar to CR4 - a bit slower but helps with other features implemntation
2007-07-09 15:16:14 +00:00
Stanislav Shwartsman
7c6c2bb520
Removed PANIC message
2007-06-08 09:25:30 +00:00
Stanislav Shwartsman
65a99eb736
Change BX_ERROR to BX_DEBUG
2007-04-25 20:14:15 +00:00
Stanislav Shwartsman
55365ba713
Minimize usage of result register
2007-04-19 19:09:52 +00:00
Stanislav Shwartsman
1c3e703394
Fixed DAZ handling by CVT instructions
2007-04-19 18:50:57 +00:00
Stanislav Shwartsman
5189cfbf10
SSE4 support
2007-04-19 16:12:21 +00:00
Stanislav Shwartsman
f6af99dead
Some variables renaming + CPU vendor variable defition
2007-04-17 21:38:51 +00:00
Stanislav Shwartsman
6c139a9c8c
Define LIN and PHY address size in config.h
2007-04-14 10:05:30 +00:00
Stanislav Shwartsman
3886e35bcb
Clean code duplication
2007-04-09 21:55:07 +00:00
Stanislav Shwartsman
223b9fda0e
Fixed RIP relative mode when in 32-bit address size
2007-04-09 21:15:00 +00:00
Stanislav Shwartsman
e26609fa97
Support for Intel LSS/LFS/LGS in 64-bit mode
...
TODO: have both AMD and Intelk versions
2007-04-09 20:28:15 +00:00
Stanislav Shwartsman
b6c8275cfd
remove old PIT model and always use Greg Alexander's new one
2007-04-08 21:57:06 +00:00
Volker Ruppert
f8aec91820
- fixed some MSVC warnings
2007-04-06 15:22:17 +00:00
Stanislav Shwartsman
65b9b46de3
Fix for legacy compilers
2007-04-04 16:55:50 +00:00
Stanislav Shwartsman
bdc4905c8a
Correctly detect SSE2 and SSE instructions and #UD when SSE2 is OFF for SSE
2007-04-02 10:46:33 +00:00
Stanislav Shwartsman
4bb19c2dc3
Fixed deciding and disasm of CALL in 64-bit mode (no 16-bit calls allowed)
2007-03-28 21:20:09 +00:00
Stanislav Shwartsman
26f08fdb2c
Change my e-mail to #SF one
2007-03-23 21:27:13 +00:00
Stanislav Shwartsman
c184a3a2ba
Removed redundant mem-only checks - handled in fetchdecode now
2007-03-23 14:50:45 +00:00
Stanislav Shwartsman
ef542b3790
Learn to decode and disassemble VMX opcodes
...
No fetchdecode support but everything is ready
2007-03-23 14:35:50 +00:00
Stanislav Shwartsman
1ec33ec518
Correctly #UD on aliased instructions when no SSE2 is configured
2007-03-22 22:51:41 +00:00
Stanislav Shwartsman
0436125d60
Some cleanup in lazy flags CF handling
2007-03-18 19:29:17 +00:00
Stanislav Shwartsman
b8787fd5a7
Some code cleanups and warning fixes
2007-03-14 21:15:15 +00:00
Stanislav Shwartsman
8ce336cad3
Fixed PANIC message
2007-03-10 09:04:39 +00:00
Stanislav Shwartsman
05ea111e1c
Clean CPU debug methods in main cpu_loop
2007-03-06 17:47:18 +00:00
Stanislav Shwartsman
8067503c67
PUSHA/POP instructions rewritten, fixed PANIC message
2007-03-02 21:03:25 +00:00
Stanislav Shwartsman
d3252fbc1c
Removed unneeded invalidate_prefetch_q from RDMSR instruction
2007-02-23 22:08:43 +00:00
Stanislav Shwartsman
8d2060b855
Replace access_linear by read_virtual_xword when applicable
2007-02-03 21:36:40 +00:00
Stanislav Shwartsman
2f9e1bee68
fixed code duplication and comments
2007-02-03 17:56:35 +00:00
Stanislav Shwartsman
372ac39050
Report some cache info in CPUID - port from QEMU
2007-01-29 17:56:03 +00:00
Stanislav Shwartsman
c24627c00f
Implemented CLFLUSH instruction
...
Set of minor fixes for correctness
2007-01-28 21:27:31 +00:00
Stanislav Shwartsman
82607c4a35
Safety net - comment BX_WRITE_32BIT_REG macro - always use WRITE_32BIT_REGZ instead !
2007-01-26 22:16:59 +00:00
Stanislav Shwartsman
8221fa6838
- Fixed zero upper 32-bit part of GPR in x86-64 mode
...
- CMOV_GdEd should zero upper 32-bit part of GPR register even if the
'cmov' condition was false !
2007-01-26 22:12:05 +00:00
Stanislav Shwartsman
acd1a05f6f
Fixed bugs for SSE3E execution and decoding
2007-01-25 21:44:35 +00:00
Stanislav Shwartsman
f8003098b1
Rename SSE4 to SSE3E to match intel docs. SSE4 coming later ;)
...
Fixed "last prefix" for REX in 64-bit mode
2007-01-25 19:09:41 +00:00
Stanislav Shwartsman
0e991964fd
incorrectly committed debug code
2007-01-13 10:45:32 +00:00
Stanislav Shwartsman
dd00bc66d0
Fixed disasm in 64bit mode, added new accessor for printing 64bit values
2007-01-13 10:43:31 +00:00
Stanislav Shwartsman
9db896d100
minor x86_64 fixes and cleanups
2007-01-12 22:47:21 +00:00
Stanislav Shwartsman
9b10f209f3
Fixed typo
2007-01-12 16:09:39 +00:00
Stanislav Shwartsman
5c21f7821f
Speed simulation between 3 to 5% by eliminating several checks from cpu loop.
...
The checks were related to repeat instructions - handle them differently
2007-01-05 13:40:47 +00:00
Stanislav Shwartsman
6e8dcbce8b
Fixed 64-bit NOP problem
...
Patch by mvysin in patch tyracker
2006-11-26 12:53:01 +00:00
Volker Ruppert
e8cd2052c9
- improved gdbstub network efficiency (SF patch #1149659 by Avi Kivity)
...
- reimplemented "enter debugger" in ask dialog for gdbstub
- X11 and wxWidgets ask dialog now show "Debugger" button for gdbstub
- indent mode changes
2006-10-29 08:48:30 +00:00
Stanislav Shwartsman
905de565a9
Add debug prints for NX bit feature
2006-10-28 12:31:23 +00:00
Stanislav Shwartsman
650086669c
Print 64-bit registers in 'info registers' command and in dump_regs
2006-10-21 22:06:39 +00:00
Volker Ruppert
8312d149eb
- stop flooding logfile when using MS-DOS with EMM386. It seems to work correctly,
...
so I think this message can be changed to BX_DEBUG.
2006-10-20 15:38:39 +00:00
Stanislav Shwartsman
e3da944cd3
Fixed TLB access code duplication
2006-10-04 19:47:24 +00:00
Stanislav Shwartsman
6c63e84d23
Fixed CR3 masking in long mode
...
Added PANIC assertion of 32-bit physical address in PAE mode
cleanup
2006-10-04 19:08:40 +00:00
Stanislav Shwartsman
7dc808e7f9
Removed debug snapshot when entering SMM/RSM
2006-10-03 22:41:02 +00:00
Stanislav Shwartsman
1aa7ae677d
Small cleanup in he APIC code, removed unused methods
2006-10-02 21:49:49 +00:00
Volker Ruppert
f091c7c0ad
- SMM must be enabled until all data is read from RAM
2006-10-02 21:22:59 +00:00
Stanislav Shwartsman
14afe14a21
New BIOS expects to see 0x64 in smm revision id when in x86-64 mode
2006-10-02 18:50:34 +00:00
Volker Ruppert
0c827dcbf1
- implemented debugger access to SMRAM area
2006-10-02 17:40:20 +00:00
Stanislav Shwartsman
925ae93e22
Reveer back changes for debug.h removal from bochs.h
2006-09-26 19:16:10 +00:00
Stanislav Shwartsman
aab3feb2e0
Fixed Makefile to compile with ACPI stub disabled
...
Remove bx_debug.h from bochs.h to reduce compilation dependencies
2006-09-25 20:13:52 +00:00
Volker Ruppert
1f5d311ca1
- fixed memory leaks found with valgrind when trying to start a second
...
simulation with wxBochs:
* cpu: delete pageWriteStampTable array
* devices: simplified setup of initial default i/o handlers
* ne2k: delete ethernet module in destructor
2006-09-20 20:52:23 +00:00
Stanislav Shwartsman
3ab94305a0
1. Fixed bug report
...
[ bochs-Bugs-1562172 ] TLB_init() fails to initialize priv_check array if USE_TLB 0
2. Paging is always exists for i386+
To disable paging it is better to use normal model without special code, only by setting cr0.pg=0
2006-09-20 17:02:20 +00:00
Stanislav Shwartsman
02c2fc9e89
Fixed priveledge level checks
2006-09-10 16:56:55 +00:00
Volker Ruppert
5dd0d64b11
- several changes for restart support in wx (not yet complete)
...
* don't initialize cpu specific parameters for the wx debugger if they already
exist
* separate siminterface method init_save_restore() added
* old wx specific handling in quit_sim() removed
* new bx_list_c method clear() deletes all parameters from the list
* moved devices cleanup code from the pc_system to a new devices method exit()
* pc_system init code now sets ticksTotal to 0
2006-09-07 18:50:51 +00:00
Stanislav Shwartsman
173d126763
Fixed LDTR reset vales
2006-08-31 18:21:16 +00:00
Stanislav Shwartsman
fdac9efa9b
Fixed ton of code duplication.
...
Do not save/restore XMM8-XMM15 not in 64-bit mode
2006-08-31 18:18:17 +00:00
Volker Ruppert
3600f1af41
- fixed LDTR list size
2006-08-26 07:35:27 +00:00
Stanislav Shwartsman
65082e4a4f
Handle granularity field for LDT
...
Next step - fix code duplication with TSS
2006-08-25 19:56:03 +00:00
Stanislav Shwartsman
54fb3b769a
Fixed LDT 16-bit limit, must support all 32-bit values.
2006-08-22 19:06:03 +00:00
Stanislav Shwartsman
3ce7764fce
Fixes in 64-bit decoding
2006-08-11 17:23:36 +00:00
Volker Ruppert
00a66c380a
- fixed boot failures on big endian machines (thanks to the SF compile farm)
2006-08-03 21:03:21 +00:00
Volker Ruppert
8e85b8654b
- fixed repeat speedup optimization on big endian machines
2006-08-01 17:09:05 +00:00
Stanislav Shwartsman
45353d5e6f
Fixed DR registers handling in x86-64 mode
2006-06-26 21:07:44 +00:00
Stanislav Shwartsman
aa1a61bfde
Add (when needed) or remove (when not needed) x86-64 compilation hack
2006-06-26 20:28:00 +00:00
Stanislav Shwartsman
c7aa53d044
Fixed compilation error of extdb
2006-06-25 21:44:46 +00:00
Stanislav Shwartsman
f9754dadeb
Fix some code duplication
2006-06-24 18:27:11 +00:00
Stanislav Shwartsman
5ade11bae4
Added exception debug print
2006-06-22 19:53:58 +00:00
Stanislav Shwartsman
6468398104
Fixed APIC interrupt priority bug
2006-06-20 16:51:03 +00:00
Stanislav Shwartsman
070d782ec8
Move paddr_valid param of dbg_xlate_linear2phy method to return value.
...
This is much easier to use.
2006-06-17 12:09:55 +00:00
Stanislav Shwartsman
f44190ed27
Comment most likely redundant invalid_prefetch_q
2006-06-16 20:08:03 +00:00
Stanislav Shwartsman
9269288319
Fix SR macros mis-use. Need to add assertion into bxlist_c and check that it has no 2 params with same name inside !
2006-06-14 16:44:33 +00:00
Stanislav Shwartsman
8ed8916ea9
Break to debugger on triple fault or panic (this time do it correctly)
...
Indent changes
2006-06-12 19:51:31 +00:00
Stanislav Shwartsman
49d7b4614f
Fixed another bug generator - duplication between descriptor type field and four descriptor cache bits
2006-06-12 16:58:27 +00:00
Stanislav Shwartsman
5a80bf51ca
Added more definitions
2006-06-11 21:55:39 +00:00
Stanislav Shwartsman
308521e7ce
Fixes in SYSCALL/SYSRET instructions
...
Use parse_selector to avoid code duplication
2006-06-11 21:37:22 +00:00
Stanislav Shwartsman
869f74b3ee
Reduce amount of dbg_get_cpu calls (I would like to remove this function) and use save/restore power in debugger
2006-06-11 16:40:37 +00:00
Stanislav Shwartsman
deab206378
More useful debug prints
2006-06-09 22:39:50 +00:00
Stanislav Shwartsman
6c3420a18b
Add debug prints before any #GP excepion which only possible to be generated
2006-06-09 22:29:07 +00:00
Stanislav Shwartsman
3cb38b3c45
Indent changes
2006-06-09 21:17:26 +00:00
Stanislav Shwartsman
fea9973570
Fixed failure when running 386 simulation
2006-06-09 21:14:25 +00:00
Stanislav Shwartsman
84124f29d2
Fix FPU tos value (found with save/restore logs browsing
2006-06-08 19:56:30 +00:00
Volker Ruppert
d550d71e03
- register parameters for the wx debugger only if present (fixes memory leak)
...
- removed useless static variable 'counter'
2006-06-06 18:36:50 +00:00
Stanislav Shwartsman
1deddb9f0e
Fix linking problem with debugger enabled
2006-06-06 16:46:08 +00:00
Stanislav Shwartsman
c8c5772f44
1. Fix BX_INFO message in config.cc
...
2. In init.cc save and restore BX_CPU_THIS__PTR trace value, allows to enable/disable tracing using save/restore.
3. in iret.cc - cleanup3. in iret.cc - cleanup3. in iret.cc - cleanup
2006-06-05 17:33:25 +00:00
Stanislav Shwartsman
f31e03d4cb
More clear debug message
2006-06-05 16:38:43 +00:00
Stanislav Shwartsman
08d7e8e305
Fixed wrong assert_check failure found during x86-64 save/restore experiments
2006-06-05 16:36:56 +00:00
Stanislav Shwartsman
1aaf19cd09
Support for partial read/write in APIC space
2006-06-05 05:39:21 +00:00
Stanislav Shwartsman
fea15294b5
Fixed compilation error in init.cc
...
Move initialization of memory object to misc_mem.cc
2006-06-03 12:59:14 +00:00
Stanislav Shwartsman
d17eb99f76
fixed allocated physical memory limit check in memory.cc
...
Force eflags before saving them - register eflags using param handlers
2006-06-01 20:05:15 +00:00
Stanislav Shwartsman
02aa59886c
Fix APIC tmr/isr/irr registers reading problem
2006-06-01 14:05:23 +00:00
Stanislav Shwartsman
32a6e4c561
Added more debug messages to apic
2006-06-01 11:59:23 +00:00
Stanislav Shwartsman
4b7e7087aa
Handle more fields memory management insie the bx_param_c.
...
Remove more strdups
2006-05-30 17:01:27 +00:00
Stanislav Shwartsman
fee48d74e0
Avoid doing strdup for param name field - most of the strdups elliminated !
2006-05-29 22:33:38 +00:00
Stanislav Shwartsman
5b912c26af
Fixed save/restore of segment registers for x86-64 mode
2006-05-28 19:18:29 +00:00
Stanislav Shwartsman
286b89d763
Several x86-64 MSRs were not-initilized !
...
Fixed small save-restore bug in dma.cc
First step to make save-restore code look better (only several files processed for example)
2006-05-28 17:07:57 +00:00
Stanislav Shwartsman
8ed9a2fa4e
Use MAX_LFV_ENTRIES constant
2006-05-27 21:44:40 +00:00
Stanislav Shwartsman
0977bef9a2
Fix compilation err for x86-64
2006-05-27 16:05:30 +00:00
Stanislav Shwartsman
8b0df8e99b
Merge SAVE_RESTORE branch to CVS
2006-05-27 15:54:49 +00:00
Stanislav Shwartsman
7c1767d17a
Partial sync with save-restore
2006-05-27 14:02:34 +00:00
Stanislav Shwartsman
65e0fea773
functionally nothing changed
2006-05-26 17:24:36 +00:00
Stanislav Shwartsman
a4129e5341
Handle NULL_SEG_REG (no segment override) case in fetchdecode.cc
2006-05-24 20:57:37 +00:00
Stanislav Shwartsman
1acdb7f274
Simplify CPU loop and fix compilation error
2006-05-24 16:46:57 +00:00
Stanislav Shwartsman
c120d5dc70
remove unused and not required apic vars
2006-05-23 16:42:50 +00:00
Stanislav Shwartsman
a010cfb8ca
Fix amount of XMM registers in non-x86-64 mode
2006-05-22 21:17:27 +00:00
Stanislav Shwartsman
8b55085c76
Merge tss286 and tss386 segment descriptor cache fields to one structure
2006-05-21 20:41:48 +00:00
Stanislav Shwartsman
d00b2dec1d
LDTR and TR type check in assert_check
2006-05-21 19:31:23 +00:00
Stanislav Shwartsman
73e1266cbe
Add CR0 consistency checks and CS.L/CS.D consistency check
...
Optimize icache writestamps - 2x more space to decrement for page-write-stamp
2006-05-19 20:04:33 +00:00
Stanislav Shwartsman
274e17a1fc
Remove unneeded function
2006-05-18 20:16:15 +00:00
Stanislav Shwartsman
8db1de7124
- Fixed several issues, each cause to NullTimer function never be called, the method is required for icache correct functionalit
...
- Speed-up icache by correct purging of Icache entries
- Several new assertions for timers, to prevent bugs in future
2006-05-16 20:55:55 +00:00
Stanislav Shwartsman
7acb46cd3d
Small cleanup in cpu.cc
2006-05-16 16:47:00 +00:00
Stanislav Shwartsman
16713b309d
PALIGNR fixed
2006-05-16 16:20:26 +00:00
Stanislav Shwartsman
7c2c9c41e8
Remove unused CPU vars
2006-05-15 18:00:55 +00:00
Stanislav Shwartsman
f4c7b4074e
Support for x86-64 in x86 debugger (DR0-DR7)
2006-05-13 12:49:45 +00:00
Stanislav Shwartsman
9a32d0e98f
Optimize debug registers handling
2006-05-13 12:29:12 +00:00
Stanislav Shwartsman
fc799ab623
FetchDecode tables are constant. Marking them const implicitly will help to compiler/linker in optimization.
2006-05-12 18:03:26 +00:00
Stanislav Shwartsman
fe644dfcbf
- Code cleanup, remove x86-64 code from functions which cannot be called from x86-64
...
- Fix PANIC multiple SSE prefix decoding (fetchdecode and disasm)
- More Bit32u -> bx_phy_address convert
- Lazy flags optimization
2006-05-12 17:04:19 +00:00
Stanislav Shwartsman
b0e49a9a05
Warn if somebody used BSWAP with 16-bit opsize (behavior undefined)
2006-05-07 20:56:40 +00:00
Stanislav Shwartsman
91ada6c72c
Separate RepeatSpeedups code in io.cc to stand-alone CPU methods
...
FestRepINSW and FastRepOUTSW similar to that is done in string.cc
Done to simplify the code, it was just impossible to understand it.
2006-05-07 20:45:42 +00:00
Stanislav Shwartsman
20b14aefa6
Fix in BSWAP 64-bit mode - allow to use additional R8-R15 registers
...
Also fixed code duplication story with BSWAP instruction
2006-05-07 18:58:47 +00:00
Stanislav Shwartsman
d69eba6c07
Split in/out instructions based on operand size
2006-05-07 18:27:36 +00:00
Stanislav Shwartsman
767fb77ebd
Fully handle segment limits inside prefetch method.
...
1. Should speed up the simulation (eliminate seg.limit check per every instruction exec)
2. Should help for DT (h.johansson request)
2006-05-04 19:54:25 +00:00
Volker Ruppert
9340f3b3f8
- partial sync with BRANCH_SAVE_RESTORE_3 (hardware save/restore not present yet)
...
* changed data format of text files for save/restore (looks like C/C++ structures,
similar to the format used in old save/restore branches)
* don't set the initial value of shadow bool parameters
* don't set the initial value of bool parameters twice
* cpu/init.cc: missing #undef added
* ne2k.cc: variable tx_timer_active was never set to 1 (type now bx_bool)
* floppy.cc: missing initialization of the 'eot' array in reset() added
* pic.h: type of member 'byte_expected' changed to Bit8u
* pit_wrap.h: unused members removed
2006-05-01 18:24:47 +00:00
Stanislav Shwartsman
f93ab35357
Flush TLB for all CPUs when memory mapping information changed by system (A20 change, PAM write or similar events)
2006-04-29 17:21:49 +00:00
Stanislav Shwartsman
199c987ee3
Return back (modified) dbg_is_end_instr_bpoint method in cpu.cc
2006-04-29 16:14:47 +00:00
Stanislav Shwartsman
2889ed190c
Removed icount guard for debugger. Implement STEPN debugger command using CPU_LOOP method capabilities
2006-04-29 09:27:49 +00:00
Stanislav Shwartsman
1a0b7ee1e3
I want to replace debugger ICOUNT guard by existent cpu_loop funtionality, first step to do that ...
2006-04-29 07:12:13 +00:00
Stanislav Shwartsman
510cbe02e2
Make fetchInstruction INLINE according to hjjhansson patch
2006-04-28 16:45:29 +00:00
Stanislav Shwartsman
003c2f59e6
Added missed CVS header to several files
2006-04-27 15:11:45 +00:00
Stanislav Shwartsman
bb1116e569
Fixed bx_cpu_c::MOVD_EdVd () always UDs
...
reported in mailing list
2006-04-27 06:09:56 +00:00
Stanislav Shwartsman
798c90ee85
Fixed comments
2006-04-26 14:05:28 +00:00
Stanislav Shwartsman
4b86ae3917
Added new ar_byte function, might be used to fix code duplication and for save-restore
2006-04-25 15:35:26 +00:00
Stanislav Shwartsman
b2408c2fca
Added assertion check CPU method, could be used for "debug mode" run with checking various assumptions before each instruction emulation
2006-04-25 14:42:57 +00:00
Stanislav Shwartsman
1939544bf8
move get_descriptor_l/get_descriptor_h methods to general cpu methods (were debugger only)
2006-04-23 17:16:27 +00:00
Stanislav Shwartsman
63dc4d4e10
Fixed CR4 GP(0) condition (patch by no_mayl in mailing list)
2006-04-23 16:11:16 +00:00
Stanislav Shwartsman
cc29f3d94b
Remove duplicate ';'
2006-04-23 16:03:46 +00:00
Stanislav Shwartsman
44afbdcd82
Implemented FXSAVE/FXRSTOR for FOO/FIP/FDP fields
2006-04-23 16:01:34 +00:00
Stanislav Shwartsman
ff02bc8ef0
Fixed:
...
With cvs snapshot 2006-04-09, --enable-debugger does not show the executed instructions anymore after being enabled via iodebug or "trace on".
2006-04-23 15:37:25 +00:00
Volker Ruppert
52c4666465
- partial sync with BRANCH_SAVE_RESTORE_3 (hardware save/restore not present yet)
...
* fixed minimum limit of signed variable types
* don't set the initial value of shadow parameters
* fixed range check for shadow parameters
* added support for setting the value base (decimal/hex) of numeric shadow parameters.
The text format hex number is now initialized in the constructor
* added missing newline after filename for binary data
* fixed data size of 64-bit shadow parameters
* fixed save/restore output format of numeric parameters (signed/unsigned/64-bit)
* cpu/init.cc: fixed macro name and added missing #undef line
2006-04-22 18:14:55 +00:00
Volker Ruppert
eb2104d0de
- parameters for the wx debugger moved to a separate subtree to avoid conflicts
...
with the proposed save/restore feature
- fixed a warning in the cpu parameter handler for the wx debugger
2006-04-16 10:12:32 +00:00
Stanislav Shwartsman
d972e4a4b7
Fixed CR3 restore in RSM instruction
...
Added HALT state indication (actually make existant one working for single CPU)
2006-04-10 19:05:21 +00:00
Stanislav Shwartsman
e7565760f7
Fixed compilation error when DEBUGGER is enabled
2006-04-07 20:53:39 +00:00
Stanislav Shwartsman
45f30f0a4c
some code written to enter CPU to shutdown state.
...
finally the shutdown handling should be done exactly as in VmWare - the GUI should ask user if the CPU should reset and go to HLT/IF=0 if user choosed to stay in shutdown mode.
CPU configure option reset-on-triple-failt should be extended to shutdown-reset=0|1
small code cleanups and fixes
2006-04-07 20:47:32 +00:00
Stanislav Shwartsman
7a1d0a53d7
Small cleanup
2006-04-06 18:45:54 +00:00
Stanislav Shwartsman
03eac64013
Added decoding of new SSE4 instructions (recently published in Intel docs)
...
At least CPUID detects them correctly
The code is never tested (still) ! (but should work fine)
2006-04-06 18:30:05 +00:00
Stanislav Shwartsman
c8cc6bcd14
Remove code duplication from SMM code
2006-04-06 16:47:29 +00:00
Stanislav Shwartsman
9dc1790f07
Simplify and optimize fetchdecode methods.
...
Now fetchdecode is simpler to understand and easier to modify, for example to support 3-byte opcodes (SSE4)
2006-04-05 20:52:40 +00:00
Stanislav Shwartsman
b9dedc8412
Added missed file from prev commit (waiting for moderator approval, message is too big)
...
Summary changes:
- Fixed critical ICACHE bug from one of the recent commits
- Complete preliminary SMM implemntation, SMI still PANICs but 'alwayscont' should work fine
- Correctly decode, disassemble and execute 'XCHG R8, rAX' x86-64 instruction
- Correctly decode, disassemble and execute multi-byte NOP 0F F1 opcode
- Fixed ENTER and LEAVE instructions in x86-64 mode
- Disasm SSE4 instructions
- Rename PNI->SSE3 everywhere in the code
2006-04-05 17:44:04 +00:00
Stanislav Shwartsman
f8c3968d42
Changes list made after CVS service crash:
...
- Fixed critical bug in CPU code added with one of the prev commits
- Disasm support for SSE4
- Rename PNI->SSE3 everywhere in the code
- Correctly decode, disassemble and execute 'XCHG R8, rAX' x86-64 instruction
- Correctly decode, disassemble and execute multi-byte NOP 0F F1 opcode
- Fixed ENTER and LEAVE instructions in x86-64 mode
- Added ability to turn ON instruction trace, only GUI support is missed.
Instruction trace could be enabled if Bochs was compiled with disasm
- More changes Bit32u -> bx_phy_address
- Complete preliminary implementation of SMM in Bochs, SMI is still PANICs but if you press 'continue' everything should work OK
- Small code cleanup
- Update CHANGES and user docs
2006-04-05 17:31:35 +00:00
Stanislav Shwartsman
a6c3ffeeb5
Fixed compilation error
2006-03-29 19:16:24 +00:00
Stanislav Shwartsman
ae2ea87c43
More fixes for SMM
2006-03-29 18:08:13 +00:00
Stanislav Shwartsman
4fd9bd53c3
Change Bit32u -> bx_phy_address in memory
2006-03-28 16:53:02 +00:00
Stanislav Shwartsman
42aac37624
Fixed complilation error
2006-03-27 20:09:37 +00:00
Stanislav Shwartsman
da3d26d7f4
Preliminary implemntation of SMM save statei
...
Fixed fetchModeMask for load32bitOsStack
2006-03-27 18:02:07 +00:00
Stanislav Shwartsman
b8be848943
Use access_type param in getHostMemAddr, less efficient but no copy-paste at least
2006-03-26 19:39:37 +00:00
Stanislav Shwartsman
5c3fba4399
Support access to SMRAM in memory object
...
Cleanup in CPU code
2006-03-26 18:58:01 +00:00
Stanislav Shwartsman
f347ab97bf
Fixed CALL/JMP far through call gate 64
...
Decode SWAPGS and RDTSCP instructions
Indent changes in fetchdecode
2006-03-22 20:47:11 +00:00
Stanislav Shwartsman
d6f85c12f6
NMI support inside the CPU.
...
Added two functions to query NMI and SMI from Bochs debugger.
In future they could be used for generating NMI or SMI by user request using GUI button (could be implemented separatelly later and under configure-time or .bocshrc option)
2006-03-16 20:24:09 +00:00
Stanislav Shwartsman
a64b16391d
Remove unused vars
2006-03-15 17:57:11 +00:00
Stanislav Shwartsman
e85a90a720
Remove cpu.h -> devices.cc dependancy, kill_bochs_request moved from CPU to bx_pc_system
...
Small Icache simplification and speedup
2006-03-14 18:11:22 +00:00
Volker Ruppert
9699eaeca4
- added SMP support in save/restore parameter subtree
...
- TODO: implement tab window control for SMP CPUs in wx "show cpu" dialog
2006-03-09 20:16:17 +00:00
Stanislav Shwartsman
d74f1b9a43
Fixed bug in ENTER instruction in long mode
2006-03-08 18:21:16 +00:00
Volker Ruppert
5597fc9cf3
- fixed wx "Show CPU" dialog to make it work with the new parameter handling
...
- fixed CPU register names
- removed old parameter handling (bx_id, BXP_* symbols, param_registry, etc.)
2006-03-08 18:10:41 +00:00
Volker Ruppert
575a17e50f
- converted cpu state parameters to param-tree style
...
- removed old-style parameter init methods
- NOTE: the wx CPU registers dialog (debugger) currently reports nothing
- TODO: fix wx CPU registers dialog, remove remaining bx_id related stuff
2006-03-07 20:32:07 +00:00
Stanislav Shwartsman
da0b2ac377
Update dependencies for iodev and root project folders.
...
Fixed compilation errors for 386 case
Added file header for slowdown_timer.h
2006-03-06 22:32:03 +00:00
Stanislav Shwartsman
7b6c2587a9
Now devices could be compiled separatelly from CPU
...
Averything that required cpu.h include now has it explicitly and there are a lot of files not dependant by CPU at all which will compile a lot faster now ...
2006-03-06 22:03:16 +00:00
Stanislav Shwartsman
fc0894bbe1
Enable A20 after system reset
2006-03-04 16:58:10 +00:00
Stanislav Shwartsman
93898e11b2
Missed }
2006-03-04 09:24:31 +00:00
Stanislav Shwartsman
324d75e749
Fix another broking change
2006-03-04 09:22:55 +00:00
Stanislav Shwartsman
e297df457a
Roll back the try to move Local APIC memory access to CPU.
...
It was fast and fine but had serious correctness problems with RMW apic access
2006-03-02 23:16:13 +00:00
Stanislav Shwartsman
6d513ed6f2
Fix indent corruption
2006-03-02 20:17:54 +00:00
Stanislav Shwartsman
6c392e7f3f
optimize apic code
2006-03-02 20:09:21 +00:00
Stanislav Shwartsman
7cc8bc0836
Clean and optimize
2006-03-02 17:39:10 +00:00
Stanislav Shwartsman
5fad793989
move local apic handling to the access_linear function for the memory class.
...
speedup the whole simulation by 2% !
2006-03-01 22:32:24 +00:00
Stanislav Shwartsman
9b3be40d88
Improve OS/2 hack - save full segment (including hidden part) and not only selector value
2006-02-28 20:29:03 +00:00
Stanislav Shwartsman
a527b2cfca
first smm - implement cpu state when switching to SMM
...
smm coming soon
fixed code duplication in init.cc
2006-02-28 19:50:08 +00:00
Stanislav Shwartsman
55ceecf79b
Small optimization in icache page-write-stamp
2006-02-28 17:47:33 +00:00
Stanislav Shwartsman
24077c071b
Fixed exception generated when accessing memory w/o right permissions
2006-02-26 21:44:03 +00:00
Stanislav Shwartsman
83bb20b6f9
Diagnostic message for possible bug in exception.cc
2006-02-24 09:49:03 +00:00
Stanislav Shwartsman
79306b851c
Separate fetch/decode instruction block to stand-alone method.
...
The method could be reused when building instruction trace for DT
2006-02-23 18:23:31 +00:00
Stanislav Shwartsman
0150904e9d
Improve debug messages and optimize
2006-02-22 20:58:16 +00:00
Stanislav Shwartsman
8ba6c1178a
Fixed PANIC in CMPxx SSE instructions
2006-02-22 20:20:21 +00:00
Stanislav Shwartsman
7cfa31492c
Removed --enable-pni configure option, to compile with PNI use
...
--enable-sse=3 instead (Stanislav Shwartsman)
2006-02-20 19:28:57 +00:00
Volker Ruppert
a4bc4cc9e0
- fixed cpu parameter handling in SMP mode
2006-02-18 17:28:18 +00:00
Volker Ruppert
2a6261fba7
- cpu options rewritten to a parameter tree
...
- boolean parameter type now supports new parameter handling
- new parameter object constructors now supports label initialization
- bx_list_c constructor now supports title initialization
- textconfig: initial support for new parameter handling
- wx: missing CPU config dialog added
- wx: ParamDialog now handles disabled parameters correctly
- removed unnecessary spaces from function calls
2006-02-18 16:53:18 +00:00
Stanislav Shwartsman
5c58b22f44
Fixed opcode names according to Intel docs
...
Fixed bug found during disasm validation
2006-02-17 13:34:31 +00:00
Stanislav Shwartsman
b966703504
print CPU mode correctly again
2006-02-14 20:14:18 +00:00
Stanislav Shwartsman
203a9caf31
SMM mode could leave together with pmode or any other (according to amd docs)
...
so we need separate bx_bool indicator in_smm instead
2006-02-14 20:03:14 +00:00
Stanislav Shwartsman
024ce249bf
Define SMM mode for future implementation.
...
I would like all next commits be aware of SMM mode.
It can't be implemented right now (too many questions w/o answers) but it will be done till next major release definitelly.
2006-02-14 19:00:08 +00:00
Stanislav Shwartsman
2646484dc1
Fix 'show' command in Boch debugger.
...
Fully supported show-interrupts, show-mode and show-call options
Enable toggling of show options (bug report from SF)
2006-02-12 20:21:36 +00:00
Stanislav Shwartsman
0bf03f370d
Support for DC and HT in SMP configurations
...
Extended format of CPU::COUNT .bochsrc option to define number of core/threads
2006-02-11 15:28:43 +00:00
Stanislav Shwartsman
9b451f43e2
Save/restore RIP/RSP only on FAULT type exceptions, not on traps
2006-02-11 09:08:02 +00:00
Stanislav Shwartsman
5a65e1065e
Decoding functionality for Bochs disassembler.
...
Fixed 'step over' debugger command using bx_dbg_read_linear method.
Small debugger fix in cpu.cc
2006-02-05 19:48:29 +00:00
Stanislav Shwartsman
9a15f59e05
Fixed bug in SYSRET legacy mode
2006-02-02 17:55:48 +00:00
Stanislav Shwartsman
6ca296de8b
Move --enable-reset-on-triple-fault option to runtime CPU::reste_on_triple-fault option in .bocshrc
...
Cleanup and optimize parser for debugger
2006-02-01 18:12:08 +00:00
Stanislav Shwartsman
1d4fa8b327
Available back ability to use eip register as source in 'set reg = <expr>' cmd.
...
Setting the eip register still not available (deliberatelly).
I don't want to enable it util I find some easy interface to do it.
I don't want to allow setting of part of RIP register using 'set eip=<expr>' and leave the upper part unchanged ....
Remove unused test registres from debugger
Fix compilation error in cpu.h
Change trace-on/trace-off commands. Make one 'trace' command with usage of 'trace on/trace off'
2006-01-31 19:45:34 +00:00
Stanislav Shwartsman
24c27deae8
Recognize XF exception (0x13) when SSE is enabled
2006-01-31 17:41:08 +00:00
Stanislav Shwartsman
067f23e3da
Fix set 'ah,bh,ch,dh' registers from debugger
...
Enable disasm by default - in adds some useful information to debug messages in log file
Remove defines for 8bit registers from cpu.h, the x86 arch defines not match defines used by set_reg and get_reg methods.
2006-01-27 19:50:00 +00:00
Stanislav Shwartsman
37eb82c69c
Totally remove the cosimulation code from Bochs.
...
The Bochs anyway even doesn't compile if cosimulation configured enabled.
But in the same time the cosimulation code only disturbs to the future development of Bochs debugger, for example adding x86-64 functionality ...
For those of you who still may want to see the cosimulation code inside I put it in patch and upload it Bochs CVS patches folder. Read comments for the patch ! ----------------------------------------------------------------------
2006-01-25 22:20:00 +00:00
Stanislav Shwartsman
83b4f7ba05
1. remove the ability of using regnames as symbols !
...
'set $eax = <value>' is stupid when you could do expr like 'set eax = ebx + 4'
2. cleanup and optimize Bochs debugger parsing, fixed several memory leaks
2006-01-25 18:13:44 +00:00
Stanislav Shwartsman
d257f548b9
1. implemented 'set register <name>=<expr>' command, old style 'registers <name>=<exp> command' removed, now 'r|reg|regs|registers' command shows CPU registers contents (same as 'info cpu')
...
2. new command 'u|disasm|disassemble mode-switch' - switch between Intel and AT&T disasm syntax
3. new command 'u|disasm|disassemble size=n' should be used instead of old 'set $disassembler_size=n'
4. 'h' is a new alias for 'help' command
2006-01-24 21:37:37 +00:00
Stanislav Shwartsman
f9cad8d272
Remove debug printf
2006-01-24 19:07:45 +00:00
Stanislav Shwartsman
18afa9fd2d
This is cumulative patch for bochs debugger, it is only very first step towards working debugger supporting all new simulator functionalitieS.
...
- move crc.cc from debugger to bochs folder and make it projct-wide and not local for debugger
- added new 'info sse' command for debugger
- extend 'modebp' command to break on any mode change
- remove unimplemened 'info program' function, it is always printed fixed text
- move debugger help to parser, cleanup and simplify it
2006-01-24 19:03:55 +00:00
Stanislav Shwartsman
21352e50a9
Fix some bugs in debugger parser, cleanup
...
Add some debugger functionality
2006-01-23 21:44:44 +00:00
Stanislav Shwartsman
5a5854c684
Missed ;
2006-01-22 18:18:19 +00:00
Stanislav Shwartsman
de9be40256
Fixed ROL/ROR flags anomaly (h.johansson)
2006-01-22 18:17:27 +00:00
Stanislav Shwartsman
9df8079206
Write to MSR_TSC implemented (patch by Bryce)
2006-01-21 12:06:03 +00:00
Stanislav Shwartsman
08c15c67c0
Don't know how much it helps ...
...
First step to make bx debugger supporting x86-64. guard_found object fields conerted to bx_address for x86-64 support.
2006-01-19 18:32:39 +00:00
Stanislav Shwartsman
90f899fd16
Fix bug in PMULUDQ SSE instruction
2006-01-18 18:39:17 +00:00
Stanislav Shwartsman
2c8f6f7720
Merged patch: determine number of processors to emulate through .bochsrc
2006-01-18 18:35:38 +00:00
Stanislav Shwartsman
c8cd1f805a
Enabled LAHF/SAHF for x86-64 mode
2006-01-17 19:50:42 +00:00
Stanislav Shwartsman
c92aba3776
Using back tracking in CVS I found the reason why CVS sources not compiled with configure --enable-debugger configuration (reported by Brendan).
...
Again it is andom change which cause to debugger not to compile ;(
This is definitelly GCC bug !
2006-01-17 07:58:11 +00:00
Stanislav Shwartsman
7bf51e48db
Print FS_MSR_BASE and GS_MSR_BASE to debug registers dump (requested in bug report [ 1406387 ] JMP instruction should display absolute address)
...
Fixed fetch mode mask initialization (bug report 1400027 Boundary instruction cache error for uninitialized memory)
For safety only - everytime when changing CS register update fetch mode mask.
Actually it need to be updated everytime when there is a chance for execute mode change or 16/32 bit mode change.
2006-01-16 19:22:28 +00:00
Stanislav Shwartsman
76ac076d52
Print R8-R15 in registers dump
2006-01-15 18:14:16 +00:00
Stanislav Shwartsman
652ce3c0dc
Fix for bug report:
...
bochs-Bugs-1406383 ] Local APIC TPR is ignored due to signed/unsigned mismatch
2006-01-15 17:38:40 +00:00
Stanislav Shwartsman
a74b63eb3d
Allow writing PCE to CR4
2006-01-13 11:11:29 +00:00
Stanislav Shwartsman
d7d2de421f
Remove code duplication in CPU and memory objects initialization
2006-01-11 18:22:12 +00:00
Stanislav Shwartsman
5899932f0c
Merge APIC patch to the CVS.
...
- Fix lowest priority interrupt delivery from I/O APIC
- XAPIC support
- Implemented APIC bus functionality
- cleanup APIC code
2006-01-10 06:13:26 +00:00
Stanislav Shwartsman
89e3472178
Fix validate_seg_regs check
2006-01-09 19:34:52 +00:00
Stanislav Shwartsman
393a653fb4
Fix typo
2006-01-05 21:40:07 +00:00
Stanislav Shwartsman
b07e698b3e
Initialize CPU and APIC after the bx_pc_system object
2006-01-05 21:39:11 +00:00
Volker Ruppert
97e1f39d8f
- I/O APIC signal handling rewritten ("backported" from qemu)
...
- don't flood the logfile if APIC EOI has no effect
- fixed a warning in the APIC code
- TODO: fix IRQ 0 handling, implement ExtINT
2006-01-01 11:33:06 +00:00
Stanislav Shwartsman
6ff8fccfc4
Fixed cross-segment boundary check, when instruction ends on the segment boundary it should generate GP(0)
2005-12-28 19:18:50 +00:00
Stanislav Shwartsman
9e4a3675d3
Cleanup APIC code
...
Fixed APIC timer problem (too many registered timers) reported by Brendan
2005-12-26 19:42:09 +00:00
Stanislav Shwartsman
279c67ae37
Fix debug message
2005-12-23 14:24:47 +00:00
Stanislav Shwartsman
dfc633ef0a
New debug function in cpu
2005-12-19 17:58:08 +00:00
Stanislav Shwartsman
cd2a8da34c
Add more debugging/instrumentation functionality
2005-12-14 20:05:40 +00:00
Stanislav Shwartsman
8627bc1596
Fixed bug from prev commit
2005-12-13 20:42:22 +00:00
Alexander Krisak
99fae60a0e
Small icache optimization
2005-12-13 14:18:34 +00:00
Stanislav Shwartsman
5f339a5fd8
Small debug fixes
2005-12-12 22:01:22 +00:00
Stanislav Shwartsman
70cc5a7fb0
Fix incorrect commit
2005-12-12 19:54:48 +00:00
Stanislav Shwartsman
f863d1e902
Generate #GP exception instead of #TS when TSS selector points to bad TSS
2005-12-12 19:44:06 +00:00
Stanislav Shwartsman
1f2cde53f0
Fix arbitration of local apic when issuing lowest priority interrupt or arbitrating between different local apics. APR (arbitration priority register) should be used for lowest priority interrupt delivery and available to user software and ARB_ID should be software transparent APIC internal
2005-12-11 21:58:53 +00:00
Stanislav Shwartsman
8b8d4900ed
Implement read/write of ESR register
2005-12-11 20:01:54 +00:00
Stanislav Shwartsman
faff702f44
GP(0) on cross segment boundaryu instruction
2005-12-09 21:21:29 +00:00
Stanislav Shwartsman
abe9791fe6
Fix typo
2005-11-28 22:42:29 +00:00
Stanislav Shwartsman
1f2913477e
Fix typo ...
2005-11-28 22:35:43 +00:00
Stanislav Shwartsman
82ccada927
Merged and committed #SF patch from wmrieker
...
[ 857235 ] task priority and other APIC bugs, etc
2005-11-28 22:19:01 +00:00
Stanislav Shwartsman
fe02ecab65
Do not flood log with WBINVD/INVD messages
2005-11-27 18:36:19 +00:00
Stanislav Shwartsman
8c91790680
Redefine registers accessors in cpu.h
...
Change BxSupportPAE and BxSupportGlobalPages macros to Bochs style names
Set bx_cpu_id in BX_CPU_C constructor (safe way)
Backup cpu-level check for paging features at compile time (already checked in configure)
Some warnings and indent fixes
speed up get_segment_base method for x86-64 case
2005-11-26 21:36:51 +00:00
Stanislav Shwartsman
49ed4e95a1
Fixed bug in set_id
2005-11-22 17:41:07 +00:00
Stanislav Shwartsman
e003620a30
In debug snapshot print flags in more ellegant way - use capital letters when flag is UP and lower letters when it DOWN
2005-11-21 22:29:02 +00:00
Stanislav Shwartsman
82dcab043f
Update TODO
2005-11-21 21:15:35 +00:00
Stanislav Shwartsman
9314752bb1
Rewritten task_switch mechnism according to AMD docs
...
This should fix the #SF bug report
736279 Jump to Task
2005-11-21 21:10:59 +00:00
Stanislav Shwartsman
8247b94245
Another fix for INIT/RESET state
2005-11-19 19:38:45 +00:00
Stanislav Shwartsman
ec81586bb8
Init/Reset values for LDTR/TR
2005-11-19 18:27:15 +00:00
Stanislav Shwartsman
8d9b5b7134
Fixed compilation error when PAE diasbled and BX_DEBUGGER enabled
...
CVS patch by shirokuma #SF 1359011
2005-11-17 17:52:00 +00:00
Stanislav Shwartsman
3250edb8c5
Update instrumentation
2005-11-14 18:25:41 +00:00
Stanislav Shwartsman
7b7ac565f9
Getting ready for long mode disasm support, patch will posted soon
2005-11-14 18:09:22 +00:00
Stanislav Shwartsman
e2a5b9c338
MOV to/from test register are UD in x86-64
2005-11-11 22:02:42 +00:00
Stanislav Shwartsman
cb4ec526ab
Fix comments and cleanup ...
...
No functional change
2005-11-11 21:34:57 +00:00
Stanislav Shwartsman
38a7e0abea
0f 0d (3dnow prefetch instruction) should execute as NOP when running on Intel EM64T CPU and as prefetch on AMD
2005-11-11 21:09:02 +00:00
Stanislav Shwartsman
0c6a401f30
Update CPU/TODO
2005-11-09 18:07:49 +00:00
Stanislav Shwartsman
e70aa1c403
Initialize l-biT (x86-64 mode) during reset or init
...
Do not modify segment limit and access rights when changing segment in real mode
2005-11-07 22:45:25 +00:00
Stanislav Shwartsman
5d67c7354f
Fix code duplication
2005-11-05 11:39:26 +00:00
Stanislav Shwartsman
cd2a9f317d
Do not PANIC when HLT with IF=0, only BX_INFO
2005-11-04 15:15:02 +00:00
Stanislav Shwartsman
ab81296e33
Update CHANGES/TODO
...
Change BX_INFO to BX_DEBUG in read CR4 function
2005-10-23 21:11:32 +00:00
Stanislav Shwartsman
732abe4b30
Move parity table from cpu.cc to lazy_flags.cc
2005-10-20 17:33:36 +00:00
Stanislav Shwartsman
64ba97210b
INVD/WBINVD should flush caches and TLB
2005-10-18 18:07:52 +00:00
Stanislav Shwartsman
670395f1be
VME support - beta #1
2005-10-17 13:06:09 +00:00
Stanislav Shwartsman
e83c77db49
Preparing to VME implementation
...
DO NOT ENABLE VME option until the implementation will be completed !
2005-10-16 23:13:19 +00:00
Stanislav Shwartsman
bf855506a3
Change set_FLAGS(0) by clear_FLAG ()
...
set_FLAGS(1) by assert_FLAG()
2005-10-15 21:01:36 +00:00
Stanislav Shwartsman
51347f2604
PAUSE instruction still should be implemented ...
2005-10-13 22:53:03 +00:00
Stanislav Shwartsman
7c1374a2ec
support lazy flags for SHRD instruction
2005-10-13 20:21:35 +00:00
Stanislav Shwartsman
7022be46f5
Fix undefined flags handling for ROR and RCR instructions
2005-10-13 19:28:10 +00:00
Stanislav Shwartsman
469358aaf9
Move SHOW_IPS action to bx_gui object, may be some GUI will be able to print IPS online in the simulation window status bar ...
...
Small code cleanup
2005-10-13 16:22:21 +00:00
Stanislav Shwartsman
2c5b72fce5
Apply patch
...
[ bochs-Patches-1311170 ] small APIC bug fix (interrupt sent to the wrong CPU)
2005-10-10 20:45:41 +00:00
Stanislav Shwartsman
39fc11c5da
Fix compilation error
2005-10-09 18:32:36 +00:00
Volker Ruppert
fa68f44d94
- compilation error fixed
2005-10-02 15:26:51 +00:00
Stanislav Shwartsman
7869ab425f
LTR should #GP when loading NULL selector
...
fixed check for SYSENTER/SYSEXIT instructions
according to new Intel references
2005-10-01 07:47:00 +00:00
Stanislav Shwartsman
3885ad67c5
use get_EFER in extdb.cc
2005-09-29 17:55:31 +00:00
Stanislav Shwartsman
8c783bc329
Fixed cpu_mode corruption in x86-64 mode
...
Removed all potentially unsafe and duplicated code in setFLAGS methods to avoid such kind of problems in future
2005-09-29 17:32:32 +00:00
Stanislav Shwartsman
b9cc8b5b0d
Do not look on mxcsr_mask field when restoring mxcsr register in FXRSTOR
...
At least my hardware CPU doesn't
2005-09-24 16:56:20 +00:00
Stanislav Shwartsman
d1c722211e
Fix duplicate opcodes, fix opcode names and disasm bugs
2005-09-23 16:45:41 +00:00
Stanislav Shwartsman
6096698393
Fixed CLTS and HLT GP0 check
2005-09-14 20:01:42 +00:00
Stanislav Shwartsman
3d9ee328fb
PMOVMSKB and PEXTRW instruction should zero-extend dest when in 64-bit mode
2005-09-12 18:08:35 +00:00
Stanislav Shwartsman
95b12d7429
#SF patch fixed transition from vm8086 to PM
2005-09-11 20:00:29 +00:00
Stanislav Shwartsman
76def09c07
Complete the FXRSTOR fix
2005-09-06 19:12:02 +00:00
Stanislav Shwartsman
734cc8496f
Update changes and cpu/todo
2005-09-05 17:50:37 +00:00
Stanislav Shwartsman
f09f1d8b98
Fixed restoring of XMM regs in fxrestor
2005-09-05 17:02:30 +00:00
Stanislav Shwartsman
33c0c5367c
Fixed bug in tasking.cc last change
2005-09-03 11:39:26 +00:00
Stanislav Shwartsman
086ee4c9aa
Fix code duplication in tas
2005-08-28 17:37:37 +00:00
Stanislav Shwartsman
823dfa6f40
This code will be required for dynamic translation in future.
...
For now it is no more than code duplication fix ...
2005-08-23 20:01:54 +00:00
Stanislav Shwartsman
b28ed3be69
Fix LDT.limit < 7 check
...
Indent for protect_ctrl.cc code
2005-08-21 18:23:36 +00:00
Alexander Krisak
7be0d52cce
Added missing reinitialization of field time_tick in guard_found
2005-08-15 15:43:04 +00:00
Alexander Krisak
672ac67ff9
Fixed bug in bochs debugger caused breakpoints doesn't fires sometimes.
2005-08-15 05:32:36 +00:00
Stanislav Shwartsman
84ce5ec720
do #GP in x86-64 mode if NT flag is set
2005-08-14 18:01:04 +00:00
Stanislav Shwartsman
681db0fd86
Roll back several incorrect changes in iret.cc
2005-08-14 17:23:03 +00:00
Stanislav Shwartsman
126069829d
Fixed compilation error when icache is disabled
2005-08-13 14:10:22 +00:00
Stanislav Shwartsman
5b258fd453
Add todo file to CPU
2005-08-10 19:04:19 +00:00
Stanislav Shwartsman
80c895498e
Fixed comments for code
2005-08-10 18:40:38 +00:00
Stanislav Shwartsman
a66b45e024
Fixed bug for masked writes in 64-bit mode
2005-08-10 18:34:00 +00:00
Stanislav Shwartsman
b192b2af9b
Optimize pageWriteStamp checking
2005-08-10 18:18:57 +00:00
Stanislav Shwartsman
c9e44fb695
Added debug dump in case of tripple fault
2005-08-08 21:03:32 +00:00
Stanislav Shwartsman
37bd193337
Split PUSHF/POPF to 3 different methods according to op size.
...
By the way fix VIP/VIF flags handling in POPF/PUSHF (future fix for VME)
2005-08-08 19:56:11 +00:00
Stanislav Shwartsman
227fea6d77
do not check CS.limit in prefetch when in long64 mode
2005-08-05 18:23:36 +00:00
Stanislav Shwartsman
8616109eb8
revert back not correct change in fetchdecode
2005-08-05 12:53:09 +00:00
Stanislav Shwartsman
8be190d848
Implemented RDTSCP instruction
2005-08-05 12:47:33 +00:00
Stanislav Shwartsman
ea30a3ef06
Implemented CALL FAR in 64-bit mode
2005-08-04 19:38:51 +00:00
Stanislav Shwartsman
b8485d5f98
Fixed RSP checking
2005-08-04 19:31:59 +00:00
Stanislav Shwartsman
084b4fa2b2
Fixed IRET implementation for long mode
2005-08-03 21:19:11 +00:00
Stanislav Shwartsman
3681126235
Fixed ugly load_ss64/mode changing workaround in exception.cc
2005-08-03 21:10:42 +00:00
Stanislav Shwartsman
a096472646
Fixed NULL SS selector loading for ret_far
2005-08-03 21:01:02 +00:00
Stanislav Shwartsman
c6c721a450
Small fixes for call-far and others
2005-08-02 20:20:22 +00:00
Stanislav Shwartsman
d8ab4e3424
Fully implemented jump_far and ret_far in 64-bit mode.
...
Note that I am not sure about 100% correctness, I am just coding Intel specs ...
Code review and massive testing still required.
2005-08-02 18:44:20 +00:00
Stanislav Shwartsman
26f0662199
dos2unix
2005-08-01 22:18:40 +00:00
Stanislav Shwartsman
6a07173b3d
Split ctrl_xfer_pro.cc to 4 different files according to the operations
2005-08-01 22:06:19 +00:00
Stanislav Shwartsman
f096a80716
Fix code duplication for check_cs descriptor
...
The function will execute
- segment is executable code segment
- conforming/non-conforming segment priviledge checks
- segment is present
2005-08-01 21:40:17 +00:00
Stanislav Shwartsman
2c6393dd8b
Fixed memory corruption in APIC
2005-08-01 18:55:58 +00:00
Stanislav Shwartsman
954aae3f99
Speedup push/pop operations, they actually not needed to do can_push/can_pop checkes, the same checkes already done in read/write_virtial methods
...
Split push_seg_reg methods according to op size
2005-07-31 17:57:27 +00:00
Stanislav Shwartsman
5da36b7d3d
Fixed code duplication, added canonical address checking for RETF in long mode
2005-07-29 06:29:57 +00:00
Stanislav Shwartsman
2b5a812674
Split last bit.cc methods according to os16/32/64
2005-07-25 04:18:20 +00:00
Volker Ruppert
0ff15e9522
- fixed panic caused by operator precedence bug
2005-07-24 08:35:15 +00:00
Stanislav Shwartsman
dea55d5e63
Fix compilation error
2005-07-22 05:00:40 +00:00
Stanislav Shwartsman
51e03f071d
Fixed XLAT instruction for x86-64
...
Small optimization for lazy flags for ADD/ADC/SUB/SBB instructions
Enable RETF64 for same privelege level return
2005-07-21 01:59:05 +00:00
Stanislav Shwartsman
aceb8c683b
Initial implementation of RETF64
2005-07-20 01:26:47 +00:00
Stanislav Shwartsman
169fa0c574
Clearify the code. x86-64 code always running in pmode so it is not needed to check if we are in protected mode everytime
2005-07-10 20:32:32 +00:00
Stanislav Shwartsman
4638f09b24
Added BX_INSTR_HLT instrumentation callback
2005-07-07 18:40:35 +00:00
Stanislav Shwartsman
01d8a97613
Try to cleanup/rewrite RepeatSpeedups optimization
...
This code doesn't add new speedups but makes it very easy
After some validation it could be no problem to enable repeat speedups optimization for REP MOVSx with any address size. And REP STOSx too.
2005-07-04 17:44:08 +00:00
Stanislav Shwartsman
3d2e2162f3
Code indent, no functionality changes
2005-07-01 14:06:02 +00:00
Stanislav Shwartsman
a9dd851fd6
Fixed several PANIC cases:
...
the PANIC message TSS.limit < 103 should never appear anymore
2005-06-22 18:13:45 +00:00
Stanislav Shwartsman
ce8f1ade07
Some not really significant speedups
2005-06-21 17:01:21 +00:00
Stanislav Shwartsman
afe3ff691d
Another fix for FPU tag word restore in FXRESTOR instruction (the tags were assigned to incorrect registers)
...
Fixed FPU print state status word printing (printed partial status instead of normal status word)
2005-06-18 20:46:08 +00:00