[FREELDR]: Use PaToVa to set the Hive and NLS data pointers, instead of assuming...
authorSir Richard <sir_richard@svn.reactos.org>
Tue, 23 Nov 2010 17:26:31 +0000 (17:26 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Tue, 23 Nov 2010 17:26:31 +0000 (17:26 +0000)
svn path=/trunk/; revision=49754

reactos/boot/freeldr/freeldr/windows/wlregistry.c

index 1080ee2..b6c1fc9 100644 (file)
@@ -88,7 +88,7 @@ WinLdrLoadSystemHive(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
        }
 
        /* Convert address to virtual */
-       HiveDataVirtual = (PVOID)(KSEG0_BASE | HiveDataPhysical);
+    HiveDataVirtual = PaToVa((PVOID)HiveDataPhysical);
 
        /* Fill LoaderBlock's entries */
        LoaderBlock->RegistryLength = HiveFileSize;
@@ -379,7 +379,7 @@ WinLdrLoadNLSData(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
        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));