Reactos

[NTOS:CM] Implement Win7+ VolatileBoot support.

Its support is controlled with a REG_DWORD value named
`VolatileBoot` inside the registry key
`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager` .

Its implementation is very trivial: when enabled, CmpShareSystemHives
is set to TRUE and doesn't change state during runtime.
In a sense this is similar to what happens in WinPE-boot, except that
ALL hives without exception (system hives and others) will be loaded
in shared mode.

+15 -1
+9
ntoskrnl/config/cmdata.c
··· 54 54 55 55 UNICODE_STRING CmpLoadOptions; 56 56 57 + /* TRUE if all hives must be loaded in shared mode */ 58 + ULONG CmpVolatileBoot; 57 59 /* TRUE if the system hives must be loaded in shared mode */ 58 60 BOOLEAN CmpShareSystemHives; 59 61 /* TRUE when the registry is in PE mode */ ··· 670 672 L"Session Manager\\Configuration Manager", 671 673 L"SelfHealingEnabled", 672 674 &CmSelfHeal, 675 + NULL, 676 + NULL 677 + }, 678 + { 679 + L"Session Manager\\Configuration Manager", 680 + L"VolatileBoot", 681 + &CmpVolatileBoot, 673 682 NULL, 674 683 NULL 675 684 },
+5 -1
ntoskrnl/config/cmsysini.c
··· 1164 1164 return FALSE; 1165 1165 } 1166 1166 1167 - /* Completely sucessful */ 1167 + /* Completely successful */ 1168 1168 return TRUE; 1169 1169 } 1170 1170 ··· 1635 1635 CmpMiniNTBoot = TRUE; 1636 1636 CmpShareSystemHives = TRUE; 1637 1637 } 1638 + /* If we are in volatile boot mode, ALL hives without exception 1639 + * (system hives and others) will be loaded in shared mode */ 1640 + if (CmpVolatileBoot) 1641 + CmpShareSystemHives = TRUE; 1638 1642 1639 1643 /* Initialize the hive list and lock */ 1640 1644 InitializeListHead(&CmpHiveListHead);
+1
ntoskrnl/include/internal/cm.h
··· 1420 1420 extern ULONG CmpTraceLevel; 1421 1421 extern BOOLEAN CmpSpecialBootCondition; 1422 1422 extern BOOLEAN CmpFlushOnLockRelease; 1423 + extern ULONG CmpVolatileBoot; 1423 1424 extern BOOLEAN CmpShareSystemHives; 1424 1425 extern BOOLEAN CmpMiniNTBoot; 1425 1426 extern BOOLEAN CmpNoVolatileCreates;