History log of /reactos/sdk/lib/cmlib/cmlib.h (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ad9c634e 18-Apr-2024 Justin Miller <justin.miller@reactos.org>

[SDK] Don't just infinitely spam the DbgPrint in the bootloader (#6763)


Revision tags: 0.4.14-release, 0.4.15-dev, 0.4.14-RC, 0.4.13-release, 0.4.14-dev, 0.4.13-RC, 0.4.12-release
# dd6c1c88 09-Sep-2019 Mark Harmstone <mark@harmstone.com>

[FREELDR] Allow Freeloader to boot Vista revamp of PR #1905 (#6479)

[FREELDR] Add "WindowsVista" boot type
[FREELDR] Set GDT correctly for Vista
[FREELDR] Map first page of memory, this is an observ

[FREELDR] Allow Freeloader to boot Vista revamp of PR #1905 (#6479)

[FREELDR] Add "WindowsVista" boot type
[FREELDR] Set GDT correctly for Vista
[FREELDR] Map first page of memory, this is an observed behavior, and
also increases stability boot Checked windows 2003 SP2 ntoskrnl with
freeloader.
[SDK] Don't assert on big keys in bootloader

Co-authored-by: Justin Miller <justin.miller@reactos.org>

show more ...


# f3141fb2 30-Oct-2023 George Bișoc <george.bisoc@reactos.org>

[NTOS:CM] Implement support for alternate registry hives

Sometimes repairing a broken hive with a hive log does not always guarantee the hive
in question has fully recovered. In worst cases it could

[NTOS:CM] Implement support for alternate registry hives

Sometimes repairing a broken hive with a hive log does not always guarantee the hive
in question has fully recovered. In worst cases it could happen the LOG itself is even
corrupt too and that would certainly lead to a total unbootable system. This is most likely
if the victim hive is the SYSTEM hive.

This can be anyhow solved by the help of a mirror hive, or also called an "alternate hive".
Alternate hives serve the purpose as backup hives for primary hives of which there is still
a risk that is not worth taking. For now only the SYSTEM hive is granted the right to have
a backup alternate hive.

=== NOTE ===

Currently the SYSTEM hive can only base upon the alternate SYSTEM.ALT hive, which means the
corresponding LOG file never gets updated. When time comes the existing code must be adapted
to allow the possibility to use .ALT and .LOG hives simultaneously.

show more ...


# 4db1b0fb 26-Oct-2022 George Bișoc <george.bisoc@reactos.org>

[SDK][CMLIB] Purge volatile data of registry in a proper way with CmCheckRegistry

Thanks to CmCheckRegistry, the function can perform volatile data purging upon boot which this removes old hacky CmP

[SDK][CMLIB] Purge volatile data of registry in a proper way with CmCheckRegistry

Thanks to CmCheckRegistry, the function can perform volatile data purging upon boot which this removes old hacky CmPrepareHive code. This also slightly refactors HvInitialize making it more proper.

show more ...


# cc63d8f4 26-Oct-2022 George Bișoc <george.bisoc@reactos.org>

[SDK][CMLIB] Implement log transaction writes & Resuscitation

=== DOCUMENTATION REMARKS ===

This implements (also enables some parts of code been decayed for years) the transacted writing of the re

[SDK][CMLIB] Implement log transaction writes & Resuscitation

=== DOCUMENTATION REMARKS ===

This implements (also enables some parts of code been decayed for years) the transacted writing of the registry. Transacted writing (or writing into registry in a transactional way) is an operation that ensures the successfulness can be achieved by monitoring two main points.
In CMLIB, such points are what we internally call them the primary and secondary sequences. A sequence is a numeric field that is incremented each time a writing operation (namely done with the FileWrite function and such) has successfully completed.

The primary sequence is incremented to suggest that the initial work of syncing the registry is in progress. During this phase, the base block header is written into the primary hive file and registry data is being written to said file in form of blocks. Afterwards the seconady sequence
is increment to report completion of the transactional writing of the registry. This operation occurs in HvpWriteHive function (invoked by HvSyncHive for syncing). If the transactional writing fails or if the lazy flushing of the registry fails, LOG files come into play.

Like HvpWriteHive, LOGs are updated by the HvpWriteLog which writes dirty data (base block header included) to the LOG themselves. These files serve for recovery and emergency purposes in case the primary machine hive has been damaged due to previous forced interruption of writing stuff into
the registry hive. With specific recovery algorithms, the data that's been gathered from a LOG will be applied to the primary hive, salvaging it. But if a LOG file is corrupt as well, then the system will perform resuscitation techniques by reconstructing the base block header to reasonable values,
reset the registry signature and whatnot.

This work is an inspiration from PR #3932 by mrmks04 (aka Max Korostil). I have continued his work by doing some more tweaks and whatnot. In addition to that, the whole transaction writing code is documented.

=== IMPORTANT NOTES ===

HvpWriteLog -- Currently this function lacks the ability to grow the log file size since we pretty much lack the necessary code that deals with hive shrinking and log shrinking/growing as well. This part is not super critical for us so this shall be left as a TODO for future.

HvLoadHive -- Currently there's a hack that prevents us from refactoring this function in a proper way. That is, we should not be reading the whole and prepare the hive storage using HvpInitializeMemoryHive which is strictly used for HINIT_MEMORY but rather we must read the hive file block by block
and deconstruct the read buffer from the file so that we can get the bins that we read from the file. With the hive bins we got the hive storage will be prepared based on such bins. If one of the bins is corrupt, self healing is applied in such scenario.

For this matter, if in any case the hive we'll be reading is corrupt we could potentially read corrupt data and lead the system into failure. So we have to perform header and data recovery as well before reading the whole hive.

show more ...


# f33da480 26-Oct-2022 George Bișoc <george.bisoc@reactos.org>

[SDK][CMLIB] Implement CmCheckRegistry and validation private helpers

CmCheckRegistry is a function that provides the necessary validation checks for a registry hive. This function usually comes int

[SDK][CMLIB] Implement CmCheckRegistry and validation private helpers

CmCheckRegistry is a function that provides the necessary validation checks for a registry hive. This function usually comes into action when logs have been replayed for example, or when a registry hive internals have changed such as when saving a key, loading a key, etc.

This commit implements the whole Check Registry infrastructure (cmcheck.c) in CMLIB library for ease of usage and wide accessibility across parts of the OS. In addition, two more functions for registry checks are also implemented -- HvValidateHive and HvValidateBin.

Instead of having the CmCheckRegistry implementation in the kernel, it's better to have it in the Configuration Manager library instead (aka CMLIB). The benefits of having it in the library are the following:

- CmCheckRegistry can be used in FreeLdr to fix the SYSTEM hive
- It can be used on-demand in the kernel
- It can be used for offline registry repair tools
- It makes the underlying CmCheckRegistry implementation code debug-able in user mode

CORE-9195
CORE-6762

show more ...


# 54c55239 26-Oct-2022 George Bișoc <george.bisoc@reactos.org>

[SDK][CMLIB] Implement self-heal registry helpers

This implements cmheal.c file which provides the basic registry self-heal infrastructure needed by the public CmCheckRegistry function. The infrastr

[SDK][CMLIB] Implement self-heal registry helpers

This implements cmheal.c file which provides the basic registry self-heal infrastructure needed by the public CmCheckRegistry function. The infrastructure provides a range of various self-heal helpers for the hive, such as subkey, class, values and node healing functions.

show more ...


# 586bea13 26-Oct-2022 George Bișoc <george.bisoc@reactos.org>

[CMLIB] Add STATUS_INVALID_PARAMETER and STATUS_REGISTRY_IO_FAILED status codes

Add these NTSTATUS codes in the CMLIB library. STATUS_INVALID_PARAMETER will be used mostly for HvInitialize function,

[CMLIB] Add STATUS_INVALID_PARAMETER and STATUS_REGISTRY_IO_FAILED status codes

Add these NTSTATUS codes in the CMLIB library. STATUS_INVALID_PARAMETER will be used mostly for HvInitialize function, STATUS_REGISTRY_IO_FAILED for whatever routines that deal with reading or writing into a hive file.

show more ...


# 2881b773 17-Jul-2022 Timo Kreuzer <timo.kreuzer@reactos.org>

[CMLIB] Don't redefine PAGED_CODE() to nothing in cmlib.h except for cmlib_host

This header is included by ntoskrnl which effectively disabled all PAGED_CODE checks since 2015. Thanks Alex.
Instead

[CMLIB] Don't redefine PAGED_CODE() to nothing in cmlib.h except for cmlib_host

This header is included by ntoskrnl which effectively disabled all PAGED_CODE checks since 2015. Thanks Alex.
Instead define _BLDR_ when building cmlib, which will avoid trying to import KeGetCurrentIrql()

show more ...


# 54a00aa8 10-Jul-2022 George Bișoc <fraizeraust99@gmail.com>

[CMLIB][NTOS:CM] Deduplicate other common definitions between CMLIB and the NTOS CM

Addendum to commit 8c2454e (r70605). Credits and courtesy go to Hermès BÉLUSCA - MAÏTO.

CORE-10802 CORE-10793


# d8738659 26-Mar-2022 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[SDK:CMLIB] Const-ify the unicode strings that are only used as input and not modified.


# 8ccd435e 27-Mar-2022 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[SDK:CMLIB] HvGetCell is a macro calling the hive's GetCellRoutine callback.

In principle there should be different get-cell routines, depending
on the type of the hive (given by the OperationType p

[SDK:CMLIB] HvGetCell is a macro calling the hive's GetCellRoutine callback.

In principle there should be different get-cell routines, depending
on the type of the hive (given by the OperationType parameter of
HvInitialize): for flat hives, memory-mapped hives, etc.
For now in ReactOS we only support a restricted subset of these,
therefore we are still happy with a single get-cell callback...
This may change in the future.

show more ...


# 9d3c3a75 20-Mar-2022 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[SDK:REACTOS][CMLIB][BOOT] Get rid of the FreeLdr-specific __FREELDR_H define, and use the standard NT _BLDR_ instead.

This standard _BLDR_ define is already defined for both FreeLdr and
boot/enviro

[SDK:REACTOS][CMLIB][BOOT] Get rid of the FreeLdr-specific __FREELDR_H define, and use the standard NT _BLDR_ instead.

This standard _BLDR_ define is already defined for both FreeLdr and
boot/environ UEFI bootloader lib, so no actual behavioural changes
should occur.

show more ...


# d6002f94 24-May-2021 Serge Gautherie <reactos-git_serge_171003@gautherie.fr>

[CMLIB] arm64: Define PAGE_SIZE

CORE-17518


# 3051eb0e 06-Jun-2020 Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com>

[NTOSKRNL] Add 'DECLSPEC_NORETURN' to a few 'KeBugCheck*()' (#2896)


Revision tags: 0.4.12-RC, 0.4.13-dev, 0.4.11-release, 0.4.11-RC, 0.4.12-dev, 0.4.10-release
# bf8a7d2d 13-Oct-2018 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[CMLIB] Adjust parameter types and annotations. Add diagnostic assertions.


Revision tags: 0.4.11-dev, 0.4.10-RC, 0.4.9-release
# 7d6bda16 04-Jul-2018 Serge Gautherie <reactos-git_serge_171003@gautherie.fr>

[REACTOS] Improve how some ASSERTMSG() message values are printed: enforce ending "\n".

NB: Not touching calls in "third-party" code: class and classpnp.


Revision tags: 0.4.10-dev, 0.4.9-RC, 0.4.8-release, 0.4.8-RC, 0.4.9-dev, 0.4.7-release, v0.4.7, 0.4.8-dev, 0.4.7-rc1
# c2c66aff 03-Oct-2017 Colin Finck <colin@reactos.org>

Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.


Revision tags: backups/GSoC_2017/rapps@75905, ReactOS-0.4.6, backups/ros-branch-0_4_6@75728, 0.4.7-dev, ReactOS-0.4.5, backups/ros-branch-0_4_5@74569, ReactOS-0.4.4-CLT2017, backups/ReactOS-0.4.4-CLT2017@74182, ReactOS-0.4.4, backups/ros-branch-0_4_4@74002, ReactOS-0.4.4-FOSDEM2017, backups/ReactOS-0.4.4-FOSDEM2017@73667, ReactOS-0.4.3, backups/ros-branch-0_4_3@73437, backups/sndblst@72664, ReactOS-0.4.2, backups/ros-branch-0_4_2@73087, ReactOS-0.4.1, backups/ros-branch-0_4_1@71718
# 321bcc05 24-Apr-2016 Pierre Schweitzer <pierre@reactos.org>

Create the AHCI branch for Aman's work

svn path=/branches/GSoC_2016/AHCI/; revision=71203