Commit Graph

12569 Commits

Author SHA1 Message Date
Shwartsman
ab629f16f6 remove redundant #if BX_SUPPORT_X86_64 around UINTR
it is checked already in config.h
2023-11-26 17:41:26 +02:00
Volker Ruppert
b319a6cb5d Some more memory leak fixes.
- delete SIM object
- delete i/o port to handler tables
- free plugin tables for enum parameters
2023-11-26 15:44:38 +01:00
Volker Ruppert
ae107f2cb8 Some more memory leak fixes.
- added method for logfunctions cleanup on app exit
- delete default i/o handler names
- delete pluginlog
2023-11-26 13:41:19 +01:00
Volker Ruppert
d63e048ec6 Memleak fix: IRQ handler names were not deleted on simulation exit. 2023-11-26 10:43:15 +01:00
Shwartsman
4a3e1cd545 fixed compilation with SVM and VMX both disabled 2023-11-26 08:23:00 +02:00
Volker Ruppert
6c8a54dcfe Fixed "no-plugin" code to avoid segfault on Bochs exit. 2023-11-25 21:59:16 +01:00
Volker Ruppert
890a1be2f2 Attempt to fix some memory leaks in the plugins and gui code (discussion #144).
- Added plugin_cleanup() code for the version with plugins disabled.
- Added PLUGIN_FINI code for the gui plugins (except wx) to delete bx_gui object.
2023-11-25 18:15:47 +01:00
Stanislav Shwartsman
f0bbf25b5d allow access to VMCS_64BIT_CONTROL_TERTIARY_VMEXEC_CONTROLS VMCS field 2023-11-25 18:02:11 +02:00
Stanislav Shwartsman
14fc5635de integrate random fixes done during WAITPKG feature development 2023-11-25 16:53:00 +02:00
Stanislav Shwartsman
280303d76c
initial code for UINTR implementation (#138)
First step into implementing UINTR - User Level Interrupts ISA extension
To be continued

---------

Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-11-25 16:43:47 +02:00
Stanislav Shwartsman
c1c391a9c6 fix common code duplication by introducing new method get_Virtual_TSC()
it computes TSC as needed for RDTSC(P) and RDMSR TSC taking into account VMX and SVM adjustments
replaces previous get_TSC_VMXAdjust(Bit64u0
2023-11-25 15:00:39 +02:00
Stanislav Shwartsman
1ae23ad935 - MONITORX/MWAITX: It is possible that MWAITX wakeup from timed mwait but APIC timer was still not reset.
A corruption would happen if MWAIT is called again to setup the timer while it still running from previous time.
  Also spurious wakeup could possibly happen as timer will send wakeup when it stops counting.
2023-11-25 14:55:14 +02:00
Volker Ruppert
86e4675a1d Fixed some memory leaks in the paramtree code (discussion #144).
- root_param was never deleted
- modified set_format() and set_long_format() to get rid of strdup()
2023-11-25 13:28:51 +01:00
Volker Ruppert
c525d9e5fc Consider half dot clock for h-panning (final fix for issue #114). 2023-11-24 23:08:17 +01:00
Volker Ruppert
68ff4be0b8 Fixed a memory leak in the slirp code. 2023-11-24 22:35:43 +01:00
Volker Ruppert
a2f7562b30 Fixed two memory leaks in the Voodoo code. 2023-11-24 21:47:41 +01:00
Stanislav Shwartsman
3cad5c3e84
address most of the memory leaks (#149)
the param tree, siminterface log and SIM were not released handle all
but SIM for now
should reduce the memory leaks list dramatically
2023-11-24 20:34:24 +01:00
Shwartsman
7f04cfd8df fix for gcc warning 2023-11-24 19:30:00 +02:00
Volker Ruppert
99629f9207 Horizontal pixel panning implemented in VGA graphics mode.
This change should fix issue #114.
Added BX_ERROR for two other unimplemented features.
2023-11-24 16:54:15 +01:00
Volker Ruppert
e9cd258882 Fixed ATAPI device reset.
Clearing 'seek complete' bit makes some MS-DOS work again.
2023-11-24 14:43:52 +01:00
Volker Ruppert
63f09e8aae Fixed cpu makefile dependencies. 2023-11-23 23:38:29 +01:00
Volker Ruppert
32b8edafc5 Fixed some gcc 13.2 warnings. 2023-11-23 20:06:07 +01:00
Shwartsman
62c2c877d0 rename VMEXIT controls in Bochs code to match their actual names and meaning 2023-11-23 19:58:08 +02:00
Shwartsman
6b5928f522 rename constants VMX_VM_EXEC_CTRL1 -> VMX_PIN_BASED_VMEXEC_CTRL for more correct naming 2023-11-23 19:51:17 +02:00
Shwartsman
4d08659621 Implement 'Tertiary VMEXEC Controls' for VMX
Currently none of the controls were not enabled, all clear but infra is here
2023-11-23 19:38:59 +02:00
Stanislav Shwartsman
1cfd97e1a0 added most_significant_bit* methods to scalar_arith.h 2023-11-23 19:03:08 +02:00
Volker Ruppert
32c7c3815a Display lib options 'cmdmode' and 'gui_debug' are now ignored by the wxWidgets port.
Using a bochsrc config designed for another gui no longer causes a BX_PANIC for unknown option.
2023-11-23 09:56:42 +01:00
Benjamin David Lunt
eae6bf9396
Close cdrom image file on eject (#145)
The WIN32 configuration for the cdrom was not closing the image file on
eject. This left the handle open while Bochs was running, not allowing
the image file to be modified.
2023-11-23 08:40:39 +02:00
Benjamin David Lunt
5f6e855350
update changes (#143)
Per Volker's request, moved some items to there correct location.
2023-11-22 08:27:05 +02:00
Shwartsman
f4f41cffc4 fix code duplication and optimize code 2023-11-21 20:26:48 +02:00
Shwartsman
f47ed2a5f7 fixed one more gcc warning 2023-11-21 16:12:53 +02:00
Shwartsman
d39c93a3c6 fixed 'misleading indentation' warning and also make statement more clear 2023-11-21 16:11:48 +02:00
Stanislav Shwartsman
fcf44b2b5e Merge branch 'master' of https://github.com/bochs-emu/Bochs 2023-11-21 15:44:33 +02:00
Stanislav Shwartsman
f90fdbc353 add methods to query local apic state 2023-11-21 15:43:38 +02:00
Shwartsman
591e2aa79f bugfix: when CET was not compiled in the emulation behavior of non-CET CPU was altered
CET 'change' some x86 behavior
For example EPTP[7] become not-reserved and write to it not fail anymore
VMX doesn't check error code for CP exception if CET is enabled
These behaviors these changed even when CET was not compiled in
2023-11-21 15:35:49 +02:00
Benjamin David Lunt
01a262306f
Improved and enhanced the floppy emulation (#135)
This improves and enhances the floppy emulation.
This adds the ability to specify a controller type.
This adds all but one, known, controller command.
This fixes the format command. Issue #123 
This fixes the error with older Windows guests.
2023-11-21 09:35:07 +02:00
Benjamin David Lunt
5683da27e8
reset status bar items at reset (#142)
When the user presses the "Reset" button on the gui ribbon, we need to
clear the active status of all statusbar items or they remain set after
the reset occurs.
This is mentioned in issue https://github.com/bochs-emu/Bochs/issues/136
2023-11-21 08:58:21 +02:00
Shwartsman
bd4cb7ffa6 fixed compilation without SVM configured in 2023-11-20 19:10:46 +02:00
Shwartsman
0cc21d166d fixed compilation with CET not compiled in 2023-11-20 15:24:57 +02:00
Shwartsman
04ffb4cf03 fixed compilation with .conf.nothing 2023-11-19 23:55:52 +02:00
Shwartsman
a7a443ab46 guard SVM functions with ifdef 2023-11-19 23:24:13 +02:00
Stanislav Shwartsman
36a1a3df86 fixed FPATAN for case of |x|=|y|
but i am pretty sure same problem might still exists for other arguments :(
need to resurrect FPU functions unit testing ...
2023-11-19 22:00:46 +02:00
Stanislav Shwartsman
0b2231b799 fixed comment 2023-11-19 20:46:53 +02:00
Stanislav Shwartsman
c1c102ab04 coding style, cleanups and optimizations 2023-11-19 20:31:05 +02:00
Volker Ruppert
a9a15d332b Modified error handling for display library option 'gui_debug'.
If Bochs debugger is not present now showing an error message box instead of a BX_PANIC for unknown option.
2023-11-19 16:16:09 +01:00
Stanislav Shwartsman
a923880b47 fix compilation warning 2023-11-19 07:54:40 +02:00
Stanislav Shwartsman
7886369102 simplify rdrand code for future extension 2023-11-19 07:29:10 +02:00
Stanislav Shwartsman
26f60a6ea4 spelling fix in the comment 2023-11-18 21:48:42 +02:00
Stanislav Shwartsman
ffec6a1898 Merge branch 'master' of https://github.com/bochs-emu/Bochs 2023-11-18 20:18:07 +02:00
Stanislav Shwartsman
12ce649b42 fix GFNI instructions emulation 2023-11-18 20:15:29 +02:00
Volker Ruppert
6aa399e9eb Added x64 configuration for the VS2019 plugins workspace (fixes issue #8).
Since VS2019 didn't copy all settings from win32, manually editing all files
was necessary (adding OutDir/IntDir stuff).
2023-11-18 17:08:05 +01:00
Stanislav Shwartsman
a0334ef2b2 change some consts back to defines to simplify integration of code to support variable PA length (rest of the code still WIP) 2023-11-18 16:53:44 +02:00
Stanislav Shwartsman
86082838af added missing else which caused redundant memory access for 512-bit loads 2023-11-18 14:52:55 +02:00
Stanislav Shwartsman
054767ff8c enable MOVDIRI for TigerLake 2023-11-18 12:35:28 +02:00
Stanislav Shwartsman
a3fe8c2c8d introduce get_efer_allow_mask function to avoid placing that code directly in init.cc 2023-11-17 23:40:28 +02:00
Stanislav Shwartsman
9bda4eba28 introduce GET64_FROM_HI32_LO32 to form 64-bit integer from 2 32-bit 2023-11-17 23:31:38 +02:00
Stanislav Shwartsman
a9625e949d update crregs.h with all known XSAVE/XRESTOR state information
including not implemented state
2023-11-17 23:24:00 +02:00
Stanislav Shwartsman
0730ff4c4a added a comment for future: some memory operations must be done atomically
these are include LOCKed RMW of course and also a lot of others
in the future it will be very hard to find all the cases that must be atomic so better to start marking them already now
try to mark every RMW case for atomicity requirements
no code changes, only comments
2023-11-17 23:18:43 +02:00
Stanislav Shwartsman
1ad2ee6d4c use isReadOK instead of magic arithmetic for system_read_* methods
introduce system_write_qword as well
2023-11-17 23:14:38 +02:00
Stanislav Shwartsman
db17e4a4e2
Revert "reset status bar items at reset" (#137)
Reverts bochs-emu/Bochs#136
2023-11-17 09:37:46 +02:00
Benjamin David Lunt
c247b43718
reset status bar items at reset (#136)
When the user presses the "Reset" button on the gui ribbon, we need to
clear the active status of all statusbar items or they remain set after
the reset occurs.
This is mentioned in issue #123
2023-11-17 09:36:56 +02:00
Stanislav Shwartsman
447f18e53b Merge branch 'master' of https://github.com/bochs-emu/Bochs 2023-11-17 01:35:39 +02:00
Stanislav Shwartsman
01e744b507 bugfix for CET/XSAVE: XSAVE/XRESTOR wrongly determined if CTE.U is in XINIT state 2023-11-17 01:35:32 +02:00
Volker Ruppert
eec7a55c46 Fixed another gcc 13.2 warning (overloaded virtual). 2023-11-16 19:47:59 +01:00
Volker Ruppert
def53a2928 Fixed gui DLL name. 2023-11-15 23:33:27 +01:00
Stanislav Shwartsman
a9d07b5a51 coding style, move variables definition closer to its use, use constants instead of defines 2023-11-14 20:14:38 +02:00
Stanislav Shwartsman
baaaf1b9a7 update CHANGES 2023-11-14 19:31:37 +02:00
Stanislav Shwartsman
4941bb1f07 sync emulated time when linking traces 2023-11-14 19:26:56 +02:00
Stanislav Shwartsman
fde226f31c improve fix for VMCS_GUEST_PENDING_DBG_EXCEPTIONS saved on VMEXIT (should be cleared after most of VMEXITs)
handle some corner cases
2023-11-14 15:59:59 +02:00
Stanislav Shwartsman
60cc8020e8 Fixed VMCS_GUEST_PENDING_DBG_EXCEPTIONS saved on VMEXIT (should be cleared after most of VMEXITs) 2023-11-13 20:02:03 +02:00
Volker Ruppert
413507ee3a Trying to load a 'builtin' plugin twice must cause a BX_PANIC (same as plugin version). 2023-11-12 21:00:14 +01:00
Volker Ruppert
04941fd511 Added support for cross-compiling for win64 with plugins enabled. 2023-11-12 20:15:51 +01:00
Stanislav Shwartsman
b54b135d29 Updated plugins workspace after memory code changes 2023-11-12 20:30:07 +02:00
Stanislav Shwartsman
1401bd50e1 Merge branch 'master' of https://github.com/bochs-emu/Bochs 2023-11-12 20:28:26 +02:00
Stanislav Shwartsman
a9457e466c fixed compilation with debugger 2023-11-12 20:28:12 +02:00
Volker Ruppert
654f8796fb Updated standard workspace after memory code changes. 2023-11-12 17:37:03 +01:00
Shwartsman
cc6f8284ff Merge branch 'master' of https://github.com/bochs-emu/Bochs 2023-11-12 17:17:01 +02:00
Shwartsman
4f739d7e88 simplification: dbg_show_symbolic with no return value 2023-11-12 13:38:59 +02:00
Shwartsman
f8c94e83ff add missing SVM VMEXIT in case of triple fault shutdown 2023-11-12 13:38:16 +02:00
Volker Ruppert
aa8224b14e Added BX_PANIC in case no plugins are found to avoid segfault. 2023-11-12 00:09:42 +01:00
Stanislav Shwartsman
f5b54a4d33
Implemented MOVDIRI instruction (#129)
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-11-11 20:30:12 +02:00
Stanislav Shwartsman
620d091264 update CHANGES 2023-11-11 18:55:29 +02:00
Stanislav Shwartsman
f85c633d3d
preserve original VMCBPTR after SVM VMLOAD/VMSAVE instructions (#128)
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-11-11 17:52:10 +02:00
Stanislav Shwartsman
154896d923 Revert "fix code duplication"
This reverts commit 29c7a84c08.
2023-11-11 12:44:01 +02:00
Stanislav Shwartsman
29c7a84c08 fix code duplication 2023-11-11 12:19:27 +02:00
Stanislav Shwartsman
32cab8f384
introduce memory stub class which manages *only* RAM related logic of… (#127)
… the memory

it is very useful for CPU unit testing without devices or BIOS

Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-11-11 10:10:50 +02:00
Stanislav Shwartsman
1e92d9ee4e removed unused defines 2023-11-10 19:14:26 +02:00
Stanislav Shwartsman
db88c6c5bf fixed code duplication in debugger code 2023-11-10 19:10:51 +02:00
Stanislav Shwartsman
676da2e587 update CHANGES 2023-11-09 23:14:01 +02:00
Stanislav Shwartsman
913c8a0ac9 Merge branch 'master' of https://github.com/bochs-emu/Bochs 2023-11-09 19:15:42 +02:00
Stanislav Shwartsman
8594972389 final resolution for issue #2 : address VEXPAND* and VPSHUFBITQMB instructions 2023-11-09 19:15:32 +02:00
Benjamin David Lunt
a354d9aecc
fix ISO status change events (#125)
This allows you to change the CD-ROM via the Bochs Ribbon, as well as
properly "ejecting" a CD from the guest.
Before the CD path would change, but the guest (tested with WinXP and
DOS as guests) would not see the change.
This fix simulates an open tray and then a closed tray for all CD
changes.
2023-11-08 08:16:52 +02:00
Shwartsman
9f27681b54 fix compilation with CPU LEVEL<6 2023-11-08 07:15:39 +02:00
Stanislav Shwartsman
6655fa9a41 fix assertion I added in virt_timer.cc 2023-11-08 07:10:19 +02:00
Stanislav Shwartsman
b78e93c9e3 optimize handling of allowed_to_run_FPU_MMX instructios common block
now checked at decode and not at every instruction
simpler code and also 1% faster winXP boot time as bonus
other x87 and mmx heavy guests may benefit even more
2023-11-08 06:48:53 +02:00
Volker Ruppert
fcaccf0585 Fixed two format warnings. 2023-11-07 22:48:33 +01:00
Shwartsman
8f30812180 resolve github issue #57 + more clear variable name 2023-11-07 16:10:41 +02:00
Shwartsman
30d285b80f use common method to parse and dump memory params in .bochsrc 2023-11-07 15:40:20 +02:00
Volker Ruppert
75d076b990 Added modeless message box support for the wxWidgets port. 2023-11-05 19:05:24 +01:00
Shwartsman
5bb77620c3 coding style and #define cleanups
avoid using ull modifyer for consts, use BX_CONST64() instead
move definitions from header file to cpp file when possible
add 'const' modifyer for obviosly const methods and pointers
2023-11-05 15:37:39 +02:00
Volker Ruppert
83c71dd7a2 Renaming method fixes gcc 11 warning (overloaded virtual). 2023-11-05 11:01:41 +01:00
Stanislav Shwartsman
7469bcb69a
measure host stack depth during simulation to avoid excessive chainin… (#119)
…g depth

never allow beyong 64K stack
2023-11-05 07:08:36 +02:00
Volker Ruppert
f719dbe6d1 In case of failure restore_config() resets the restore flag. 2023-11-04 15:09:44 +01:00
Shwartsman
7290fb1231 simplify code in bx_virt_timer_c::timer_handler + add assert 2023-11-04 14:50:56 +02:00
Volker Ruppert
e896e71618 Fix for the fix: restore state from config interface works again (really fixes issue #37). 2023-11-03 23:58:40 +01:00
Volker Ruppert
ae31d06147 In restore mode load config earlier to make config interface selection work (fixes issue #37). 2023-11-03 18:19:38 +01:00
Volker Ruppert
2ea60efe00 Added x64 configuration to VS standard workspace (fixes issue #8 / TODO: plugins). 2023-11-03 14:38:34 +01:00
Volker Ruppert
77d7ee7d92 Updated MSVC plugins workspace (ZIP -> folder). 2023-11-01 17:18:34 +01:00
Volker Ruppert
7619ccb25d Fixed VS workspace files (TODO: plugins, WIN64 support). 2023-11-01 14:37:01 +01:00
Volker Ruppert
828da97aa5 Attempt to fix issue #40 using calculated size for 'first_sectors' buffer insted of hardcoded value. 2023-11-01 09:38:05 +01:00
Shwartsman
fb6dae6846 add block_size size param to saved .bochsrc 2023-10-31 15:36:46 +02:00
Benjamin David Lunt
586443f1ea
usb_ehci log fix (#116)
Simply change two BX_INFOs to BX_DEBUGs to keep from over populating the
log file.
2023-10-31 06:33:14 +02:00
Volker Ruppert
f4af2d4e24 Added modeless message box support for the x gui. 2023-10-30 21:27:37 +01:00
Stanislav Shwartsman
975c11fe09 fix canonical address calculation broken with LASS merge 2023-10-30 07:08:44 +02:00
Stanislav Shwartsman
18deee022f
make CPU to use C++ template for implementation of CPU methods (#115)
this allow to remove a lot of code from CPU common methods
2023-10-30 06:57:16 +02:00
Stanislav Shwartsman
2b439ea29e Merge branch 'master' of https://github.com/bochs-emu/Bochs 2023-10-29 23:39:46 +02:00
Stanislav Shwartsman
8cc85b1133 fixed compilation warnings from CI/DI on github 2023-10-29 23:39:32 +02:00
Volker Ruppert
cc16aea6fb Added modeless message box stub for textconfig. 2023-10-29 21:59:18 +01:00
Benjamin David Lunt
1519076597
Add Modeless MessageBox capabilities (#109)
As an example, when saving the state of an emulation, especially one
that has large image files and a large memory setting, there is a pause
between the time you choose a directory to save to, and the MessageBox
that states that the state was saved. During this time, there is no
indication that Bochs is doing anything. As far as the user is
concerned, Bochs froze.

So, this PR adds the capability to display a _Modeless_ message box. To
do so, at any point you need a message box shown, allowing other things
to continue to happen (SYNCHRONOUS), simply call the following line:
`void *hwnd = SIM->ml_message_box("Message Box Title", "Message Box
Text");`
Then after the task has been performed, remove the message box:
`SIM->ml_message_box_kill(hwnd);`

The function is implemented in all configurations via virtual calls,
however, the creation of the message box is currently only implemented
in the Win32 configuration. Other configurations will need this
implemented, though I do not have those configurations to test with,
except the text only config. I may get around to it :-).

This also currently only displays as the state is being saved. To
display when the state is being restored should now be a simple task by
adding the two lines shown above to the associated function.

The only drawback with this is that if the state is considerably small,
the save will take just a second or less. If so, this window will show
and then instantly be removed, possibly confusing the user. _What was
that!!_
2023-10-29 21:47:12 +01:00
Stanislav Shwartsman
96b887a9bb
code refactor towards fixing issue #2 (#112)
next step new methods for VEXPANDPS_MASK_VpsWpsR and
VEXPANDPD_MASK_VpdWpdR with mask and memory operand will be introduced
with fault suppression support
legacy load methods aren't good because the loads here actually read
POPCNT(mask) elements from memory src
2023-10-28 22:21:42 +03:00
Volker Ruppert
1a420ddf8b Added SB16 option again (removed by a previous commit 2023-10-28 17:43:15 +02:00
Shwartsman
325fb4bfe0 Change current directory before restoring from path bugfix 2023-10-28 11:35:49 +03:00
Benjamin David Lunt
ba9ed5d4d0
Add DIAG command and change to enum (#113)
This adds support for the UFI_SEND_DIAGNOSTIC command in USB_FLOPPY.CC
  and
This changes the list of defines to enum to match the current changes
made to recent files.
2023-10-27 08:24:41 +03:00
Benjamin David Lunt
5e87c5a8cf
add ehci and xchi parameters to suspend config (#111)
This changes the recent PR to use get_selected() instead of hard coding
the "uhci" and "ohci".
This also adds the xHCI options.
2023-10-23 17:01:45 +03:00
Stanislav Shwartsman
c48a50141b remove unused variable 2023-10-23 09:55:42 +03:00
Stanislav Shwartsman
78acf5ba76 Merge branch 'master' of https://github.com/bochs-emu/Bochs 2023-10-23 09:32:33 +03:00
Stanislav Shwartsman
9981f76ef9 correctly advance to next instruction for MONITOR with non-WB memory type 2023-10-23 09:32:25 +03:00
Benjamin David Lunt
b7f2aee9fd
write companion to save file (#110)
This fix adds the `companion=uhci\ohci` parameter to the saved config
file on suspend.
2023-10-23 07:53:22 +03:00
Stanislav Shwartsman
49a6d5bf0c coding style, initialize variables right before their use
remove redunant const in function params
2023-10-22 22:14:52 +03:00
Shwartsman
7568149dd8 fix compilation without EVEX 2023-10-22 15:58:28 +03:00
Shwartsman
f455fa87e4 update CHANGES with CD-ROM fix 2023-10-22 11:55:26 +03:00
Benjamin David Lunt
bfba29385f
A small fix and addition for a TEAC CD-ROM driver (#105)
This fixes the CD-ROM hardware by making sure the `drive_ready` flag is
zero after an `ATAPI_DEVICE_RESET` command. As far as I know, no other
Guest needed this fix except for the TEAC-CDI driver referred to below.

This also adds an assumption fix so that the TEAC_CDI driver will work.
The TEAC_CDI driver relies on the fact that the TEAC drive it is
designed for, sets the `interrupt reason` register (`sector count`
register) after the `ATAPI_IDENTIFY` command is issued. It uses this
`i_o` bit of this register to determine the direction of transfer for
the 0xA1 command, even though this is a read-only direction command.

Through other tests, I see no other Guests effected by this addition.

I also added a few minor syntax modifications, tab spacing, and
comments. The DEBUG out string will display the ATAPI command as well as
the 0xA0 command.
2023-10-22 11:52:53 +03:00
Shwartsman
ab1e94b13c convert define to enum
add const to some function methods
tab2space
2023-10-20 22:34:37 +03:00
Stanislav Shwartsman
873f62e298 update CHANGES 2023-10-20 21:03:04 +03:00
Benjamin David Lunt
0d1d6c671a
Ehci companion (#104)
This PR adds the ability to choose which companion controller the EHCI
uses.
`#usb_ehci: enabled=1, companion=uhci`
`#usb_ehci: enabled=1, companion=ohci`

UHCI is enabled by default:
`#usb_ehci: enabled=1`

This breaks up `usb_ohci.cc/h` into `usb_ohci.cc/h` and `ohci_core.cc/h`
to be like the existing `usb_uhci.cc/h` and `uhci_core.cc/h`.
This adds the ability to define a Port Routing string in the
`HcspPortRoute` register, and is optional via the `EHCI_PORT_ROUTE`
define.

Currently `EHCI_N_CC` and `EHCI_N_PCC` must remain as currently set (3
and 2 respectively), however with a little more work, I think these can
be modified and have up to 7 companion controllers with more ports per
companion, as long as the combined total is <= 15 total ports.

Please verify the `Makefile.in` changes. I do not use GCC and can not
verify it is correct.
2023-10-20 21:00:59 +03:00
Shwartsman
02c4f85a89 implemented proper masked load for VPMOVSX/ZX instructions + bugfix 2023-10-20 20:13:29 +03:00
Shwartsman
5103d97ece mask use of CUT_OPMASK_TO macro instead of magic arithmetic 2023-10-19 16:59:32 +03:00
Shwartsman
63286528b5 take axv512 masted read/write helpers to separate file 2023-10-19 16:52:55 +03:00
Stanislav Shwartsman
e0cc12471c
fixed issue #95 port_e9_hack (#101)
refactoring of port_e9_hack configuration options
do not allow port e9 access for all rings if port_e9_hack is not enabled

Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-10-18 08:19:33 +03:00
Shwartsman
2b873eb665 reapply PR #98 Hid register state fix 2023-10-17 15:10:28 +03:00
Shwartsman
f605dba487 remove duplicate option from configure scripts 2023-10-17 09:42:35 +03:00
Shwartsman
133144ae41 update include dependencies for CPU, MEMORY and BX_DBG folders 2023-10-16 19:42:44 +03:00
Shwartsman
d6c3ac641e fix compilation with mingw which has READLINE but doesn't have READLINE_HISTORY 2023-10-16 17:13:17 +03:00
Shwartsman
daa0e4506d add more features to configure scripts in repo (they are used for building release)
add SVM, EVEX, CET

reduce compilation dependencies
remove paramtree.h from bochs.h so many modules won't include it anymore

indentation fixes
2023-10-16 16:40:05 +03:00
Shwartsman
221cac7972 fixed compilation with no EVEX 2023-10-16 08:14:03 +03:00
Stanislav Shwartsman
a3d2fec111 Merge branch 'master' of https://github.com/bochs-emu/Bochs 2023-10-16 00:19:45 +03:00
Stanislav Shwartsman
035695f73c define CPU feature's enum together with feature name in one place 2023-10-15 23:56:11 +03:00
Stanislav Shwartsman
8e6bdcb4d9 define CPU feature's enum together with feature name in one place 2023-10-15 23:43:14 +03:00
Benjamin David Lunt
e7910a30a0
Xhci options (#92)
This adds a "hint" to the xHCI port configuration "option" entries,
hinting that the port number must or must not be super-speed.
2023-10-15 21:47:24 +03:00
Stanislav Shwartsman
8316d7698f
implemented Linear Address Separation extension (LASS) (#90)
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-10-15 14:32:01 +03:00