[OpenBIOS] [PATCH] SparcStation 10/20 mode fix

Olivier Danet odanet at caramail.com
Sat Feb 1 21:52:57 CET 2014


* SS10/20 use 36bits addresses.
   When mapping peripherals, bits [35:32] are not always tied to 0.

* The probe-set-sbus forth word expects hex numbers for slots.
   SS5 uses slots 0 to 5, whereas SS10/20 uses the slot 0xF,
   and triggers the bug.

Signed-off-by: Olivier Danet <odanet at caramail.com>
===================================================================
--- drivers/iommu.c    (révision 1257)
+++ drivers/iommu.c    (copie de travail)
@@ -158,8 +158,8 @@
      ucell size, virt;

      size = POP();
-    POP();
      phys = POP();
+    phys = (phys << 32) + POP();

      virt = ofmem_map_io(phys, size);

===================================================================
--- drivers/sbus.c    (révision 1257)
+++ drivers/sbus.c    (copie de travail)
@@ -153,7 +153,7 @@
      fword("new-device");
      PUSH(0);
      PUSH(0);
-    snprintf(buf, 6, "%d,0", slot);
+    snprintf(buf, 6, "%x,0", slot);
      push_str(buf);
      fword("set-args");
      feval("['] tcx-driver-fcode 2 cells + 1 byte-load");
@@ -268,7 +268,7 @@

      PUSH(0);
      PUSH(0);
-    snprintf(buf, 6, "%d,%ld", slot, offset);
+    snprintf(buf, 6, "%x,%lx", slot, offset);
      push_str(buf);
      fword("2dup");
      fword("probe-self-sbus");
===================================================================




More information about the OpenBIOS mailing list