silo on qemu-system-sparc64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I'm trying to boot gentoo install-sparc64-minimal-2008.0.iso
using qemu-system-sparc64 and it stops with SI message.

The problem is with code in first-isofs/crt0.S where it tries to
clear BSS, it is using %i3 register value to compute address.
It occurs that openbios image does not really care about
contents of %i3 before calling loaded silo code. So %i3 can
have odd value and subsequent store is faulting with
unaligned access.

Any hints on what does silo expect in %i3 are appreciated,
so we could amend openbios code to provide good initial
state to silo.

If I follow open firmware standard draft and clear %i3 before
control is passed to silo then it even allows me to boot gentoo
kernel (of course kernel crashes a bit later :) Still in this case
it is not clear why silo does those computations in the first place.

The silo code excerpt in question is below. Note that %i3 is
never assigned to in silo code before that 5 label. Fault is at
last std instruction (which is at pc=0x4064), qemu trace below.

--- silo-1.4.13/first-isofs/crt0.S ---
        .align  32
jumphere:
        /* Clear BSS */
5:      add     %l0, %i3, %l0
        add     %i1, %i3, %i1
        andcc   %i1, 4, %g0
        sub     %l0, %i1, %i2                   ! %i2 = BSS length
        be      1f
         mov    %g0, %g1

        st      %g0, [%i1]
        add     %i1, 4, %i1
1:
        subcc   %i2, 32, %i2
        std     %g0, [%i1]



---QEMU TRACE---
IN:
0x0000000000004060:  subcc  %i2, 0x20, %i2
0x0000000000004064:  std  %g0, [ %i1 ]
0x0000000000004068:  std  %g0, [ %i1 + 8 ]
0x000000000000406c:  std  %g0, [ %i1 + 0x10 ]
0x0000000000004070:  std  %g0, [ %i1 + 0x18 ]
0x0000000000004074:  bgu  0x4060
0x0000000000004078:  add  %i1, 0x20, %i1

  4254: Unaligned Memory Access (v=0034) pc=0000000000004064
npc=0000000000004068 SP=00000000ffe80201
pc: 0000000000004064  npc: 0000000000004068
General Registers:
%g0: 0000000000000000   %g1: 0000000000000000   %g2: 000001fe020003f8
 %g3: 00000000ffe52ed0
%g4: 0000000000000000   %g5: 0000000000000020   %g6: 0000000000000000
 %g7: 0000000000000000
Current Register Window:
%o0: 0000000000000000   %o1: 0000000000000000   %o2: 0000000000000000
 %o3: 0000000000000000
%o4: 00000000ffd19928   %o5: 0000000000000001   %o6: 00000000ffe80201
 %o7: 0000000000004000
%l0: 0000000000005db1   %l1: 0000000000005c30   %l2: 0000000000000000
 %l3: 0000000000000000
%l4: 0000000000000000   %l5: 0000000000000000   %l6: 0000000000000000
 %l7: 000000000000401c
%i0: 0000000000004000   %i1: 0000000000005c31   %i2: 0000000000000160
 %i3: 0000000000000001
%i4: 00000000ffe808dc   %i5: 0000000000000000   %i6: 00000000ffe802e1
 %i7: 00000000ffd0bc90

-- 
Kind regards,
Igor V. Kovalenko
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux