j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
* 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@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"); ===================================================================
On 01/02/14 20:52, Olivier Danet wrote:
- 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@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"); ===================================================================
Great - this patch gets SS-20 working for me again!
Reviewed-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
ATB,
Mark.