Commit graph

82836 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 5871716c64
[HALX86] Update the PCI hardware IDs database.
Extracted from the pci.ids database at https://pci-ids.ucw.cz/ from 2022-11-25 03:15:01 .
Maintained by Albert Pool, Martin Mares, and other volunteers from the PCI ID Project.
2022-11-25 16:17:10 +01:00
Thomas Faber c0027d117c
[LIBXML2] Update to version 2.10.3. CORE-17766 2022-11-25 09:30:40 -05:00
Thomas Faber 19da1718e5
[LIBXSLT] Update to version 1.1.37. CORE-17766 2022-11-25 09:30:40 -05:00
Thomas Faber 1dbad942d8
[LIBXML2] Update to version 2.10.2. CORE-17766 2022-11-25 09:30:39 -05:00
Thomas Faber 0d5a4166a4
[LIBXML2] Update to version 2.10.1. CORE-17766 2022-11-25 09:30:36 -05:00
Katayama Hirofumi MZ 3f3714bad4
[NTGDI][FREETYPE] Font cache: Use FT_Matrix instead of MATRIX (#4900)
- Use FT_Matrix instead of MATRIX in FONT_CACHE_ENTRY structure.
- Use FtMatrixFromMx and FT_Set_Transform instead of FtSetCoordinateTransform.
CORE-11848
2022-11-25 11:23:29 +09:00
Timo Kreuzer 9658c6a220 [NTOSKRNL] Print boot cycles on x64 just like on x86 2022-11-24 21:17:58 +02:00
Timo Kreuzer 225e0c89d9 [NTOS] Fix a bug in KiPrepareUserDebugData 2022-11-24 21:17:58 +02:00
Timo Kreuzer e923912f94 [NTOS] Fix unwinding through KiThreadStartup 2022-11-24 21:17:58 +02:00
Timo Kreuzer 66aa25b1cd [RTL] Implement RtlUnwind 2022-11-24 21:17:58 +02:00
Timo Kreuzer 8d3bc7c572 [RTL] Set unwind flags in RtlUnwindEx 2022-11-24 21:17:58 +02:00
Timo Kreuzer 0c211b975f [RTL] Fixes for RtlpUnwindInternal 2022-11-24 21:17:58 +02:00
Timo Kreuzer aade1ab01b [RTL] Fix RtlVirtualUnwind 2022-11-24 21:17:58 +02:00
Timo Kreuzer 90d2e12dfa [RTL] Fix RtlpCaptureNonVolatileContextPointers 2022-11-24 21:17:58 +02:00
Timo Kreuzer f4d4b31c61 [RTL] Implement x64 version of RtlInterlockedPushListSList 2022-11-24 21:17:58 +02:00
Timo Kreuzer 20a6cff4dd [CRT] Implement _InterlockedCompareExchange128 intrinsic for GCC 2022-11-24 21:17:58 +02:00
Timo Kreuzer 3381bf39db [HAL/x64] Fix x86BiosCall
Use an INT call stub and exit on the address after the stub instead or using iret (some BIOS code uses int / iret internally). This fixes the messed up display when trying to switch modes.
2022-11-24 21:17:58 +02:00
Timo Kreuzer 38fc6e1274 [OLEAUT32] Implement x64 call_method in asm
This is based on the inline implementation for GCC.
2022-11-24 21:17:58 +02:00
Timo Kreuzer a007f5e490 [NTOS] Fix NtContinue for x64 2022-11-24 21:17:58 +02:00
Timo Kreuzer 6744368755 [NTDLL_APITEST] Implement NtContinue test for x64 2022-11-24 21:17:58 +02:00
Hermès Bélusca-Maïto f7024d6c72
[PSDK][NTOS:KD64] Turns out, that even Clang in MSVC mode needs the 64-bits pointer extension hack!
Addendum to commit de81021ba.
Otherwise, we get the following build error:

 \ntoskrnl\kd64\kddata.c(532,5): error: initializer element is not a compile-time constant
      PtrToUL64(RtlpBreakWithStatusInstruction),
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 \ntoskrnl\kd64\kddata.c(526,26): note: expanded from macro 'PtrToUL64'
 #define PtrToUL64(x)    ((ULPTR64)(x))
                          ^~~~~~~~~~~~
2022-11-24 13:30:43 +01:00
Katayama Hirofumi MZ 375b02f337 [NTGDI][FREETYPE] Simplify IntRequestFontSize and FONTGDI
FONTGDI.lfWidth and FONTGDI.EmHeight are not used.
Simplify code without setting these members.
CORE-11848
2022-11-24 14:18:20 +09:00
Katayama Hirofumi MZ 476f94c0fe [NTGDI][FREETYPE] Formatting code; Follow up #4865 (a620c6f)
CORE-11848
2022-11-24 12:28:10 +09:00
Thomas Faber 911153da10
[LIBXML2] Update to version 2.10.0. CORE-17766 2022-11-23 22:02:47 -05:00
Thomas Faber 608bbe1136
[MSXML3][MSXML3_WINETEST] Partial sync to Wine to enable libxml2 update. CORE-17766
xml2: Import upstream release 2.10.0.

wine commit id 015491ab32742ace5218d37b1149c58803858214 by Alexandre Julliard <julliard@winehq.org>

Note: Upstream msxml3_test has switched away from WINE_NO_LONG_TYPES, so
I've kept the old printf format specifiers for now. Once we do a full
sync, we can get rid of __ROS_LONG64__ for this test and use them
unmodified.
2022-11-23 22:02:47 -05:00
Thomas Faber 21ab4d93c7
[LIBXSLT] Update to version 1.1.36. CORE-17766
This version was released after libxml2 2.10.0, but it removes
usage of some now-deprecated functions that would break the build.
2022-11-23 22:02:43 -05:00
Katayama Hirofumi MZ a620c6f82e
[NTGDI][FREETYPE] Simplify font rendering (#4865)
- Add ftGdiGetRealGlyph and ftGdiGetTextWidth helper functions.
- Optimize font rendering.
CORE-11848
2022-11-24 11:51:04 +09:00
Hermès Bélusca-Maïto 968b264300
[NTOS:KD] Rename the private acquire/release lock functions to fix GCC compilation.
If you ask why there are two sets of functions that do the same, it's
because this file (and the kdmain.c) will very soon some day be moved to
a transport dll, outside the kernel, and it will need these functions.
2022-11-24 01:44:14 +01:00
Hermès Bélusca-Maïto ffb05406e6
[NTOS:KD64] Implement KdLogDbgPrint() for the WinDbg !dbgprint command.
See this command's documentation:
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/-dbgprint
and the section "DbgPrint buffer and the debugger"
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/reading-and-filtering-debugging-messages#dbgprint-buffer-and-the-debugger
for more details.

- Loosely implement the function, based on our existing circular printout
  buffers in kdio.c.
- Enable its usage in the KdpPrint() and KdpPrompt() functions.

Notice that this function will *only* capture the strings being sent **to**
the debugger, and not the strings the debugger itself produce. (This means
that we cannot use the KdPrintCircularBuffer as a replacement for our
KDBG dmesg one, for example...)

How to test:
Run ReactOS under WinDbg, and use the !dbgprint command to view the
buffer. You can also use the Memory Window, place yourself at the
address pointed by KdPrintCircularBuffer and KdPrintWritePointer, and
read its contents.

What you should observe:
Prior notice: The circular buffer in debug builds of ReactOS and Windows
is 0x8000 bytes large. In release builds, its size is down to 0x1000.
1- When you start e.g. the 2nd-stage GUI installation of ReactOS, going
   past the initial "devices installation" and letting it stabilize on
   the Welcome page, break into WinDbg and run the !dbgprint command. You
   should notice that the end of its output is weirdly truncated, compared
   to what has been actually emitted to the debug output. Comparing this
   with the actual contents of the circular buffer (via Memory Window),
   shows that the buffer contents is actually correct.
2- Copy all the text that has been output by the !dbgprint command and
   paste it in an editor; count the number of all characters appearing +
   newlines (only CR or LF), and observe that this number is "mysteriously"
   equal to 16384 == 0x4000.
3- Continue running ReactOS installation for a little while, breaking back
   back into WinDbg and looking at !dbgprint again. Its output seems to be
   still stopping at the same place as before (but the actual buffer memory
   contents shows otherwise). Continue running ROS installation, and break
   into the debugger when ROS is about to restart. You should now observe
   that the dbgprint buffer rolled over:
     dd nt!KdPrintRolloverCount shows 1.
   Carefully analysing the output of !dbgprint, however, you will notice
   that it looks a bit garbage-y: the first part of the output is actually
   truncated after 16384 characters, then you get a second part of the
   buffer showing what ReactOS was printing while shutting down. Then
   you get again what was shown at the top of the !dbgprint output.
   (Of course, comparing with the actual contents of the circular buffer
   in memory shows that its contents are fine...)

The reason of these strange observations, is because there is an intrinsic
bug in the !dbgprint command implementation (in kdexts.dll). Essentially,
it displays the contents of the circular buffer in two single dprintf()
calls: one for the "older" (bottom) part of the buffer:
  [WritePointer, EndOfBuffer]
and one for the "newer" (upper) part of the buffer:
  [CircularBuffer, WritePointer[ .
The first aspect of the bug (causing observation 3), is that those two
parts are not necessarily NULL-terminated strings (especially after
rollover), so for example, displaying the upper part of the buffer, will
potentially also display part of the buffer's bottom part.
The second aspect of the bug (explaining observations 1 and 2), is due
to the implementation of the dprintf() function (callback in dbgenv.dll).
There, it uses a fixed-sized buffer of size 0x4000 == 16384 characters.
Since the output of the circular buffer is not done by little chunks,
but by the two large parts, if any of those are larger than 0x4000 they
get truncated on display.
(This last observation is confirmed in a completely different context by
https://community.osr.com/discussion/112439/dprintf-s-max-string-length .)
2022-11-24 01:18:18 +01:00
Hermès Bélusca-Maïto 36335d9cee
[NTOS:KD64] Correctly initialize the KdPrint buffer data in KdDebuggerDataBlock so as to fix the WinDbg !dbgprint command.
Now, !dbgprint just shows an empty log (since we don't fill it), instead
of showing the following error:

  kd> !dbgprint
  Can't find DbgPrint buffer
2022-11-24 01:18:17 +01:00
Hermès Bélusca-Maïto de81021bab
[PSDK][NTOS:KD64] Rename GCC_ULONG64 to ULPTR64 to self-document the fact it stores a pointer as a 64-bit quantity.
But the underlying GCC stupidity is still there (15 years later).

However, enable it only in 32-bit GCC builds, not in 64-bits nor with MSVC.
See commit b9cd3f2d9 (r25845) for some details.

GCC is indeed still incapable of casting 32-bit pointers up to 64-bits,
when static-initializing arrays (**outside** a function) without emitting
the error:

  "error: initializer element is not constant"

(which might somehow indicate it actually tries to generate executable
code for casting the pointers, instead of doing it at compile-time).

Going down the rabbit hole, other stupidities show up:

Our PVOID64 type and the related POINTER_64 (in 32-bit archs), or the
PVOID32 and POINTER_32 (in 64-bit archs), are all silently broken in
GCC builds, because the pointer size attributes __ptr64 and __ptr32,
which are originally MSVC-specific, are defined to nothing in _mingw.h.
(And similarly for the __uptr and __sptr sign-extension attributes.)

Clang and other sane ompilers has since then implemented those (enabled
with -fms-extensions), but not GCC. The closest thing that could exist
for GCC is to do:

  #define __ptr64 __attribute__((mode(DI)))

in order to get a 64-bit-sized pointer type with

  typedef void* __ptr64 PVOID64;

but even this does not work, with the error:

  "error: invalid pointer mode 'DI'"
2022-11-24 01:18:16 +01:00
Hermès Bélusca-Maïto 1c0950b557
[PSDK][NTOS:KD64] Update the KDDEBUGGER_DATA64 structure with new fields.
Information from the Windows 10 SDK and from
https://github.com/DarthTon/Blackbone/blob/master/src/BlackBoneDrv/NativeStructs.h
2022-11-24 01:18:15 +01:00
Hermès Bélusca-Maïto 1847474aaa
[PSDK] Clarify the FIXME comment about this mysterious warning.h (here for WDK compatibility). 2022-11-24 01:18:11 +01:00
Marcin Jabłoński edb7575faa
[NTOS:KE/x64] Implement KeDisconnectInterrupt() for amd64 (#4883)
Choose the correct element of the KiUnexpectedRange array,
depending on the interrupt vector, the same way as here:
a2c6af0da4/ntoskrnl/ke/amd64/except.c (L77)

And guard KeConnectInterrupt() execution with dispatcher lock.

CORE-14922
2022-11-22 23:52:18 +03:00
Hermès Bélusca-Maïto d15f126143
[NTOS:KDBG] Fix the ANSI escape sequences used to get terminal characteristics when printing with paging.
- Line-wrapping is enabled with 'ESC[?7h' (the '?' was forgotten).
  Notice that the following reference also shows it wrong:
  https://www.cse.psu.edu/~kxc104/class/cse472/09s/hw/hw7/vt100ansi.htm

- Terminal type is actually queried with 'ESC Z' (VT52-compatible), or
  with 'ESC[c' (VT100-compatible). The antediluvian CTRL-E ('\x05')
  control code gives instead a user-configurable (usually empty) string,
  so it's not reliable.
  Also, we don't really care about the returned result, we just need to
  know that one has been sent.

Cross-checked with online documentation:
* "Digital VT100 User Guide" (EK-VT100-UG-001) (1st edition, August 1978,
  reviewed November 1978).
* https://www.real-world-systems.com/docs/ANSIcode.html
* https://geoffg.net/Downloads/Terminal/TerminalEscapeCodes.pdf
* https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
* https://en.wikipedia.org/wiki/Enquiry_character

- Retrieve the size of the *controlling terminal* with escape sequences
  only when it's a serial one: serial output is enabled *and* KDSERIAL
  is set (i.e. user input through serial). See code for the actual logic
  (the corresponding truth table is left as an exercise for the reader).

- Fix also a "Buffer" vs. "InBuffer" mismatch, that caused the whole
  code to fail.

- For fallback terminal size values, use meaningful ones when SCREEN
  is instead the controlling "terminal" (based on full-size BOOTVID
  values).

- When echoing read characters during line-cooking, do direct output by
  using KdpDprintf() instead of going through the heavy KdbpPrint() function.
  This fixes some input artifacts like: 1. extra slowdowns due to
  querying terminal size at each keypress, and 2. getting obnoxious
  "--- Press q to abort ..." prompts in the middle of typing a long
  comamnd because you are at the very bottom of the screen.
2022-11-22 02:10:55 +01:00
Hermès Bélusca-Maïto c29d6806b8
[NTOS:KD] Remove last remnant of KdpDetectConflicts, deprecated since 2007.
Addendum to commit be2645ad8 (r25987).
2022-11-22 02:10:54 +01:00
Hermès Bélusca-Maïto 9337ea6a3c
[NTOS:KDBG] Deduplicate code between KdbpPrint() and KdbpPager(). 2022-11-22 02:10:54 +01:00
Thomas Faber 8940614a78
[LIBXML2] Update to version 2.9.14. CORE-17766 2022-11-21 19:46:12 -05:00
Thomas Faber 7244e0c5c6
[LIBXML2] Update to version 2.9.13. CORE-17766 2022-11-21 19:46:12 -05:00
Thomas Faber df1adce32c
[LIBXML2] Fix forgotten config.h update. CORE-17766 2022-11-21 19:46:11 -05:00
Thomas Faber f7671c1be8
[LIBXSLT] Update to version 1.1.35. CORE-17766 2022-11-21 19:46:11 -05:00
Thomas Faber e524b1bcf6
[LIBXSLT] Improve sync with upstream. CORE-17766
Makefile.am: this hasn't been updated in a while
security.c: WIN32 -> _WIN32 to keep the ROS-diff consistent with the rest
win32config.h/libxslt.h: remove unnecessary ROS-diff
xsltwin32config.h: this was missed in the 1.1.34 sync
xsltexports.h: mark a ROS-diff as such
2022-11-21 19:46:08 -05:00
Zebediah Figura dee3e6e7cd
[WINESYNC][WORDPAD] paint_ruler(): Use GetSysColorBrush()
Import wine-4.7 commit:
dcd9376ae7

Follow-up to 0.4.15-dev-5248-g be014129a5.
2022-11-21 23:08:27 +03:00
Zebediah Figura 0828e16462
[WINESYNC][USER32] MDI_AugmentFrameMenu(): Use GetSysColorBrush()
Import applicable part of wine-4.7 commit:
8d251a1dd1

Follow-up to 0.4.15-dev-5248-g be014129a5.
2022-11-21 23:08:09 +03:00
Thomas Faber 79b0fce5dc
[NTOS:CM] Consistently use synchronous I/O for registry hives.
Our current CmpFileRead/CmpFileWrite do not wait for completion,
so will cause stack corruption if used on files opened in async
mode.
2022-11-20 16:02:39 -05:00
Jose Carlos Jesus dfb7e2d639
[TRANSLATION] Improve Portuguese (pt-PT) translation (#4886)
- [APPWIZ] Improve pt-PT translation
- [INPUT] Update pt-PT translation
- [INTL] Fix typos in pt-PT translation
- [LICCPA] Improve pt-PT translation
- [SYSDM] Update and improve pt-PT translation
- [NTOBJSHEX] Update pt-PT translation
- [ZIPFLDR] Update and improve pt-PT translation
2022-11-20 23:20:11 +03:00
Jose Carlos Jesus 685728bc24
[SHELL32] Prevent a second call to Drive Properties dialog (#4888)
CDefaultContextMenu::DoProperties provides a fallback call
to the property sheet testing the return value of the _DoCallback method,
which is ultimately the return value of SH_ShowDriveProperties().

SH_ShowDriveProperties() sometimes returns an HRESULT, however it is marked
as returning a BOOL. Then, DrivesContextMenuCallback() always handles this
result as an HRESULT.

Fix SH_ShowDriveProperties() to always return a BOOL as it is intended,
and in DrivesContextMenuCallback() handle the result accordingly.

CORE-18537
2022-11-20 21:10:11 +03:00
Jose Carlos Jesus c093d4f803
[TASKMGR] Prevent context menu on idle process (#4889)
In Win2K3, there is no context menu on the System Idle Process.

CORE-18640
2022-11-20 20:22:30 +03:00
Thamatip Chitpong f125cd1c71
[SYSDM] System Parameters: Close dialog on ESC (#4891)
CORE-18610
2022-11-19 20:08:04 +03:00
Katayama Hirofumi MZ f908d37bb3
[REGEDIT] F4, Alt+D, Tab, and Shift+Tab (#4885)
CORE-12323
2022-11-19 08:42:20 +09:00