[ros-diffs] [sir_richard] 49754: [FREELDR]: Use PaToVa to set the Hive and NLS data pointers, instead of assuming that KSEG0_BASE | Pa is the correct answer for all architectures.

sir_richard at svn.reactos.org sir_richard at svn.reactos.org
Tue Nov 23 17:26:31 UTC 2010


Author: sir_richard
Date: Tue Nov 23 17:26:31 2010
New Revision: 49754

URL: http://svn.reactos.org/svn/reactos?rev=49754&view=rev
Log:
[FREELDR]: Use PaToVa to set the Hive and NLS data pointers, instead of assuming that KSEG0_BASE | Pa is the correct answer for all architectures.

Modified:
    trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c

Modified: trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c?rev=49754&r1=49753&r2=49754&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c [iso-8859-1] Tue Nov 23 17:26:31 2010
@@ -88,7 +88,7 @@
 	}
 
 	/* Convert address to virtual */
-	HiveDataVirtual = (PVOID)(KSEG0_BASE | HiveDataPhysical);
+    HiveDataVirtual = PaToVa((PVOID)HiveDataPhysical);
 
 	/* Fill LoaderBlock's entries */
 	LoaderBlock->RegistryLength = HiveFileSize;
@@ -379,7 +379,7 @@
 	if (NlsDataBase == 0)
 		goto Failure;
 
-	NlsVirtual = (PVOID)(KSEG0_BASE | NlsDataBase);
+	NlsVirtual = PaToVa((PVOID)NlsDataBase);
 	LoaderBlock->NlsData->AnsiCodePageData = NlsVirtual;
 	LoaderBlock->NlsData->OemCodePageData = (PVOID)((PUCHAR)NlsVirtual +
 		(MM_SIZE_TO_PAGES(AnsiFileSize) << MM_PAGE_SHIFT));




More information about the Ros-diffs mailing list