13618 Commits

Author SHA1 Message Date
Stanislav Shwartsman
39414b6e62 more updates to CHANGES 2024-10-24 20:20:14 +03:00
Volker Ruppert
bb90786fca Update CHANGES. 2024-10-24 18:18:33 +02:00
Benjamin David Lunt
8fda7423d3
Allow the boot usb option (#209)
This allows the `usb` option to be used in the `boot:` parameter. Of
course there is not support for booting from a USB, but this allows for
a (probably much) further down the road addition.

This will break the current bios when booting from a network. However,
the bios is already broken in this manner, especially when
`BX_ELTORITO_BOOT` is not defined. The current bios code assumes and
hard codes the BEV entry to 4. However, if the `BX_ELTORITO_BOOT` define
is missing, the BEV will be added to the third entry, not the fourth
entry.

For the BIOS to be updated correctly, things like the following will
need to be updated instead of hard coded to `[4]`.

54961f0326/bochs/bios/rombios.c (L2205)

The following will need to be not hard coded to 4.

54961f0326/bochs/bios/rombios.c (L2253-L2257)

The following will need "usb" added.

54961f0326/bochs/bios/rombios.c (L2102)

The following assumes the next entry will be the fourth entry, not
checking to see if `BX_ELTORITO_BOOT` was defined.

54961f0326/bochs/bios/rombios.c (L10851-L10857)

The following comment will need to be updated.

54961f0326/bochs/bios/rombios.c (L8365-L8371)

As well as a few other fixes and updates.

This PR simply allows the value of '4' (`BX_BOOT_USB`) to be placed in
the boot sequence options, moving the network (`BX_BOOT_NETWORK`) to the
next number.

The boot sequence option still only allows three parameters.
`boot: cdrom, floppy, disk`
or
`boot: cdrom, usb, disk`
I don't think it is necessary to add a fourth.

---------

Co-authored-by: Volker Ruppert <Volker.Ruppert@t-online.de>
2024-10-24 17:02:07 +02:00
Volker Ruppert
15badf06c4 Preparing Bochs code for accepting USB boot option PR.
The current code would panic if booting from network is selected.
Added two empty items for PCMCIA and USB as a workaround.
FIXME 1: The config interfaces win32paramdialog and wxdialog now showing
         two empty lines in combo box.
FIXME 2: The Bochs BIOS can only boot from network if selected in boot menu
         (press F12).
2024-10-24 16:48:43 +02:00
Volker Ruppert
7373c19c78 Banshee: added host-to-screen stretching BitBlt support (#365). 2024-10-24 10:07:51 +02:00
Stanislav Shwartsman
556f64b8e7 extract EVEX opcodes definitions to separate file ia_opcodes_evex.def 2024-10-23 21:34:03 +03:00
Stanislav Shwartsman
7368a56647 remove duplicate print of eflags in debugger 2024-10-23 16:19:47 +03:00
Stanislav Shwartsman
c015c8168c fixed TPAUSE implementation and close issue #366 2024-10-23 15:02:54 +03:00
Stanislav Shwartsman
cbb1e0ed8e updated CHANGES 2024-10-23 14:34:29 +03:00
Stanislav Shwartsman
93a07982d5 rewritten LASS implementation to fix failures under ArrowLake model
biggest issue was:
A supervisor-mode data access causes a LASS violation only if supervisor-mode access protection is enabled
(CR4.SMAP = 1) and RFLAGS.AC = 0 or the access implicitly accesses a system data structure
2024-10-23 14:30:44 +03:00
Stanislav Shwartsman
a4c47d9559 added helper function to stringify EFLAGS as well and reuse it in Bochs debugger 2024-10-23 12:43:50 +03:00
Stanislav Shwartsman
2dfdd98ccf improve debug print after simulation finishes
add detailed print for CR0, CR4, XCR0 and EFER extensions
2024-10-23 12:15:02 +03:00
Stanislav Shwartsman
36b9cd93cf enable more bits in MSR IA32_SPEC_CTRL to support Win11 boot in Sapphire Rapids and Arrow Lake CPU models 2024-10-23 11:14:23 +03:00
Stanislav Shwartsman
d69acea2c0 fix name of the processor in the warning message 2024-10-23 10:48:24 +03:00
Stanislav Shwartsman
f90201b603 added ArrowLake CPU definition
features: AVX-VNNI, AVX-IFMA, AVX-VNNI-INT8, AVX-VNNI-INT16, AVX_NE_CONVERT, GFNI, VAES/VPCLMULQDQ, SHA512, SM3/SM4, CMPCCXADD, LASS, SERIALIZE, UINTR
update CHANGES
2024-10-23 10:20:23 +03:00
Stanislav Shwartsman
5c81b532a2 opcodes with EVEX.LLIG could come with any VL value and still will be allowed on AVX10.VL256 only machine 2024-10-22 23:27:00 +03:00
Stanislav Shwartsman
1f6436499d add AVX10.256 emulation VMX control 2024-10-22 22:15:41 +03:00
Stanislav Shwartsman
6717e8255d add XSAVE/XRSTOR support for AVX10.256 2024-10-22 21:43:57 +03:00
Stanislav Shwartsman
8469fcade1 make assignHandler member function for cleaner code 2024-10-22 21:09:16 +03:00
Stanislav Shwartsman
5bff389409 fix complation with minimalistic configuration which has no CPUID yet 2024-10-22 20:55:33 +03:00
Stanislav Shwartsman
60f8ab2a36 add preliminary AVX10.1 handling
AVX10.1 includes the following AVX extensions:
	x86_feature(BX_ISA_AVX512, "avx512")                                    /* AVX-512 instruction */
	x86_feature(BX_ISA_AVX512_DQ, "avx512dq")                               /* AVX-512DQ instruction */
	x86_feature(BX_ISA_AVX512_BW, "avx512bw")                               /* AVX-512 Byte/Word instruction */
	x86_feature(BX_ISA_AVX512_CD, "avx512cd")                               /* AVX-512 Conflict Detection instruction */
	x86_feature(BX_ISA_AVX512_VBMI, "avx512vbmi")                           /* AVX-512 VBMI : Vector Bit Manipulation Instructions */
	x86_feature(BX_ISA_AVX512_VBMI2, "avx512vbmi2")                         /* AVX-512 VBMI2 : Vector Bit Manipulation Instructions */
	x86_feature(BX_ISA_AVX512_IFMA52, "avx512ifma52")                       /* AVX-512 IFMA52 Instructions */
	x86_feature(BX_ISA_AVX512_VPOPCNTDQ, "avx512vpopcnt")                   /* AVX-512 VPOPCNTD/VPOPCNTQ Instructions */
	x86_feature(BX_ISA_AVX512_VNNI, "avx512vnni")                           /* AVX-512 VNNI Instructions */
	x86_feature(BX_ISA_AVX512_BITALG, "avx512bitalg")                       /* AVX-512 BITALG Instructions */
	x86_feature(BX_ISA_AVX512_BF16, "avx512bf16")                           /* AVX-512 BF16 Instructions */
	x86_feature(BX_ISA_AVX512_FP16, "avx512fp16")                           /* AVX-512 FP16 Instructions */

And it could be handling 256-bit only, in this case avx10_1 will be enabled but avx10_vl512 will not.
Bochs will support all relevant instructions but without 512 bit mode in this case, attemp to encode VL512 in EVEX will result in #UD
also added support for AVX10 CPUID leaf 0x24

TODO: VMX support
2024-10-22 20:44:46 +03:00
Stanislav Shwartsman
3db8404a03 correctly report CPUID leafs 0x19-0x1c as reserved on Sappire Rapids CPUID with AMX enabled 2024-10-22 12:51:14 +03:00
Cacodemon345
f6617f29d6
UHCI: do not deactivate TDs on NAKs (#362)
NAKs from USB devices do not deactivate TDs according to the official
UHCI spec (page 22).

Reference: http://ftp.netbsd.org/pub/NetBSD/misc/blymn/uhci11d.pdf
2024-10-21 16:10:19 +02:00
Volker Ruppert
ffb3b43268 Cirrus: Fixed banking and hardware cursor in VGA compatible modes. 2024-10-20 19:44:14 +02:00
Volker Ruppert
d5e89aa731 Cirrus: Fixed uninitialized variable. 2024-10-20 16:32:47 +02:00
Stanislav Shwartsman
8c053ca361 added initial code for AMX_MOVRS instructions 2024-10-20 11:08:58 +03:00
Stanislav Shwartsman
3de88be5ac comment out avx512pf and avx512er ISA extensions which not supported by Bochs 2024-10-20 10:49:29 +03:00
Stanislav Shwartsman
4ceb60f12b better code formating 2024-10-19 20:17:07 +03:00
Stanislav Shwartsman
e8d5f983fb replace long_mul function in wide_int.cc with much faster code from softfloat3e 2024-10-19 18:26:07 +03:00
Stanislav Shwartsman
987e205fb0 implement AMX_TF32 extension 2024-10-19 10:15:38 +03:00
Stanislav Shwartsman
690441e0cb fix issue #363 (spurious physical memory read error message) 2024-10-18 18:17:59 +03:00
Stanislav Shwartsman
de7862a3f9 updates to CPUID definitions published in Intel ISA extensions rev54 doc 2024-10-18 17:37:54 +03:00
Volker Ruppert
60491a64cf Cirrus: Added horizontal pixel panning support for 8, 15 and 16 bpp modes.
Original Cirrus VGABIOS uses this feature in VBE function 0x07 since the
screen start address is dword aligned. It's only documented for standard VGA,
but not for the extended Cirrus modes.
TODO: Implement this in the LGPL'd VGABIOS.
2024-10-17 19:33:06 +02:00
Volker Ruppert
a1d6e72b1b Continued work on GTK USB debugger (tree now shown). 2024-10-13 10:08:35 +02:00
Stanislav Shwartsman
67a9bffb42 updates for CPUID definitions 2024-10-12 18:07:28 +03:00
Stanislav Shwartsman
b5665c39da CMPCCXADD instructions can be executed only in 64-bit mode
configure and compile them only for 64-bit mode as well
2024-10-12 17:22:14 +03:00
Volker Ruppert
ab89d23f06 Cirrus: Don't decrement height if redraw area contiues on the left of the display. 2024-10-06 09:56:10 +02:00
Volker Ruppert
85c58ff450 Cirrus: Modified redraw code added for #221 to fix stack overflow (#358). 2024-10-04 09:22:01 +02:00
Volker Ruppert
9054a9c998 Cirrus PCI: Discard extra bytes at BitBLT writes if necessary (#357). 2024-10-03 19:11:56 +02:00
Volker Ruppert
4a32e42230 Continued work on GTK USB debugger (First step to implement treeview). 2024-10-01 12:09:32 +02:00
Volker Ruppert
3ca671ca80 Banshee/Voodoo3: Added 16 bpp to 32 bpp pixel format conversion
for screen-to-screen bitblt operation (big endian code untested).
2024-09-22 17:05:11 +02:00
Volker Ruppert
e1a160e81e Cirrus: Added support for graphics controller mode extensions in VGA mode.
Now the GD5446 PCI driver and the GD5430 ISA driver work correctly.
Attempt to fix hardware cursor in VGA mode. The specs don't say anything about
this case, but this version works now with 640x480 resolution.
2024-09-21 10:39:27 +02:00
Vort
750548365d
Fix big-endian support in bx_banshee_c::mem_read (#354)
Byte reversing code in commit 52c2fbee5e76f45c1725971634ebab2c984a9556
uses `8` bit shift, while `3` bit shift should be used instead.

Tested with Debian 7 _([hdd
image](https://people.debian.org/~aurel32/qemu/powerpc/))_ inside of
QEMU PowerPC emulation:


![qemu_bochs_win311_voodoo](https://github.com/user-attachments/assets/097f70b7-95aa-4e4f-857b-53e0c6fdafdf)
2024-09-21 07:49:29 +03:00
Volker Ruppert
52c2fbee5e Banshee / Voodoo3: Added support for mem_read() with length 3.
This should fix Voodoo3 with Windows 3.11 driver.
2024-09-19 20:22:30 +02:00
Volker Ruppert
0fe6799544 Cirrus: Attempt to fix hardware cursor drawing in the VGA case.
NOTE: This doesn't fix the issues with Windows 3.11 driver yet.
Renamed VGA core memsize_mask to vgamem_mask to avoid confusion.
Attempt to fix hardware cursor for indexed host displays.
2024-09-19 19:02:52 +02:00
Volker Ruppert
d4cee9c360 Cirrus: Added 8 bpp display update code for VGA mode with hardware cursor. 2024-09-18 17:19:25 +02:00
Volker Ruppert
ec469aa626 Cirrus: Added display update code for VGA mode with hardware cursor.
TODO: Fixup mem_read / mem_write for this case. The display has some issues
and the cursor pattern is not yet written to memory top.
2024-09-17 20:44:22 +02:00
Volker Ruppert
48824a452b Partly fixed Cirrus PCI issues found with Windows 3.11 driver.
Implemented byte swapping apertures for word and dword in mem_write_handler().
This fixes missing / unreadable text in 8 bpp and 16 bpp modes.
TODO: 4 bpp and 24 bpp issues with this driver.
2024-09-13 18:00:04 +02:00
Volker Ruppert
bfebb17b9d Fixed Voodoo3 issue found with Diablo II game (#349).
If front and back buffer addresses are identical, 'video_changed' flag must be set.
2024-09-11 16:29:40 +02:00
Volker Ruppert
f5e3dd9dce Added JSR and RET functions to CMDFIFO (Voodoo2/Banshee/Voodoo3). 2024-09-08 20:52:40 +02:00