
Hi,
I've got a ppc405gp board that has been running U-boot/Linux for a while, but using a silly hack in cmd_go to pass in our arguments. I haven't quite figured out how the kernel gets the bd_t pointer. I"m also confused by the seemingly inconsistent bd_t structures between the kernel and u-boot.
So what the hacked version of u-boot (hacked by someone else) currently does is declare a simple bd_t in cmd_go and pass the address of that as the only parameter when we jump to addr.
((void (*)(void *))addr)(&bd_struct);
Obviously, I'd rather just use the normal method. It looks to me like the parameters to addr() ends up being the load address of the kernel, but when we get to ppc4xx_init() in the kernel it looks like it *should* be a pointer to bd_t.
Any hints as to how this all works? I've looked at walnut as an example, but the bd_t defined in the kernel looks like it starts with bi_s_version[4] and bi_r_version[30], which look to be at some offset inside the bd_t defined in u-boot.h
Confused, mh