Commit Graph

9267 Commits

Author SHA1 Message Date
Stanislav Shwartsman
93523a657d remove patch that always kept IF set after HLT - not needed anymore 2011-12-30 08:50:01 +00:00
Stanislav Shwartsman
3501eeceaf updated cpudb list in .bochsrc sample 2011-12-29 22:01:51 +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
32f53b5151 - performance fix for the new status LED code: only call the gui specific code
to update the status text if there is really a change
- changed the counter resolution to 5 (auto-off still happens after 0.5 seconds)
- the element value -1 is only used to reset the LEDs, so we have to ignore the
  status flags
2011-12-29 16:28:58 +00:00
Volker Ruppert
13506f74ee - fixed handling of directories with the attributes 'hidden' and 'system' 2011-12-29 15:39:04 +00:00
Stanislav Shwartsman
abda3a967c added two AMD CPUs to CPUDB 2011-12-29 14:23:22 +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
644c7c6289 undo bxswap change - it breaks build with bx_debugger enabled. error - multiple definition of bx_swap16 in parser.o and lexer.o 2011-12-28 22:43:18 +00:00
Stanislav Shwartsman
7cd72d6f79 remove old garbage from makefile 2011-12-28 22:35:21 +00:00
Stanislav Shwartsman
c62426145a moved bx_bswap definition into osdep.h so bximage tool can also include them 2011-12-28 22:17:12 +00:00
Stanislav Shwartsman
5da69a6fb4 fixed typo - invalid CPUID leaf should go to max std leaf 2011-12-28 21:59:39 +00:00
Stanislav Shwartsman
2b854cb101 added basic (very basic) SVM CPUID into generic_cpuid module 2011-12-28 21:54:51 +00:00
Stanislav Shwartsman
0a14f08f16 completing SVM coding, missed - CPUID, extended APIC 2011-12-28 16:12:28 +00:00
Volker Ruppert
ea80df55e6 - implemented "auto-off" status LED feature and removed old "iolight" code 2011-12-28 14:53:05 +00:00
Stanislav Shwartsman
864ea23b5b take events handling logic from cpu.cc to new file event.cc 2011-12-28 12:26:45 +00:00
Stanislav Shwartsman
dcfa57087f fixed typo in configure script 2011-12-28 12:20:49 +00:00
Volker Ruppert
0b2bec6752 - implemented "auto-off" timer for the status bar LEDs that replaces the
existing "iolight timer" code in the hard drive code. If an LED is registered
  with the "auto-off" flag, the device only needs to turn on the LED to indicate
  data transfer. The LED timer in the gui code turns it off after 0.5 seconds if
  it is not actived by another transfer. Added this feature to all network
  devices.
- TODO #1: implement this feature in the USB host controllers
- TODO #2: the unused timer in the hard drive code could be used for the
  emulation of seek functions
2011-12-28 11:51:42 +00:00
Stanislav Shwartsman
2b8371f2b6 implemented SVM_GIF handling 2011-12-27 20:46:15 +00:00
Stanislav Shwartsman
7f5f917a34 more SVM implementation 2011-12-27 19:42:11 +00:00
Volker Ruppert
3e65692e40 - some progress for making the E1000 work with Windows XP
- allow to set the PCI busmaster bit
  - implement byte read access for the status register
2011-12-27 16:39:31 +00:00
Volker Ruppert
8ef4c8abaa - removed plugins 'acpi' and 'ioapic' from the optional plugin control to avoid
trouble. In the future they may depend on the selected PCI chipset.
2011-12-27 13:02:35 +00:00
Stanislav Shwartsman
c32eaa5d05 added more svm intercepts 2011-12-26 20:51:57 +00:00
Volker Ruppert
0de2516d05 - fixes to avoid crash after unloading plugins before simulation
- small cleanups
2011-12-26 20:32:56 +00:00
Stanislav Shwartsman
6ae86a059b firt cleanup in SVM code. added intercept check for MSR and IO 2011-12-26 19:57:39 +00:00
Volker Ruppert
046b74d94c - devices 'e1000' and 'es1370': moved config parameter creation and bochsrc
option parsing to the plugin device code
- TODO: some more optional device plugins could be modified this way
2011-12-26 17:32:57 +00:00
Stanislav Shwartsman
8b4a2c2034 implemented some more intercepts.
fixed compilation without SVM
2011-12-26 16:33:13 +00:00
Volker Ruppert
add7af8c13 - added support for converting growing to flat mode images
- added command line arguments and non-interactive (quiet) mode
2011-12-26 12:49:36 +00:00
Stanislav Shwartsman
bfcbb81602 SVM:
- IO intercept is not implemented yet
 - MSR intercept is not implemented yet

VMX:
 Fixed Bochs PANIC crash when doing I/O access crossing VMX I/O permission bitmaps.
 This can happen because access_physical_read and access_physical_write cannot access memory cross 4K boundary.
2011-12-25 22:09:31 +00:00
Stanislav Shwartsman
ea6dfe3dc0 added svm files 2011-12-25 20:01:48 +00:00
Stanislav Shwartsman
01080243d4 complation fix 2011-12-25 19:58:21 +00:00
Stanislav Shwartsman
a44c1b8e1e SVM and VMX share tsc offset code 2011-12-25 19:53:23 +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
Volker Ruppert
c4952b4c84 - E1000 support: updated workspace files and documentation 2011-12-24 15:17:10 +00:00
Volker Ruppert
f9ed249f10 - moved shared NIC config parameter init and parsing code to separate functions
(mac, ethmod, ethdev, script and bootrom)
2011-12-23 14:40:43 +00:00
Volker Ruppert
04b0bcb746 - some work for the case the plugin support is turned off
- added plugin unload function and improved load function
  - use new function in bx_unload_plugins()
- new macro BX_UNREGISTER_DEVICE_DEVMODEL for future enhancements
2011-12-23 12:01:58 +00:00
Volker Ruppert
6df6f4ff76 - renamed 'user options' to 'addon options'. When a load option for optional
plugins is implemented in bochsrc, these functions can be used to install
  additional options from the devices code. Then the whole init / parse / save
  code for this device can be moved from config.cc to the device plugin.
2011-12-23 10:03:10 +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
d613ce554f added extra CPUID option (VMX) - increase list count 2011-12-22 15:49:16 +00:00
Volker Ruppert
38a797f502 - added function for loading optional plugins in case the plugin support is
turned off. Removed workaround code from devices.cc.
- removed 'pci_ide' plugin from the optional plugin control, since it depends
  on the presence of 'pci' and 'harddrv'.
- define types for plugin init/fini functions
2011-12-22 10:35:49 +00:00
Volker Ruppert
d070de30dd - removed BX_INFO (used for testing PCI ROM support) 2011-12-22 08:21:48 +00:00
Volker Ruppert
bfa3a14265 - PCI ROM handling fixes
- fixed tmpsize (patch by Sebastian Herbszt)
  - disable PCI ROM access after copying to shadow RAM (same as SeaBIOS)
2011-12-22 07:53:51 +00:00
Volker Ruppert
40052509d2 - PCI ROM handling fixes
- fixed tmpsize (patch by Sebastian Herbszt)
  - disable PCI ROM access after copying to shadow RAM (same as SeaBIOS)
2011-12-22 07:53:25 +00:00
Stanislav Shwartsman
2dee4b12be added VMX .bochsrc option to ctoggle VMX ON/OFF on runtime 2011-12-21 09:11:51 +00:00
Stanislav Shwartsman
e7ed8aca5c move inhibit interrrupts functionality to icount interface 2011-12-21 06:17:45 +00:00
Volker Ruppert
e38772006f - added PCI ROM init code that copies to shadow RAM and use it for both VGA
and other boot ROMs
- define and use PCI constants (patch by Sebastian Herbszt)
2011-12-20 19:34:47 +00:00
Volker Ruppert
46d5caa98d - added PCI ROM init code that copies to shadow RAM and use it for both VGA
and other boot ROMs
- define and use PCI constants (patch by Sebastian Herbszt)
2011-12-20 19:34:05 +00:00
Volker Ruppert
e312454851 - several fixes in PCI ROM code of the memory handlers
- use 'pci_rom_size - 1' as the mask for the offset address
  - ne2k: memory handlers must be disabled if compiled without PCI support
  - svga_cirrus: check for the PCI ROM size to make VBE work correctly
  - added BX_INFO to the mem write handlers
2011-12-20 19:33:16 +00:00
Stanislav Shwartsman
7cdeecf198 VMX: fixed VirtualBox VMX guest Guru Meditation - FS.BASE get corrupted after saving/restoring unusable selector 2011-12-19 16:06:53 +00:00
Stanislav Shwartsman
6cc03432d9 improve VMX debug print 2011-12-18 21:04:30 +00:00