[HAL]: Implement ISA BUS address translation.
[reactos.git] / reactos / hal / halx86 / generic / legacy / bus / isabus.c
index 884e6d0..4d716a1 100644 (file)
@@ -24,9 +24,28 @@ HalpTranslateIsaBusAddress(IN PBUS_HANDLER BusHandler,
                            IN OUT PULONG AddressSpace,
                            OUT PPHYSICAL_ADDRESS TranslatedAddress)
 {
                            IN OUT PULONG AddressSpace,
                            OUT PPHYSICAL_ADDRESS TranslatedAddress)
 {
-    DPRINT1("ISA Translate\n");
-    while (TRUE);
-    return FALSE;
+    BOOLEAN Status;
+    
+    /* Use system translation */
+    Status = HalpTranslateSystemBusAddress(BusHandler,
+                                           RootHandler,
+                                           BusAddress,
+                                           AddressSpace,
+                                           TranslatedAddress);
+    
+    /* If it didn't work and it was memory address space... */   
+    if (!(Status) && (*AddressSpace == 0))
+    {
+        /* Try EISA translation instead */
+        Status = HalTranslateBusAddress(Eisa,
+                                        BusHandler->BusNumber,
+                                        BusAddress,
+                                        AddressSpace,
+                                        TranslatedAddress);
+    }
+    
+    /* Return the result */
+    return Status;
 }
 
 /* EOF */
 }
 
 /* EOF */