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/windo…
==============================================================================
--- 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));