mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[SDK][CMLIB] Declare some BootType and BootRecover identifiers & Miscellaneous Stuff
=== DOCUMENTATION REMARKS === HBOOT_TYPE_REGULAR and HBOOT_TYPE_SELF_HEAL are boot type values set up by the CMLIB library (for the BootType field respectively). HBOOT_TYPE_REGULAR indicates a normal system boot whereas HBOOT_TYPE_SELF_HEAL indicates the system boot is assisted within self healing mode. Whether the former or the latter value is set it's governed by both the kernel and the bootloader. The bootloader and the kernel negotiate together to determine if any of the registry properties (the hive, the base block, the registry base, etc) are so severed from corruption or not. In extreme cases where registry healing is possible, the specific base block of the damaged hive will have its flags marked with HBOOT_TYPE_SELF_HEAL. At this point the boot phase procedure is orchestrated since the boot phase no longer goes on the default path but it's assisted, as I have already said above. HBOOT_NO_BOOT_RECOVER, HBOOT_BOOT_RECOVERED_BY_HIVE_LOG and HBOOT_BOOT_RECOVERED_BY_ALTERNATE_HIVE on the other hand are identifiers for the BootRecover field of the BASE_BLOCK header structure. These are used exclusively by FreeLdr to tell the kernel if the bootloader recovered the SYSTEM hive or not. In case where the bootloader did recover the SYSTEM hive, the kernel will perform a flush request on the dirty data down to disk. The (almost) worse case FreeLdr could not repair the main hive by applying log data, it will load the alternate mirror version of the hive. In addition to that, declare other miscellaneous CMLIB identifiers for log transaction writes purposes.
This commit is contained in:
parent
2cc7eeb939
commit
99fab7b905
1 changed files with 24 additions and 0 deletions
|
@ -44,6 +44,17 @@
|
|||
|
||||
#define HV_LOG_HEADER_SIZE FIELD_OFFSET(HBASE_BLOCK, Reserved2)
|
||||
|
||||
//
|
||||
// Clean Block identifier
|
||||
//
|
||||
#define HV_CLEAN_BLOCK 0U
|
||||
|
||||
//
|
||||
// Hive Log identifiers
|
||||
//
|
||||
#define HV_LOG_DIRTY_BLOCK 0xFF
|
||||
#define HV_LOG_DIRTY_SIGNATURE 0x54524944 // "DIRT"
|
||||
|
||||
//
|
||||
// Hive structure identifiers
|
||||
//
|
||||
|
@ -70,6 +81,19 @@
|
|||
//
|
||||
#define HTYPE_COUNT 2
|
||||
|
||||
//
|
||||
// Hive boot types
|
||||
//
|
||||
#define HBOOT_TYPE_REGULAR 0
|
||||
#define HBOOT_TYPE_SELF_HEAL 4
|
||||
|
||||
//
|
||||
// Hive boot recover types
|
||||
//
|
||||
#define HBOOT_NO_BOOT_RECOVER 0
|
||||
#define HBOOT_BOOT_RECOVERED_BY_HIVE_LOG 1
|
||||
#define HBOOT_BOOT_RECOVERED_BY_ALTERNATE_HIVE 2
|
||||
|
||||
/**
|
||||
* @name HCELL_INDEX
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue