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
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
9db896d100
minor x86_64 fixes and cleanups
2007-01-12 22:47:21 +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
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
650086669c
Print 64-bit registers in 'info registers' command and in dump_regs
2006-10-21 22:06:39 +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
65082e4a4f
Handle granularity field for LDT
...
Next step - fix code duplication with TSS
2006-08-25 19:56:03 +00:00
Stanislav Shwartsman
3ce7764fce
Fixes in 64-bit decoding
2006-08-11 17:23:36 +00:00
Stanislav Shwartsman
c7aa53d044
Fixed compilation error of extdb
2006-06-25 21:44:46 +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
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
6c3420a18b
Add debug prints before any #GP excepion which only possible to be generated
2006-06-09 22:29:07 +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
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
1acdb7f274
Simplify CPU loop and fix compilation error
2006-05-24 16:46:57 +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
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
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
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
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
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
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
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
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
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
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
da3d26d7f4
Preliminary implemntation of SMM save statei
...
Fixed fetchModeMask for load32bitOsStack
2006-03-27 18:02:07 +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
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
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
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
5c58b22f44
Fixed opcode names according to Intel docs
...
Fixed bug found during disasm validation
2006-02-17 13:34:31 +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
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
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
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
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
2c8f6f7720
Merged patch: determine number of processors to emulate through .bochsrc
2006-01-18 18:35:38 +00:00
Stanislav Shwartsman
89e3472178
Fix validate_seg_regs check
2006-01-09 19:34:52 +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
f863d1e902
Generate #GP exception instead of #TS when TSS selector points to bad TSS
2005-12-12 19:44:06 +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
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
7022be46f5
Fix undefined flags handling for ROR and RCR instructions
2005-10-13 19:28:10 +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
d1c722211e
Fix duplicate opcodes, fix opcode names and disasm bugs
2005-09-23 16:45:41 +00:00
Stanislav Shwartsman
95b12d7429
#SF patch fixed transition from vm8086 to PM
2005-09-11 20:00:29 +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
126069829d
Fixed compilation error when icache is disabled
2005-08-13 14:10:22 +00:00
Stanislav Shwartsman
b192b2af9b
Optimize pageWriteStamp checking
2005-08-10 18:18:57 +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
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
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
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
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
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
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
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
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
64f6d8c293
Separate force_flags function from read_flags (fix code duplication)
2005-06-16 17:25:04 +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
663f7d5ef3
CMPXCHG16B instruction implemented
2005-05-19 20:25:16 +00:00
Stanislav Shwartsman
caa0648188
Move duplicated code to separate function
...
And fix a bug I added by previous merge
2005-04-17 21:51:59 +00:00
Stanislav Shwartsman
6fa52214b0
Canonical address check for RIP in x86-64
2005-04-17 18:54:54 +00:00
Stanislav Shwartsman
0b6a3afb53
Fixed compilation problem in segment_ctrl.pro
...
Restore back the workaround for segmentation checking in exception.cc until the better solution will be found
2005-04-13 17:13:05 +00:00
Stanislav Shwartsman
9b30cad4c4
Just software changes:
...
1. Separate interrupt function to 3 different functions (real_mode, long_mode, pmode)
2. Added PANIC messages for not implemented FAR CALL, FAR JUMP and FAR RET in long mode
2005-04-12 18:08:10 +00:00
Stanislav Shwartsman
c2c18d2aa4
Clean fix for loading NULL SS selector in exception.cc
2005-04-11 18:53:04 +00:00
Stanislav Shwartsman
1755589376
Separate pageWriteStamp from ICACHE. The pageWriteStamp has totally independant structure and could be used in future with icache structure. Also it could be significantly speeded up using BX_SMF analog constructions.
2005-04-10 19:42:48 +00:00
Stanislav Shwartsman
6d491de4d3
Fixed bug with jumping from long mode when executing interrupt
2005-03-30 22:31:03 +00:00
Stanislav Shwartsman
0f7f728e86
Added debug messages for interrupt function in long mode
...
Added mode switch debug prints
2005-03-30 20:53:04 +00:00
Stanislav Shwartsman
da9091f04a
Fixed compatability mode execution bug, compatability mode and long mode should be treated as protected for all protected_mode() checks
2005-03-29 21:37:06 +00:00
Kevin Lawton
831afe7c40
Removed unused instruction (function) prototypes which were generated as
...
a result of the initial implementation of AMD64 support. These appear
to have been cut-n-paste vestiges.
2005-03-25 21:33:47 +00:00
Kevin Lawton
e6cb602231
Moved macros for duplicate SSE/SSE2 functions from fetchdecode.h to
...
cpu.h, and defined function prototypes for the case where bochs
is compiled with a new #define (called StandAloneDecoder) is set.
This allows for the decoder to be tested separately from bochs.
2005-03-23 01:45:16 +00:00
Kevin Lawton
4e03c4448c
Added some comment tags so that a script can pull out relevant parts
...
of the decoder to test it in standalone mode. A few lines in cpu.h
were re-arranged to make this easy, but no real lines of code were
changed or generated.
Changed a few PANICs to INFOs after testing corresponding cases.
2005-03-22 18:19:55 +00:00
Stanislav Shwartsman
f77ddd9701
Remove cpu_onlline_map varaible, it wasn't initialized properly and might cause APIC problems
2005-03-19 18:43:00 +00:00
Stanislav Shwartsman
6e53a54907
Extend cpu_mode for :
...
#define BX_MODE_IA32_REAL 0x0 // CR0.PE=0
#define BX_MODE_IA32_PROTECTED 0x1 // CR0.PE=1, EFLAGS.VM=0
#define BX_MODE_IA32_V8086 0x2 // CR0.PE=1, EFLAGS.VM=1
#define BX_MODE_LONG_COMPAT 0x3 // EFER.LMA = 0, EFER.LME = 1
#define BX_MODE_LONG_64 0x4 // EFER.LMA = 1, EFER.LME = 1
2005-03-15 19:00:04 +00:00
Stanislav Shwartsman
189e55885d
put VME initial code in BX_SUPPORT_VME ifdefs
2005-03-13 20:18:37 +00:00
Stanislav Shwartsman
fd13784231
Small cleanup in access.cc
...
VME feature code should be valid only for CPU LEVEL >= 4
2005-03-12 19:34:18 +00:00
Stanislav Shwartsman
2a5a5c2de5
Fixed compilation error for 486 CPU
...
small fixes for IRET instructionm
2005-03-12 16:40:14 +00:00
Stanislav Shwartsman
24fa5935c1
Getting little bit closer to VME feature
2005-03-09 22:01:13 +00:00
Stanislav Shwartsman
709b218c10
Reduce metaInfo initialization in fetchDecode
2005-03-01 21:44:01 +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
c583a6f9cf
move segments and descriptors definitions and macroses for new descriptor.h
2005-02-27 17:41:45 +00:00
Stanislav Shwartsman
2bfc842c09
CPU fixes by Kevin Lawton
2005-02-16 21:27:21 +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
799403620e
Small speedup in boundaryFetch method
2005-02-12 14:00:13 +00:00
Stanislav Shwartsman
9305305493
First (and may be last) step to implementation of
...
Virtual Mode Extensions (VME)
and
Protected Mode Virtual Interrupts (PVI)
instructions STI and CLI have full support of these features, according to Intel docs. Need to check POPF and PUSHF instructions and afterwise VME and PVI extensions could be enabled in CR4
2005-02-03 22:08:34 +00:00
Stanislav Shwartsman
bbcc5e0e3a
Split BOUND instruction to two different according to operand size
...
Coding style change
2005-01-28 20:50:48 +00:00
Stanislav Shwartsman
8fe15b0ddc
Fixed compilation error
2004-12-17 10:50:49 +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
46bb3d8853
remove duplicated data arrays from CPU
2004-12-11 20:51:13 +00:00
Stanislav Shwartsman
0d09a8c8a8
fix code duplication
2004-11-26 19:53:04 +00:00
Stanislav Shwartsman
69c0b06955
fixes in disassembler
...
split REPEAT instructions according to opsize to speedup execution
now each REPEATABLE instruction splitted to 3 different instructions, one for 16-bit operand size, one for 32-bit and one for 64-bit. Choosing of correct instruction occure in fetchdecode step.
2004-11-20 23:26:32 +00:00
Stanislav Shwartsman
645e04860e
For now : disable fetching from physical address 0xFFFFFFF0 after #RESET
...
because ICACHE do not support physical address > mem.len.
This is the first part of the fix, the rest coming soon
2004-11-18 23:16:36 +00:00
Stanislav Shwartsman
7b62a6e206
Fix reset registers in CPU for #RESET signal
...
Extract ICACHE from cpu.h to separate icache.h
2004-11-14 19:29:34 +00:00
Stanislav Shwartsman
2ce5495d38
Fixed compilation errors
2004-11-03 06:35:48 +00:00
Stanislav Shwartsman
2ed7e4eed5
EIP > CS.limit should be checked in real mode too.
...
Enable for now for JUMP instructions, still todo - CALL and RET
2004-11-02 17:31:14 +00:00
Stanislav Shwartsman
f06c8b6b95
EIP > CS.limit should not be a problem
...
Manual says that GP(0) shouldd be generated in this case ALWAYS
Fixed instructions PANIC messages to ERROR for this case
And ... do not leave PANIC messages w/o taking care that user could push CONTINUE button and program should know to continue after the PANIC code line. Mainly in rerurn instructions were several problems ...
2004-11-02 16:10:02 +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
040be015d8
1. Added required GP(0) exception when setting conficting flags in CR0
...
2. APIC disabled compilation error fixed
2004-09-21 20:19:19 +00:00
Stanislav Shwartsman
760a195c9d
* Fix LOCK prefix handling for x86-64
...
* Split BT*_EvGv functions to 3 different function according to exec mode
2004-09-17 20:47:19 +00:00
Stanislav Shwartsman
bbd55fe16f
Merge and commit patch.apic-zwane from CVS patches directory.
...
the patch release notes by Zwane:
o Define symbols for constants like
o APIC arbitration
o Processor priority
o Various interrupt delivery fixes
o Focus processor checking
o ExtINT delivery
I need to release this now so that i don't fall too far behind CVS, when
it was part of the bochs-smp patch it could boot 2.4.18 4way. Apologies
for the whitespace changes.
Also remove patch.apic-ppr-zwane patch because it already included in
patch.apic-zwane.
I hope it will help to boot x86-64 or cmp systems required missed APIC
features !
2004-09-15 21:48:57 +00:00
Stanislav Shwartsman
283f9ae5d2
Simplify cpu.h
...
Speedup FYL2X and FYL2XP1 instructions
2004-09-14 20:19:54 +00:00
Stanislav Shwartsman
6cdb42d909
Little bit optimize memory access functions. Now values are calculated only if they actually needed.
2004-09-13 20:48:11 +00:00
Stanislav Shwartsman
fc631037ff
remove obsolete comments from fetchdecode
2004-09-06 20:22:39 +00:00
Stanislav Shwartsman
016207b222
Commented problematic check in misc_mem.cc
...
Implemnted lazy-flags and undocumented flags handling for IMUL instructions
2004-08-30 21:47:24 +00:00
Stanislav Shwartsman
b370a417a4
Optimize lazy-flags for ADC and SBB instructions
2004-08-18 20:47:35 +00:00
Stanislav Shwartsman
1b7b791493
Speedup lazy-flags for INC and DEC instructions
2004-08-14 20:00:24 +00:00
Stanislav Shwartsman
1732e54baa
Fixed undocumented flags handling for some instructions.
...
Bugfix for CF flag handling for SHL64 instruction
2004-08-14 19:34:02 +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
Stanislav Shwartsman
5de51f67d9
Prepare lazy flags macroses for more efficient lazy flags handling
2004-08-11 21:26:23 +00:00
Stanislav Shwartsman
8f0cf91fff
This commit is the first commit in long series of changes the have several purposes:
...
1. Review and commit patch
[ 896733 ] Lazy flags, for more instructions, only 1 src op
May be partially, but I hope to get all ideas from patch in
2. Get Bochs speedup after lazy flags optimization
3. Most important for me: improve correctness of emulation by handling several
undocumented EFLAGS modifications. And finally pass
UFLAGS - Undefined Flags Test v 3.0
Copyright (C) Potemkin's Hackers Group (PHG) 1989,1995
The test still fails on > 50% of its checks.
2004-08-09 21:28:47 +00:00
Stanislav Shwartsman
f9bd2b74be
1. Fixed bug in FSUB instruction
...
2. Fixed bug
[ 989478 ] I-Cache and undefined Instruktions
The L4 microkernel uses an undefined instruction to
trap for a special requests into the kernel (LOCK NOP).
The handler fixes this up and gives the user a special
code page with syscall stubs. If you're not using the
I-Cache optimization everthing works find on bochs. But
if you enable the I-Cache (--enable-icache), then the
undefined opcode exception is thrown only once for ever
virtual address it occurs. See the demodisk of the
L4KA::pistachio
(http://www.l4ka.org/projects/pistachio/download.php ).
In this case the pingpong benchmark of this demo is of
interest. Everything runs fine until the program tries
to spawn a new task for its measurements. This new task
shares the code of the creating program. But the new
task stops executing at the undefined instruction
explained above and no exception is thrown.
2004-07-29 20:15:19 +00:00
Stanislav Shwartsman
50aaf8ec6f
Implemented FFREEP 287+ compatability instruction
2004-07-15 19:45:33 +00:00
Stanislav Shwartsman
79b1cfdc1c
removed unused code
2004-07-12 19:20:55 +00:00
Stanislav Shwartsman
5c5b556f24
Merge softfloat-fpu-implementation_ver4_branch branch
2004-06-18 14:11:11 +00:00
Stanislav Shwartsman
3274e0dd12
Commit patch
...
[ 950905 ] Do not PANIC on rare, bad input from user-mode
by h.johansson
with little changes and fixes
2004-05-10 21:05:51 +00:00
Stanislav Shwartsman
cf6d1b8bd9
port some changes from spftfloat-fpu branch to the MT
2004-04-09 15:34:59 +00:00
Stanislav Shwartsman
3f7c794b26
commit patch
...
899972 data xfer performance patch V 2.0.4 2004-02-18 15:38 nobody psychosmur
2004-02-26 19:17:40 +00:00