This driver works as complement to disk.sys/classpnp.sys from Windows 10
Manages partition PDOs and exposes them as volumes to mountmgr.sys.
The driver is almost complete, just some minor IOCTLs missing (will be
added on demand)
- ReparseFile was concatenated with itself, instead of ReparseIndex
- Meanwhile, use RtlAppendUnicodeStringToString for concatenating
strings instead of raw memory operations
This function may stuck during device installation if there are issues
with interrupts (or with a device itself).
This fixes the boot on my testing ThinkPad x60s
- Change INIT_FUNCTION and INIT_SECTION to CODE_SEG("INIT") and DATA_SEG("INIT") respectively
- Remove INIT_FUNCTION from function prototypes
- Remove alloc_text pragma calls as they are not needed anymore
This avoids blocking all Ex worker threads in fastfat, thereby making Cc
unable to issue the lazy writes that would unblock those workers.
This is more or less directly taken from fastfat_new.
in favor of add_compile_options and the like with generator expressions
Also take this as an opportunity to remove the C++11 standard hack, GCC 8 now defaults to C++14
Instead of messing with global variables and the like, we introduce two target properties:
- WITH_CXX_EXCEPTIONS: if you want to use C++ exceptions
- WITH_CXX_RTTI: if you need RTTI in your module
You can use the newly introduced set_target_cpp_properties function, with WITH_EXCEPTIONS and WITH_RTTI arguments
We also introduce two libraries :
- cpprt: for C++ runtime routines
- cppstl: for the C++ standard template library
NB: On GCC, this requires to create imported libraries with the related built-in libraries:libsupc++, limingwex, libstdc++
Finally, we manage the relevant flags with the ad-hoc generator expressions
So, if you don't need exceptions, nor RTTI, nor use any runtime at all: you simply have nothing else to do than add your C++ file to your module
Cc may decide to process deferred writes any time, so the context might
already be freed by the time we return from CcDeferWrite.
Also mark the IRP as pending, since we're going to return STATUS_PENDING.
The source code is licensed under MS-PL license, taken from Windows Driver Samples
repository (microsoft/Windows-driver-samples@master/storage/class/cdrom/)
Synched with commit 96eb96dfb613e4c745db6bd1f53a92fe7e2290fc
The driver is written for Windows 10 and uses KMDF so we compile it with ntoskrnl_vista
and wdf01000 statically linked (for wdf01000 this will likely be changed in future)
CORE-17129
It adds basic input support for:
- Standard Bus Mouse
- Standard InPort Mouse
- Logitech Bus Mouse
- Microsoft Bus Mouse
- Microsoft InPort Mouse
- NEC PC-98 Bus Mouse
Untested on PC/AT, but should work.
Replace call to AllocatedBufferSize(), with BufferSize().
Indeed (quoting https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/portcls/nf-portcls-idmachannel-buffersize ):
> The BufferSize() method returns the buffer size that was set by the previous call to IDmaChannel::SetBufferSize(). If SetBufferSize() has not been called since the IDmaChannel::AllocateBuffer() call, BufferSize returns the allocated buffer size. The DMA-channel object does not actually use this value internally. This value is maintained by the object to **allow its various clients to communicate the intended size of the buffer**.
And this is exactly what we want to do.
The source code is licensed under MS-PL license, taken from Windows Driver Samples
repository (https://github.com/microsoft/Windows-driver-samples/tree/master/storage/class/disk/)
Synched with commit 3428c5feaac7c1a5e2a09db0ed93392f7568f9e6
The driver is written for Windows 8+, so we compile it with ntoskrnl_vista
statically linked and with NTDDI_WIN8 defined
CORE-17129
The source code is licensed under MS-PL license, taken from Windows Driver Samples
repository (https://github.com/microsoft/Windows-driver-samples/tree/master/storage/class/classpnp/)
Synched with commit 88541f70c4273ecd30c8c7c72135bc038a00fd88
The driver is written for Windows 8+, so we compile it with ntoskrnl_vista
statically linked and with NTDDI_WIN8 defined
CORE-17129
'...\write.c(38): error C2373: 'RfsdFloppyFlush': redefinition; different type modifiers'
'...\write.c(45): error C2373: 'RfsdFloppyFlushDpc': redefinition; different type modifiers'
It started to spam when more components of the MountMgr
were coded during 0.4.14dev.
According to Victor Perevertkin it is not crucial for us
to see it, as those are 'optional MountMgr features'.
Imho this points towards unimplemented stuff.
No official ros release has been affected, because I did
revert most of the new MountMgr features for 0.4.14release
earlier.
Some places have been changed to return FILE_DOES_NOT_EXIST, everything
else just returns 0. FastFAT driver from MS does the same (tm),
so I'm not going to have a big research here.
CORE-16623
Co-authored-by: Suraj K Suresh <kssuraj15@gmail.com>
We must not do anything on PDO removal, especially not deleting it.
We are allowed to delete it, only once we successfully completed a IRP_MN_QUERY_DEVICE_RELATIONS without with PDO.
JIRA-user "Illen" reported booting from his Z170 controller worked up to
0.4.12-dev-936-g89aaf0e
and would refuse booting - beginning with uniata commit
0.4.12-dev-937-g
b546130731
For sure this workaround is just a temporary and no proper solution,
but was confirmed to be working by "Illen".
We have no clear understanding of the real bug yet.
Can be replaced by something better at any time.
It was already committed into 0.4.12, 0.4.13, 0.4.14.
We never had an affected release therefore.
Since no one took care of this bug ever,
the workaround will now be committed to master as well.
cherry picked from commit 0.4.13-RC-9-g
11178f38e4
- Add boot video color constants
- Refactor palette initialization
- Move some common stuff in right place
- Get rid of some magic constants and hardcoded values
- Get rid of TopDelta variable (calculated at compile time)
- Update SAL annotations
Addendum to 5f2ca473. CORE-16216 CORE-16219
According to PC-9801 Bible p. 50, divisor for PIT will become unsupported in some cases after having removed the fractional part. Replace 19200 value with 9600 which is supported by both 10 MHz and 8 MHz machines.
When gdb receives a fault, it converts it to "signal", and send "C"
command to server to transfer the signal it couldn't handle.
On ReactOS (and Windows ?) side, we tell KD API that we continue with an
error code, so the exception handler can be called.
This is useful when playing with gflags, especially +soe, with KDGDB.
In ACPI resource descriptors, alternatives are marked with
StartDependent tags. Only the last set is terminated with EndDependent.
Therefore, since we only return the first alternative list for now,
ignore the first StartDependent tag and terminate enumeration at the second.
In the future we will need to build the full set of alternative lists here,
which will also make the unit test succeed fully.
This should fix random resource conflicts and make COM ports usable.
IoCreateDevice() was called too early, when a spinlock was acquired.
Create ISAPNP_LOGICAL_DEVICE structure when a device is detected, and call IoCreateDevice() later, when required.
The DbgBreakPoint() was reported to be continuable without
obvious side-effects by Doug Lyons.
Thank you for your tests Doug.
To prevent what end-users may otherwise perceive as a
freeze-regression caused by enabling the new driver in
0.4.13-dev-1048-g
6392c5a78c
Also convert all sizes and positions of CONSOLE_DRAW to USHORT since
this is the standard type for all console buffer positions & sizes
(minimum value 0, maximum value 0xFFFF == 65535).
Addendum fixes to ca370b49 (r52239) and a965ca6b (r52409).
- Fix the comments to explain what is really happening.
- Fix the boundary calculations in VidDisplayString() so that we can
correctly display a character in the very last column before going
to the next line, and fix similarly the vertical boundary calculation.
- Port the fixes to the ARM code.
CORE-15901
This fixes display reset transition when an external module acquired
INBV ownership and then released it, similarly to what was done in
commit 0ad65796 for VIDEOPRT.
For this a backup screenbuffer is used to store the contents of the
screen just before an INBV screen acquire transition, and these contents
are restored when it is detected that INBV ownership has been released.
Also, the active text font associated with the active console code-page
is restored, as well as the cursor state and shape.
In addition, any user of BLUE.SYS is now required to explicitly issue
a new IOCTL_CONSOLE_RESET_SCREEN to either enable or disable the screen.
This allows avoiding nasty unwanted screen mode switches when a handle
to the \Device\BlueScreen device is opened but no screen mode switch was
actually wanted - This "fixes" this annoyance on ReactOS and Windows,
when these are running witha VGA-compatible video driver and one wants
to look at properties of the \Device\BlueScreen device using
Sysinternals' WinObj.
Following this, we don't need to check anymore for explicit INBV
ownership by issuing calls to InbvCheckDisplayOwnership(), but instead
we check whether the screen has beeen manually enabled using the
aforementioned IOCTL. This partly supersedes commit 8b553a4b, and allows
fixing the second bug, namely that if we start ReactOS without the
/NOGUIBOOT option (and thus, INBV is active during boot), USETUP would
not show up anything because BLUE.SYS wouldn't display anything on screen.
See CORE-15901.
[USETUP][CONSRV] Call IOCTL_CONSOLE_RESET_SCREEN to tell BlueScreen device to enable the screen.