Commit Graph

85 Commits

Author SHA1 Message Date
Stanislav Shwartsman
2653d54e96 split 32-bit modermdata variable in BxInstruction_c to 4 Bit8u variables
this way it is possible to save shifts and masking when accessing modrm fields
2007-11-08 18:21:37 +00:00
Stanislav Shwartsman
6629f6dea3 Fixed macro redefinition 2007-11-05 16:36:37 +00:00
Stanislav Shwartsman
44e49f2fe2 Fixed CPU state print in debug dump 2007-11-05 16:28:03 +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
6d7134ef99 Remove dump_cpu debugger function, CPI method and all related structures.
Extended 'info' command in debugger to have all functionality of dump_cpu if needed. Also param tree print always could be used !
2007-10-23 21:51:44 +00:00
Stanislav Shwartsman
4ec7f5df39 Optimize access to IP (16 bit) - made IP register similar to GPR 2007-10-18 22:44:39 +00:00
Stanislav Shwartsman
e9801ef501 Support for restore cpu (and any other device from bochs root) from debugger 2007-10-14 19:04:51 +00:00
Stanislav Shwartsman
f6ed95785f added cpu state param - for future use and for dbg info
started to move debugger to info bx_param interface -> info sse and info mmx commands modified
2007-10-11 18:12:00 +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
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
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
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
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
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
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
1acdb7f274 Simplify CPU loop and fix compilation error 2006-05-24 16:46:57 +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
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
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
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
da3d26d7f4 Preliminary implemntation of SMM save statei
Fixed fetchModeMask for load32bitOsStack
2006-03-27 18:02:07 +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
55ceecf79b Small optimization in icache page-write-stamp 2006-02-28 17:47:33 +00:00
Stanislav Shwartsman
b966703504 print CPU mode correctly again 2006-02-14 20:14:18 +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
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
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
21352e50a9 Fix some bugs in debugger parser, cleanup
Add some debugger functionality
2006-01-23 21:44:44 +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
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
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
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
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
7b7ac565f9 Getting ready for long mode disasm support, patch will posted soon 2005-11-14 18:09:22 +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
c026a90779 Unify coding style in CPU methods
NO AFFECT ON EMULATION RESULTS
2005-05-20 20:06:50 +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
52041f60d4 Support for X86_64 in debug CPU method
Fixed debug messages printed from read_virtual_checks
2005-03-30 19:56:02 +00:00
Stanislav Shwartsman
e5c3e3c262 CPU mode enumeration changed 2005-03-29 22:18:13 +00:00