77 Commits
Author SHA1 Message Date
Hervé Poussineau 9e09b5c5b9 [KDSTUB] Implement driver for KDNET extension stubs
CORE-20385
2026-06-15 08:42:50 -07:00
Dmitry Borisov e2aa54321a [BOOTVID] Rename some function parameters
Delta       -> Stride
TopDelta -> Height
2026-04-21 15:08:17 -05:00
Hermès Bélusca-Maïto 5923d37e1f [KDCOM][KDGDB] Fix kdcom.dll/kdgdb.dll file naming on MSVC-built ISOs
CORE-20528

Addendum to commit 912c8ad987 (PR #5187)

Fix a bug where "KDCOM/KDGDB_NAME_ON_CD" CMake variables weren't used
as variables, but directly as names.
2026-03-23 13:29:58 +01:00
Hermès Bélusca-Maïto 6e51f4abb0 [KDVM] Rename KdVmKdVmExchangeData to KdVmExchangeData 2026-03-21 23:17:39 +01:00
Hermès Bélusca-Maïto 20e16781bb [KDCOM][KDGDB][KDVM] Adjust the file names reported in their version resources 2026-03-21 23:16:12 +01:00
Hermès Bélusca-Maïto 9669b3124f [KDGDB] Fix build with x86 and x64 MSVC (#5187)
```
gdb_input.c(243): error C4477: '_snprintf' : format string '%p' requires
  an argument of type 'void *', but variadic argument 1 has type 'UINT_PTR'

i386_sup.c(98): error C4090: 'return': different 'const' qualifiers
amd64_sup.c(115): error C4090: 'return': different 'const' qualifiers
```
2026-03-21 22:52:16 +01:00
Hermès Bélusca-Maïto 6e3e7f0d23 [KDGDB] Recognize both 'DEBUGPORT=GDB' and 'DEBUGPORT=COM' syntaxes (#5187) 2026-03-21 22:52:09 +01:00
Hermès Bélusca-Maïto 912c8ad987 [KDGDB] Don't make GDB a separate citizen (#5187)
But add KDGDB compilation only for x86 and x64, since for other
architectures (e.g. ARM) it currently emits the following error:
```
drivers/base/kdgdb/kdgdb.h(149): fatal error C1189: #error:
    "Please define relevant macros for your architecture"
```

For the time being, keep the "GDB" build configuration macro, used for
Gitpod testing... but this needs to be replaced with a more robust solution.
Because of this, rename kdgdb.dll to kdcom.dll, and kdcom.dll to kdser.dll
so that GDB is used by default, and we don't get a file name clash too.

Revert also commit 57cf5cdc5d.
2026-03-21 22:46:58 +01:00
Hermès Bélusca-Maïto d012a8c4a3 [KDGDB] Minor formatting/typo fixes 2026-03-21 18:16:07 +01:00
Hermès Bélusca-Maïto 6c532e771e [FREELDR][KDCOM][KDGDB] Allow specifying the serial port address in the DEBUGPORT option
This is the same feature as the one that already exists in the
NTOS:KD!kdmain.c module used by the in-kernel KDBG debugger
(GCC builds), first introduced in commit 4ce30245de (r54473),
and documented at:
https://reactos.org/wiki/Debugging#Changing_the_serial_port_address

This feature is useful if one uses a PCI, PCIe, PCMCIA, or ExpressCard
serial card on real hardware (these cards are used e.g. with laptops
without a built-in serial port), or with AMT serial over LAN.
After determining the serial port I/O address (say, 0xCC00), specify
the debug port as follows:

/DEBUGPORT=COM:0xCC00

instead of the usual syntax: /DEBUGPORT=COMn (n an integer).

The same syntax can be used for debugging FreeLoader as well: in the
FREELDR.INI file, add a "Debug" line in the "FREELOADER" section,
as follows:

```
[FREELOADER]
Debug=/DEBUG /DEBUGPORT=COM:0xCC00 /BAUDRATE=115200
```

----

NOTE for KDCOM/KDGDB:

Since `strtoul()` is used, but isn't exported by ntoskrnl, link against
the "strtol" static library that has been introduced in commit d317d4fbcc
(r71481).
2026-03-21 00:10:21 +01:00
Hermès Bélusca-Maïto 956d9f7973 [FREELDR][KDCOM][KDGDB][KDVM][NTOS:KD] Don't overrun the command-line when parsing "DEBUGPORT"
Don't loop past the end of the command-line buffer, if the command-line
terminates with a lone "DEBUGPORT" without any extra parameter following.
For example: "some things   DEBUGPORT  "
2026-03-21 00:06:20 +01:00
Hermès Bélusca-Maïto c4d60756dd [FREELDR][KDCOM][KDGDB][NTOS:KD] Some code "nits"
- Don't hardcode constant string lengths.

- Use `_strnicmp()` -- Ideally we shouldn't have to unconditionally upcase
  the global kernel command-line string to perform substrings comparisons.

- Cast `atol()` returned value to `ULONG`.
2026-03-19 22:49:29 +01:00
Hermès Bélusca-Maïto 4d0642b67f [FREELDR][KDCOM][KDGDB][NTOS:KD] Minor code comments enhancements 2026-03-19 22:14:00 +01:00
Hermès Bélusca-Maïto b1a31610ac [FREELDR][KDCOM][KDGDB] Remove deprecated "IRQ" debugger command-line option
- The "IRQ" debugger option was introduced in commit 5a6adb4f13 (r2546).
  It was used by the in-kernel GDB stub, to manually wire an interrupt
  handler `GspBreakIn()` to allow the debugger to break into the system
  when a command is received on the GDB serial port.

  Side-remark:
  The hooking was done via `HalGetInterruptVector()` + `IoConnectInterrupt()`,
  but only at phase 1 initialization when the memory manager was up, which
  can be "late" enough during system boot initialization.
  Instead of using `IoConnectInterrupt()`, one could have used explicit
  `KeInitializeInterrupt()` + `KeConnectInterrupt()` calls that would
  have worked much earlier in the boot stage.

- This functionality was soon after disabled in commit c804ca06be (r2946)
  in the GDB stub (see `ntoskrnl/kd/gdbstub.c!KdGdbStubInit()`), never
  to be re-enabled again.
  It was removed completely in commit e160c0fb26 (r14799).

- Since ReactOS was (until recently) always debugged locally using the
  in-kernel KDBG debugger, break-in was done with TAB-K keypress,
  intercepted by the keyboard driver that triggered a `DbgBreakPoint()`,
  thus no break-in via serial port interrupt was necessary.

- Remote debugger break-in detection, which is the standard method that
  is used when remote-debugging using KD transport DLLs and WinDbg, was
  introduced in commit 12e7593f24 (r25984). As with the rest of debugger
  communication and as done on Windows, detection is done by polling the
  serial port at certain times, namely in the `KeUpdateSystemTime()`
  kernel procedure periodically invoked by the timer interrupt.
  This break-in detection was then erroneously removed in commit bf8b9467dc
  (r45140), and reinstated in commit 014b23b9a (r56194).

- Parsing of this "IRQ" option was copy-pasted in other modules (FreeLoader,
  KDCOM, and KDGDB), even though it was never used. The parsing was then
  removed in KDBG itself in commit 95faf65ebf, but left in the other
  modules... until now!
2026-03-19 21:52:14 +01:00
Hermès Bélusca-Maïto 3012af5e30 [CPORTLIB][FREELDR][KD][NTOS] Move duplicated UART settings into a common header 2026-03-16 16:18:43 +01:00
Hermès Bélusca-Maïto c2aaa52bf2 [BOOTVID] Implement a generic linear framebuffer boot video driver (#8618)
Its purpose is to offer an out-of-the-box generic framebuffer video
(a video miniport driver for win32k will be introduced in a future PR)
to ease ReactOS porting to other possibly non-PC-compatible systems,
where no VGA-compatible video is present and only linear framebuffers
are available; for example: XBOX, UEFI with GOP only, AppleTV, etc.

Of course, once ReactOS is ported, one can then (and should) write,
or use existing video drivers tailored to the system of interest.

Together with our FreeLoader, this driver could also be employed for
of porting/modding Windows 2000/XP/2003 attempts to other platforms,
as this has been done by external contributors.

Current limitations:
- Only supports 32 bits-per-pixel ARGB format. This limitation will be
  removed in subsequent PR(s).
- May be slow during rendering (region color filling and scrolling);
  I will try to improve this as time goes.

This driver's code is loosely based upon preliminary code by Justin Miller
and on the existing XBOX bootvid implementation.
Tested by Justin Miller (@TheDarkFire) for UEFI, and by Sylas Hollander
(@DistroHopper39B) with his AppleTV port.
It has also been tested with VESA linear modes on PC by myself.
2026-01-30 21:21:30 +01:00
Hermès Bélusca-Maïto fda2ee2ad8 [BOOTVID] Modularize the different bootvid's build rules (#8548)
The aim is to be able to compile multiple bootvids for a given ReactOS
build without having to duplicate the same commands.
2026-01-18 18:19:01 +01:00
Hermès Bélusca-Maïto d4ffcf81be [BOOTVID][NTOS:INBV] Improve SAL annotations for *BufferToScreenBlt() and *ScreenToBufferBlt() 2026-01-03 14:19:25 +01:00
Hermès Bélusca-Maïto 5674e5d32b [BOOTVID][HAL][NTOS:INBV][NDK] *DisplayString(): Use a more suitable string pointer parameter type
Use `PCSTR` for the type of the (Hal,Inbv,Vid)DisplayString() routines'
`String` parameter, instead of `PCHAR` or `PUCHAR`, since it points to a
NUL-terminated string. (The buffer isn't a counted string.)

And improve SAL annotations along the way.
2026-01-03 14:19:24 +01:00
Hermès Bélusca-Maïto 3b33b1025e [BOOTVID] Use an "unsigned" (U)RECT structure for the VidpScrollRegion (#8547)
This makes the code more readable than using e.g. `VidpScrollRegion[0]`,
`VidpScrollRegion[1]` etc. instead of `VidpScrollRegion.Left`,
`VidpScrollRegion.Top` respectively.

Based on a suggestion by Dmitry Borisov.
2026-01-03 14:19:23 +01:00
Hermès Bélusca-Maïto 5894d0b443 [BOOTVID] Reorganize some definitions used in the per-architecture bootvids (#8547)
In addition:
- simplify the no-op `PrepareForSetPixel()` definitions;
- const-ify immutable data arrays for the VGA PC bootvid.
2026-01-03 14:19:15 +01:00
Hermès Bélusca-Maïto 44e4781600 [BOOTVID] Split common.c into graphics-specific and console (in console.c) parts (#8547)
In addition:
- move back common function prototypes to precomp.h;
- const-ify `VidpFontData` and adjust its usages;
- improve SAL annotations for `InitPaletteWithTable()`;
- rename the (Vid)ResetDisplay() parameter to "SetMode".
2026-01-03 13:42:47 +01:00
Dmitry Borisov c8e1772109 [BOOTVID:PC98][PC98VID] Disable the text layer when setting mode (#8539)
The previous approach was causing the contents of TVRAM to be visible after boot:
https://github.com/user-attachments/assets/df6d2782-4d54-41ab-b4c9-caeb170c4e1e

Fixes a regression introduced in 0fa49018cd.

CORE-17977
2025-12-28 14:40:17 +03:00
Stanislav Motylkov c3f3b2b0ad [BOOTVID:XBOX] Fix MSVC build
Fix two similar warnings, that were treated as errors:
- warning C4146: unary minus operator applied to unsigned type, result still unsigned

Addendum to fa1ec0a2ed. CORE-16216 CORE-16219
2025-12-19 15:56:07 +01:00
Stanislav Motylkov 52e02af86b [BOOTVID] Fix build for ARM port
- Move functions from header to main source, keeping their definitions
- Fix typo DefaultPalette -> VidpDefaultPalette
- Add missing PrepareForSetPixel() function

Addendum to 5f2ca473dc and cd91271796. CORE-17617 CORE-17604
2025-07-02 22:24:46 +02:00
Katayama Hirofumi MZ fe11f7a2e5 [REACTOS] Refresh old URLs (#7632)
URLs are getting old. We have to
update URLs for documentation
purpose.
JIRA issue: CORE-19963
- Refresh old URLs.
- Add " (DEAD_LINK)" labels
  to dead links.
- Use MS Learn links rather
  than MSDN ones.
- Some dead links revived by
  Web Archive.
- Don't change Wine Tests
  and Wine Sync.
- Don't change 3rd party libraries.
- Don't append "redirected" labels.
2025-01-28 13:36:45 +09:00
Hermès Bélusca-Maïto b84f2a1cdc [KDVM] Fix definition of RtlEqualMemory() (#6988)
Comply with the standard documented behaviour:

https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlequalmemory#return-value
> RtlEqualMemory returns TRUE if Source1 and Source2 are equivalent; otherwise, it returns FALSE.

and
https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlcomparememory#return-value
> [...] If all bytes match up to the specified Length value, the Length value is returned.
2024-06-10 22:29:22 +02:00
Hermès Bélusca-Maïto 3b62a89d4d [BOOTVID] Don't NTAPI non-exported functions; remove useless @implemented (#6650) 2024-03-23 15:16:00 +01:00
Hermès Bélusca-Maïto ff790a9111 [BOOTVID] Add file copyright information headers (#6650) 2024-03-23 15:15:41 +01:00
Hermès Bélusca-Maïto 7b956a0a1f [BOOTVID] Fix definition of GetFontPtr(). 2023-12-24 21:41:09 +01:00
Hermès Bélusca-Maïto f8f9c170b1 [KDGDB] Fix GCC build. Addendum to commits b577ac07 and de81021ba.
See also PR #5217.
2023-04-05 03:33:42 +02:00
Hermès Bélusca-Maïto 641c89d834 [KDVBOX] Fix port name comparison. 2023-04-05 03:33:38 +02:00
Hermès Bélusca-Maïto b577ac073e [KDGDB] Fix compilation following commit de81021ba (#4930)
Use cast to be compatible with "public" structure definition.
2022-12-06 00:53:53 +01:00
Jérôme Gardou 6e0d8de013 [KDGDB] Support "int 0x2c" for x86 & amd64 targets 2021-07-05 10:55:47 +02:00
Victor Perevertkin 34593d933b [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
Jérôme Gardou 9930eeca76 [KDGDB] Implement TIB address retrieval 2021-05-11 11:00:49 +02:00
Jérôme Gardou 0ab44664b6 [KDGDB] Remove debugging leftover 2021-04-28 14:52:05 +02:00
Jérôme Gardou 3ee1eb42a5 [KDGDB] Avoid looping for ever when something unexpected happens 2021-04-28 13:10:23 +02:00
Jérôme Gardou 0eea78648c [KDGDB] Adapt to amd64 2021-04-28 13:10:23 +02:00
Jérôme Gardou 10379811c0 [KDGDB] Break and ignore when being prompted. 2021-03-30 17:20:57 +02:00
Jérôme Gardou 00ce9ad42a [CMAKE] Declare KD stub Dlls as kerneldll 2021-03-24 15:20:06 +01:00
Hervé Poussineau 2a6d8465d6 [KDVBOX] Fix compilation with GAS x64 2021-01-28 23:10:01 +01:00
Jérôme Gardou 3acbec4851 [KDGDB] Always use kernel stack to get stack frame 2020-11-09 10:47:05 +01:00
Stanislav Motylkov 2a77e359e4 [XBOX] Move NV2A XGPU definitions into header file
TODO: helper functions should be also moved. CORE-16216
2020-08-26 16:58:01 +03:00
Dmitry Borisov 06cbc2acd2 [BOOTVID] More improvements for PC-98 (#2936)
- Fix failure handling
- Reduce memory mapping that's not needed
2020-07-29 19:10:39 +03:00
Dmitry Borisov e318801c1c [BOOTVID] Fix screen buffer copying code for PC-98 (#2936) 2020-07-29 19:10:39 +03:00
Dmitry Borisov c87be643f8 [BOOTVID] Improve text scrolling performance for PC-98 (#2936) 2020-07-29 19:10:39 +03:00
Dmitry Borisov 5d40981efa [BOOTVID] Fix BitBlt behavior (#2936) 2020-07-29 19:10:38 +03:00
Dmitry Borisov da9384b918 [BOOTVID] Annotate some functions to avoid confusing (#2936)
Also fix some magic constants.
2020-07-29 19:10:38 +03:00
Dmitry Borisov 4d54b8ce69 [BOOTVID] Fix drawing strings on top of the bitmap (#2936)
Also fix VGA pixel drawing.

CORE-15896
2020-07-29 19:10:38 +03:00