Commit Graph

12851 Commits

Author SHA1 Message Date
Dreg
da43cc4580
add port e9 hack support for all rings (#64)
By enabling the 'all_rings' option, you can utilize the port e9 hack
from ring3

IMO very useful for:
- user-mode sandbox (ex Cuckoo)
- malware analysis
- API/SYSCALL logger with a simple hook from ring3
- automation + instrumentation from user mode code
- ...

So yes, from this PR a user-mode-sandbox can display on the console of
the system running Bochs anything that is written to 0xE9 port


![porte9hackallrings](https://github.com/bochs-emu/Bochs/assets/9882181/ddbca3fa-729b-4a3e-95ad-078e44c7a17a)

**This PR is 100% backward compatibility**

btw, @stlintel I'm not certain if **bochs/config.cc** is the ideal
location to define **bool port_e9_hack_all_rings** (unmapped io/dev is
better?)
2023-08-26 18:37:55 +03:00
Stanislav Shwartsman
253882589d extend cpuid enums with new bits announced in Intel SDM 2023-08-20 20:30:01 +03:00
Stanislav Shwartsman
1dcae848d7 change nullptr to NULL to help some old hosts not supporting C++ standard 2023-08-20 19:40:08 +03:00
Stanislav Shwartsman
6481d24e06 Another cleaner way to implemented fix by rei141
from Fixes in VM Entry Checks for Guest Segment Registers #51

Correction in checks for Code Segment (CS):
Previously, the DPL of CS was incorrectly compared with its own RPL.
According to Intel SDM, Vol. 3C, Chapter 27.3.1.2, for non-conforming code segments (type 9 or 11), the DPL of CS should be equal to the DPL of SS.
And for conforming code segments (type 13 or 15), the DPL of CS cannot be greater than the DPL of SS.

This way VMCS is not accessed multiple times which is important for some usages
2023-08-20 19:33:37 +03:00
Stanislav Shwartsman
58c047c6d6 Merge part of PR by rei141
Fixes in VM Entry Checks for Guest Segment Registers #51

Correction in Type range checks for DS, ES, FS, GS:
The original code erroneously applied the check for types less than 11, excluding types equal to 11.
This is not in accordance with Intel SDM, Vol. 3C, Chapter 27.3.1.2, which states that the check should include types equal to or less than 11.
This fix corrects this by including types equal to or less than 11 in the check.
2023-08-20 18:52:53 +03:00
Stanislav Shwartsman
4b7e61d985 add updated lex and yacc scripts 2023-08-20 18:35:19 +03:00
Dreg
244033e234
improvement of the magic breakpoints fix #55 (#58) 2023-08-20 18:21:16 +03:00
Stanislav Shwartsman
b7d4445d34
Merge pull request #52 from disba1ancer/gdbstub-x86-64-eip-patch
Fix for gdbstub with x86-64 that truncates instruction pointer while breakpoint check
2023-08-19 10:50:52 +03:00
Stanislav Shwartsman
ba2747bea9
Merge pull request #54 from therealdreg/add-support-info-idt-symbols-32bits
add symbol info to info idt on protected 32
2023-08-19 10:39:29 +03:00
Dreg
81b4bdba7b add symbol info to info idt on protected 32 2023-07-23 16:12:44 +02:00
disba1ancer
c11006ad51 Fixed instruction pointer truncation in gdbstub 2023-05-25 00:00:24 +03:00
Stanislav Shwartsman
24f988cf54
Merge pull request #49 from Vort/dir_sep
Use correct directory separator in Windows builds
2023-04-16 13:02:32 +03:00
Vort
ace4a4dfa9 Use correct directory separator in Windows builds 2023-04-16 12:22:45 +03:00
Stanislav Shwartsman
571a961d9c
Merge pull request #45 from fysnet/usb/hid_mouse_improvements
Usb/hid mouse improvements
2023-04-10 10:04:23 +03:00
Benjamin David Lunt
8272ee3f6c
Include cstddef 2023-04-09 10:54:08 -07:00
Benjamin David Lunt
0985f9bfec
hid mouse improvements 2023-04-09 10:44:00 -07:00
Benjamin David Lunt
fd02efa536
hid mouse improvements 2023-04-09 10:43:18 -07:00
Shwartsman
bd51ec5f83 fixed SF #1456 Bochs does not handle NMI blocking correctly when running virtual machines 2023-04-08 08:36:28 +03:00
Stanislav Shwartsman
e2f4eff91a fixed compilation of instrumentation examples with debugger OFF 2023-04-06 22:18:01 +03:00
Stanislav Shwartsman
caf80c29bf Merge branch 'master' of https://github.com/bochs-emu/Bochs 2023-04-06 22:04:04 +03:00
Stanislav Shwartsman
c10268f5b5 fixed compilation warnings in usb code 2023-04-06 22:03:36 +03:00
Volker Ruppert
bee4b45ad7 usb_uasp is not a separate plugin device 2023-04-06 20:59:14 +02:00
Stanislav Shwartsman
8d35b84a61 fixed potentially non-initialized var warning 2023-04-06 21:37:22 +03:00
Volker Ruppert
545a73ad56 Fixed generation of user documentation 2023-04-06 20:20:20 +02:00
Stanislav Shwartsman
55e66d4d6f
Merge pull request #42 from fysnet/master
Updates to USBMSD/SCSI emulation
2023-04-01 10:44:27 +03:00
Benjamin David Lunt
b20ddc75ff
Updates to USBMSD/SCSI emulation 2023-03-31 19:05:59 -07:00
Benjamin David Lunt
45469a7929
Updates to USBMSD/SCSI emulation 2023-03-31 18:55:05 -07:00
Benjamin David Lunt
df257317f3
Updates to USBMSD/SCSI emulation 2023-03-31 18:35:28 -07:00
Benjamin David Lunt
0135a545c0
Updates to USBMSD/SCSI emulation 2023-03-31 18:33:38 -07:00
Benjamin David Lunt
3cf9aa2ace
Updates to USBMSD/SCSI emulation 2023-03-31 18:30:11 -07:00
Stanislav Shwartsman
8eee519f4e
Merge pull request #39 from fysnet/master
Add over-current signaling
2023-03-23 07:22:46 +02:00
Benjamin David Lunt
64bb47b283
Add over-current signaling
This adds over-current signaling to the USBs four host controllers.
To signal an OC, use the runtime configuration and set the checkbox (GUI) or text config's parameter to 1.
This pull request also adds USB documentation to user.dbk.
2023-03-22 16:13:25 -07:00
Benjamin David Lunt
a0e4106f4a
Add over-current signaling
This adds over-current signaling to the USBs four host controllers.
To signal an OC, use the runtime configuration and set the checkbox (GUI) or text config's parameter to 1.
This pull request also adds USB documentation to user.dbk.
2023-03-22 16:12:08 -07:00
Benjamin David Lunt
dacc965593
Add over-current signaling
This adds over-current signaling to the USBs four host controllers.
To signal an OC, use the runtime configuration and set the checkbox (GUI) or text config's parameter to 1.
This pull request also adds USB documentation to user.dbk.
2023-03-22 16:05:44 -07:00
Stanislav Shwartsman
45ed74dc1b
Merge pull request #38 from fysnet/master
Forgot to add SPD action to UHCI
2023-03-22 06:54:26 +02:00
Benjamin David Lunt
d01e0f6cf8
Forgot to add SPD action to UHCI 2023-03-21 18:40:11 -07:00
Stanislav Shwartsman
5b45a2e985
Merge pull request #36 from fysnet/master
Fix issue #25
2023-03-18 07:44:19 +02:00
Benjamin David Lunt
64009cb067
Fix issue #25
The 'd.pcap_image_t pcapture' in usb_common.h called its constructor and set 'fd' to -1. However, in the usb_device_c() constructor, we then cleared all of 'd', resetting pcapture.fd back to zero. Then on Bochs exit, the pcap_image_t destructor tried to close the file since 'fd' was zero instead of -1. To fix this, I removed the pcap_image_t constructor and now call pcap_image_init() within the usb_device_c constructor.
2023-03-17 17:30:10 -07:00
Stanislav Shwartsman
a34bc01592
Merge pull request #35 from fysnet/master
USB emulation update
2023-03-13 16:07:47 +02:00
Benjamin David Lunt
6a0e7a5306
Allow a usb port number to be more than one digit
Also fixed an error with xhci and the save/restore Bochs environment
2023-03-12 16:40:02 -07:00
Benjamin David Lunt
8ef4dcc7d1
Allow a usb port number to be more than one digit 2023-03-12 16:36:22 -07:00
Benjamin David Lunt
280fbf1929
Added info about the USB disk/cdrom options 2023-03-12 14:58:12 -07:00
Benjamin David Lunt
3c6a97c676
add dependencies 2023-03-11 17:37:27 -07:00
Benjamin David Lunt
7e046f5a27
indentation corrections 2023-03-11 17:28:59 -07:00
Benjamin David Lunt
418ef4e1ca
USB emulation update
add usb_uasp to the build
2023-03-10 12:56:32 -07:00
Benjamin David Lunt
9075864647
USB emulation update
change to 'public'
2023-03-10 12:30:03 -07:00
Benjamin David Lunt
5b6ed6274b
USB emulation update
Add protected declaration
2023-03-10 12:22:13 -07:00
Benjamin David Lunt
884d4c272e
USB emulation update
fix two comments
2023-03-10 11:56:12 -07:00
Benjamin David Lunt
7041926aac
USB emulation update
Added examples for new options.
 - xhci: model= option
 - xhci: allow the user to select number of ports
 - usb disk: proto= option (bbb or uasp)
Added xhci primary stream support.
 (Secondary stream support is not included)
Added (experimental) usb disk protocol UASP for super- and high-speed usb disk devices.
  (high-speed uasp support is not thoroughly tested)
xhci: fixed "change event" function
scsi: fixed bug in command 0x25
scsi: added command 9E/10
2023-03-10 11:37:08 -07:00
Benjamin David Lunt
86b50988be
USB emulation update
Added examples for new options.
xhci: model= option
usb disk: proto= option
2023-03-10 11:29:06 -07:00