Stanislav Shwartsman
ddb9aeff59
fixups in CHANGES file
2024-01-12 12:56:34 +02:00
Shwartsman
6f4f217a08
implemented AMX_FP16 and aMX_COMPLEX, fixes for daz handling in AVX_NE_CONVERT FB16
...
updated CHANGES
2024-01-12 12:38:31 +02:00
Stanislav Shwartsman
167942816a
regen Makefile.in dependencies
2024-01-12 01:10:47 +02:00
Stanislav Shwartsman
0eab037907
dynamically allocate VMCB_CACHE only if SVM is actually enabled by CPU model
...
also reduces include dependency on svm.h
2024-01-12 00:56:09 +02:00
Stanislav Shwartsman
d6769cecfc
AMX was added to 'release' conf but not to 'everything'
2024-01-12 00:30:53 +02:00
Stanislav Shwartsman
6b48d6e33f
resolution for SF bug #1460 Incorrect "Blocking by NMI" bit when handling NMI VM-exit
...
as well as
resolution for Test stuck due to incorrect Virtual NMI handling #211
which appear the same problem
2024-01-12 00:19:44 +02:00
Shwartsman
9e36971e0f
fixed TILELOADD/TILESTORED and TDPBF16PS
2024-01-11 21:04:14 +02:00
Shwartsman
8dca1e0e07
correct implementation of AMX TDPBxxD instructions
2024-01-11 20:20:33 +02:00
Volker Ruppert
b8054277cb
Fixed compilation with PCI disabled.
...
When switching to Voodoo 1/2 update timer only if update_mode_vsync is enabled.
Still TODO: update docs.
2024-01-11 18:30:39 +01:00
Volker Ruppert
fc6703a2f7
VGA update timer using vertical frequency now supported by Voodoo devices.
...
TODO: update docs.
2024-01-11 17:48:11 +01:00
Shwartsman
89d992b5b8
fixed ( #214 ) wrong MSR name typo in MSR error message
...
in real mode exceptions should not push error code to stack so the same should be for VMEXIT due to HW exception from unrestricted real mode guest (fixes #211 )
2024-01-11 08:10:42 +02:00
Shwartsman
77bbdca17a
change from USB Debugger branch by Ben, rename variable
2024-01-10 21:25:03 +02:00
Stanislav Shwartsman
cc87b23738
regen configure after AMX added
2024-01-10 20:23:55 +02:00
Stanislav Shwartsman
3a02e85599
AMX support ( #212 )
2024-01-10 20:13:25 +02:00
Volker Ruppert
cfa7276cb9
Added support for driving the VGA display update timer with VSYNC.
...
- Using the special value of 0 enables this feature. In that case the vertical
frequency is used for the display updates. The update() method is called at
the "vertical retrace end" time and sets the time of the display start. This
value is used to set the vertical retrace indicator in VGA register 0x03da.
- This feature is not yet enabled if Voodoo support is present. The Voodoo device
has it's own vertical timer and needs some more testing and possibly some changes.
2024-01-09 21:48:19 +01:00
Shwartsman
c04fb9a6ba
Fixed decoding of AVX-VNNI instruction (typo in decoder tables)
...
mention AVX-VNNI in CHANGES
2024-01-09 09:14:39 +02:00
Shwartsman
e5ef6d6a47
According to documentation (8254.pdf), mode 6 is the same as mode 2 and mode 7 is the same as mode 3.
2024-01-08 20:27:59 +02:00
Volker Ruppert
f06346afcb
Voodoo Banshee: added missing type cast in mem_write().
2024-01-07 22:05:41 +01:00
Volker Ruppert
9dbca8951e
Fixed Banshee read from ROM and mem_write() for any size and endianness.
2024-01-07 19:33:58 +01:00
Volker Ruppert
0d3a63b08d
Updated LGPL'd VGABIOS to release 0.8c.
2024-01-07 17:27:30 +01:00
Volker Ruppert
a566b1e69d
PCI MMIO space is not disabled if the Cirrus card is in VGA mode.
2024-01-07 13:55:43 +01:00
Volker Ruppert
c13ef56378
Increase maximum VGA update frequency to 75 and default to 10.
...
Small cleanups in the VGA code.
2024-01-07 11:15:04 +01:00
Shwartsman
54961f0326
fix buffer overflow with LA57
2024-01-07 07:37:18 +02:00
Volker Ruppert
080cf72f5f
Fixed CGA address wrap.
2024-01-06 16:31:04 +01:00
Volker Ruppert
c9c0237af3
Fixed start address in emulated CGA mode.
2024-01-06 15:05:33 +01:00
Volker Ruppert
6d433ec44b
Missing horizontal pel panning support added in modeX.
...
Added error messages for unsupported features (EGA only ?).
TODO: horizontal pel panning support missing or incorrectly implemented in other
graphics.
2024-01-06 11:29:39 +01:00
Shwartsman
cda3ed5a60
update CHANGES
2024-01-05 20:33:47 +02:00
Shwartsman
b24bf1dae2
CPUID: Added Xeon Sapphire Rapids CPU definition
...
Features PKS, WAITPKG, UINTR, AVX512_BF16, MOVDIRI/MOVDIR64, LA57, SERIALIZE and more
Not yet supported but will be added in future: AVX512_FP16, AMX
2024-01-05 19:54:37 +02:00
Shwartsman
a67fb31d4f
LA57: attempt to change (not just clear) LA57 in long mode cause #GP
2024-01-05 18:46:56 +02:00
Volker Ruppert
3a73e8a0b2
Fixed address wrap in non-chain4 256-color VGA mode called modeX.
...
There were blinking dotted lines visible in old DOS games (#205/#206).
2024-01-05 14:36:42 +01:00
Shwartsman
6893743a5b
prevent trace linking aftre portin/portout instructions as well
2024-01-05 09:12:01 +02:00
Shwartsman
27d48ecb94
HandlersChaining Optimization: mark IN/OUT instructions as TraceEnd, they could have significant side effects like raising interrupts which have to be handled
...
resolves issue #207
2024-01-05 08:45:10 +02:00
Volker Ruppert
1f8eb7b608
First step to fix the timer code for speaker sound output.
...
There is some output now, but not really music yet.
2024-01-04 19:26:27 +01:00
Shwartsman
41c2bb8bee
fix for LA57 cr4 checks, thanks Ben for pointing this out
2024-01-04 08:35:33 +02:00
Volker Ruppert
071f5c72f7
Reduce VGA vertical screen size if blanking starts before display end.
2024-01-03 23:48:24 +01:00
Volker Ruppert
210ea89b36
Voodoo Banshee / Voodoo3 hardware cursor fixes ( #202 / #203 ).
...
- Fixed crash in "half mode" (line doubling).
- Fixed redraw_area() values (must be unsigned).
2024-01-02 21:30:28 +01:00
Shwartsman
05b187f851
update CHANGES with SB16, keyboard, VGA and Voodoo fixes done by Volker
2024-01-02 21:49:48 +02:00
Volker Ruppert
f48acd833f
Some speaker output fixes.
...
- Increase buffer size and allocate buffer dynamicly.
- Make sure the beep_level is correctly set up in dsp_generator().
- TODO: fix timer code for usable sound output with the speaker.
2024-01-01 19:43:33 +01:00
Volker Ruppert
7985fa1ebb
X11: changed set_font() message to BX_DEBUG.
2024-01-01 11:20:05 +01:00
Volker Ruppert
10811e13ed
SB16: added 16-bit write support for even i/o addresses.
2023-12-31 16:05:20 +01:00
Volker Ruppert
1699f30d64
Reduce default keyboard serial delay to 150 to avoid timeouts.
...
Some cleanups in the keyboard code.
2023-12-31 10:47:10 +01:00
Shwartsman
b93b9ad881
fixed comments in bf16.h
2023-12-29 22:45:59 +02:00
Stanislav Shwartsman
07d28c60b8
generic cpuid fix dump_cpuid
2023-12-29 21:53:15 +02:00
Stanislav Shwartsman
75a7151fbf
let generic CPUID to use MTF VMX extension
2023-12-29 21:50:40 +02:00
Stanislav Shwartsman
ec7ef85ed9
exclude cpuid.h from cpu.h to reduce compilation dependency
2023-12-29 21:27:24 +02:00
Volker Ruppert
63ab5ea24a
Align SB16 DMA buffer size to 4 to avoid crash in 16-bit stereo mode.
2023-12-29 19:49:58 +01:00
Volker Ruppert
be1baa295c
Implemented secondary VGA charmap support.
...
All guis with 'new_text_api' and the graphical text snapshot working with it.
2023-12-29 17:47:44 +01:00
Shwartsman
133f1136d3
fix compilation with no x86-64 compiled in
2023-12-29 17:56:47 +02:00
Volker Ruppert
a1872535ca
Voodoo: fixed randomly missing color palette updates.
2023-12-29 15:18:06 +01:00
Stanislav Shwartsman
e3612c30f8
Implement support for LA57 and 5-level paging
2023-12-29 14:48:38 +02:00
Volker Ruppert
157d3a9189
Next attempt to fix the Voodoo hang on exit.
...
It occurred with the pthreads library only and should be fixed now.
2023-12-29 10:25:38 +01:00
Volker Ruppert
29fbdb48da
Set default value for SB16 dmatimer to 1000000 and updated docs.
2023-12-28 20:32:14 +01:00
Volker Ruppert
917ac4c79d
Fixed some Voodoo issues.
...
Temporarily disable fifo_reset() in recompute_video_memory(). FIFO handling must
be observed and a better solution must be found.
Fixed hang after pressing power button: destructor modification was required since
the swapbuffer command can depend on vertical retrace.
2023-12-28 19:04:20 +01:00
Volker Ruppert
326114f4e7
Updated LGPL'd VGABIOS to version 0.8b.
2023-12-28 08:54:56 +01:00
Volker Ruppert
9d1df2915c
VGA mem_write(): added missing update flag in chain4 mode.
2023-12-27 23:24:46 +01:00
Volker Ruppert
aa23a09afd
VGA mem_write(): moved and fixed CGA specific code.
...
Removed disabled BX_DEBUG code and VGA_TRACE_FEATURE symbol.
Some other small fixes and cleanups.
TODO #1 : review MAP13 addressing in case start address > 0.
TODO #2 : review chain4 code in medm_write().
2023-12-26 11:16:59 +01:00
Volker Ruppert
de4876e2c4
VGA mem_write(): in text mode don't mark graphics tiles for update.
...
TODO: Check special cases code in mem_write() for correctness.
2023-12-25 21:03:53 +01:00
Shwartsman
5b61b51498
more optimal version for VDPBF16PS
...
avoid constly softfloat calls when masked
2023-12-25 16:26:28 +02:00
Shwartsman
ddff78a16c
style and disasm updates, no functional impact
2023-12-25 14:57:05 +02:00
Vort
aed0c5e954
Prevent output of fraction of sample ( #193 )
...
Fixes #134 .
2023-12-25 12:00:31 +02:00
Shwartsman
7c9bab8182
handle getexp methods though templates
2023-12-25 08:07:07 +02:00
Stanislav Shwartsman
ef30a12afb
avoid accidential zero of the mask, due to Bit64u computation overflow (1 << 64) == 1
2023-12-24 22:37:02 +02:00
Stanislav Shwartsman
e7f2450220
fix XSAVE leaf resporting in CPUID
2023-12-24 20:12:30 +02:00
Shwartsman
00831a09d7
optimize load vector methods
2023-12-24 19:57:07 +02:00
Volker Ruppert
8a4941f670
Some cleanups in the recently fixed code.
2023-12-24 14:41:47 +01:00
Stanislav Shwartsman
662d8ec279
fix bug from previous commit
2023-12-24 15:04:31 +02:00
Stanislav Shwartsman
eb6d4f5fc8
use simpler method to write XMM register while clearing AVX upper part
2023-12-24 14:45:04 +02:00
Volker Ruppert
e3eb603ad4
Some fixes for the VGA mode 0x13 (issue #188 and discussion #108 ).
...
- Shift start address by 2 in update() code and mem_write().
- Added split screen support for this mode.
- Some code cleanups.
2023-12-23 21:37:08 +01:00
Shwartsman
b4effb58af
fix compilation with minimalistic config
2023-12-23 22:10:22 +02:00
Shwartsman
19dbd7314b
convert more instructions to template
2023-12-23 22:01:13 +02:00
Shwartsman
8e76c9b6bb
move many SSE/AVX/AVX512 methods to template functions
2023-12-23 21:00:51 +02:00
Shwartsman
120ad141b3
reduce code duplication by merging equivalent methods
2023-12-23 19:12:03 +02:00
Shwartsman
f3053e49bd
fixed warnings in x.cc
2023-12-23 16:44:00 +02:00
Volker Ruppert
664fdae152
Fixed mouse toggle check (issue #181 ).
...
Clear out other keys/buttons when pressing one of the modifier keys.
2023-12-23 10:32:15 +01:00
Shwartsman
f1bab0c057
fixed MSR bit defines from FRED feature
...
minor update for WRMSRLIST instruction from today's SDM update
2023-12-23 10:34:03 +02:00
Volker Ruppert
84989e883f
Update CHANGES
2023-12-23 08:30:36 +01:00
Volker Ruppert
f0350b575a
Updated LGPL'd VGABIOS images from https://github.com/bochs-emu/VGABIOS .
2023-12-23 08:22:54 +01:00
Volker Ruppert
b63b1225a8
Fixed backward screen-to-screen copy operation for > 8 bpp modes.
2023-12-21 10:53:13 +01:00
Vort
75ea1c2222
Prevent crash in get_retrace ( #185 )
...
Fixes #184 .
2023-12-20 13:35:51 +02:00
Shwartsman
fc919cd132
use true/false instead of 0/1 for bool in the cpu code
2023-12-19 20:44:56 +02:00
Shwartsman
1a2544b1bb
fixed typo in comment
2023-12-19 19:51:37 +02:00
Stanislav Shwartsman
54e88eee92
more correction for CPUID leaf 0xD
2023-12-18 15:58:18 +02:00
Saulius Krasuckas
f221984d89
Fix niclist.exe crash when writing to string returned by PACKET.DLL ( #179 )
...
Seemingly Npcap returns a read-only string and `niclist.exe` tries to
modify (tokenize) it using `strtrok()`.
That results in the crash: #161
Probably related to
https://github.com/the-tcpdump-group/libpcap/pull/949 .
Here is my try at fixing this.
For successful modification I propose to use a stack-allocated copy
instead of the original (const) version string.
Now
[packetWin7/Dll/Packet32.cpp#L159](https://github.com/nmap/npcap/blob/a41bc6a/packetWin7/Dll/Packet32.cpp#L159 )
seems to initialize `const char PacketLibraryVersion[]` from the define
`WINPCAP_VER_STRING`, which seems to be of arbitrary length:
```
__declspec(dllexport) const char PacketLibraryVersion[] = WINPCAP_VER_STRING;
```
Let's search for the longest string present in their repo:
```
$ git log -u version.h | awk 'BEGIN { FPAT="(([^ \t]+)?(\"[^\"]+\")?)+" } /^.*define.+WINPCAP_VER_STRING.+[0-9]/ { gsub(/"/, "", $NF); print $NF }' | sort -Vu | while read; do printf "%4s %s\n" ${#REPLY} "${REPLY}"; done | sort -n
4 0.01
4 0.03
4 0.04
4 0.05
4 0.06
4 0.07
4 0.08
4 0.09
4 0.10
4 0.11
4 0.78
4 0.80
4 0.81
4 0.82
4 0.83
4 0.84
4 0.85
4 0.86
4 0.90
4 0.91
4 0.92
4 0.93
4 0.94
4 0.95
4 0.96
4 0.97
4 0.98
4 1.00
4 1.10
4 1.20
4 1.30
4 1.31
4 1.40
4 1.50
4 1.55
4 1.60
4 1.70
4 1.71
4 1.72
4 1.73
4 1.74
4 1.75
4 1.76
4 1.77
4 1.78
5 0.991
5 0.992
5 0.993
5 0.994
5 0.995
5 0.996
5 0.997
6 0.9981
6 0.9982
6 0.9983
6 0.9984
6 0.9985
6 0.9986
6 0.9987
6 0.9988
6 0.9989
6 0.9990
6 0.9991
6 0.9992
6 0.9993
6 0.9994
6 0.9995
6 0.9996
6 0.9997
7 0.08 r8
7 0.08 r9
7 0.09 r2
7 0.09 r3
7 0.09 r4
7 0.09 r5
7 0.09 r6
7 0.09 r7
7 0.09 r8
7 0.09 r9
7 0.10 r2
7 0.10 r3
7 0.10 r4
7 0.10 r5
7 0.10 r6
7 0.10 r7
7 0.10 r8
7 0.10 r9
7 0.78 r2
7 0.78 r3
7 0.78 r4
7 0.78 r5
7 0.99-r1
7 0.99-r2
7 0.99-r3
7 0.99-r4
7 0.99-r5
7 0.99-r6
7 0.99-r7
7 0.99-r8
7 0.99-r9
8 0.08 r10
8 0.09 r10
8 0.09 r11
8 0.09 r12
8 0.09 r13
8 0.10 r10
8 0.10 r11
8 0.10 r12
8 0.10 r13
8 0.10 r14
8 0.10 r15
8 0.10 r16
8 0.10 r17
8 0.10 r18
10 4.1.0.2980
10 4.1.0.3001
```
So it's 10 characters. (Sorry for the long Bash one-liner)
Also I visited the older code from WinPcap, and it seems it used a
64-byte long string:
[packetNtx/Dll/Packet32.c#L105](https://github.com/wireshark/winpcap/blob/267327e/packetNtx/Dll/Packet32.c#L105 )
```
char PacketLibraryVersion[64];
```
So I assumed it's safe to allocate the same on stack.
2023-12-18 13:00:59 +02:00
Shwartsman
d794b516e1
rewrite XSAVE/XRESTORE CPUID leaf reporting,
...
fixed several bugs and made code correct for all future XSAVE extensions
2023-12-18 11:35:55 +02:00
Stanislav Shwartsman
54831068df
implement RDMSRLIST/WRMSRLIST instructions (+related VMX extensions) ( #176 )
2023-12-16 21:59:34 +02:00
Shwartsman
accb975173
use true/false for boolean values insetad of 0 and 1
2023-12-16 19:07:03 +02:00
Shwartsman
e9c39194f2
update CHANGES
2023-12-16 16:55:56 +02:00
Vort
ee528baa03
Expand maximum resolution for Banshee and Voodoo 3 from 1600x1280 to 1920x1440 ( #175 )
...
Fixes #174 .
2023-12-16 16:51:18 +02:00
Shwartsman
e68ae599af
added comments and consts for CPUID definitions
2023-12-16 10:10:48 +02:00
Shwartsman
cd350d8548
adopting hack listed in https://github.com/bochs-emu/Bochs/issues/147 to solve hang
2023-12-16 08:45:53 +02:00
Vort
02704120a3
Implement Voodoo 3 writes with length 8 ( #173 )
...
Fixes #172
Co-authored-by: Stanislav Shwartsman <stlintel@gmail.com>
2023-12-16 08:28:59 +02:00
Shwartsman
0fbf559276
fix bx_banshee_c::mem_read unknown access length warning
2023-12-16 08:24:08 +02:00
Shwartsman
e67fb33443
fix potentially un-initialized value warning
2023-12-15 22:49:34 +02:00
Shwartsman
438fd787c3
attempt to warn (BX_ERROR) for unsupported read/write size
2023-12-15 22:31:49 +02:00
Vort
30db11d271
Fix memory corruption when reading Voodoo ROM ( #169 )
...
Fixes #131 .
2023-12-15 22:24:57 +02:00
Volker Ruppert
50258bf32e
Improved Ne2k bootrom parameter description.
2023-12-14 23:01:11 +01:00
Volker Ruppert
5fec28cb17
Partly fixed display errors found in game Prehistorik 2 (issue #166 ).
...
- Fixes in MAP13 disabled mode (VGA mode 6): half dot clock, color support
- Modified method get_vga_pixel(): now using row start address as an argument
2023-12-13 17:15:09 +01:00
Volker Ruppert
7641d13614
E1000: Added support for i/o mapped register access to make DOS driver work.
2023-12-11 21:21:34 +01:00
Shwartsman
4a6ec57711
remove redundant space in comment
2023-12-10 20:44:05 +02:00
Volker Ruppert
6c955d6d2a
Update CHANGES
2023-12-10 13:29:12 +01:00
Volker Ruppert
bb477316f1
Some small bximage quiet mode changes.
...
- Show error message if a parameter is missing for quiet mode.
- Show defaults in help message.
- Added quiet mode example in manual page.
2023-12-10 11:17:21 +01:00
Volker Ruppert
35c39e46c0
Added BIOS capabiölity to enter keycode with ALT + numeric keypad.
2023-12-10 10:05:54 +01:00
Volker Ruppert
0d49d2a8df
Added 'flash_data' parameter to the romimage option.
...
This parameter defines the file name for the flash BIOS config space loaded
startup if existing and saved on exit if modified. The Bochs BIOS doesn't
use this feature yet. Updated 'romimage' option documentation.
2023-12-09 17:52:33 +01:00
Volker Ruppert
8c89528617
Fixed assertion failure on exit ( #164 ).
...
The io object should never been deleted.
2023-12-09 14:22:02 +01:00
Volker Ruppert
b03e901206
Update CHANGES
2023-12-08 14:32:26 +01:00
Volker Ruppert
20b61b31f2
Improved parsing bochsrc options passed on the command line (see issue #160 ).
...
If the last char of an argument is a colon, equal sign or comma and there is
at least one more argument, then concatenate these arguments to one and pass
it to parse_line_unformatted().
2023-12-08 14:17:40 +01:00
Volker Ruppert
edb9c7aad8
Added save/restore support for the ESCD space in the flash BIOS ROM. ( #162 )
...
These changes only have an effect when using a BIOS image designed for
real hardware (tested with asus_p6np5.bin). When using Bochs BIOS no
data will be saved / restored, since the 'flash_modified' value is
always set to 'false'. Saving ESCD data on exit is not implemented yet,
but it shouldn't be hard to do.
2023-12-07 21:45:39 +01:00
Stanislav Shwartsman
2eccb25e8f
x87: Implemented special behavior for 287-compatibility FSTP opcode: D9D8..D9DF - Behaves the same as FSTP but won't cause a stack underflow exception.
2023-12-07 12:56:02 +02:00
Volker Ruppert
54aeba83d3
Moved CMOS image runtime options setup to cmos.cc.
2023-12-05 18:16:24 +01:00
Volker Ruppert
7fcf4a419a
Added support for saving CMOS image at runtime.
...
- Added CMOS image options to runtime menu (except RTC init).
- Fixed default size of Bochs CMOS RAM (s.max_reg).
- Fixed bochsrc parse to make 'rtc_init' parameter work.
- In textconfig now using SERIES_ASK for CMOS image options.
2023-12-04 20:39:24 +01:00
Volker Ruppert
c8b370d206
Added split screen support to the 256-color VGA mode called "modeX".
2023-12-03 19:42:05 +01:00
Volker Ruppert
77eaf072b4
Update CHANGES
2023-12-03 17:20:35 +01:00
Shwartsman
9e68546126
cleanup more leafs in CPUDB
2023-12-03 17:59:48 +02:00
Shwartsman
624a7a33a4
fixed compilation
2023-12-03 16:57:58 +02:00
Shwartsman
d6e60afd9f
remove configure scripts which were used only for CI/DI and not part of the new CI/DI configuration script
2023-12-03 16:50:45 +02:00
Shwartsman
a1060a0825
cleanups in CPUDB cpuid definitions
2023-12-03 16:46:39 +02:00
Volker Ruppert
18d1e76444
X gui: a short delay makes it show the modeless message box correctly.
2023-12-03 15:28:23 +01:00
Volker Ruppert
7f420fc260
Added modeless message box in the restore code and some related fixes.
...
- Show message box while restoring hardware state.
- Set modeless message box handle to NULL after destroying it.
- Reset all config options to default before restoring config.
- Fixed CMOS RTC value after restore if in 12-hour-mode.
- Fixed possible segfault in the plugins code caused by Voodoo plugin in VGA mode
(found at restore code testing).
2023-12-03 12:34:03 +01:00
Vort
9ac605e411
Enable asserts for MSVC Debug builds ( #158 )
...
Enabling `assert`s in Debug MSVC builds (removing of `NDEBUG` defines)
allows to catch more bugs.
No changes were made to `BX_ASSERT` handling.
Also I did not touched `vs2019-plugins` because it looks broken for me.
2023-12-03 11:16:48 +02:00
Vort
5147c20eaa
Enable static library linking for MinGW builds ( #152 )
...
This change allows to build Windows binaries without dependencies on
toolchain-specific libraries (like `libc++.dll`).
It allows to perform version updates by copying of single `bochs.exe`,
without the need for searching and distribution of linked DLLs.
---------
Co-authored-by: Volker Ruppert <Volker.Ruppert@t-online.de>
2023-12-03 09:00:23 +02:00
Benjamin David Lunt
d9bee7d87a
Added warning note ( #156 )
...
The Legacy BIOS is incapable of handling a PCI enabled VGA rom, so added
a warning to not use this particular combination.
2023-12-03 07:41:41 +02:00
Volker Ruppert
98f4180764
Added shortcut script for Github build tests.
...
In addition to release, nothing and everything, I have added "i686" for the
maximum possible i686 config and "x86-64" for the minimal 64-bit cpu config.
2023-12-02 16:26:05 +01:00
Volker Ruppert
af47384d96
Regenerated configure script and updated CHANGES.
2023-12-02 15:13:39 +01:00
Volker Ruppert
fc0992ac40
Added capability to select config with command line argument (.conf.linux).
...
TODO #1 : some other shortcut scripts should support this.
TODO #2 : add a special script for Github test builds this way.
2023-12-02 14:49:21 +01:00
Stanislav Shwartsman
fcea81a042
fixed compilation in cmos.cc
2023-12-02 08:43:56 +02:00
Stanislav Shwartsman
ffc722f4e8
Porting #SF patch #565 Real Time Clock /CMOS fix ( #4 )
...
by Michele Giacomone
Detailed description:
-Observed issues
Due to some limitations only dates between 1980 and 2038 can be
used in a reliable way.
Also, bochs incorrectly assumes a linear correspondence between
the data returned by the <time.h> functions localtime() and
mktime(), and isn't setting the latter properly.
Bochs keeps its internal time value dependent to these functions
after setup, assuming that their internal settings won't change
on the go - which is not the case.
In my OS, and in my timezone, this leads to incorrect startup values
for 5 months each year and unreliable values if the simulation is
kept going for a long time. (a feedback between localtime() and
mktime() is created which keeps shifting back the time)
Also, the RTC simulation is not realistic since the clock fixes
itself across DST changes, without updating any DST related flag,
a behavior that no guest OS expects.
-Proposed fix
This is implemented in such way that no bochs' previous behavior
is changed, a part from the broken ones, with legacy in mind
== the user can keep using bochs exactly as before knowing nothing
of this patch
+Make the internal s.timeval variable a Bit64s, so it can fit all
values that the cmos can correctly represent, reported below:
MIN setting -62167219200 => 0000/01/01 SAT 0:00:00
MAX BCD setting 253402300799 => 9999/12/31 FRI 23:59:59
MAX BIN setting 745690751999 => 25599/12/31 FRI 23:59:59
And then fix each reference to these so it can handle such values
And make bochs correctly wrap around for under/overflows, so that
only the most significant bits of the century are lost.
+Do the same thing to the bochs time0 parameter, so all the above
values can be chosen at startup (despite being now legal values,
1 and 2 will still be treated as "local" and "utc"). Note that
normally only BCD settings are valid since bochs' CMOS defaults
to such operating mode - the only way to use the binary range
is by loading a cmos memory map.
+Make the internal s.timeval variable independent from external
factors. This means providing a small set of time handling
functions, contained in "iodev/utctime.h", which must work in
any environment in which bochs compiles, accessing no external
resource. This also means that after startup, s.timeval will only
be changed internally, and no call to the OS time functions will
be made.
+Make the internal s.timeval variable timezone independent, to
have a linear correlation between its values and valid CMOS
settings. To make it easier, s.timeval is gonna be treated as
if the current timezone was UTC: so,
- if the user selects UTC as time0, s.timeval will become current
time(NULL)
- if the user selects localtime, s.timeval will be computed as
the value which will display the same broken down time as
localtime(&now)
- if the user inputs a time formatted string the proper s.timeval
to displayed will be easily calculated,
- if the user inputs a starting time value, s.timeval will be
computed as the value which will display the same broken down
time as localtime(&user_input) to ensure the same operation as
before.
A "tz=utc" is displayed when bochs prints out the current time
value, to warn users about the difference in meaning between the
internally kept time value and the value they can set through
the "time0=" parameter. This might be changed to communicate
instead the time value they can input to get the same setting,
but performing such calculation (except for the startup time)
suffers from all the mktime()/localtime() problems listed above
so I did not do it.
The range of "time0" is automatically adjusted so all users in
all time zones can set any legal value despite "time0=" having a
local meaning.
A thorough explanation of what I did and why can be found in the
"iodev/utctime.h" library header.
---------
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
Co-authored-by: Volker Ruppert <Volker.Ruppert@t-online.de>
2023-12-01 22:55:35 +01:00
Shwartsman
4de6c097a4
use true/false instead of 0/1 for boolean variables
...
cleanups in code
2023-12-01 23:01:11 +02:00
Stanislav Shwartsman
0653c5ba75
fixed compilation when x86_64 not compiled in but mwait is
2023-12-01 21:45:17 +02:00
Stanislav Shwartsman
00e8e0bca0
implemented MOVDIR64B instruction and enabled in TigerLake model
2023-12-01 18:03:25 +02:00
Stanislav Shwartsman
2e89b9bcba
implemented WAITPKG instruction set ( #150 )
...
still missing : UMWAIT/TPAUSE should set CF flag if it was using OS
deadline and woken up after deadline (i.e. not from monitored store)
also not clear in the spec: should UWAITX/TPAUSE always wait until
deadline due to 'while(tsc<deadline)' statement ?
+include small fixes for AMD's MONITORX/MWAITX
2023-12-01 18:00:03 +02:00
Stanislav Shwartsman
97a63b0414
fix name of ifdef guarding include
2023-12-01 12:27:21 +02:00
Stanislav Shwartsman
2a3321d012
remove apic.h from dependencies in cpudb folder
2023-11-28 16:22:02 +02:00
Stanislav Shwartsman
9ef235c338
compilation fix with --enable-memtype disabled
2023-11-28 16:20:03 +02:00
Shwartsman
3c857f2ad1
make APIC from static object to dynamic so many cc files won't need to be dependent on apic.h
2023-11-28 11:08:42 +02:00
Shwartsman
8dd9649389
fixed compilation for VMX=1 X86_64=1
...
updated (c) for many files
2023-11-28 10:36:56 +02:00
Shwartsman
4efcabb1a1
reduce code duplication with making new simpler to use physical access methods
2023-11-28 10:24:11 +02:00
Shwartsman
685a033d2d
fixed compilation with BX_SUPPORT_VMX=1 (x86_64 = 0)
2023-11-28 09:07:32 +02:00
Stanislav Shwartsman
6e1e04e2a5
update CHANGES
2023-11-27 20:15:00 +02:00
Stanislav Shwartsman
47edb90b02
remove in_repeat obsolete usages
2023-11-27 20:15:00 +02:00
Stanislav Shwartsman
e0802b31d2
remove redundant code
...
VMENTER already ensure that POSTED INTR implies
PIN_VMEXIT(VMX_PIN_BASED_VMEXEC_CTRL_EXTERNAL_INTERRUPT_VMEXIT) = 1
and
(vm->vmexit_ctrls & VMX_VMEXIT_CTRL1_INTA_ON_VMEXIT) != 0
2023-11-27 20:15:00 +02:00
Shwartsman
f37049903b
fixed compilation
2023-11-27 20:15:00 +02:00
Shwartsman
cc4f594ede
implemented process-posted-interrupts VMX extension
2023-11-27 20:15:00 +02:00
Stanislav Shwartsman
9a5dfb10c1
fixed 'misleading indentation' warning
...
move variable definitions closer to their use
2023-11-27 19:05:12 +02:00
Stanislav Shwartsman
a5c6bcfd15
remove in_repeat variable and replace it with correct EFLAGS.RF management
2023-11-27 13:51:25 +02:00
Stanislav Shwartsman
ca4ca03be8
remove #ifdef around in_repeat variable, it is always needed
2023-11-26 23:21:51 +02:00
Volker Ruppert
e82316c490
Memory leak fix in the win32 gui code.
...
In exit() method always call terminateEmul(), but the argument depends on the
value of bx_user_quit.
2023-11-26 22:04:07 +01:00
Stanislav Shwartsman
4ee9d37a5f
prevent access to non-existing VMCS fields
2023-11-26 20:29:56 +02:00
Stanislav Shwartsman
ad7a85d11a
updates for SVM INVLPGA instruction
...
- decoding and disasm
- invalidate only pages pointed by RAX and not entire TLB
2023-11-26 19:45:07 +02:00
Volker Ruppert
48b3b7e7a5
If any device is still loaded, plugin_cleanup() calls bx_unload_plugins().
2023-11-26 18:36:07 +01:00
Shwartsman
b013b389ea
fixed code duplication, extract some code to functions
...
make special phy memory read methods which help to write cleaner code
2023-11-26 18:25:54 +02:00
Shwartsman
6d5e527e7d
Merge branch 'master' of https://github.com/bochs-emu/Bochs
2023-11-26 17:41:53 +02:00
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