Commit Graph

11335 Commits

Author SHA1 Message Date
Volker Ruppert
e7587d25a4 Some 8-bit register reference macro changes to produce more effective code
(SF patch #532 by Yeong-uk Jo).
2016-03-17 17:14:27 +00:00
Stanislav Shwartsman
cbe50a9539 enable PKE bit in CR4 2016-03-16 19:44:24 +00:00
Stanislav Shwartsman
8fe26816dc recalculate protection keys if cr0.wp change 2016-03-04 11:59:32 +00:00
Stanislav Shwartsman
bcb36e81fa experimental implementation of protection keys paging extension published in SDM rev054. to enable configure with --enable-protection-keys 2016-03-02 20:44:42 +00:00
Stanislav Shwartsman
9308ad31c6 remove unused param from serveIcacheMiss 2016-02-22 19:57:24 +00:00
Stanislav Shwartsman
591039e588 removed debug print 2016-02-21 20:14:15 +00:00
Stanislav Shwartsman
de85547932 update popcnt functions to faster versions 2016-02-21 18:39:10 +00:00
Volker Ruppert
ce7afe050f Applied current state of porting EHCI from Qemu. No functional changes yet. 2016-02-09 17:11:59 +00:00
Volker Ruppert
60d5aaaacf Added QEMU queue macros (required for EHCI) as a separate file. Removed already
existing defines from the Slirp compatibility header.
2016-01-08 18:58:27 +00:00
Stanislav Shwartsman
18f07937d2 add new cpuid bit announced in sdm rev057 to disasm features list as well 2015-12-29 20:22:33 +00:00
Stanislav Shwartsman
88be61c3d9 add new cpuid bit announced in sdm rev057 2015-12-29 20:21:08 +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
f5d094024d 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:04:00 +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
5e635a87bb Fixed IRQ sharing for multi-function PCI devices and removed workaround in the
UHCI core code.
2015-11-28 10:24:22 +00:00
Volker Ruppert
93f9584b1b Load USB core plugin before parsing bochsrc, since USB HC devices depend on
it's symbols. Unload this plugin in the devices init if unused.
TODO: Similar changes may be required for the networking and sound stuff.
2015-11-20 18:07:27 +00:00
Volker Ruppert
e19f28dad7 Call DEV_pci_set_irq() only if the IRQ level really changes. The Bochs IRQ
routing code is possibly buggy, since it can make multiple UHCI devices fail
in a multi-function device (like EHCI).
2015-11-12 21:45:44 +00:00
Volker Ruppert
2f94f55a82 Some work in the UHCI core for the usage as a companion controller of EHCI.
- added method to change port ownership.
- fixed UHCI reset and initialized device pointers.
- added symbol UHCI_FULL_DEBUG to reduce debug output if not set.
- renamed connection handling method.
2015-11-08 18:54:30 +00:00
Volker Ruppert
7d56f7d1d5 Split the USB UHCI code in two parts: uhci_core.cc implements the device
emulation and usb_uhci.cc implements the setup for the PIIX3 chipset and the
runtime device change code. The UHCI core is required for the EHCI emulation,
since there can be multiple "companion" controllers for USB 1.1 device handling.
2015-11-05 21:21:15 +00:00
Volker Ruppert
d455659bd1 Split the USB UHCI code in two parts: uhci_core.cc implements the device
emulation and usb_uhci.cc implements the setup for the PIIX3 chipset and the
runtime device change code. The UHCI core is required for the EHCI emulation,
since there can be multiple "companion" controllers for USB 1.1 device handling.
2015-11-05 21:20:54 +00:00
Volker Ruppert
aefccb14ab Added support for registering master PCI devices with function > 0 (required
for implementing EHCI).
2015-11-04 16:32:16 +00:00
Volker Ruppert
76c065dd89 Fixed usage of MSD device on xHCI hub.
- implemented xHCI TRB command "Reset Device".
- fixed SCSI read/write commands in non-async mode.
2015-11-02 21:36:38 +00:00
Volker Ruppert
56a7b11ab5 Align PCI memory regions at 64k boundary to make Bochs memory handlers work
correctly (registering small MMIO regions of USB controllers could fail otherwise).
2015-11-02 17:00:24 +00:00
Volker Ruppert
8df02880f8 Align PCI memory regions at 64k boundary to make Bochs memory handlers work
correctly (registering small MMIO regions of USB controllers could fail otherwise).
2015-11-02 16:59:50 +00:00
Volker Ruppert
c2b790809d Simplify xHCI code, since the capability registers are readonly.
- Moved initialization from reset_hc() to init().
- Removed save/restore registration.
- Removed extra debug output.
2015-11-01 08:55:03 +00:00
Volker Ruppert
be304bf4af Definition of maximum nuber of USB ports moved from bochs.h to device. 2015-10-31 15:12:36 +00:00
Volker Ruppert
234f10f159 The OHCI async support works fine in all tests, so some BX_INFO messages
can be changed now to BX_DEBUG.
2015-10-26 20:23:33 +00:00
Stanislav Shwartsman
6e5a0c8313 fixed compliation err 2015-10-26 17:49:45 +00:00
Volker Ruppert
7cf7ee8293 Block device detection fixes for Linux.
- now using macro S_ISBLK() to detect block device (cdrom/hdimage).
- re-implemented recently removed check for block device in concat mode.
2015-10-25 17:02:12 +00:00
Volker Ruppert
c3a7db7f82 Added support for full silent install. 2015-10-25 12:21:24 +00:00
Volker Ruppert
7c0d93884e Fixed array size (rfb) and added comment (win32). 2015-10-25 09:22:43 +00:00
Volker Ruppert
cbd147fca3 Fixed and improved text mode CO40.
- vgacore: double font and screen width at half dot clock.
- X gui: improved font bitmap generation to support width > 9.
- win32 gui: adjust values to use existing stretching feature.
- guis rfb, sdl, sdl2, vncsrv and wx: double pixels if font width > 9.
2015-10-24 22:03:51 +00:00
Volker Ruppert
1a3bf9419c SDL/SDL2: increase status item width to show max. 6 characters 2015-10-23 18:39:38 +00:00
Volker Ruppert
fcf9b8285b Added seek emulation for USB disk write commands (async mode required).
Fixed MSD status handling (required for seek emulation).
2015-10-22 18:13:59 +00:00
Volker Ruppert
3c7260a01b Improved panic message for unavailable image mode.
Removed disabled code in the 'sparse' section.
2015-10-18 07:13:56 +00:00
Volker Ruppert
2420ba499e Fixed 'concat' mode lseek() for whence != SEEK_SET. 2015-10-17 14:08:23 +00:00
Volker Ruppert
141aea5f1b Fixed and improved 'concat' disk image mode. 2015-10-17 10:06:36 +00:00
Volker Ruppert
c3397b15d7 Fixed read() and write() methods of most disk images modes to support multiple
sector transfers (buffer pointer update was missing). Multiple sectors transfers
could for the USB disk emulation and for image conversion with bximage.
2015-10-15 17:21:34 +00:00
Volker Ruppert
708e946cb8 As a workaround for possibly buggy hdimage code, read() and write() calls
transfer only one disk sector. Moved disk write code to the seek_complete()
method (seek emulation for write commands is not ready yet).
2015-10-13 19:49:09 +00:00
Volker Ruppert
b22023838c Completed save/restore support for the USB xHCI device.
TODO: reduce size of saved file (find a way to skip unused slots).
2015-10-11 17:07:18 +00:00
Volker Ruppert
3fc71ec131 Now using BXRS_* macros for all USB devices.
TODO: This should be used everywhere in register_state() if possible.
2015-10-11 07:33:22 +00:00
Stanislav Shwartsman
a8a325f2f5 #define to enum or inline function convertion 2015-10-09 19:33:36 +00:00
Stanislav Shwartsman
ea3c1c77eb added vmx consistency checks related to recently implemented support for vm-entering shutdown/wait-for-sipi state 2015-10-09 06:18:14 +00:00
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