Skip to content

Commit 2b71c73

Browse files
committed
[ROSLOAD] Enable registry healing code for x64
1 parent e56911f commit 2b71c73

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

boot/freeldr/freeldr/ntldr/registry.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,7 @@ RegInitializeHive(
9999
_In_ BOOLEAN LoadAlternate)
100100
{
101101
NTSTATUS Status;
102-
/*
103-
* FIXME: Disable compilation of some parts of code for AMD64 for now,
104-
* since it makes the FreeLdr binary size so large that it prevents
105-
* x64 ROS from booting.
106-
*/
107-
#if !defined(_M_AMD64)
108102
CM_CHECK_REGISTRY_STATUS CmStatusCode;
109-
#endif
110103

111104
/* Initialize the hive */
112105
Status = HvInitialize(GET_HHIVE(CmHive),
@@ -128,22 +121,17 @@ RegInitializeHive(
128121
return FALSE;
129122
}
130123

131-
/* FIXME: See the comment above */
132-
#if !defined(_M_AMD64)
133124
/* Now check the hive and purge volatile data */
134125
CmStatusCode = CmCheckRegistry(CmHive, CM_CHECK_REGISTRY_BOOTLOADER_PURGE_VOLATILES | CM_CHECK_REGISTRY_VALIDATE_HIVE);
135126
if (!CM_CHECK_REGISTRY_SUCCESS(CmStatusCode))
136127
{
137128
ERR("CmCheckRegistry detected problems with the loaded flat hive (check code %lu)\n", CmStatusCode);
138129
return FALSE;
139130
}
140-
#endif
141131

142132
return TRUE;
143133
}
144134

145-
/* FIXME: See the comment above */
146-
#if !defined(_M_AMD64)
147135
/**
148136
* @brief
149137
* Loads and reads a hive log at specified
@@ -418,7 +406,6 @@ RegRecoverDataHive(
418406
HiveBaseBlock->CheckSum = HvpHiveHeaderChecksum(HiveBaseBlock);
419407
return TRUE;
420408
}
421-
#endif
422409

423410
/**
424411
* @brief
@@ -464,14 +451,6 @@ RegImportBinaryHive(
464451
CmSystemHive = FrLdrTempAlloc(sizeof(CMHIVE), 'eviH');
465452
Success = RegInitializeHive(CmSystemHive, ChunkBase, LoadAlternate);
466453
if (!Success)
467-
/* FIXME: See the comment above */
468-
#if defined(_M_AMD64)
469-
{
470-
ERR("Corrupted hive %p!\n", ChunkBase);
471-
FrLdrTempFree(CmSystemHive, 'eviH');
472-
return FALSE;
473-
}
474-
#else
475454
{
476455
/* Free the buffer and retry again */
477456
FrLdrTempFree(CmSystemHive, 'eviH');
@@ -505,7 +484,6 @@ RegImportBinaryHive(
505484
*/
506485
((PHBASE_BLOCK)ChunkBase)->BootRecover = HBOOT_BOOT_RECOVERED_BY_HIVE_LOG;
507486
}
508-
#endif
509487

510488
/* Save the root key node */
511489
SystemHive = GET_HHIVE(CmSystemHive);

0 commit comments

Comments
 (0)