1378 Commits
Author SHA1 Message Date
Hervé Poussineau ded9969049 [ATAPI] Correctly register GUID_DEVINTERFACE_STORAGEPORT interface
IoRegisterDeviceInterface() is taking a PDO as argument.
Otherwise, it is failing with STATUS_INVALID_DEVICE_REQUEST.
2026-08-03 22:29:57 +02:00
Timo Kreuzer 9675f756ce [NDK] Fix definition of OB_CLOSE_METHOD 2026-07-28 12:16:32 +00:00
Dmitry Borisov af36fc655d [NVNET] Fix two typos (#9345)
- Fix ETH_IS_EMPTY macro condition (5th octet)
- Add missing assignment of maximum VLAN ID

CORE-15872
2026-07-26 19:52:51 +03:00
Timo Kreuzer ccc242ed6f [ARBITERS][NDIS] Try to fix the repository 2026-07-21 08:52:34 +00:00
708d289dbf [NDIS] Use the PCI standard bus interface for config access (#8452)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <[email protected]>
Co-authored-by: Dmitry Borisov <[email protected]>
2026-07-19 10:33:34 -07:00
Mikhail Tyukin 248aa75023 [WSHTCPIP][TCPIP] Implement SO_KEEPALIVE, SIO_KEEPALIVE_VALS 2026-07-19 15:33:29 +02:00
Alex Mendoza ae50d745ca [USBHUB] USBH_FdoQueryBusRelations: Fix an off by one (#9298)
Fix an out of bounds heap read when compacting the ghost device list.

Change the loop condition from `GhostPort < DeviceRelations->Count` to
`GhostPort < DeviceRelations->Count - 1` so the array shift never reads
past the last valid entry.
2026-07-17 22:48:18 +03:00
Ahmed Arif 63deca5a96 [ACPI][UEFI] Use bootloader-provided ACPI root pointer in OSL (#8980)
Fix ACPI table discovery on the UEFI boot path by teaching the ACPI OSL
to use the loader-provided ACPI root table information instead of relying
only on legacy BIOS RSDP scanning:

- Build a synthetic RSDP from the ACPI BIOS configuration node
  populated by the bootloader
- Fallback to the old scan only if that data is unavailable
- Keep full 64-bit physical addresses when mapping ACPI tables
- Improve failure diagnostics if initialization still fails

This lets ACPICA initialize from the UEFI-provided RSDT/XSDT path.
CORE-11954

So QEMU Q35 on UEFI is now able to discover ACPI tables through the loader-
provided root table path, which fixes 0x7B INACCESSIBLE_BOOT_DEVICE bugcheck:

https://github.com/user-attachments/assets/25d4d9c9-4197-496b-84f9-e5642c65809d
2026-07-09 01:40:17 +03:00
Dmitry Borisov c54a9ca090 [DC21X4] Improve MII link status indication (#9220)
This code should be generic for all MII PHYs so always read the BMSR register twice.
2026-06-28 20:35:01 +02:00
Ahmed Arif 1b91127bbe [FLOPPY] Fix double-free of the interrupt object on init failure (#9225)
AddControllers already disconnects the controller interrupt on its error paths but left InterruptObject pointing at the freed object.

Now that DriverEntry runs Cleanup on failure (and Unload() routes through it too), that stale pointer is handed to IoDisconnectInterrupt a second time, bugchecking with BAD_POOL_HEADER.

Clear InterruptObject right after disconnecting so Cleanup() skips it.

CORE-20669
2026-06-28 10:23:39 -05:00
Ahmed ARIF 9dce9a82e9 [FLOPPY] fix driver unloading 2026-06-25 12:07:57 +00:00
Hervé Poussineau 9e09b5c5b9 [KDSTUB] Implement driver for KDNET extension stubs
CORE-20385
2026-06-15 08:42:50 -07:00
Alex Mendoza f800886dc0 [WDMAUD] WdmAudGetDeviceInterface(): fix memory leak and protect the buffer (#9012)
- Fix memory leak in WdmAudGetDeviceInterface() (FreeItem(Device) was not called on STATUS_BUFFER_OVERFLOW early return path).
- Wrap user-mode buffer write in ProbeForWrite() + SEH2().
2026-05-26 19:35:16 +02:00
Timo Kreuzer 151c67ebfc [ROSTESTS] Implement automatic test discovery
This uses the START_TEST macro to create test entries in a ".test" section in the binary.
2026-05-15 16:50:48 +00:00
Timo Kreuzer b13e568d99 [CMAKE] Remove global _CRT_NON_CONFORMING_SWPRINTFS
Instead define it only in 3rd-party code where required.
Most of these will go away with future wine-syncs.
2026-05-07 06:27:58 +00:00
Timo Kreuzer 1cf31524d5 [REACTOS] Stop using non-conforming swprintf / vswprintf
Use the underscored versions instead.
2026-05-07 06:27:58 +00:00
Oleg Dubinskiy 2ec1f64c96 [HDAUDBUS] Sync to the current upstream
Import the following upstream commits:
https://github.com/coolstar/sklhdaudbus/commit/30a807de7d7934045161afc93f8ef11ac7a73c91
https://github.com/coolstar/sklhdaudbus/commit/76dbc244c36645796df03c53ddc6122e059e2d62
https://github.com/coolstar/sklhdaudbus/commit/afb1d55817a233707344cb47c5f80863685f1d76
https://github.com/coolstar/sklhdaudbus/commit/da286c7824405f3255dc3d97700042f2245f854f
https://github.com/coolstar/sklhdaudbus/commit/5477b93a3b68c474819abf2094a49d0e2d8d9799
which contain new supported devices added in inf file and two bugfixes from me, which fix all playback distortions with all XP-compatible HD audio codecs.
Tested and works fine with Realtek HD audio codec R2.74 on ALC660 controller at least, but it still needs to be tested with other codecs as well (like SigmaTel etc.).
Also update the commit hash in 3rd party files.txt appropriately.
2026-04-27 23:05:40 +02:00
Timo Kreuzer 081a6366df [KSECDD][NTOS][RTL] Change license of some of my code to MIT 2026-04-23 12:39:01 +00:00
Dmitry Borisov e2aa54321a [BOOTVID] Rename some function parameters
Delta       -> Stride
TopDelta -> Height
2026-04-21 15:08:17 -05:00
Dmitry Borisov 7d33f7503b [UNIATA] Disable the driver and enable the new ATA stack
Also fix descriptions for devices 1166:0241 and 1166:0242.
See https://bugzilla.kernel.org/show_bug.cgi?id=10424 and
https://github.com/torvalds/linux/commit/aeb74914ef0e6746f15b11c0399048de9c5c05b8

CORE-17256
2026-04-21 15:01:22 -05:00
Dmitry Borisov ac33647888 [ATAPI] Add ATA storage driver
CORE-17256
CORE-17191
CORE-17716
CORE-17977
CORE-13976
CORE-16216
2026-04-21 15:01:22 -05:00
Dmitry Borisov ae2827f481 [PCIIDEX] Add DMA support
CORE-17256
2026-04-21 15:01:22 -05:00
Dmitry Borisov c741c39025 [ATAPI] Disable the driver 2026-04-21 15:01:22 -05:00
Oleg Dubinskiy 410dd824aa [DRIVERS] Update the name of the new HD audio bus driver
Remove *_new prefix from the new HDAudBus driver, since it's now used by default and the previous (old) one was removed.
[DOC] Update the path of the new HDAudBus driver to the current actual one.
2026-04-02 11:33:07 +02:00
Oleg Dubinskiy b308bcc311 [DRIVERS] Remove old HD audio bus driver
since it's obsolete now and is not used any more.
2026-04-02 11:33:07 +02:00
Justin Miller 20494b84ef [PCIX] PciComputeNewCurrentSettings skip CmResourceSharedDeviceExclusive (#8464) 2026-04-01 09:29:34 +00: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 d436f2e76b [EXT2FS] Fix an uninitialized variable usage RTC failure
Cherry-picking commit
https://github.com/bobranten/Ext4Fsd/commit/3158b917a20019d2fdc3fb84b9ac4ac03af7b862

See https://github.com/bobranten/Ext4Fsd/issues/83 for more information,
and debug traces.

## How to reproduce:

- Format a partition in Ext2 with Paragon Hard Disk Manager 2010 Professional.

- Compile ReactOS with MSVC, ensuring that the driver is compiled with
  `EXT2_HTREE_INDEX` defined and set to 1, and with Run-time error checks
  enabled with the `/RTC1` flag (this is the default in our source tree).

- Install ReactOS on this partition.

## What's being observed:

After reboot, some filesystem paths are accessed, and the code inside the
`#ifdef EXT2_HTREE_INDEX` block is taken (in ext2/src/dirctl.c#L777-L794).
For some reasons, the retrieved `rc` doesn't get the "expected" value and
the `goto errorout;` path is taken. After this label, `FileIndex` was
reset to `ByteOffset`, which remained uninitialized.
A bugcheck ensues because of the failed check (usage of uninitialized variable).
2026-03-18 21:11:35 +01:00
Timo Kreuzer bbce31f601 [UNIATA] Disable GCC 13 misleading-indentation warning
C:/ReactOS/reactos/drivers/storage/ide/uniata/id_init.cpp: In function 'BOOLEAN UniataChipDetectChannels(PVOID, PPCI_COMMON_CONFIG, ULONG, PPORT_CONFIGURATION_INFORMATION)':
C:/ReactOS/reactos/drivers/storage/ide/uniata/id_init.cpp:111:5: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
  111 |     for(i=deviceExtension->AHCI_PI_mask, n=0; i; n++, i=i>>1);
      |     ^~~
In file included from C:/ReactOS/reactos/drivers/storage/ide/uniata/stdafx.h:13,
                 from C:/ReactOS/reactos/drivers/storage/ide/uniata/id_init.cpp:48:
C:/ReactOS/reactos/drivers/storage/ide/uniata/atapi.h:154:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  154 | #define KdPrint2(_x_)  {;}
      |                        ^
C:/ReactOS/reactos/drivers/storage/ide/uniata/id_init.cpp:112:5: note: in expansion of macro 'KdPrint2'
  112 |     KdPrint2((PRINT_PREFIX "mask -> %d chans\n", n));
      |     ^~~~~~~~
2026-03-18 17:29:12 +02:00
Timo Kreuzer aa1cac9d22 [ACPI] Apply consistent indentation (tabs)
Fixes GCC 13 warning about misleading indentation.

C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c: In function 'acpi_evaluate_reference':
C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c:367:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
  367 |     if (buffer.Pointer)
      |     ^~
In file included from C:/ReactOS/reactos/drivers/bus/acpi/acpica/include/acpi.h:70,
                 from C:/ReactOS/reactos/drivers/bus/acpi/precomp.h:6,
                 from C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c:26:
C:/ReactOS/reactos/drivers/bus/acpi/acpica/include/acoutput.h:496:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  496 | #define return_ACPI_STATUS(s)           return(s)
      |                                         ^~~~~~
C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c:370:9: note: in expansion of macro 'return_ACPI_STATUS'
  370 |         return_ACPI_STATUS(status);
      |         ^~~~~~~~~~~~~~~~~~
2026-03-18 17:29:12 +02:00
Timo Kreuzer 3723e5a4dd [EXT2] Disable GCC 13 address-of-packed-member warning
C:/ReactOS/reactos/drivers/filesystems/ext2/src/ext4/ext4_extents.c: In function 'ext4_ext_insert_index':
C:/ReactOS/reactos/drivers/filesystems/ext2/src/ext4/ext4_extents.c:788:22: warning: taking address of packed member of 'struct ext4_extent_header' may result in an unaligned pointer value [-Waddress-of-packed-member]
  788 |         le16_add_cpu(&curp->p_hdr->eh_entries, 1);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
2026-03-18 17:29:12 +02:00
Timo Kreuzer 0e999beea1 [UDFS] Fix GCC 13 warnings about uninitialized variables
Also apply _SEH2_VOLATILE where needed (all variables that are set in the __try block and referenced in the __except or __finally block).
It's hard to tell whether these are false positives, because the code is quite a mess.

C:/ReactOS/reactos/drivers/filesystems/udfs/udfinit.cpp: In function 'NTSTATUS UDFDismountDevice(PUNICODE_STRING)':
C:/ReactOS/reactos/drivers/filesystems/udfs/udfinit.cpp:643:36: error: 'Buffer' is used uninitialized [-Werror=uninitialized]
  643 |     PFILE_FS_ATTRIBUTE_INFORMATION Buffer;
      |                                    ^~~~~~
2026-03-18 17:29:12 +02: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
Eric Kohl 07d30c679e [TCPIP] Read the interface metric from the registry or use the automatic metric feature
- Read the interface metric from the registry.
- Assign an automatic metric to an interface if a registry value is not available.
- Determine the automatic metric from the link speed. The metric for the loopback interface is always 1.
2026-03-14 21:10:56 +01:00
Eric Kohl 606d22d6c0 [TCPIP] Map 127.x.x.x addresses to the loopback address
- Identify 127.x.x.x addresses as on-link addresses.
- Modify the neighbor cache to map all 127.x.x.x addresses to the loopback address (127.0.0.1).
- Create a single entry for all 127.x.x.x addresses instead of one entry per address. This entry belongs to the loopback address.

CORE-7484
2026-03-14 16:01:31 +01:00
Ivan Georgiev a70f59b0dd [DRIVERS] Replace obsolete RtlConvert*ToLargeInteger calls with inline equivalents (#8721)
RtlConvertUlongToLargeInteger and RtlConvertLongToLargeInteger are
obsolete NT routines that assign a 32-bit integer to LARGE_INTEGER.QuadPart.
Replace all driver/DLL usages with inline .QuadPart assignments or
standard C/C++ casts. This removes unnecessary function calls.

CORE-19438
2026-03-14 13:29:02 +03:00
Nguyen Duc Thinh 35d0dfeef7 [PROCESSR][INF] cpu.inf: Add Hardware IDs for modern Intel CPUs (#8716)
Add Hardware IDs for Intel 8th-14th Gen and Core Ultra.
2026-03-09 14:10:58 +01:00
Oleg Dubinskiy 8aed778a96 [HDAUDBUS_NEW] Fix PCI Bus interface version used for WdfFdoQueryForInterface()
Use hardcoded value '1' instead of predefined 'PCI_BUS_INTERFACE_STANDARD_VERSION', as in the current upstream.
Import upstream commit https://github.com/coolstar/sklhdaudbus/commit/4c92e71ef9e91360cb35be6a09aadb2c3eaaca27.
According to the note from CoolStar, that defined value is different on Windows 11, so it causes some problems and '1' should be used instead.
Missed that during the import before.
Addendum to 7c2d923007.
2026-02-23 15:17:38 +01:00
Oleg Dubinskiy bc354746e0 [HDAUDBUS_NEW] Enable building the driver
- Add CMakeLists.txt.
- Fix GCC and MSVC builds.
CORE-15350, CORE-18776
2026-02-16 15:18:26 +01:00