Commit Graph

483 Commits

Author SHA1 Message Date
Volker Ruppert
acc4c6c2c8 Some fixes and cleanups
- in wx we had two logfunctions for the siminterface (removed duplicate init)
- renamed siminterface prefix to "SIM"
- moved variable "pluginlog" to the plugin interface
- fixed / removed some forward declarations
2013-12-29 08:45:28 +00:00
Stanislav Shwartsman
b6c39a3176 merge AVX and SSE .bochsrc options to single SIMD option which will configure SSE and AVX together 2013-09-16 19:50:36 +00:00
Volker Ruppert
dbccb39fb7 fixed unused variable warning with BX_CPU_LEVEL <= 4 2013-09-06 06:44:05 +00:00
Stanislav Shwartsman
852b5c3749 implemented SHA new instructions announced in recent Intel SDM extensions document rev015 2013-07-24 18:44:22 +00:00
Stanislav Shwartsman
edc3003f35 do not use cpuid:level param when it doesn't exists 2013-06-15 17:53:49 +00:00
Volker Ruppert
17b7b87a61 Added new experimental gui 'vncsrv" using the LibVNCServer library. It supports
higher resolutions and > 8 bpp graphics modes. The RFB gui with limited
capabilities is still available.
TODO:
- fix random segfaults in dimension_update()
- Windows (MinGW) support
- fixes for clients not supporting 'rfbEncodingNewFBSize'
- fix cursor shape after dimension update()
2013-05-30 17:18:30 +00:00
Stanislav Shwartsman
9b958b3a05 allow to select CPU level = 5 from .bochsrc even when Bochs is compiled with CPU_LEVEL=6 2013-04-17 19:46:11 +00:00
Volker Ruppert
910774513b some work for "wx second run" support (not yet complete)
- bx_list_c: added support for removing parameter with other parent list
- USB HC's: remove item from runtime config on simulation exit
- initialize bx_user_quit in bx_begin_simulation()
- only remove optional plugin from list if alrady unloaded
2013-02-17 08:27:43 +00:00
Volker Ruppert
e9302f4c13 don't execute hdimage save functions if the save/restore path is empty
reset save/restore path after completing save or restore process
2013-02-09 14:21:58 +00:00
Volker Ruppert
addd85e408 don't overwrite log actions per device if default is unchanged
- after parsing command line only update actions if default has changed
- bx_init_hardware(): extra update of log actions in quick start mode not needed
2013-02-05 20:57:40 +00:00
Volker Ruppert
b6f9c738fd simplified code using new bx_param_string_c method sprint()
TODO: use sprint() in enhanced debugger
2013-02-02 08:49:55 +00:00
Volker Ruppert
17970857b8 added new bx_param_string_c methods isempty() and sprint()
- isempty() returns 1 if string length is 0 or string has special value "none"
- sprint() copies the formatted / converted string into a buffer
- use new methods in some parts of the code (TODO: win32 dialogs)
- check for the special value "none" to avoid failures
2013-02-01 19:13:58 +00:00
Volker Ruppert
cc56245407 started implementing the i430FX chipset
- renamed config parameter "i440fx_support" to "enabled"
- new config parameter "chipset" added (current choices "i430FX" and "i440FX")
- don't load ACPI support if the i430FX chipset is selected
- select register values for the core PCI devices depending on the chipset
- USB UHCI must be connected to a PCI slot if the i430FX chipset is used
- rombios changes to make the i430FX chipset work
- TODO #1: implement limitation to 1 cpu and 128 MB RAM for the i430FX chipset
- TODO #2: verify register behaviour of both chipsets
2012-11-11 08:11:17 +00:00
Volker Ruppert
5f5d8e2c33 Applied initial version of the 3dfx Voodoo Graphics emulation. The Voodoo core
is based on a patch originally designed for DOSBox. Currently only the Voodoo1
adapter model can be emulation. The emulation is currently slow, but we intend
to clean up and optimize the code. Running the 3D engine in a separate thread
is also planned. To compile with Voodoo support the configure option
"--enable-voodoo" must be used. Then the device can be activated with
"plugin_ctrl: voodoo=1" in bochsrc or on the command line. The device will be
assigned automatically to a PCI slot unless you do that manually. A specific bochsrc
option to select the adapter model will be added when the code has support for it.
2012-09-14 21:50:50 +00:00
Volker Ruppert
c2f9150497 - split "show ips" handler from bx_signal_handler to simplify usage without alarm() 2012-08-26 12:32:10 +00:00
Volker Ruppert
ba80ab8395 - next attempt to fix random freezes in wxGTK
- re-implemented siminterface method is_wx_selected() (the old one had been
    renamed to has_debug_gui() which is something different now)
  - don't use alarm() if the wx gui is selected and instead use the wxTimer based
    code that already exists for wxMSW
2012-08-25 13:20:55 +00:00
Volker Ruppert
95e3a7141d - reset config options support for the optional plugin control. Unload all the
plugins from the list and load the default set.
- initialize save/restore support earlier to avoid segfault when unloading plugin
2012-08-19 11:45:50 +00:00
Volker Ruppert
44098d90e6 - fixed location of optional plugin load / unload calls 2012-07-14 15:48:48 +00:00
Stanislav Shwartsman
5d66e8450e implemented ADCX/ADOX instructions from rev013 of arch extensions published by Intel 2012-07-12 14:51:54 +00:00
Volker Ruppert
1ac405f6f2 - added command line option '--help features' to show all available features
and devices. This option can be used by external bochsrc creation tools to
  offer config related to the emulated hardware only (fixes SF item #1251456).
- TODO: add available display libraries.
2012-07-07 10:49:46 +00:00
Volker Ruppert
db633275b0 - several improvements to the optional plugin control
- SIM->opt_plugin_ctrl() now can be used to verify the optional plugin
    configuration when using the plugin name "*". The 'load' value 1 makes
    sure that all plugins with the value 1 are loaded. The 'load' value 0
    unloads all plugin with the value 0 (marked for removal).
  - add the default set of plugins to the 'plugin_ctrl' list and load all these
    pre-defined optional plugins before parsing the configuration.
  - special wx case: verify plugin configuration before showing the plugin
    control dialog and before initialising hardware.
  - device plugins that have been loaded, but not configured now set their
    plugin control value to 0. Added the plugin unload check before signalling reset.
2012-07-06 17:19:32 +00:00
Volker Ruppert
3202afb48e - show ips feature: disable alarm timer on simulation exit to avoid wxBochs
process termination
2012-05-12 09:32:09 +00:00
Volker Ruppert
70a38a8a3d - apply 'log actions by device' to the existing modules before editing them
in the config interface. Applied settings are marked as 'done' with the value
  -1 to avoid unwanted modification. NOTE: Not all Bochs modules exist when
  running the start menu / dialog.
2012-04-06 13:15:27 +00:00
Volker Ruppert
2b4d9a26dc - added new command line option '-noconsole' to disable the console window
on Windows. Added early command line check for this option to call the
  console creation for sdl and wx only if required. NOTE: The console is still
  needed for the config interface 'textconfig', the console debugger and log
  output to stdout/stderr.
2012-03-02 16:51:45 +00:00
Volker Ruppert
2f5be164d2 - reverted part of rev. 11031: for dependent lists the check 'param->get_parent() == this'
also works and no deplist trick is required
- bx_param_c destructor now deletes the dependent list if it exists (memory leak)
- bx_list_c::clear() only deletes the parameter if the list is it's parent
- added new method cleanup_save_restore() to free memory on simulator shutdown
2012-02-14 18:13:54 +00:00
Volker Ruppert
223fe998b3 - code for setting up log actions by device rewritten
- unknown module names now cause a panic
- added log function names to some more devices
- TODO: find a way to configure log actions by device in the config interface
  start menu (most of the devices do not exist at this point)
2011-12-30 11:13:37 +00:00
Volker Ruppert
b130bf671b - initial "log action by device" implementation added (TODO: check for
invalid module names, save log actions to bochsrc)
- added new member 'name' to the logfunctions class for the case the prefix
  is too short. Added to some devices with longer names.
2011-12-29 19:51:54 +00:00
Volker Ruppert
09391fc21a - prepared "set log action by device" feature in the parameter tree and the
bochsrc parser. When read it will be possible to define exceptions from the
  default setting like this:

  debug: action=ignore, pci=report

- TODO (almost everything)
  - add a 'name' member to the logfunctions class, since the prefix might be
    too short
  - apply special log actions the log modules and panic on unknown modules
  - support saving special log action to bochsrc
2011-12-29 12:44:38 +00:00
Stanislav Shwartsman
75bda1d5cd implemented SVM emulation support for Bochs (incomplete yet)
I am merging the code in order to start making shortcuts between VMX emulation and SVM emulation.
Of course SVM emulation is incomplete, completely untested and not expected to work.
But someone could already take a look one the code and give some suggestions.

Also looking for anybody with existing SVM kernels - as simple as possible - for testing.

Status:
 - exceptions intercept is not implemented yet
 - IO intercept is not implemented yet
 - MSR intercept is not implemented yet
 - virtual interrupts are not implemented yet
 - CPUID is not implemented yet

No advanced SVM featurez planned - I am implementing the very basic 'Pacifica' document from 2005 using QEMU code as reference.
2011-12-25 19:35:29 +00:00
Stanislav Shwartsman
4bb4d29f8c better report supported CPUID features when not using pre-defined CPUID profile 2011-12-22 19:12:37 +00:00
Stanislav Shwartsman
50d6ab3a1b fixed compilation issue under win32 --with-nogui 2011-12-15 19:33:06 +00:00
Stanislav Shwartsman
6751af5d8e added AVX FMA extensions support. The implementation is based on QEMU patch by Peter Maydell (fixed) 2011-09-29 22:20:56 +00:00
Stanislav Shwartsman
62d0c8abf7 - Now you could disable x86-64 from .bochsrc so now it is possible to emulate
32-bit CPU using Bochs binary compiled with x86-64 support.

The commit also fixes some init.cc issues with initialization of SYSCALL/SYSRET MSR in AMD hosts and also includes code reorg.
2011-09-25 17:36:20 +00:00
Stanislav Shwartsman
c419b2a672 another small smp optimization 2011-09-22 21:48:54 +00:00
Stanislav Shwartsman
1b9f286945 - New way of CPUs scheduling in SMP mode brings up to 50% speedup to the
SMP emulation. New implementation uses dynamic CPU quantum value and takes
   full advantage of the trace cache. Each emulated processor will execute
   the whole trace before switching to the next processor.
 * It is also safe to use large (up to 16 instructions) quantum values for
   the SMP emulation now and improve performance even further.

The same merge also completely fixes SF bug :
  [3312237] stepN command might be not working properly

Handlers chaining speedups are also supported with SMP emulation now.
2011-09-22 19:38:52 +00:00
Stanislav Shwartsman
50207eeb90 - Added support for AMD SSE4A emulation, the instructions can be enabled
using .bochsrc CPUID option.
2011-09-18 16:18:22 +00:00
Stanislav Shwartsman
6bdfbeeffa fixed for gather VSIB calculation 2011-08-28 20:14:53 +00:00
Stanislav Shwartsman
44241a1e56 - Added support for AVX and AVX2 instructions emulation, to enable configure
with --enable-avx option. When compiled in, AVX still has to be enabled
    using .bochsrc CPUID option. AVX2 FMA instructions still not implemented.

  - Added support for Bit Manipulation Instructions (BMI) emulation. The BMI
    instructions support can be enabled using .bochsrc CPUID option.
2011-08-27 13:47:16 +00:00
Volker Ruppert
0b670248ca - added command line option '--help cpu' that shows the list of supported cpu
models (TODO: this could be done for devices, too)
2011-08-22 04:07:10 +00:00
Stanislav Shwartsman
13feb0772a - 10% emulation speedup with handlers chaining optimization implemented. The
feature is enabled by default when configure with --enable-all-optimizations
    option, to disable handlers chaining speedups configure with
        --disable-handlers-chaining
2011-08-21 14:31:08 +00:00
Stanislav Shwartsman
eba771bf39 remove '-cpu' command line option, it can be used using cpu:model command line so no extra option is needed 2011-08-20 18:59:25 +00:00
Stanislav Shwartsman
60a33f24d5 added new bochs binary param to choose cpu to emulate 2011-08-16 20:30:01 +00:00
Stanislav Shwartsman
a03e0266fb added yonah CPUID to cpudb. remove bxversion.h from dep files 2011-08-16 19:58:56 +00:00
Stanislav Shwartsman
1adda7bf64 Fixed MWAIT leaf CPUID - required for Fedora15 startup 2011-08-03 20:29:24 +00:00
Stanislav Shwartsman
1d89709e62 Added another CPU to CPUDB: p4_willamette (one more without x86-64 support).
Reimplemented CPUDB using pure C macros magic.
Fixed compilation errors when compiling with SMP on.
2011-07-31 18:43:46 +00:00
Stanislav Shwartsman
bf8dc9df43 update timestamps immediately 2011-07-12 19:14:08 +00:00
Volker Ruppert
345d67c403 - removed BeOS support from sources and documentation 2011-07-11 17:36:10 +00:00
Stanislav Shwartsman
432bf97197 was playing with SMP and debugger 2011-07-09 22:17:16 +00:00
Volker Ruppert
4699840aaf - reorganisation of the vga init code:
- using the same init() method for all display adapters
  - new method protected init_standard_vga() for the shared vga core
  - new method init_vga_extension() implements the extended features
- moved loading of vgabios image for the ISA case from main.cc to the vga init code
2011-07-03 15:31:16 +00:00
Stanislav Shwartsman
29e3f6e762 remove trace cache disabled mode from the code. next step going to be - introducing new optimization features based on trace cache 2011-06-01 20:34:04 +00:00