Commit Graph

11192 Commits

Author SHA1 Message Date
Stanislav Shwartsman
cd2129ec3b avoid calling prefetch() each time when linking traces cross page 2015-10-09 05:33:44 +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
Volker Ruppert
eed2bb15b8 Simplified register_state() for for small byte arrays in remaining i/o devices. 2015-10-06 18:20:16 +00:00
Volker Ruppert
9bc8651328 Extended functionality of class bx_shadow_data_c to simplify saving small byte
arrays. Changed register_state() code in a few devices to use this feature.
TODO: Use this feature in all devices with small byte arrays.
2015-10-05 18:09:58 +00:00
Volker Ruppert
12915a48f2 Added missing update of 'curr_lba' for the harddisk read seek emulation.
Added comments to the MSD / SCSI members similar to usb_cbi.
Now using BXRS_* macros for save/restore.
2015-10-04 08:54:36 +00:00
Volker Ruppert
b754d72ab2 Some work on the USB disk/cdrom emulation.
- More accurate seek emulation for read commands.
- Moved status indicator code to the SCSI layer.
- Fixed dump size for async packets.
TODO: Seek emulation for disk write commands.
2015-10-03 07:19:48 +00:00
Stanislav Shwartsman
12f6857968 fixed smm restore of segment register's selector 2015-09-30 18:55:21 +00:00
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