Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Boot code of linuxppc v. netbsd
First of all, if anyone wants to look at it, linux-pmac/arch/ppc can be
found both loose and as a .tgz under
http://www.drow.net/netbsd/linux_arch_ppc and
http://www.drow.net/netbsd/linux_arch_ppc.tgz .
Looking at coffboot, their xcoff boot loader, I noticed something very
interesting. It calls first crt0 - some cache flushing only, as far as I
can tell - and then start(int a1, int a2, void *promptr).
Our ofwboot on the other hand begins right at:
__dead void
_start(vpd, res, openfirm, arg, argl)
void *vpd;
int res;
int (*openfirm)(void *);
char *arg;
int argl;
Notice that we are expecting five parameters instead of three. Could it
possibly be that Apple's OF is not providing five?
As an aside, in arch/powerpc/powerpc/ofwmagic.S we say:
/*
* Magic note section used by OpenFirmware.
*/
[snip]
# note descriptor
# real mode (-1) or virtual mode (0)
.long 0
Is this ignored? Also, I note that a vmlinux.coff has only a .text, .data,
and .bss while we have seven or so sections. Cutting corners for poor old
Apple again?
Dan.
---------------------------------------------------------------------
| Dan Jacobowitz | drow%drow.net@localhost |
| Administrator Extraordinaire | Web site coming someday |
| My opinions are my own - | Day Job: http://www.wwwcomm.com |
| My mistakes are someone else's | |
---------------------------------------------------------------------
Home |
Main Index |
Thread Index |
Old Index