/* FUNCTIONS **************************************************************/
+#ifndef _ZOOM2_
/* Arch-specific addresses translation implementation */
PVOID
VaToPa(PVOID Va)
{
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)
PCONFIGURATION_COMPONENT_DATA Child;
PCONFIGURATION_COMPONENT_DATA Sibling;
- DbgPrint((DPRINT_WINDOWS, "ConvertConfigToVA(Start 0x%X)", Start));
+ DPRINTM(DPRINT_WINDOWS, "ConvertConfigToVA(Start 0x%X)\n", Start);
Child = Start;
while (Child != NULL)
if (Child->Sibling)
Child->Sibling = PaToVa(Child->Sibling);
- DbgPrint((DPRINT_WINDOWS, "Device 0x%X class %d", Child, Child->ComponentEntry.Class));
+ if (Child->ComponentEntry.Identifier)
+ Child->ComponentEntry.Identifier = PaToVa(Child->ComponentEntry.Identifier);
- // If the child has a sibling list, then search the sibling list
- // for an entry that matches the specified class, type, and key.
- Sibling = Child->Sibling;
+ 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);
while (Sibling != NULL)
{
if (Sibling->ConfigurationData)
if (Sibling->Sibling)
Sibling->Sibling = PaToVa(Sibling->Sibling);
- DbgPrint((DPRINT_WINDOWS, "Device 0x%X class %d", Sibling, Sibling->ComponentEntry.Class));
+ if (Sibling->ComponentEntry.Identifier)
+ Sibling->ComponentEntry.Identifier = PaToVa(Sibling->ComponentEntry.Identifier);
+
+ 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);
- // If the sibling has a child tree, then search the child tree
- // for an entry that matches the specified class, type, and key.
+ // Recurse into the Child tree
if (VaToPa(Sibling->Child) != NULL)
ConvertConfigToVA(VaToPa(Sibling->Child));
Sibling = VaToPa(Sibling->Sibling);
}
+ // Go to the next child
Child = VaToPa(Child->Child);
}
}