[FREELDR]: VaToPa/PaToVa are assuming all architectures have VA at PA | KSEG0_BASE...
[reactos.git] / reactos / boot / freeldr / freeldr / windows / conversion.c
index 87ba43e..2f58a5f 100644 (file)
@@ -15,6 +15,7 @@
 
 /* FUNCTIONS **************************************************************/
 
+#ifndef _ZOOM2_
 /* Arch-specific addresses translation implementation */
 PVOID
 VaToPa(PVOID Va)
@@ -27,6 +28,19 @@ PaToVa(PVOID Pa)
 {
        return (PVOID)((ULONG_PTR)Pa | KSEG0_BASE);
 }
+#else
+PVOID
+VaToPa(PVOID Va)
+{
+    return Va;
+}
+
+PVOID
+PaToVa(PVOID Pa)
+{
+    return Pa;
+}
+#endif
 
 VOID
 List_PaToVa(LIST_ENTRY *ListEntry)
@@ -70,7 +84,7 @@ ConvertConfigToVA(PCONFIGURATION_COMPONENT_DATA Start)
        PCONFIGURATION_COMPONENT_DATA Child;
        PCONFIGURATION_COMPONENT_DATA Sibling;
 
-       DbgPrint((DPRINT_WINDOWS, "ConvertConfigToVA(Start 0x%X)\n", Start));
+       DPRINTM(DPRINT_WINDOWS, "ConvertConfigToVA(Start 0x%X)\n", Start);
        Child = Start;
 
        while (Child != NULL)
@@ -90,8 +104,8 @@ ConvertConfigToVA(PCONFIGURATION_COMPONENT_DATA Start)
                if (Child->ComponentEntry.Identifier)
                        Child->ComponentEntry.Identifier = PaToVa(Child->ComponentEntry.Identifier);
 
-               DbgPrint((DPRINT_WINDOWS, "Device 0x%X class %d type %d id '%s', parent %p\n", Child,
-                       Child->ComponentEntry.Class, Child->ComponentEntry.Type, VaToPa(Child->ComponentEntry.Identifier), Child->Parent));
+               DPRINTM(DPRINT_WINDOWS, "Device 0x%X class %d type %d id '%s', parent %p\n", Child,
+                       Child->ComponentEntry.Class, Child->ComponentEntry.Type, VaToPa(Child->ComponentEntry.Identifier), Child->Parent);
 
                // Go through siblings list
                Sibling = VaToPa(Child->Sibling);
@@ -112,8 +126,8 @@ ConvertConfigToVA(PCONFIGURATION_COMPONENT_DATA Start)
                        if (Sibling->ComponentEntry.Identifier)
                                Sibling->ComponentEntry.Identifier = PaToVa(Sibling->ComponentEntry.Identifier);
 
-                       DbgPrint((DPRINT_WINDOWS, "Device 0x%X class %d type %d id '%s', parent %p\n", Sibling,
-                               Sibling->ComponentEntry.Class, Sibling->ComponentEntry.Type, VaToPa(Sibling->ComponentEntry.Identifier), Sibling->Parent));
+                       DPRINTM(DPRINT_WINDOWS, "Device 0x%X class %d type %d id '%s', parent %p\n", Sibling,
+                               Sibling->ComponentEntry.Class, Sibling->ComponentEntry.Type, VaToPa(Sibling->ComponentEntry.Identifier), Sibling->Parent);
 
                        // Recurse into the Child tree
                        if (VaToPa(Sibling->Child) != NULL)