Partially fixed up tree after merge from HEAD. More to do.
[reactos.git] / reactos / boot / freeldr / freeldr / windows / wlregistry.c
index 3498c31..73ec593 100644 (file)
 
 #include <freeldr.h>
 
+#ifdef _M_PPC
+#include <of.h>
+#include <mmu.h>
+#endif
+
 #define NDEBUG
 #include <debug.h>
 
@@ -69,7 +74,11 @@ WinLdrLoadSystemHive(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
        }
 
        /* Convert address to virtual */
+#ifdef _M_IX86
        HiveDataVirtual = (PVOID)(KSEG0_BASE | HiveDataPhysical);
+#elif defined(_M_PPC)
+       HiveDataVirtual = (PVOID)HiveDataPhysical;
+#endif
 
        /* Fill LoaderBlock's entries */
        LoaderBlock->RegistryLength = HiveFileSize;
@@ -311,7 +320,11 @@ WinLdrLoadNLSData(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
        if (NlsDataBase == 0)
                goto Failure;
 
+#ifdef _M_IX86
        NlsVirtual = (PVOID)(KSEG0_BASE | NlsDataBase);
+#elif defined(_M_PPC)
+       NlsVirtual = (PVOID)NlsDataBase;
+#endif
        LoaderBlock->NlsData->AnsiCodePageData = NlsVirtual;
        LoaderBlock->NlsData->OemCodePageData = (PVOID)((PUCHAR)NlsVirtual +
                (MM_SIZE_TO_PAGES(AnsiFileSize) << MM_PAGE_SHIFT));