Re: Psim and kickstart

Nils Ole Timm <[email protected]> Wed, 9 Feb 2011 12:06:23 +0100
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
--000e0cd638149f24e7049bd77447
Content-Type: text/plain; charset=ISO-8859-1

I actually got it to work with psim now.
The issue was that 0x11e does not seem to be a valid special purpose
register, unless I am missing something. At least the code seems to run fine
now when replacing
mfspr %r24, 0x11e
with
mfspr %r24, 0x11f
which is the ID for the processor identifier special purpose register in the
PowerPc specifications I have found so far.

On the device that I eventually want to run the kernel on I already have
uBoot set up, but I have to admit that I do not know how to pack the
binaries properly so that the kernel boots and I get output through the
serial port.

It is a p2020, which is pretty much designed like a dual core switch.
It has an e500v2 processor and boots from a usb stick.

I would greatly appreciate any advice on how to go about getting it to run
on actual hardware.

Also I am not quite sure about what the secondary spin in the bootloader is
ment to do.
>From how I understand the code, the secondary spin sets r1 to the adress of
the first spin, then loads the hex value of the first spin into r2 which is
something like 0x4800 0000 and compares wether that value +1 is zero. If not
it just fetches the same memory adress again and again. And obviously 0x4800
0000 is never zero, so cmpwi %r3, 0 will never be equal.

Maybe my understanding is just wrong or I have some issues with the
endianness of powerpc. But it seems like you can never actually get out of
the secondary spin. At least in how the bootloader is now. Also if r3 were
equal to 0 at some point you would jump to the memory adress of -1.
I am a little confused here as you can see. It would be great if someone
could tell me what's going on there.

Best regards,
Nils Ole Timm

--000e0cd638149f24e7049bd77447
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I actually got it to work with psim now.<div>The issue was that 0x11e does =
not seem to be a valid special purpose register, unless I am missing someth=
ing. At least the code seems to run fine now when replacing</div><div>mfspr=
 %r24, 0x11e</div>
<div>with</div><div>mfspr %r24, 0x11f</div><div>which is the ID for the pro=
cessor identifier special purpose register in the PowerPc specifications I =
have found so far.</div><div><br></div><div><div>On the device that I event=
ually want to run the kernel on I already have uBoot set up, but I have to =
admit that I do not know how to pack the binaries properly so that the kern=
el boots and I get output through the serial port.</div>
<div><br></div><div>It is a p2020, which is pretty much designed like a dua=
l core switch.</div><div>It has an e500v2 processor and boots from a usb st=
ick.</div><div><br></div><div>I would greatly appreciate any advice on how =
to go about getting it to run on actual hardware.</div>
</div><div><br></div><div>Also I am not quite sure about what the secondary=
 spin in the bootloader is ment to do.</div><div>From how I understand the =
code, the secondary spin sets r1 to the adress of the first spin, then load=
s the hex value of the first spin into r2 which is something like 0x4800 00=
00 and compares wether that value +1 is zero. If not it just fetches the sa=
me memory adress again and again. And obviously 0x4800 0000 is never zero, =
so cmpwi %r3, 0 will never be equal.</div>
<div><br></div><div>Maybe my understanding is just wrong or I have some iss=
ues with the endianness of powerpc. But it seems like you can never actuall=
y get out of the secondary spin. At least in how the bootloader is now. Als=
o if r3 were equal to 0 at some point you would jump to the memory adress o=
f -1.</div>
<div>I am a little confused here as you can see. It would be great if someo=
ne could tell me what&#39;s going on there.</div><div><br></div><div>Best r=
egards,</div><div>Nils Ole Timm</div>

--000e0cd638149f24e7049bd77447--