Commit Graph

94 Commits

Author SHA1 Message Date
Stanislav Shwartsman
1af7010e50 Optimized memory access for 64-bit mode
Starting convergence to new lazy flags scheme by Darek Mihocka (www.emulators.com). The new flags code is still being validated and perfected but I try to minimize the diff between 2 versionS
2007-11-20 17:15:33 +00:00
Stanislav Shwartsman
83f6eb6945 Changes copyrights for the files I wrote :)
Also split EqId G1 group for x86-64
2007-11-17 23:28:33 +00:00
Stanislav Shwartsman
9dc471bbe5 Simplify Guest2HostTLB code
Fixed APIC CPUID bit
2007-11-11 20:44:07 +00:00
Stanislav Shwartsman
5fd21257de Remove qick TLBN invalidation code - it actually only could slow down emulation 2007-11-09 21:14:56 +00:00
Stanislav Shwartsman
2f5fa07af3 small speedups 2007-11-07 10:40:40 +00:00
Stanislav Shwartsman
e137560b14 Complete MONITOR/MWAIT implemntation (including monitoring of memory range)
Fixed PANIC in read/write Cr/Dr - should #UD with unkown register used
2007-11-01 18:03:48 +00:00
Stanislav Shwartsman
ce0e0287fb Naturally speedup repeat execution functions, fix TLB index calculations 2007-10-30 22:15:42 +00:00
Stanislav Shwartsman
2d981562c4 changes Bit32u -> bx_phy_address in dbg paging method 2007-10-08 20:45:30 +00:00
Stanislav Shwartsman
91e6ca8d5c Implemented MTRR support
Fixes in #PF exception priority
2007-09-20 17:33:35 +00:00
Stanislav Shwartsman
70f513b07b Make efer control MSR separate register 2007-09-10 20:47:08 +00:00
Stanislav Shwartsman
5ac1bb6646 rewrite page fault 2007-08-30 16:48:10 +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
c184a3a2ba Removed redundant mem-only checks - handled in fetchdecode now 2007-03-23 14:50:45 +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
905de565a9 Add debug prints for NX bit feature 2006-10-28 12:31:23 +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
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
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
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
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
798c90ee85 Fixed comments 2006-04-26 14:05:28 +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
4fd9bd53c3 Change Bit32u -> bx_phy_address in memory 2006-03-28 16:53:02 +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
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
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
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
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
55ceecf79b Small optimization in icache page-write-stamp 2006-02-28 17:47:33 +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
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
8be190d848 Implemented RDTSCP instruction 2005-08-05 12:47:33 +00:00
Stanislav Shwartsman
0b60100a0d Merged patch for Hkan T. Johansson
TLB access bit optimizations
2005-06-14 20:55:57 +00:00
Stanislav Shwartsman
495102369f Fix PAE functionality 2005-04-14 16:44:40 +00:00
Stanislav Shwartsman
c30e89289b Fixed R/O pages access in CPL=3 (TLB accessBits bug) 2005-03-03 20:24:52 +00:00
Stanislav Shwartsman
b25088bf2f Merge patch [1153327] ignore segment bases in x86-64 by Avi Kivity 2005-02-28 18:56:05 +00:00
Stanislav Shwartsman
ef197b2a56 Fixed compilation error in paging.cc
Some fixed for APIC in P4 processor
APIC patch by mrieker cleaned even more
2005-02-23 21:18:24 +00:00
Stanislav Shwartsman
91526a90b3 Merged patch
[1123895] x86-64 gdb/debugger fixes by Avi Kivity
2005-02-16 18:58:48 +00:00
Stanislav Shwartsman
57fcc89274 Non-Execution support impelemented and enabled in CPUID when in x86-64 configuration 2005-01-20 19:37:43 +00:00
Stanislav Shwartsman
2212b963ed Added additional comment to code in paging.cc 2005-01-19 20:48:51 +00:00
Stanislav Shwartsman
f5b64a3a59 more preparations to NXE feature 2004-12-16 22:21:35 +00:00
Stanislav Shwartsman
da24883199 Extend page directory entries to 8 byte in PAE mode when X86_64 is enabled
(prepartions to NX feature implementation)
2004-12-13 22:26:36 +00:00
Stanislav Shwartsman
730b8c0243 Fix this pointers in the code 2004-11-14 21:25:42 +00:00
Stanislav Shwartsman
a9022ac5cb Fixed compilation prroblem reported in bug
[ bochs-Bugs-913418 ] compiler errors with --enable-external-debugger option
Remove code duplication
2004-10-29 21:15:48 +00:00
Stanislav Shwartsman
5e23909c7c prepations for NX bit implementation 2004-10-21 18:20:40 +00:00
Stanislav Shwartsman
6a9e8e6011 Drop unnecessary warning 2004-10-05 20:25:06 +00:00
Stanislav Shwartsman
6dc8a1cafd Very small code cleanup 2004-09-04 18:22:22 +00:00
Stanislav Shwartsman
a1f830d429 Implemented FAST lazy flags version for logic instructions.
Small code cleanup/simplification for others.
2004-08-13 20:00:03 +00:00