Commit Graph

283 Commits

Author SHA1 Message Date
Stanislav Shwartsman
c009e87a81 Remove external debugger interface:
- it is closed source (!!!)
 - we have very nice replacement now
2008-10-01 09:44:40 +00:00
Stanislav Shwartsman
d19dd8cf74 Added BX_ASSERT_ENABLE configure option to control BX_ASSERT code @configure time.
By default BX_ASSERT will be disabled 'cause it affects emulation performance
It will be ON by default when BX_DEBUGGER compiled in
2008-06-12 21:02:54 +00:00
Stanislav Shwartsman
3f1e436926 Removed unused variables in bx_dbg struct 2008-05-23 14:04:45 +00:00
Stanislav Shwartsman
3fd4a09bbc preparations for future 64-bit physical address support 2008-05-10 20:39:53 +00:00
Stanislav Shwartsman
8022225907 Disable BX_ASSERT when NO_LOGGING is set 2008-05-10 18:04:37 +00:00
Stanislav Shwartsman
6ebae41ad7 print physcial address with special format - preparations for 64-bit physical address emu 2008-05-09 22:33:37 +00:00
Stanislav Shwartsman
bdaef81603 Added debugger memory trace functionality. Enable by 'trace-mem on' command 2008-04-19 13:21:23 +00:00
Stanislav Shwartsman
ab76cbb4a0 Improve param interface 2008-04-18 16:47:45 +00:00
Stanislav Shwartsman
8424d2b888 Fixed required to make MSVC build with fastcall optimization (-Gr) healthy.
There is a trick in MSVC is to turn on the -Gr compiler switch which tells MSVC to compile all functions using fastcall calling convention. This way you don't have to edit each function declaration. But certain functions must NOT be fastcall, and those are callbacks from Windows which are defined either as cdecl or stdcall. The entry point main() also has to remain cdecl.
Patch by Darek Mihocka
2008-04-07 20:20:04 +00:00
Stanislav Shwartsman
452d8f0ac7 Implemented "copy from little endian" macros for BIG_ENDIAN hosts.
tab2space cleanup in bochs.h
2008-02-07 21:08:55 +00:00
Stanislav Shwartsman
063d896226 Optimization in 16-bit resolve functions
Fixes for hosts which can't support misaligned memory access
2008-02-07 20:43:13 +00:00
Stanislav Shwartsman
55ad3e89b6 another whitespace cleanup by Sebastien 2008-02-05 22:57:43 +00:00
Stanislav Shwartsman
192f398b46 removed --enable-magic-breakpoint configure option - it is enabled by default if Bochs internal debugger compiled in. Also it always possible to switch magic break off by .bochsrc option 2008-01-21 21:36:58 +00:00
Stanislav Shwartsman
cce3699e0b Fixed warning and possible compilation error 2008-01-01 18:12:31 +00:00
Stanislav Shwartsman
917a040cc4 Fixed more VCPP2008 warnings 2007-12-26 18:39:15 +00:00
Stanislav Shwartsman
bfd2cb67f4 Add include sys/time.h to fix compilation error 2007-12-20 18:32:14 +00:00
Stanislav Shwartsman
adda3befd3 Trace cache optimization merged 2007-12-09 18:36:05 +00:00
Stanislav Shwartsman
8f8ae29882 Fix compilation errrr 2007-11-22 17:30:40 +00:00
Stanislav Shwartsman
a9ea644c5c Print timestamps feature for performance measurements
If enabled (in .bochsrc) + --enable-show-ips=1 Bochs will print IPS + time data every second
2007-11-20 18:36:26 +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
afdcadad73 Added ability to switch off bochs loging (BX_DEBUG/INFO/ERROR) 2007-10-30 18:57:46 +00:00
Stanislav Shwartsman
d30a0d3699 warning fixes 2007-10-24 23:29:40 +00:00
Stanislav Shwartsman
6c79b067a6 Fixed __386__ macro in guest2host memory accesses - should be LITTLE_ENDIAN instead 2007-10-16 16:17:48 +00:00
Stanislav Shwartsman
ac272e9383 Changes breakpoints configure time enable macroses - reduce amount of compile-time parameters 2007-10-12 22:11:25 +00:00
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
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
5189cfbf10 SSE4 support 2007-04-19 16:12:21 +00:00
Stanislav Shwartsman
40a395a3f4 Improve single threaded simulation speed in SMP binary of Bochs
This is still significantly slower than in native no-SMP binary but faster than before at least
2007-03-06 21:12:20 +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
67314b8e1e - attempt to fix the Solaris 10 compilation failure 2006-10-31 19:26:34 +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
Volker Ruppert
598c34ed0a - added special logfunction for the gdbstub and set panics to fatal
- removed trailing linefeeds from log messages
- removed command line parameters from init function
- added copyright and CVS ID
2006-10-26 17:27:04 +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
2cdd6596f1 - implementation of the PIIX4 ACPI controller started. The code is not yet
enabled and the i/o handler only generate info messages.
2006-09-24 16:58:13 +00:00
Volker Ruppert
fdefdc5b9f - remove logfunction from list when device is deleted
- fixed typos in harddrv code
2006-09-17 18:09:33 +00:00
Volker Ruppert
4cf2f745d1 - some fixes to avoid segfaults after early panics
- fixed gameport log type
- wx: store mouse capture mode in the gui code (only access the mouse parameter
  when the capture mode changes)
- wx: don't initialize wxScreen if already done and clear screen on exit
2006-09-12 13:05:07 +00:00
Volker Ruppert
e075c68f78 - close logfile and reset logging to stderr at the end of the simulation
- removed unused code
2006-09-09 11:28:52 +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
Volker Ruppert
4e0dad5c2f - removed unused save/restore declaration 2006-05-27 17:50:29 +00:00
Volker Ruppert
6a299e61a7 - get rid of the unused description field of shadow bool and data parameters
(new/modified constructor)
- new constructor for bx_list_c objects without title
- shadow parameter bitmasks fixed
- functions bx_sr_before_save_state() and bx_sr_after_restore_state() prepared
- ne2k.cc: reset behaviour fixes
- sb16: some variable types changed
2006-05-14 15:47:37 +00:00
Volker Ruppert
2e144d5862 - changed some function argument and return types from char * to const char *
(grabbed from patch included in FC5 Bochs package for wxWidgets 2.6.x)
2006-03-13 18:55:53 +00:00
Volker Ruppert
4e4df52109 - added new function bx_stop_simulation() to stop the Bochs simulation thread
(used by wx). Now the siminterface no longer depends on cpu.h
2006-03-11 22:40:32 +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
c0aeb1b073 Substitute NULL to BX_CPU_C parameter instead of BX_CPU(0) for memory ops originated by devices 2006-03-06 19:23:13 +00:00
Volker Ruppert
dd7e08de99 - remaining config options and special menus added to parameter tree
- parameter tree structure updated (TODO: should be moved to development.dbk)
- code cleanup: bx_options stuff and obsolete parameter access methods removed
- TODO: rewrite of shadow parameter stuff (for subtree "save_restore")
2006-03-05 10:24:29 +00:00
Volker Ruppert
dbe0918d59 - text snapshot check option added to parameter tree
- GDB stub options are now regular parameters
- syntax of text_snapshot_check bochsrc directive changed
2006-03-04 12:43:47 +00:00
Volker Ruppert
e1b42d183a - sb16 options rewritten to a parameter tree
- sb16 parameters stored in the device class and runtime parameter handler added
- wx: ParamDialog can currently handle only dependency lists of bool parameters
  correctly (TODO: add support for numeric parameters)
2006-03-03 20:29:50 +00:00
Volker Ruppert
dafe33fc84 - network options rewritten to a parameter tree
- disable usb options if not compiled with usb support
- usb and network dependency list created with menu->clone()
- load usb plugin only if at least one hub is present
- remaining options prepared for rewrite
- proposed parameter tree updated
2006-03-02 20:13:14 +00:00
Volker Ruppert
154702eaca - serial, parallel and usb options rewritten to a parameter tree
- bx_init_options(): local variables cleanup
- hide floppy devtype parameter (floppy media type change support not yet complete)
- wx: menu order changed
- keyboard.cc: removed obsolete FIXME
- proposed parameter tree updated
2006-03-01 17:14:36 +00:00
Volker Ruppert
15efba10dd - ata/atapi options rewritten to a parameter tree
- siminterface get_param_*() methods num support a base parameter like the generic
  get_param() method
- new parameter lists now also have a generated id
- test function print_tree() now handles enum parameters correctly
- proposed parameter tree updated
2006-02-26 19:11:20 +00:00
Volker Ruppert
6cd4ffff28 - floppy options rewritten to a parameter tree
- enum parameter type method set_by_name() fixed
2006-02-24 22:35:46 +00:00
Volker Ruppert
a4f412d3e8 - boot and loader options rewritten to a parameter tree
- wx: ParamDialog method EnableParam can now handle new-style parameters
- saving of pcidev options fixed
2006-02-23 22:48:57 +00:00
Volker Ruppert
c47508bdb1 - keyboard and mouse options rewritten to a parameter tree
- siminterface method ask_param() can now handle new-style parameters
- proposed parameter tree updated
2006-02-22 19:18:29 +00:00
Volker Ruppert
d4d4cbf6dd - display and interface options rewritten to a parameter tree
- new enum parameter method get_selected() returns a pointer to the selected string
- proposed parameter tree updated
2006-02-21 21:35:09 +00:00
Volker Ruppert
d364481bed - pcidev options rewritten to a subtree of parameter "pci"
- save pcidev config line if enabled
- load pcidev plugin if requested
- pci parameter dependencies improved
- textconfig: show the title of a disabled submenu
2006-02-20 21:29:13 +00:00
Volker Ruppert
6311fface8 - pci options rewritten to a parameter tree
- proposed parameter tree updated
- pci presence flag stored in the memory code
2006-02-19 21:35:50 +00:00
Volker Ruppert
509900dff4 - clock and cmos options rewritten to a parameter tree
- clock/cmos menu added in textconfig and wx
- enum parameter type now supports new parameter handling
- long text format for numeric parameters added (useful when both textconfig and
  wx are present)
- wx: handling of list flag USE_BOX_TITLE fixed
- textconfig: optional memory features moved to submenus
- siminterface generates a unique id for new parameters (used for wx dependencies)
- proposed parameter tree updated
- floppy options init code cleanup (still using old-style parameters)
2006-02-19 15:43:03 +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
Volker Ruppert
a14b2a9720 - memory parameter handling rewrite completed
- added BXPN_* symbols for parameter names (taken from old save/restore branch)
2006-02-17 22:27:38 +00:00
Volker Ruppert
4cece81589 - started implementation of the parameter tree based on patch.param-tree
* memory parameter handling rewritten (not yet complete)
  * new reset() method for bx_list_c for recursive reset of all list members
  * memory options in wx now handled in a ParamDialog (ConfigMemoryDialog removed)
  * removed obsolete BXP_* constants in siminterface.h
  * updated proposed parameter tree
- constant BX_N_OPTRAM_IMAGES for optional RAM images limit added
2006-02-16 21:44:17 +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
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
c7dd4185a7 Do not pass crc32 function as parameter to memory class - it is available as global function now 2006-01-28 16:16:03 +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
Volker Ruppert
c56b918a8e - code cleanup: removed unused defines and structure members
- removed plugin flag 'use_devmodel_interface' (all plugins are using it)
2006-01-20 19:12: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
3dbf0f3b97 Bochs supports only ONE memory address space anyway so the code sould be optimized for this case a little (mainly in SMP configuration) 2006-01-15 19:35:39 +00:00
Stanislav Shwartsman
48919f6e6d Compile fix for new disasm (see SF patch) 2005-11-20 20:33:31 +00:00
Volker Ruppert
e0f02463f9 - the step delay for the recalibrate and seek commands is now calculated from the
number of steps to do, the step rate time and the date rate
- the option floppy_command_delay is obsolete now, since all floppy delays are
  based on the hardware specs. The usage of this option caused a warning now.
2005-11-12 10:38:51 +00:00
Kevin Lawton
641650e7e1 Added optramimage directive for .bochsrc files, with same syntax as
optromimage.  You can load up to 4 arbitrary binary images into RAM.
  I didn't do any checking on the addresses, so it's up to you to make
  sure they don't collide with anything else.  Should only be used for
  placing files into standard RAM.
2005-10-28 00:12:27 +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
Volker Ruppert
0cacb9af0c - deprecated option 'newharddrivesupport' removed from hard drive code
- sense code ASC_ILLEGAL_OPCODE added for unimplemented/unknown ATAPI commands
- some panics changed to errors
- unsupported bits message in drive and head register changed to BX_DEBUG
- improved info about not existing drive
- indent mode fixed in ATAPI packet command section
2005-10-02 10:16:54 +00:00
Volker Ruppert
0706c5bcfb - renamed cmos image parameter to 'rtc_init'
- bochsrc sample: example for serial mode 'socket' added
2005-09-18 07:16:28 +00:00
Volker Ruppert
c58b8b54c3 - binary RTC mode implemented
- cmos image options renamed
- new cmos option controls the usage of the RTC values from image
- report time0 in use after handling the cmos image stuff
- MSVC warning fixed
2005-09-11 20:03:56 +00:00
Volker Ruppert
c83745753b - moved BX_SHARE_PATH check and definition to bochs.h
- small cleanup in bochs.h
2005-07-31 15:35:01 +00:00
Volker Ruppert
8380541a8f - replacing uint* types by Bit*u types since they are identical (BeOS code untouched) 2005-06-26 10:54:49 +00:00
Volker Ruppert
4ee7865930 - BX_GDBSTUB and BX_SUPPORT_X86_64 are always defined in config.h 2005-03-16 16:36:31 +00:00
Volker Ruppert
a16fbc293a - vga extension option partially implemented (Bochs VBE interface and PCI VGA
dummy interface are now disabled if the extension isn't set to "vbe"
- writing charmap data in graphics mode now supported (SF patch #1059199)
- fixed set_ask_format() for the mouse type option
2005-02-01 19:16:39 +00:00
Stanislav Shwartsman
3cd646004f Fixed bug "1101168 APIC base address change" 2005-01-13 19:03:40 +00:00
Stanislav Shwartsman
f5b64a3a59 more preparations to NXE feature 2004-12-16 22:21:35 +00:00
Volker Ruppert
d5684940a1 - renamed parameters that control the sb16 and ne2k presence to "enabled"
- ne2k and sb16 config lines now support the parameter "enabled=0|1"
- config parser code for ne2k and pnic now working the same way
- ne2k enable option now present in config menu / dialog
2004-12-14 19:27:42 +00:00
Volker Ruppert
02ae558db8 - removed old unused code designed for a save/restore feature
- fixed pcidev targets in iodev/Makefile.in
- updated all Makefile dependencies using a default setup (.conf.linux).
  TODO: dependencies should be generated at compile time since they depend on
  the config settings
2004-12-13 19:10:38 +00:00
Volker Ruppert
78218d8b1b - implementation of bus mouse and usb mouse started - NOT YET COMPLETE !
(SF patch #1082584 by Ben Lunt)
2004-12-11 08:35:33 +00:00
Volker Ruppert
6cc4cd8c4b - mouse type option prepared (TODO: device code for wheel and serial mouse) 2004-11-30 21:03:16 +00:00
Alexander Krisak
efc5edc58b Preparing for QNX6 port. 2004-11-22 13:14:54 +00:00
Volker Ruppert
3cad938b05 - gdbstub support turned into a runtime option (SF patch #1021740 by Charles Duffy)
- gdb_* options moved to the new gdbstub option
2004-11-06 10:50:03 +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
Volker Ruppert
06b249ebc6 - boot sequence support added in the config interface and the hard drive init
code. Up to 3 boot drives are supported now. TODO: new boot dialog for wx.
- config.cc: missing ask formats for enum parameters added
- wxdialog.cc: tab window now uses the label instead of the ask format if defined
2004-10-16 15:44:00 +00:00
Volker Ruppert
0819a15cd4 - applied patch.guess-flp-img-size (SF patch #567595) by Tal Benavidor with some
changes (moved to config.cc, use stat(), support more types)
- bochs.h: unused floppy stuff removed
- bochsrc sample: updated 'floppya' description
2004-09-07 18:02:29 +00:00
Volker Ruppert
ae180cc46a - pci slot register mechanism added
* up to 5 slots can be specified with the 'i440fxsupport' config option
  * the pci slot number are hardwired to pci device numbers
  * the 'devfunc' value is returned the calling device (useful for multi-function
    devices)
  * the core of the i440FX chipset is hardwired to pci device 1 + 2; usb is still
    optional and appears at device 1, function 2
- ne2k: enable pci features if connected to a pci slot
- ne2k: asic data port supports 32-bit access if ne2k-pci is active
- pci2isa: improved error messages for ELCR1 and ELCR2
2004-06-29 19:24:34 +00:00
Stanislav Shwartsman
5873b26a82 Speed up compilation process.
bochs.h already not include iodev.h which reduces compilation dependences for almost all cpu and fpu files, now cpu files will not be recompiled if iodev includes was changed
2004-06-19 15:20:15 +00:00
Volker Ruppert
bf243f892a - added PCI IDE controller (dummy device - busmaster feature not present yet) 2004-06-09 20:55:58 +00:00
Stanislav Shwartsman
47fd2820ae split main.cc to main.cc + config.cc 2004-06-04 22:06:55 +00:00
Volker Ruppert
d5f337e1ef - prepared implementation of display library specific options
- fixed bug #890734 (commas in strings enclosed with double quotes)
2004-02-22 18:51:38 +00:00
Daniel Gimpelevich
126971af49 Made to compile on MacOS9 2004-02-06 22:28:00 +00:00
Christophe Bothamy
8ad4cf6056 - add speaker log, pluginSpeaker, and beep_on/off methods in guis 2004-02-01 23:48:57 +00:00
Michael Brown
d1922bc835 Changed #ifdef MAGIC_BREAKPOINT to #if BX_MAGIC_BREAKPOINT and added a
configure script option --enable-magic-breakpoints (enabled by default).

Documented the instruction required to trigger the magic breakpoint
(xchgw %bx,%bx).
2004-01-29 17:49:03 +00:00