Commit Graph

32 Commits

Author SHA1 Message Date
Volker Ruppert
e7093e74d8 Started implementing the i440BX PCI/AGP chipset.
- Added new PCI chipset choice for the i440BX AGPset. Some basic work is done,
  but AGP support is not present yet.
- Added new class for the "virtual" PCI-to-PCI bridge that should manage the
  secondary bus (AGP). Since this device must appear with device number #1 at
  the primary bus, it was required to change the PCI device numbers for the
  i440BX case. Moved the PIIX4 module to device number #7. The presence of the
  PCI base address regions now depends on the header type as expected.
- Since the Bochs BIOS cannot handle the modified PCI device layout, all tests
  continued with an external BIOS designed for this chipset (GA-6BA_F1.bin).
  This BIOS requires additional changes in some devices.
- ACPI: Return value 0 for some status registers and the GPI registers.
- CMOS: Since the PIIX4 supports a 256 byte CMOS RAM, prepared support for it
  and enable it in case a 256 byte CMOS image is used.
- PCI: The device numbers for 4 slots starting at #8. The 5th slot could be
  used for AGP when available.
2018-02-24 18:04:36 +00:00
Volker Ruppert
d46a9b7205 Some work on the PCI devices code.
- Since the pci_read_handler() method is identical in most devices, move it
  to the base class to reduce code duplication. Only the 'pcidev' device has
  it's own implementation (NOTE: it is not maintained yet).
- Minor other fixes and cleanups in some PCI devices.
2017-03-24 19:57:25 +00:00
Volker Ruppert
458f747b48 Removed unused argc and argv parameters from plugin init functions. 2017-01-28 09:52:09 +00:00
Volker Ruppert
17b4e65bef The save/restore list for USB devices is now cleared by the device destructor
instead of the hub's remove_device() method. The external hub removes connected
devices before clearing it's own list. This fixes crash on exit when devices
are present on external hub.
2016-11-12 14:17:46 +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
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
be304bf4af Definition of maximum nuber of USB ports moved from bochs.h to device. 2015-10-31 15:12:36 +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
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
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
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
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
87d40fe673 Some work on the status LED support for removable devices.
- Force a status bar update after unregistering an item.
- Added status indicators for USB disk and cdrom.
- Handle USB device disconnect in the runtime config handler, too.
2015-07-13 21:57:09 +00:00
Volker Ruppert
3986a0b703 Extended status bar LED feature to support dynamic indicators for removable
devices like USB disk, cdrom or floppy. Using this feature for the new USB
floppy. Removed static indicators for port activity from the USB HC code.
TODO: Implement status LEDs for USB disk and cdrom.
2015-07-13 16:56:06 +00:00
Volker Ruppert
3b87e71346 Minor bugfix and small additions by Ben Lunt. 2015-06-29 20:32:56 +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
50e96fa1cd - applied parts of the new USB patch by Ben Lunt
- removed max_packet_size member from USB device structure
- usb_uhci: improved speed info
- updated USB-related documentation
- TODO: review and test the main part of the xHCI changes by Ben
2014-09-22 19:49:39 +00:00
Volker Ruppert
773ac518b3 Fixed broken MSVC plugins support (many CDECL additions required)
TODO: check for remaining CDECL issues (hdimage mode 'dll') and update project files
2014-06-08 08:40:08 +00:00
Volker Ruppert
c6dd095321 Added new method for the init of the readonly registers in the PCI config space
and cleaned up the PCI devices code.
2013-12-30 22:39:21 +00:00
Volker Ruppert
f3a6fbd235 Simplified setup of special runtime menus / dialogs
- If the runtime flag of a bx_list_c object is set, all it's items are set up
  as runtime options.
- Set the runtime parameter for all top-level runtime-only lists. Setting up
  each single parameter is no longer needed.
2013-11-25 21:07:39 +00:00
Volker Ruppert
910774513b some work for "wx second run" support (not yet complete)
- bx_list_c: added support for removing parameter with other parent list
- USB HC's: remove item from runtime config on simulation exit
- initialize bx_user_quit in bx_begin_simulation()
- only remove optional plugin from list if alrady unloaded
2013-02-17 08:27:43 +00:00
Volker Ruppert
38addf037f PCI register behaviour fixes, updated messages and comments 2012-11-12 18:56:07 +00:00
Volker Ruppert
cc56245407 started implementing the i430FX chipset
- renamed config parameter "i440fx_support" to "enabled"
- new config parameter "chipset" added (current choices "i430FX" and "i440FX")
- don't load ACPI support if the i430FX chipset is selected
- select register values for the core PCI devices depending on the chipset
- USB UHCI must be connected to a PCI slot if the i430FX chipset is used
- rombios changes to make the i430FX chipset work
- TODO #1: implement limitation to 1 cpu and 128 MB RAM for the i430FX chipset
- TODO #2: verify register behaviour of both chipsets
2012-11-11 08:11:17 +00:00
Volker Ruppert
de34274fcb - parts of the USB keypad code are still based on Ben's code, so we need to
add the LGPL to usb_hid.cc
- moved Ben's comment to usb_uhci.cc, since this file contains most of his
  initial pciusb patch
- TODO: implement full USB keyboard support (port from QEMU)
2012-09-02 09:37:47 +00:00
Volker Ruppert
a2dd985aef - remove registered device state in destructor (fixes crash on Bochs exit with
MSVC plugins)
2012-08-19 08:16:20 +00:00
Volker Ruppert
db633275b0 - several improvements to the optional plugin control
- SIM->opt_plugin_ctrl() now can be used to verify the optional plugin
    configuration when using the plugin name "*". The 'load' value 1 makes
    sure that all plugins with the value 1 are loaded. The 'load' value 0
    unloads all plugin with the value 0 (marked for removal).
  - add the default set of plugins to the 'plugin_ctrl' list and load all these
    pre-defined optional plugins before parsing the configuration.
  - special wx case: verify plugin configuration before showing the plugin
    control dialog and before initialising hardware.
  - device plugins that have been loaded, but not configured now set their
    plugin control value to 0. Added the plugin unload check before signalling reset.
2012-07-06 17:19:32 +00:00
Volker Ruppert
40f33ff8c2 - don't clear pending interrupt bits when setting the new status 2012-06-21 17:06:57 +00:00
Volker Ruppert
05fe85659a - fixed and improved IRQ handling (ported update_irq() function from Qemu) 2012-06-17 07:14:27 +00:00
Volker Ruppert
1425e2370c - fixes related to the wx 2nd run support (not yet complete)
- siminterface: don't create plugin parameter if it already exists
  - wx: make sure all plugins are loaded when creating plugin control dialog
  - USB HC's: fixed removal of parameters when unloading plugin
2012-02-23 21:26:13 +00:00
Volker Ruppert
de94b08a1a - class bx_list_c now contains a chained list of parameters. Removed the now
obsolete maxsize parameter from all lists.
2012-02-12 18:43:20 +00:00
Volker Ruppert
a700d33e9f - call functions for config and bochsrc parameter handling used by plugins
from the siminterface (required by MSVC and maybe others)
2012-01-16 17:11:16 +00:00
Volker Ruppert
68b49ba42d - moved the USB stuff to the new subdirectory iodev/usb
- TODO #1: do the same with the network and sound code
- TODO #2: update MSVC workspace files
2012-01-14 12:36:32 +00:00