Commit Graph

367 Commits

Author SHA1 Message Date
Stanislav Shwartsman
4d227d15fb remove instrument.h from bochs.h so it won't be included everywhere
include it only where required
move PHY_ADDRESS reserved bits consts to cpu.h
2022-07-30 22:35:43 +03:00
Volker Ruppert
e34d017f60 Some fixes for compiling for WIN64 with MSVC.
- Added check in config.h whether or not Bochs is configured and compiled for
  the same target platform (WIN32 / WIN64).
- Fixed some warnings that occur in the MSVC WIN64 case.
2021-07-12 19:05:25 +00:00
Volker Ruppert
27c120154b Fixed a GCC warning and some MSVC warnings. 2021-02-27 20:53:10 +00:00
Volker Ruppert
96193ed79c Finished bx_bool to bool type changes.
- Changes in the USB host controller code.
- Finally removed bx_bool type definition.
- NOTE: The Bochs BIOS still has it's own bx_bool definition.
2021-02-04 20:15:13 +00:00
Stanislav Shwartsman
41ea50ba22 complete transition to new disasm, remove old disasm from source code 2021-01-02 13:43:10 +00:00
Volker Ruppert
aaf8c9d4e4 Removed "svga" display library designed for the obsolete Linux SVGALib.
The latest release is from 2001 and it will not work on modern Linux systems.
Parts of the SVGALib code have been moved to the Linux kernel and the X11 and
SDL libraries are using it as a video driver.
2020-11-25 07:56:32 +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
Stanislav Shwartsman
a136e1c96c add missing config.h.in 2020-05-19 16:14:03 +00:00
Volker Ruppert
762d2a35af Some work on the "multiple NICs" support.
- Added support for the E1000 network card similar to ne2k implementation.
- Define BX_NE2K_MAX_DEVS to make the maximum number of devices variable.
2020-03-08 16:45:52 +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
Stanislav Shwartsman
f90e5f4f44 Add initial implementation of the CET (Control Flow Enforcement Technology) emulation according to SDM071
Only missing items (to be added soon):
  - Supervisor Shadow Stack EPT Control is not implemented yet
  - SMM placing for SSP
Currently have to be added manually to some CPUID model, for example to ICL-U
To enable configure with --enable-cet
2019-12-20 07:42:07 +00:00
Stanislav Shwartsman
44b3ebeca2 remove BX_TRUE/BX_FALSE macros, use stdc++ true/false instead 2019-12-09 16:44:36 +00:00
Volker Ruppert
9a27303afa Some work for GTK version 3 compatiblity
- if wxGTK uses GTK 3.x, also use it for the gui debugger to avoid trouble
- the name of the include file for GDK keysyms now depends on GDK version, so
  the temporary translation table can be removed
- small fix to compile the gui debugger with GTK 3.x (warnings still exist)
2019-11-11 19:40:09 +00:00
Volker Ruppert
dbf7da542f Check if Xrandr extension is present. 2019-04-21 20:08:32 +00:00
Volker Ruppert
8006ec9fa3 Fixes and updates for wxWidgets 3.0
- wxMSW unicode: define UNICODE before including windows.h via bochs.h.
- Fixed compilation error (wxNode usage).
- Fixed deprecation warnings at toolbar creation.
2017-06-04 09:32:58 +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
d6166344eb Added ethernet module 'socket'. designed to connect two Bochs instances with
external program 'bxhub' (simulating a two port ethernet hub). It is based on
an old SF patch and it has been updated and extended:
- Windows support (tested with MinGW/MSYS and MSVC nmake).
- Command line arguments for 'bxhub' (base port number, MAC address, TFTP).
- Added support for DHCP, TFTP, ARP and ICMP echo (ping). It uses parts of the
  code for the 'vnet' module with some additions from the former "slirp backend".
- TODO: code cleanup to reduce duplication, rewrite of the networking plugins
  stuff similar to the work done with the sound drivers.
2017-02-27 22:26:43 +00:00
Volker Ruppert
f971dccddb Implemented SDL2 "wavein" service (Audio capture support is new in SDL 2.0.5
and does not yet work on all platforms).
2017-02-08 18:48:49 +00:00
Volker Ruppert
f844e846b7 Added PCM output data resampling in a separate thread. The resampler requires
either libsamplerate or the SoX resampler library installed. If not installed,
the data is only copied to the output buffer and sample rate of the output
driver is changed similar to legacy code. Related changes:
- Added check for libsamplerate or SoX resampler header files in configure
  script.
- Added functions for converting source format to float (requied by resampler)
  and float to output format.
- Added support for float type data in the audio buffer code. Buffer chain #0
  receives float data from sendwavepacket() and buffer #1 receives data for
  mixing and output in format "16-bit signed little endian stereo".
- ALSA: Disable builtin resampling feature if resampler is present to avoid
  doing it twice.
2017-02-05 08:33:03 +00:00
Volker Ruppert
f18bb743be Added new symbol BX_USE_GUI_CONSOLE and set it to 1 for all guis with support
for the VGA to be used for textconfig at runtime.
2017-01-13 15:57:36 +00:00
Stanislav Shwartsman
956eb6e990 add missing PKEYS define into config.h.in 2016-03-17 19:29:34 +00:00
Stanislav Shwartsman
9557cafcef revertng commit #12854 because it broke MT simulation with debugger enabled. Until investigted. 2015-12-20 22:44:54 +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
Stanislav Shwartsman
9f77a6c3b0 full debugger support together with handler-chaining speedups optimization enabled (experimental)
should speedup emulation with debugger enabled
2015-10-09 05:28:47 +00:00
Stanislav Shwartsman
8804fb624b Clear definition of BX_CPP_INLINE in Visual Studio case 2015-05-14 11:49:28 +00:00
Volker Ruppert
696c1a6e55 Some Bochs features are still called "experimental". The bus mouse, USB OHCI,
USB UHCI and the E1000 NIC are known to work fine on some guest systems, so
it's safe to remove this attribute.
TODO: Some other Bochs features need to be reviewed for this.
2015-04-07 16:57:36 +00:00
Volker Ruppert
cbfbaaacb7 Added BX_HAVE_SOUND_* definitions to simplify code. 2015-02-23 21:32:34 +00:00
Stanislav Shwartsman
e16c6eb30c preparations and interface definition for memory type support 2015-02-19 20:23:08 +00:00
Volker Ruppert
1e52f0cbe0 Implemented simple mixing support (addition and clipping).
Fixed minimum value of signed data types.
TODO: Use the mixer thread support in the sound modules (alsa, oss, osx, win).
2015-02-02 21:11:31 +00:00
Volker Ruppert
7330f3a61c Changed to way to determine the default lowlevel sound driver (part of the
mixing3.patch by Dawn Teschendorf).
2014-11-22 11:43:40 +00:00
Stanislav Shwartsman
f8267ec3a7 rework in CPUID code (fixed code duplication). Re-enable perfmon reporting in CPUID because Win8/Win10 installation doesn't want to start without perfmon reported. TODO: implement basic perfmon support (at least only fixed counters) because win7-64 doesn't install with perfmon reported but not implemented 2014-10-15 08:04:38 +00:00
Stanislav Shwartsman
206c19116d fixed diagnostic message 2014-10-15 05:15:58 +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
3e2acd21ac Fixes for the SDL2 gui on Windows 2014-06-28 23:49:10 +00:00
Volker Ruppert
3c0ad43092 Continued preparing Bochs for SDL2 support
- added new symbol BX_WITH_SDL2 and prepared build system
- TODO #1: add new option --with-sdl2 to configure script
- TODO #2: add new file sdl2.cc (porting seems hard to do - writing from scratch
  might be better)
2014-06-23 19:37:58 +00:00
Volker Ruppert
5602e1b676 Added new symbol BX_USE_WIN32CONFIG in config.h and cleaned up related code 2014-06-20 09:31:56 +00:00
Stanislav Shwartsman
2fe0aaa472 added configure option for trace linking optimization and mention it in CHANGES 2014-05-01 18:30:23 +00:00
Stanislav Shwartsman
e03134d964 add likely/unlikely macros from linux kernel for future use 2014-04-21 20:06:32 +00:00
Volker Ruppert
64385beaa4 Renamed "slirp_new" to "slirp" (source file, symbols, classes, docs) 2014-04-02 17:38:09 +00:00
Volker Ruppert
fee79a2837 Removed the "slirp backend" networking module from the Bochs sources. It had
required an external binary and it couldn't be ported to Windows. Now the new
builtin and portable slirp support based on Qemu's implementation is almost
stable and all the 'vnet' DHCP and TFTP features have been ported to the new
slirp module.
TODO: rename all the "slirp_new" stuff to "slirp"
2014-04-01 18:18:04 +00:00
Volker Ruppert
5ca0a003b6 Configure script and config.h.in reorganization: put all device-related config
options in one section and added busmouse option.
2014-03-23 12:00:58 +00:00
Volker Ruppert
dfc71f8ae4 Applied patch for builtin "slirp" (user-mode networking) support. This version
is almost a port of the Qemu 1.1.2 implementation. It has been tested successfully
on Linux and Windows (MinGW/MSYS). The networking module is currently called
"slirp_new", since the "slirp" backend module still exists.

TODO list:
  - MSVC support (requires container_of() macro replacement)
  - apply fixes and improvements from recent Qemu releases
  - use our TFTP implementation to reduce code duplication
  - check if we can share ARP and DHCP support with "vnet"
  - add SMB support on Linux
  - finally remove the slirp backend module support
2014-02-16 13:31:53 +00:00
Volker Ruppert
fb70da3e3e Added check for type ssize_t
List the supported ethernet modules
2013-12-04 17:04:15 +00:00
Volker Ruppert
b9944b43b5 Some small fixes
- bochs.h:     fixed gcc 4.8 warning
- config.h.in: fixed newline
- extplugin.h: fixed VS2008Ex plugins compilation
- gui.cc:      fixed tooltip
2013-11-07 19:38:23 +00:00
Volker Ruppert
b1d4a96983 Rewrite of the lowlevel cdrom code
- class cdrom_base_c now provides portable ISO image access methods
- platform specific classes implement access to cdrom/dvd devices
2013-11-06 11:15:22 +00:00
Volker Ruppert
08b66534aa bximage fixes for compiling with VS2008Ex DLL plugins 2013-10-28 20:31:34 +00:00
Stanislav Shwartsman
7790e994eb do not touch inline definition under C++ - added issue #1 in SF bug 1342 2013-10-17 19:22:16 +00:00
Volker Ruppert
51688143aa Some work on the lowlevel sound support
- ALSA driver is now default on Linux (if present)
- SDL sound driver is now default if no platform-specific driver is available
  and the SDL gui is enabled
- soundlnx.cc: sendwavepacket() now exits with error if device is not opened
- soundmod.cc: exit beep loop if sendwavepacket() returns error
2013-08-04 14:35:06 +00:00
Stanislav Shwartsman
2dbe81db51 first infrastructure changes to support EVEX prefix and AVX-512 extensions recently published by Intel 2013-07-26 12:50:56 +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