Skip to contentSkip to conversation

Need help recompiling (debugging) proll-18

DISCUSSION Arno Schuring 2 participants 2 messages Oct 1, 2004 – Oct 2, 2004

lore
Share & tools
lore
#0 lore raw

Hello list!

(I hope this is the correct list to post questions like this, maybe I should have mailed Pete Zaitcev directly but I couldn't find his email address on the proll site, nor did I wish to possibly offend him)

I'm at a loss getting my Krups working (yes it's old, I know). I have tried several approaches to remote-boot it (I don't have a spare sun machine - I cross-compile from i586) but have only failed so far :(

I have tried both homemade and precompiled kernels, but keep getting stuck either at "couldn't open root device xx" or "can't open initial console".

To remedy this I set out to change the command line options proll passes to the kernel. I thought I could edit proll's sources and recompile. However, my executables keep freezing the javastation, and I'm stuck as to why... not surprising, since I've never worked on sparc processors before.

Anyways, I've hacked in a number of debug statements and I believe I have identified the failing instruction but don't understand why it's failing. Here's the final printk output of proll:

init_mmu_swift: flushing cache
init_mmu_swift: switching ctx table
init_mmu_swift: clearing old table references
--freeze--

(see attached system.c, function init_mmu_swift)
The offending instruction seems to be

        __asm__ __volatile__ ("sta %%g0, [%0] %1\n\t" : :
            "r" (0x400), "i" (ASI_M_FLUSH_PROBE) : "memory");

commenting out this instruction does allow the program to continue but causes the krups to reboot itself in a second... quite understandable since the tlb is probably filled with invalid addresses.

But now the question: why is it failing? A dissassembly of both the original and new executable yields no functional differences in this function (other than the debug printk's) - the ret/restore instead of retl can't be the problem, since it's never reached, or can it?

/tmp/proll.krups.ID18: file format a.out-sunos-big
Disassembly of section .text:
(...)

    42e0:       86 10 20 00     clr  %g3
    42e4:       05 00 00 07     sethi  %hi(0x1c00), %g2
    42e8:       92 10 a3 ff     or  %g2, 0x3ff, %o1     ! 0x1fff
    42ec:       c0 a0 c1 c0     sta  %g0, [ %g3 ] (14)
    42f0:       85 28 e0 01     sll  %g3, 1, %g2
    42f4:       c0 a0 81 80     sta  %g0, [ %g2 ] #ASI_N_L
    42f8:       86 00 e0 10     add  %g3, 0x10, %g3
    42fc:       80 a0 c0 09     cmp  %g3, %o1
    4300:       08 bf ff fb     bleu  0x42ec
    4304:       84 10 21 00     mov  0x100, %g2
    4308:       91 32 20 04     srl  %o0, 4, %o0
    430c:       d0 a0 80 80     sta  %o0, [ %g2 ] #ASI_N
    4310:       84 10 24 00     mov  0x400, %g2
    4314:       c0 a0 80 60     sta  %g0, [ %g2 ] (3)
    4318:       81 c3 e0 08     retl
    431c:       01 00 00 00     nop

(...)

proll.aout: file format a.out-sunos-big
Disassembly of section .text:
(...)

    429c:       9d e3 bf 98     save  %sp, -104, %sp
d    42a0:       11 3f f4 3d     sethi  %hi(0xffd0f400), %o0
d    42a4:       40 00 00 da     call  0x460c
d    42a8:       90 12 22 e8     or  %o0, 0x2e8, %o0     ! 0xffd0f6e8
    42ac:       84 10 20 00     clr  %g2
    42b0:       03 00 00 07     sethi  %hi(0x1c00), %g1
    42b4:       86 10 63 ff     or  %g1, 0x3ff, %g3     ! 0x1fff
    42b8:       c0 a0 81 c0     sta  %g0, [ %g2 ] (14)
    42bc:       82 00 80 02     add  %g2, %g2, %g1
    42c0:       c0 a0 41 80     sta  %g0, [ %g1 ] #ASI_N_L
    42c4:       84 00 a0 10     add  %g2, 0x10, %g2
    42c8:       80 a0 80 03     cmp  %g2, %g3
    42cc:       08 bf ff fb     bleu  0x42b8
    42d0:       01 00 00 00     nop
d    42d4:       11 3f f4 3d     sethi  %hi(0xffd0f400), %o0
d    42d8:       40 00 00 cd     call  0x460c
d    42dc:       90 12 23 08     or  %o0, 0x308, %o0     ! 0xffd0f708
    42e0:       b1 36 20 04     srl  %i0, 4, %i0
    42e4:       82 10 21 00     mov  0x100, %g1
    42e8:       f0 a0 40 80     sta  %i0, [ %g1 ] #ASI_N
d    42ec:       11 3f f4 3d     sethi  %hi(0xffd0f400), %o0
d    42f0:       40 00 00 c7     call  0x460c
d    42f4:       90 12 23 30     or  %o0, 0x330, %o0     ! 0xffd0f730
    42f8:       82 10 24 00     mov  0x400, %g1
    42fc:       c0 a0 40 60     sta  %g0, [ %g1 ] (3)
d    4300:       11 3f f4 3d     sethi  %hi(0xffd0f400), %o0
d    4304:       40 00 00 c2     call  0x460c
d    4308:       90 12 23 60     or  %o0, 0x360, %o0     ! 0xffd0f760
    430c:       01 00 00 00     nop
    4310:       81 c7 e0 08     ret
    4314:       81 e8 00 00     restore

(...)

I realise this is a very specific issue, but any help would be welcome.

Kind regards,
Arno Schuring

#1 lore raw
Quoted 2 lines · Arno Schuring

I'm at a loss getting my Krups working (yes it's old, I know). I have tried several approaches to remote-boot it (I don't have a spare sun machine - I

ftp://ftp.splack.org/pub/splack/sparc/splack-8.0/javastation

Everything you need to get it working.