Supplement to commit f09f448d95 (r57263), CORE-6491
## Problem description:
The support for unloading registry hives using the `NtUnloadKey2()` and
`CmUnloadKey()` functions has been introduced in commit 3507ef2ac6 (r68295),
CORE-3094.
It also brought the first usage of the `CmpRemoveFromHiveFileList()` routine,
previously implemented in commit f09f448d95 (r57263), in order to remove the
registry value associated to a registry hive, listed under the registry key
`HKLM\SYSTEM\CurrentControlSet\Control\hivelist`, added by a previous
`CmpAddToHiveFileList()` invocation when the hive was initially mounted.
The problem was that in `CmUnloadKey()`, the `CmpRemoveFromHiveFileList()`
routine was invoked *AFTER* a successful call to `CmpUnlinkFromMasterHive()`.
Because of this, the routine was looking at an alread invalidated `LinkData`
hive node. In doing so, the `LinkName` it deduced, and the hive path it
constructed to lookup into the `hivelist` registry key, could become invalid:
either from the name data being read, or, because the `KeyNode.Flags` value
became invalid, invalidating the `KEY_COMP_NAME` flag for example, thus
affecting the readability of the key name.
In ReactOS, the problem almost never showed up, except during its 1st-stage
installation, where the target `SOFTWARE` hive, mounted as:
`\Registry\Machine\USetup_Software`, remained listed in the `hivelist`
registry key, while the hive itself was already perfectly unloaded.
As it turned out, the `SOFTWARE` mount link key was already invalidated,
and the `USetup_Software` name was read incorrectly, and the code was
generating an invalid hive path string to be looked up.
Note that invoking `CmpRemoveFromHiveFileList()` *AFTER* a successful
`CmpUnlinkFromMasterHive()`, is an action similar to what is done in
Windows 2003 SP1 and later; however, this would have required reconstructing
the hive's path just before unlinking it. (On Windows 2003 RTM and before,
`CmpRemoveFromHiveFileList()` is invoked *BEFORE* `CmpUnlinkFromMasterHive()`
in symmetry to what is done in the hive linking process. This has been
changed on SP1+ so as to keep the hive linking information in the registry
up until the hive unlinking has been successfully done.)
## Problem resolution:
To resolve this issue, instead of reconstructing the hive path just before
unlinking the hive, as done in Windows 2003 SP1 and SP2 (and removing it from
the hive list later), we adopt an approach _similar_ to that of Vista+, by
caching the hive path string initially constructed by `CmpAddToHiveFileList()`
in the `CMHIVE` structure into a new `HiveRootPath` member.
The `CMHIVE::HiveRootPath` member is absent in Windows 2003,
https://www.vergiliusproject.com/kernels/x86/server-2003/sp2/_CMHIVE
and is introduced with Windows Vista RTM,
https://www.vergiliusproject.com/kernels/x86/windows-vista/rtm/_CMHIVE
- SAL2-annotate the functions.
- `HiveListValueName` --> `HiveListKeyName`, since it is a
registry key name. And make it static to this file.
- Make `CmpGetHiveName()` local to that file as well, since
it is not used anywhere else.
Needed in order for arbiter to note\ insta-break things on legacy HAL.
This is PURELY for legacy machines booting without MPS, which we dont support MPS anyway so this is how legacy HAL is going to boot at all for the time being
This commit implements SetSearchPathMode based on official documentations from Microsoft and Wine tests.
This is different from #3665 since it updates SearchPathW to use the configured Search Path Mode, while the older PR only introduces SetSearchPathMode with desired outputs per input. Also improves thread safety.
CORE-17586
I did notice our PCIX hack flags seem to be compatible with what windows is trying to do, I've kept that. Though I'm only really checking against modern windows here. I may reduce our flag list later, also i noticed our usage of them was a bit off in how we decode some information; This broke VGA for months in my development of this driver.
* [PCIX] Refuse to disable decodes for the devices Windows keeps decoding
* [PCIX] Let a 64-bit BAR be placed above 4GB
* [XDK] Enable the MemIo vista+ APIs we're really need
* [PCIX] Build a BAR requirement from named bounds
* [PCIX] Treat a BAR that implements no address bits as absent
Request a full non-client repaint after frame geometry changes to fix
stale or missing caption buttons.
Fixes regression introduced in b38db9dd23 (#9126).
CORE-5877 CORE-16672 CORE-20769
Collect the WM_NCPAINT regions a window is given when it gets maximized
and then restored, and check that no part of the non-client frame
was left out of them.
This covers a regression for non-client repaint regions. CORE-20769
A raw MSI descriptor stores the message count where a line interrupt keeps its level, so print the vector instead. Label message interrupts as PCI.
it's a bit messy since we dont globally expose the resource entries. but it'll work. I made it clear what was going on in the comment
Create a new HAL module for x2APIC support, starting with its private
header! x2APIC and xAPIC are sadly not register compatible, so this lives
as its own module instead of extending the existing APIC.
This adds the following:
- MSR base/offset defines,
- the x2APIC `APIC_BASE_ADDRESS_REGISTER` and
`APIC_INTERRUPT_COMMAND_REGISTER` layouts
- MSR based register access helpers,
- and declarations for `X2ApicIsSupported`/`X2ApicEnable`
(they will be implemented in another PR)
The new arch/hwpci.c file is to be included in compilation of any
FreeLdr port for platforms that are known to have PCI buses.
Will be used for PCI bus detection on UEFI, see PR #9374.
+ Update the source file headers.
Introduces ECAM support into PCIX, also fixes a small bug I found while using it.
introduced an AMD k8 work around.
I know we should have some kind of compatibility thing like errata, but we don't have a good way to do that yet. and I like being able to boot.
Not like we're the first to do this either:
torvalds/linux@d6ece54
Fix a small registry bug too.
Add manifest to comdlg32 which I forgot to add in PR #8821 (9699568b70). Fixes "err:dlg32.c:81 failed to create activation context, last error 1814" spam in testbots. An example of this can be seen at https://reactos.org/testman/detail.php?id=92118306&prev=0
This currently does not affect anything else as comctl32 uses theming for v5.
JIRA issue: CORE-20586
- Use `target_include_directories()` in the libraries' CMakeLists.txt for
exposing their include path to their users, so that these library users
do not have to manually add these paths to their own CMakeLists.txt.
- For dynamic library (DLL) modules, this also takes the advantage of the
inherited interface include directories for their associated import and
delay-import libraries.
Libraries:
LIBJPEG, LIBPNG, LIBTIFF, LIBTIRPC, LIBXSLT, MBEDTLS.
- Use `target_include_directories()` in the libraries' CMakeLists.txt for
exposing their include path to their users, so that these library users
do not have to manually add these paths to their own CMakeLists.txt.
- Explicitly specify `STATIC` in `add_library()` for static libraries.
- Use MODULE instead of SHARED for the DLL. See commit 23373acbb9 for more details.
- NTOS kernel uses the arbiter and cmlib libraries.
- Explicitly add sdk/lib/rtl to the include directories
for avlsupp.c inclusion in mm/ARM3/vadnode.c
User-mode:
- DNSAPI uses the adns library.
- CONSOLE.CPL uses the concfg library.
- DISKPART, PING use the conutils library.
- ADVAPI32 uses the cryptlib library.
- EVENTLOG uses the evtlib library.
- NTVDM uses the fast486 library.
- HID uses the hidparser_um library.
- WINEMP3.ACM uses the libmpg123 library.
- OPENGL32 uses the mesa library.
- LOCALSPL uses the skiplist library.
- IPHLPAPI, WSHTCPIP use the tdilib library.
- TIMEDATE.CPL, SYSSETUP use the tzlib library.
- DRWTSN32, DXDIAG, SYSDM.CPL, SYSTEMINFO use the udmihelp library.
- CABINET, VFDLIB, dbghelp_apitest use the zlib library.
Drivers:
- PCIX uses the arbiter library.
- KSECDD uses the cryptlib library.
- I8042PRT uses the dmilib library.
- FTFD uses the freetype library.
- HIDPARSE uses the hidparser_km library.
- ATAPI, SCSIPORT, STORPORT, USBSTOR use the sptilib library.
- NETKVM uses the virtio library.
- BTRFS uses the zlib library.
Sound:
- backpln/audio_test use the libsamplerate library.
- KMIXER, mmixer_test, WDMAUD, WDMAUD.DRV use the libsamplerate and mmixer libraries.
- Use `target_include_directories()` in the libraries' CMakeLists.txt for
exposing their include path to their users, so that these library users
do not have to manually add these paths to their own CMakeLists.txt.
- Explicitly specify `STATIC` in `add_library()` for static libraries.
Libraries:
- dll/opengl: MESA
- sdk/lib/3rdparty: ADNS, LIBICONV, LIBMPG123, LIBSAMPLERATE, LIBXML2
- sdk/lib/drivers: ARBITER, HIDPARSER, MMIXER, SPTILIB, VIRTIO
- sdk/lib: CRYPTLIB, DMILIB, EVTLIB, INFLIB, SKIPLIST, TDILIB, TZLIB, UDMIHELP
- win32ss/user/winsrv: CONCFG
- Use `target_include_directories()` in the libraries' CMakeLists.txt for
exposing their include path to their users, so that these library users
do not have to manually add these paths to their own CMakeLists.txt.
- Explicitly specify `STATIC` in `add_library()` for static libraries.
- Use `target_include_directories()` in the libraries' CMakeLists.txt for
exposing their include path to their users, so that these library users
do not have to manually add these paths to their own CMakeLists.txt.
- Explicitly specify `STATIC` in `add_library()` for static libraries.
- Specify fast486 library inclusion only for the "components"
sub-libraries that use it (lib_hal_generic, lib_hal_pc98,
and lib_hal_xbox), using `target_link_libraries()`.
- In order for the dependencies (and the include directories)
of the linked fast486 library to propagate up to the main HAL
module linkage, don't add the "components" sub-libraries object
libraries to the main HAL build target via `$<TARGET_OBJECTS:...>`,
but instead via `target_link_libraries()`.
This supplements the changes for the HAL made in commit 49286a6225
(PR #3431).
- Remove unnecessary gcc library linking.
- Use `target_include_directories()` in the libraries' CMakeLists.txt for
exposing their include path to their users, so that these library users
do not have to manually add these paths to their own CMakeLists.txt.
- Explicitly specify `STATIC` in `add_library()` for static libraries.