Commit Graph

74 Commits

Author SHA1 Message Date
Volker Ruppert c12c8324dc Added config parameter to set up advanced PCI options as comma-separated
values. Now it is possible to disable ACPI or HPET in case the i440FX chipset
is selected.
2020-12-04 17:04:40 +00:00
Volker Ruppert c05cb5e1d7 Removed legacy "load32bitOShack" feature. In the early days of Bochs some hacks
were required to load a 32 bit OS. In the meantime Bochs has been made capable
of loading 32 and 64 bit OS's without hacking.
2020-06-07 17:28:54 +00:00
Volker Ruppert e23a930864 Added "ddc" parameter to the "vga" option to make it possible either to disable
the DDC feature or to read the monitor EDID from file. By the default the
builtin "Bochs Screen" EDID is used.
2020-03-21 18:00:02 +00:00
Volker Ruppert 835a745215 Added experimental "multiple NICs" support (currently NE2000 only). Unlike the
old SF patches this solution is compatible with the plugin architecture. The
ne2k plugin is loaded only once and a new ne2k_main_c object creates up to 4
ne2k device objects depending on the config. The new ne2k parameter "card"
specifies the zero-based card number to configure. If not given, the default
is card #0 for compatibility. The new ne2k parameter "type" specifies the bus
it is connected to ("isa" or "pci"). Card #0 defaults to PCI, the others to
ISA. In the PCI slot configuration the ne2k device can be used multiple times
if more than one card is configured.
Related changes:
- removed SMF stuff for ne2k
- always convert device prefix to uppercase (ne2k uses NE2K0 ... NE2K3)
- removed unused BXPN values
- TODO: add multiple NICs support for the E1000
2020-03-02 22:04:10 +00:00
Volker Ruppert 74d40805d1 Added support for unlocking disk images (locks leftover from previous Bochs
session) with the new command line argument '-unlock'.
2018-05-11 07:44:49 +00:00
Volker Ruppert e1d8bedbb5 Added symbol BX_LOAD32BITOSHACK to disable this legacy feature. With the
latest BIOS images 32-bit and even 64-bit guest OS's are known to boot inside
of Bochs without hacking. This legacy hack could be removed after next release
if nobody complains.
2017-04-17 13:26:44 +00:00
Volker Ruppert 19b98b1145 Simplified code for the "optromimage" and "optramimage" options stuff (saving
configuration, loading images). Cleaned up "romimage" option parsing and
prepared parameter "options" for the behaviour of the Bochs BIOS.
TODO: implement BIOS option "fastboot" to skip the boot menu prompt.
2017-02-14 20:11:58 +00:00
Volker Ruppert 756fde6267 Simplified code for saving BIOS and VGABIOS image configuration. 2017-02-13 21:14:34 +00:00
Volker Ruppert 0ba744b9fe Started implementing USB EHCI support. The PCI and MMIO register behaviour is
almost implemented, the port owner handling and the UHCI companion controllers
are present. High speed devices are not yet supported, since the EHCI scheduler
code has not been written yet (e.g. porting from Qemu). Low and full speed
devices should be detected correctly and work after port ownership change to
UHCI. 6 ports are available and the bochsrc syntax is similar to other HCs.
2015-12-06 20:03:42 +00:00
Volker Ruppert 327f987a18 Added the capability to set up the sound driver per service. The global
sound option for setting up one driver for all services is still available.
2015-03-06 22:54:30 +00:00
Volker Ruppert c8207c7a10 Some work on the soundfile 'driver' and the sound configuration.
- waveout: added support for RIFF WAVE format and raw output. The formats
  'voc' and 'wav' are detected by file extension, raw output is used otherwise.
- midiout: added support for raw midi output (no header, no deltatime).
  The 'mid' format is detected by file extension, raw output is used otherwise.
- Added 'midiout' parameter to the global sound option to specify the device
  if necessary. The related SB16 parameter now only specifies the output file.
- TODO: Rewrite of the sound configuration and output code to support dual
  output (device and file).
2015-02-17 08:33:07 +00:00
Volker Ruppert 524ba46c3d Added the capability to select the operation mode of the VGA update timer.
The realtime mode is enabled by default (patch by Dawn Teschendorf).
2014-11-15 10:22:27 +00:00
Stanislav Shwartsman 8d1e3b2ac1 Added statistics collection infrastructure in Bochs and
implemented important CPU statistics which were used for Bochs CPU model performance analysis.
old statistics code from paging.cc and cpu.cc is replaced with new infrastructure.

In order to enale statitics collection in Bochs CPU:

- Enable statistics @ compilation time in cpu/cpustats.h
- Dump statistics periodically by adding -dumpstats N into Bochs command line
2014-10-14 15:59:10 +00:00
Volker Ruppert ef7e02c12c Added bochsrc option for the Voodoo Graphics emulation. Some code for Voodoo2
model exists, but needs to be verified.
2013-12-22 19:50:29 +00:00
Volker Ruppert f008f0989f Simplified floppy parameter handling
wx floppy dialog now forces a media change by clicking OK (same as win32dialog)
wxdialog.cc: one more whitespace cleanup
wxdialog.h: removed unused members
2013-12-08 11:32:13 +00:00
Volker Ruppert eed48eb69e - Added capability to change the midi output mode at runtime
- Some other related changes and cleanups
2013-11-22 18:28:21 +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
Stanislav Shwartsman 852b5c3749 implemented SHA new instructions announced in recent Intel SDM extensions document rev015 2013-07-24 18:44:22 +00:00
Volker Ruppert dd794d6d44 Some more work on the 'sound' bochsrc option
- added 'wavein' parameter to specify the wave input device if necessary
 - if 'wavein' is not set, Bochs uses the 'waveout' value for input, too
 - SB16: the 'wave' parameter is now only used to specify the filename (mode 2 or 3)
 - TODO: implement 'wavemode' feature for ES1370 similar to SB16
2013-07-06 15:12:04 +00:00
Volker Ruppert 2e993f4a84 Some work on the 'sound' bochsrc option
- forgot to save 'sound' bochsrc line
 - renamed wave output parameter to 'waveout'
 - simplified sound option parsing
2013-06-30 08:21:26 +00:00
Volker Ruppert 192aa1f369 Added global sound control option in bochsrc and config interface
- added 'sound' option to select the driver and the wave output device
  (see bochsrc sample for details)
- the wave device option of sb16 and es1370 is now only used to set up the
  wave input device (if necessary)
- cleaned up the speaker code to initialize the 'sound' case correctly
2013-06-24 19:19:12 +00:00
Volker Ruppert c3740c0e6e Added new bochsrc option to control the speaker output mode. The choices 'sound'
(lowlevel sound output), 'system' (system beep on Linux and Windows) and 'gui'
(forward beep to related gui methods) are available.
2013-06-16 18:52:34 +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 058c0e05fb - removed wx debugger dialogs (enhanced gui debugger now almost stable with wx) 2013-02-16 12:22:13 +00:00
Volker Ruppert f9dca3c76b some keyboard bochsrc option changes
- moved 'user_shortcut' option to the keyboard option
- added new bx_param_c option value BOCHSRC_HIDDEN for parameters that should
  only be available in the config interface. The new bochsrc option save and
  parser function skip parameters with this flag set. This is useful for
  parameters that will be set from the parser in a different way.
- save keyboard bochsrc line using the parameter list directly
- parse keyboard bochsrc options (except 'keymap') using the parameter list
- user shortcut: old-style syntax has already been removed
- increased minimum value for the keyboard's 'serial_delay'
2013-01-27 19:09:24 +00:00
Volker Ruppert 34dbbe1c74 save the mouse, serial, parallel and ata resource options using the parameter tree 2013-01-19 22:37:15 +00:00
Volker Ruppert a54f50e4f2 save the sound configuration using the parameter tree 2013-01-19 15:18:07 +00:00
Stanislav Shwartsman ce2751a13c move misaligned_sse from compile time to .bochsrc option 2012-12-20 19:43:11 +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
Stanislav Shwartsman 2f3c7ff8e4 implemented SMAP (Supervisor Mode Access Protection) from [Intel Architecture Instruction Set Extensions Programming Reference] rev14
fixed enabling of ADX extensions in generic CPUID when enabled through .bochsrc

Small code cleanups on the way to implementation of APIC Registers Virtualization features disclosed in recent Intel SDM rev043
2012-09-10 15:22:26 +00:00
Volker Ruppert 4538078abb - several fixes for "2nd run" support in wx (still incomplete)
- uninstall parameter handlers (floppy, keyboard)
  - unload plugin that cannot be removed automatically
- wx: removed "show keyboard" demo and some other cleanups
- TODO: remove wx debugger and make wx work with the enhanced gui debugger
2012-08-14 19:33:24 +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 82c65076cc - renamed PCI Pseudo NIC bochsrc option to "pcipnic" (temporary hack should
be removed after next Bochs release)
- documentation updates
2012-07-11 21:03:59 +00:00
Volker Ruppert 27fdc3cd45 - added new parameter 'rtc_sync' for the 'clock' option. If this option is
enabled together with the realtime synchronization, the RTC runs at realtime speed.
2012-05-15 17:03:45 +00:00
Stanislav Shwartsman 5a33b1be84 mvoed MWAIT_IS_NOP option from CPUID to CPU - it has meaning even if CPUID tree is not used because CPU is configured with CPUDB pre-defined configuration 2012-03-15 19:46:57 +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
Volker Ruppert aad2d89c83 - rewrite of the optional plugin control feature. Now the plugins are loaded
directly while parsing the bochsrc or command line. If plugin support is enabled,
  the option could load all optional plugins, not only the ones supported before.
  NOTE #1: The old option had all plugins enabled by default and gave the user
           a chance to diable them. Now the plugins are only loaded if they
           appear in the config line and they are set to "1".
  NOTE #2: Loading a plugin that is controlled by a bochsrc option is possible,
           but it currently leads to a panic, since the load command is still
           present in devices.cc.
  NOTE #3: The plugin init code creates the device object and registers the
           optional plugin device. As an option, it can create config parameters
           and register an option parser. The device init, register state and
           reset is still handled in devices.cc, but in the order the devices
           have been loaded with the plugin control.
  NOTE #4: If plugin support is disabled, the plugin control only accepts the
           devices listed in plugin.cc.
- plugin init of core plugins now fails if they are not loaded with the expected
  type. For core plugins the load order is important and they cannot be handled
  with the chained devices list (used for optional and user plugins).
- some additions for calling config.cc functions from a plugin device
2011-12-25 08:52:34 +00:00
Stanislav Shwartsman 2dee4b12be added VMX .bochsrc option to ctoggle VMX ON/OFF on runtime 2011-12-21 09:11:51 +00:00
Volker Ruppert 5045a241e8 - ported Intel(R) 82540EM Gigabit Ethernet adapter emulation from Qemu
- TODO: add save/restore support, use Bochs function for host to little endian
  data conversion, timers of networking modules 'vnet' and 'slirp' should use
  the device speed instead of fixed 10 MBit
2011-12-13 20:53:44 +00:00
Stanislav Shwartsman 5cc04b9955 Implemented AMDs Buldozer XOP and TBM extensions.
XOP: few instructions are still missing, coming soon

  BX_PANIC(("VPERMILPS_VpsHpsWpsVIbR: not implemented yet"));
  BX_PANIC(("VPERMILPD_VpdHpdWpdVIbR: not implemented yet"));
  BX_PANIC(("VPMADCSSWD_VdqHdqWdqVIbR: not implemented yet"));
  BX_PANIC(("VPMADCSWD_VdqHdqWdqVIbR: not implemented yet"));
  BX_PANIC(("VFRCZPS_VpsWpsR: not implemented yet"));
  BX_PANIC(("VFRCZPD_VpdWpdR: not implemented yet"));
  BX_PANIC(("VFRCZSS_VssWssR: not implemented yet"));
  BX_PANIC(("VFRCZSD_VsdWsdR: not implemented yet"));
2011-10-19 20:54:04 +00:00
Stanislav Shwartsman 2580d8c46d added FMA4 AMD instructions support, fixed mem access length for Intel scalar FMA instructions 2011-10-07 14:09:35 +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 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 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 c35e385139 - removed 'text_snapshot_check' feature and related BX_PASS loglevel
- documentation updates
2011-07-31 14:38:03 +00:00
Stanislav Shwartsman 1a051f9f00 Added several predefined CPUs that can be selected from .bochsrc using new CPU::MODEL option.
Selecting CPU MODEL from .bochsrc automatically chooses real HW CPUID and also configures Bochs emulator to emulate this specific CPU including all its features only.
Supported CPUs to choose from:
	core2_extreme_x9770
	corei7_sandy_bridge_2600K
	p4_prescott_celeron_336
2011-07-29 15:03:54 +00:00
Volker Ruppert eb0c06f357 - added new parameter 'update_freq' for the 'vga' option that should replace the
'vga_update_interval' option. The screen update frequency is still based on
  the emulated clock unless the realtime sync is enabled with the 'clock' option.
  TODO: rewrite the virt_timer code to support realtime screen updates
  independent from 'clock' setting.
- fixed changing parameter 'update_freq' at runtime (timer object and blink counter)
2011-07-26 22:16:24 +00:00
Volker Ruppert c2d0c207f7 - preparing Bochs for experimental USB xHCI support (written by Ben Lunt) TODO list:
- add sources (update in progress)
  - update configure script
  - initialize new USB devices member 'max_packet_size' (need help from Ben)
2011-07-04 19:42:47 +00:00
Stanislav Shwartsman 8399dee24c implemented AVX float16 convert instructions 2011-06-11 13:12:32 +00:00