Commit Graph

11817 Commits

Author SHA1 Message Date
Volker Ruppert
1855f22d2b Added sector size option in bximage for creating flat, sparse and growing mode
images. TODO: using ATA disk images with big sectors requires BIOS support.
2018-03-30 21:04:04 +00:00
Volker Ruppert
7895516c4d Fixed copy&paste bug making undoable/volatile disk images fail. 2018-03-30 09:35:15 +00:00
Stanislav Shwartsman
0cd49ddae4 fixed compilation with EVEX disabled 2018-03-29 08:50:38 +00:00
Volker Ruppert
95d0a182af Some work on the disk image sector size option based on a patch by Ben Lunt.
- Implemented sector size handling in the ATA disk emulation. This feature
  still needs BIOS support to boot from a disk with big sectors.
- Enabled sector size support in the redolog_t class based disk image mode.
  The base class can handle 512 byte blocks only, but that doesn't matter since
  all valid sector sizes are multiple of it. So for now the growing, undoable
  and volatile disk image modes internally read/write 512 bytes per call.
- TODO: BIOS, bximage.
2018-03-27 17:47:46 +00:00
Volker Ruppert
1d3e8ca33f Now ignoring PCI base memory flags (BX_ERROR instead of BX_PANIC). The USB xHCI
controller is now usable again, but we still don't support the 64-bit PCI
address space.
2018-03-26 20:58:40 +00:00
Volker Ruppert
ea7334bfab Sector size option implemented in the USB disk code. The sector size value must
be specified as a USB port option (e.g. 'sect_size:1024'). The values 512, 1024
and 4096 are supported. If not specified, it defaults to 512.
TODO: ATA disk (harddrv code), BIOS, bximage.
2018-03-23 19:02:38 +00:00
Volker Ruppert
657cd05c0a Continued preparing hard disk sector size option in the hdimage code.
- 'flat' mode: disk image size must be multiple of sector size.
- 'concat' mode: each disk image size and lseek() offset must be multiple of
   sector size.
- 'sparse' mode: page size and lseek() offset must be multiple of sector size.
- TODO: 'growing', 'undoable' and 'volatile' mode: redolog_t class is still
  based on 512-byte blocks.
- TODO: 'vbox', 'vmware3', 'vmware4', 'vpc' and 'vvfat' mode have a builtin
  geometry. If other sector sizes are supported, it should be handled correctly.
- harddrv code now reports current sector size, but still panics for now.
- TODO: harrdrv and USB disk code, bximage, BIOS.
2018-03-18 09:07:31 +00:00
Volker Ruppert
db95a54238 Prepared config interface for a hard disk sector size option.
This code is based on the initial patch by Ben Lunt with some modifications:
using enum parameter, extra parser handler and cdrom handling not necessary,
TODO: hdimage and bximage code, harddrv and USB disk emulation, BIOS.
2018-03-13 20:35:56 +00:00
Volker Ruppert
e639d9dd29 Report AGP model in PCI status, new PCI capabilities and strapInfo register.
AGP specific features are not present yet.
2018-03-09 18:33:44 +00:00
Volker Ruppert
8952c144bd Some work on the i440BX chipset and related changes.
- Fixed PCI BAR initialization (now using memset()).
  - Fixed reset failure (set all PAM memory types to ROM).
  - Added stub for the AGP aperture (register BAR #0, handle APSIZE and read
    GART entry in read/write handlers).
  - Added some more PCI register defaults and write masks.
  - Fixed a warning in the ES1370 code.
  - Voodoo Banshee: set up PCI subsystem ID depending on bus and model.
  - Volatile BIOS write support must also be present in ISA BIOS memory.
2018-03-04 04:53:16 +00:00
Volker Ruppert
73bc76072e Added support for assigning a device (banshee or voodoo3) on Bochs PCI slot #5
to AGP if chipset i440BX is selected. AGP-specific features are not implemented
yet.
2018-02-25 20:59:30 +00:00
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
1e35653b1e Added method to return the PCI device name and improved debug output. 2018-02-18 07:41:42 +00:00
Volker Ruppert
511457fd0e Added a new section about Voodoo Graphics usage in the user documenation.
Mention the new VESA DDC support in the docs.
2018-02-17 09:10:58 +00:00
Volker Ruppert
04981c35d3 Added the subsystem ID of a Voodoo3 PCI model to make it work with an external
VGABIOS image in Win95/98 guest without hacking. Mention the Voodoo3 model in
the docs.
2018-02-16 13:11:30 +00:00
Stanislav Shwartsman
773f1b7e42 cleanup return value of all instruction handlers 2018-02-16 07:57:32 +00:00
Volker Ruppert
05da2a4dff Added basic support for the Voodoo3 model (Banshee plus secondary TMU).
Using a temporary subsystem ID, since I haven't found a VGABIOS ROM image for
the PCI version and Bochs doesn't support AGP yet. After modifying Voodoo3.inf
the driver could be installed successfully in Win95/98 and the Voodoo3 works as
expected (same issues as the Banshee model).
Removed BX_ERROR message about setting undocumented srcXY register bits. They
seem to have no effect on the emulation and could be ignored.
2018-02-13 19:36:20 +00:00
Volker Ruppert
e14f70088c Fixed possible infinite loop: width for redraw_area() cannot be 0. 2018-02-12 21:07:04 +00:00
Volker Ruppert
6610382b31 Fixed possible infinte loop when text_update() is called within video mode change
(found with Voodoo Banshee).
2018-02-12 09:19:33 +00:00
Volker Ruppert
bb472a78f9 Some work on the Voodoo Banshee emulation and related changes.
- Screen-to-screen blt: added support for expanding monochrome source data.
- Fixed calculation of the pitch for packed source data.
- Fixed repeated execution of some commands in non-immediate mode.
- PCI devices: fixed and improved BX_INFO / BX_DEBUG messages.
2018-02-11 22:40:30 +00:00
Volker Ruppert
dbbeffd32e Now also using parse_param() method for BXT_PARAM_BYTESTRING input to reduce
code duplication.
2018-02-05 21:08:43 +00:00
Stanislav Shwartsman
1e35e64ec6 fixed compilation warnings 2018-02-05 16:02:53 +00:00
Volker Ruppert
967f7d3381 Added method parse_param() to bx_param_bytestring_c and use it to reduce code
duplication (TODO: similar changes in win32paramdlg.cc).
2018-02-04 22:20:46 +00:00
Volker Ruppert
50c1370216 Some work on the PCI devices code.
- Added INT pin init to method init_pci_conf().
- Moved readonly register handling to the common PCI write handler.
- Moved IRQ line reporting to the common PCI write handler.
2018-02-04 18:17:28 +00:00
Volker Ruppert
87145baf61 Rewrite of the PCI base address (BAR) handling to reduce code duplication.
- Added new structure bx_pci_bar_t that contains all parameters related to the
  PCI BARs (type, size, address and r/w handlers).
- Added new methods init_bar_io() and init_bar_mem() to set up the new structure
  in the pci device init code.
- Added new method pci_write_handler_common() to handle writes to the normal
  BARs and the ROM BAR. Writes to other registers are forwarded to the device
  specific PCI write handlers. Removed BAR and ROM BAR handling from the
  specific code.
- Added new method pci_bar_change_notify() to execute specific code after BAR
  update (vga, ne2k).
- Moved normal BAR handling to method after_restore_pci_state().
- Store pointer to PCI device name in bx_pci_device_c and use it for i/o setup.
2018-02-04 09:41:50 +00:00
Volker Ruppert
c4a86cbee0 Some fixes in the bochsrc save and parse functions.
- Fixed saving new parameter type BXT_PARAM_BYTESTRING (MAC address).
- Fixed some special parser functions by using new parse_param() method.
2018-02-02 19:04:59 +00:00
Volker Ruppert
89353c8f4f Applied SF patch #539 (written by David O'Shea).
- Ported "hack for NE2000 with Netware 3.11" from an older QEMU version.
- Check if the TX packet is within memory bounds, otherwise PANIC.
2018-01-30 19:21:24 +00:00
Volker Ruppert
82f45f262a Small addition for the plug&play BIOS stub: added support for function 0x0000
(currently returning 0 for number of device nodes).
2018-01-28 11:59:29 +00:00
Volker Ruppert
38c3d80bb7 Small addition for the plug&play BIOS stub: added support for function 0x0000
(currently returning 0 for number of device nodes).
2018-01-28 11:59:13 +00:00
Stanislav Shwartsman
2bca4cc310 improve debug print for SPP access 2018-01-27 21:25:46 +00:00
Stanislav Shwartsman
afc2ee6bfd Implemented SPP: EPT-Based Subpage Protection. Cleaned code duplication between FXSAVE/FXRSTORE and XSAVE/XRSTOR (save/restore of SSE code is the same) 2018-01-27 21:20:33 +00:00
Stanislav Shwartsman
a9ac81e092 convert defines to const and enum in paging.cc 2018-01-27 19:31:39 +00:00
Stanislav Shwartsman
fd70b46136 update CHANGES 2018-01-27 19:12:22 +00:00
Stanislav Shwartsman
c600964b6d simplify save/retore format for pci2isa irq_registry 2018-01-26 20:13:47 +00:00
Stanislav Shwartsman
7310d9edae write byte arrays from param_data in save/restore in JSON style format (using [] instead of {}). fixes in save/restore. 2018-01-26 20:02:28 +00:00
Stanislav Shwartsman
3dd83448eb fixes for commit 13439 which accidentally broke save/restore disalog on windows 2018-01-26 19:28:52 +00:00
Volker Ruppert
80325ccd3e LGPL'd VGABIOS updated from CVS (VESA extension 'read EDID' for Bochs VBE
and Cirrus added).
2018-01-26 16:28:29 +00:00
Volker Ruppert
26314fb8b7 Implemented basic DDC support for the Bochs VBE adapter.
TODO: Update both Bochs VBE and Cirrus version of the LGPL'd VGABIOS to return
the EDID using this feature.
2018-01-26 09:37:26 +00:00
Stanislav Shwartsman
769ed3ef88 fixed MOVBE instruction decoding 2018-01-23 19:53:34 +00:00
Stanislav Shwartsman
7bdcc826d7 fixed ambiguous function definition 2018-01-23 19:08:23 +00:00
Stanislav Shwartsman
dc628676ad rename bx_shadow_data_c::get_format as it overrides/collides with bx_param::get_format 2018-01-19 21:21:09 +00:00
Volker Ruppert
5154285270 Some work on the Voodoo Banshee emulation.
- Added support for stippled lines.
- Fixed return values of the I2C interface with no VMI/decoder connected.
- Added some comments about current status of the Banshee code.
2018-01-19 20:58:06 +00:00
Stanislav Shwartsman
e4c8b37b18 minor updates to param tree code 2018-01-19 20:39:48 +00:00
Stanislav Shwartsman
e8d0e718f1 continue param tree changes
take RAW_BYTES string out of bx_param_string_c into new param type bx_param_bytestring_c (better name, anybody?)
this is intermediate step, later it would be better to merge bx_param_string into generic template bx_param<type>
but bx_param_bytestring_cis not matching that concept (or probably will continue to inherit from bx_param<string>)
2018-01-19 20:27:04 +00:00
Volker Ruppert
de30601ca6 Fixed possible FPE at high speaker frequencies (beep_samples == 0). 2018-01-18 19:00:57 +00:00
Volker Ruppert
5c5fd2c97c Fixed segfault when disabling speaker plugin. 2018-01-16 16:55:39 +00:00
Volker Ruppert
e647f7b120 Implemented basic DDC support.
- Basic I2C implementation for DDC2B support.
- Added VESA EDID structure (values from a patch for the LGPL'd VGABIOS).
- Windows now detecting plug&play monitor "Bochs Screen" if an original VGABIOS
  image is used (Cirrus PCI / Voodoo Banshee).
- TODO: Add this feature in the Cirrus version of the LGPL'd VGABIOS.
2018-01-14 18:44:28 +00:00
Volker Ruppert
1f2d9ca668 Added DDC stub for the Cirrus and Voodoo Banshee display adapters (when ready,
this code should return the VESA EDID for the Bochs plug&play monitor).
2018-01-11 19:02:08 +00:00
Stanislav Shwartsman
7d1a524ff0 fix indentation after tab2space 2018-01-11 08:47:02 +00:00
Stanislav Shwartsman
6d93ba14ec tab2space 2018-01-11 08:45:00 +00:00