Commit Graph

11185 Commits

Author SHA1 Message Date
Stanislav Shwartsman
18fced44ae clean wrongly committed line 2015-09-30 18:45:01 +00:00
Stanislav Shwartsman
8d13b61319 implemented TSC Scaling VMX feature according to timestamp-counter for virtualization whitepaper published by Intel 2015-09-30 18:44:01 +00:00
Stanislav Shwartsman
ad52e15860 added few tlb specific cpustat counters 2015-09-28 19:09:32 +00:00
Stanislav Shwartsman
0e37969e32 stop flooding log by messages which not necesary indicate guest code error 2015-09-28 18:45:26 +00:00
Stanislav Shwartsman
dd1ec977c2 enable vmenter to wait-for-sipi state 2015-09-28 18:42:05 +00:00
Stanislav Shwartsman
3a563a6573 use segment rok4g and wok4g in the fast string optimizations for correctness 2015-09-28 18:37:35 +00:00
Volker Ruppert
256fd99d12 USB floppy "format unit" timing implemented similar to read/write timing.
Added latency time for the "implied seek" of read/write/format commands. Both
features can be used when asynchronous packet handling is available. Some
related changes in the non-async read and write code.
2015-09-28 18:15:18 +00:00
Volker Ruppert
71774c57bb Some work on the USB floppy emulation.
- Added support for changing image mode at runtime (flat <-> vvfat).
- Added device buffer to save/restore list.
2015-09-27 15:02:38 +00:00
Volker Ruppert
fa08563adf Fixed configure script for the MSVC target with 64 bit. Now the configure option
'--target=x86_64-windows' can be used to prepare Bochs for WIN64 compiled with
e.g. VS2013.
2015-09-27 11:04:02 +00:00
Volker Ruppert
b22a57d4df Some work on the USB floppy emulation.
- Added missing update of the write protection flag after runtime config.
- Added sense codes for invalid cases of some commands.
- Added buffer pointer save/restore handling and use BXRS macros now.
2015-09-27 08:32:54 +00:00
Volker Ruppert
e8d045ad30 USB floppy sector write timing implemented similar to read timing. It can be
used when asynchronous packet handling is available. Some changes in the
non-async read and write code.
TODO: seek timing (similar to legacy floppy).
2015-09-26 09:19:56 +00:00
Stanislav Shwartsman
8232928096 small code optimization and simplification 2015-09-23 19:25:07 +00:00
Stanislav Shwartsman
c44cb6ed81 more cases applicable for BX_TLB_ENTRY_OF 2015-09-22 20:10:22 +00:00
Stanislav Shwartsman
49e1b69502 added svn id tag for tlb.h 2015-09-21 20:07:51 +00:00
Stanislav Shwartsman
a66ed15d26 added missing tlb.h 2015-09-21 20:07:06 +00:00
Stanislav Shwartsman
be4b73c6d2 extracted tlb specific code to tlb.h; extracted xsave cpuid leaf function to base cpuid class 2015-09-21 13:16:17 +00:00
Volker Ruppert
2232dd23d6 USB floppy sector read timing implemented based on the drive speed 300 RPM.
It can be used when asynchronous packet handling is available. Some changes in
the non-async read and write code.
TODO: sector write timing, seek timing (similar to legacy floppy).
2015-09-20 10:53:16 +00:00
Volker Ruppert
6cbd6e247a USB floppy command FORMAT UNIT implemented and read commands fixed. Formatting
media in USB floppy works now with XP guest.
2015-09-19 12:45:54 +00:00
Volker Ruppert
12cace4c5a Some work on async packet and seek emulation support.
- deactivate seek timer when operation is cancelled.
- set async packet mode with a separate method at connection time.
- renamed some variables and prepared seek emulation for USB disk writes.
2015-09-16 17:08:50 +00:00
Volker Ruppert
0b432b313f Added seek emulation support for USB harddisk reads and cleaned up the
MSD / SCSI code.
TODO list (async packet and seek support):
- seek emulation for USB harddisk write commands
- seek emulation for floppy
- async packet support for UHCI and xHCI
- improve and clean up OHCI async packet code
2015-09-15 17:55:32 +00:00
Stanislav Shwartsman
c8cf4f956d fix halt cpu indication from debugger 2015-09-14 19:17:20 +00:00
Volker Ruppert
491dc311ca Some work for asynchronus USB packet handling (needed by disk/cdrom seek emulation).
- Common USB code prepared for async USB packet handling (ported from an earlier
  Qemu version).
- Added simple async packet handling to OHCI (partly ported from earlier Qemu).
- Implemented USB cdrom seek emulation for hubs with async packet support. The
  legacy code is still present for hubs without this feature.
- For UHCI and xHCI the callback is set to NULL to force the usage of the
  legacy cdrom read code.
TODO: clean up OHCI code, async support for UHCI and xHCI, seek emulation for
USB harddisk and floppy.
2015-09-13 20:04:41 +00:00
Volker Ruppert
8db5305b18 Updated MSVC workspaces after adding USB floppy support. 2015-09-12 08:06:20 +00:00
Stanislav Shwartsman
da39e57196 comment fixes 2015-09-08 19:14:58 +00:00
Volker Ruppert
6dbd4c37a9 Some USB debug output (packet dump) changes
- rewrite of usb_dump_packet(), execute code only if debug output is enabled.
- OHCI: removed packet dump, it should be done in the devices code if necessary.
2015-09-06 06:54:07 +00:00
Volker Ruppert
a536aa8286 Fixed format capacities list for the "no medium" case. 2015-09-05 11:35:05 +00:00
Volker Ruppert
f54feb5b91 Some variables should not be handled by the xHCI internal save/restore, moving
them out of the hub structure.
Fixed a warning.
2015-09-05 07:23:25 +00:00
Volker Ruppert
b69e40d584 The USB host controllers have no asynchronus packet completion support yet.
TODO: implement this feature (useful for cdrom, disk and floppy devices).
2015-09-05 06:30:28 +00:00
Volker Ruppert
4b83f9e899 If the debug mode is enabled for usb_msd, turn it on for the SCSI device, too,
Don't try to insert cdrom media if device/image path is empty.
2015-09-03 18:54:51 +00:00
Stanislav Shwartsman
f76b972fed bugfix in call gate handling from call far instruction - found with rdos 2015-09-02 19:14:47 +00:00
Volker Ruppert
b5355d3ba7 Added infos and example for the USB floppy to the documentation. 2015-09-01 19:01:37 +00:00
Volker Ruppert
44d0e8f911 Added media change support for the USB floppy. 2015-08-31 20:51:54 +00:00
Volker Ruppert
c136fa1618 Added framework for USB floppy media change support based on the USB cdrom
code (not yet functional).
Minor related changes in the USB cdrom code.
2015-08-30 08:37:27 +00:00
Volker Ruppert
2dbfae1b1c Fixes and improvements for the USB cdrom runtime options.
- Add a special list to the MSD state and add pointers to the runtime-only
  options for the cdrom. The restore handler of this list calls runtime_config()
  to make sure the media path and status are correctly updated.
- Registering a runtime config handler for the USB cdrom is not necessary since
  runtime_config() is always called from the hub it is connected to.
- Restore a string parameter value only if it's different from the initial one.
2015-08-29 14:02:13 +00:00
Volker Ruppert
946a6bf50e Fixed USB device disconnect: clear save/restore list before deleting device
(bug found with valgrind).
2015-08-28 18:52:54 +00:00
Volker Ruppert
7da8cfa4b0 Fixed save/restore support of the USB subsystem when using an external hub
with devices conected at runtime.
- Added restore handler support for the bx_list_c class. If a handler is
  registered, it will be called after restoring all of the list's members.
- USB hub: add special lists to the port state and add pointers to the
  runtime-only options for each port. The restore handler of this list calls
  init_device() to make sure all connected devices can be restored.
- Call restore_logopts() after restoring hardware to make sure all saved
  modules have been created.
- TODO: the USB cdrom also needs a fix for it's runtime-only options.
2015-08-28 17:37:38 +00:00
Volker Ruppert
cc3020ab53 Added support for connecting USB floppy without media present.
Fixed status indicator activity.
TODO: add media change support without disconnect.
2015-08-24 20:26:08 +00:00
Volker Ruppert
38fbdaa7e8 Added runtime config handler for the USB cdrom and modified parameter handling
similar to the ATAPI implementation (including locked tray case).
Fixed status indicator activity and minor other changes.
2015-08-23 16:09:24 +00:00
Volker Ruppert
1df014a8ae Implemented unregister mechanism for runtime config handlers.
TODO: use it for removable devices with removable media (USB floppy / cdrom).
2015-08-23 07:04:56 +00:00
Volker Ruppert
f7726990f2 Fixed MTRR setup for memory size > 4 GB. 2015-08-22 06:19:13 +00:00
Volker Ruppert
22c674ef7a Fixed MTRR setup for memory size > 4 GB. 2015-08-22 06:18:38 +00:00
Volker Ruppert
9596717f3c Fixed MTRR setup for memory size > 4 GB. 2015-08-22 06:17:39 +00:00
Volker Ruppert
1ac159ba52 Modified sleep rate in conversion thread to get more continuous output. 2015-08-18 17:26:25 +00:00
Volker Ruppert
792c5bdec2 Set default device speed for floppy, cdrom and disk to 'full'. 2015-08-16 16:15:46 +00:00
Volker Ruppert
823ba769fb Some work on the USB floppy emulation.
- Removed USB device type handling from constructor and init code, since we
  only the 'floppy' type here.
- Write commands now using the device buffer for one sector.
TODO: support for starting without media and runtime media change.
2015-08-16 06:44:16 +00:00
Volker Ruppert
5bc1717adc Removed the data tranfer limit for read/write commands.
- The read buffer is now limited to 16 sectors and the read commands can fill
  it multiple times until all sectors have been read.
- The write commands are currently not using the device buffer, so no panic
  should happen here.
2015-08-14 17:43:25 +00:00
Volker Ruppert
639f361d02 Fix the fix: force a status bar update after registering an item, too. 2015-08-11 17:48:18 +00:00
Volker Ruppert
16fb8317bd Fixed parameter handler issues found with runtime changes while cdrom tray locked.
- bx_param_num_c: set the value returned from the handler.
- bx_param_string_c: set the new value after processing the handler.
- harddrv param handler: check lock state of cdrom and modify value if true.
2015-08-10 18:44:16 +00:00
Volker Ruppert
8a1e31ef08 Added common USB device option "debug" to turn on BX_DEBUG reporting at
connection time.
Fixed USB floppy capacity entries for 1.44 MB (last LBA, not LBA count).
2015-07-31 19:01:09 +00:00
Volker Ruppert
46d2c0adad Started implementing save/restore support for the USB floppy.
Fixed status indicator handling in case of connect failure.
2015-07-28 18:44:08 +00:00