* [U-Boot-Users] help understanding bd_t passing
@ 2006-03-28 17:13 Martin Hicks
2006-03-28 22:16 ` Wolfgang Denk
0 siblings, 1 reply; 3+ messages in thread
From: Martin Hicks @ 2006-03-28 17:13 UTC (permalink / raw)
To: u-boot
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
--
Martin Hicks || mort at bork.org || PGP/GnuPG: 0x4C7F2BEE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060328/1639c49f/attachment.pgp
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] help understanding bd_t passing
2006-03-28 17:13 [U-Boot-Users] help understanding bd_t passing Martin Hicks
@ 2006-03-28 22:16 ` Wolfgang Denk
2006-03-29 2:45 ` Martin Hicks
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2006-03-28 22:16 UTC (permalink / raw)
To: u-boot
In message <20060328171315.GL27792@bork.org> you wrote:
>
> 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
"go" is not used to boot Linux. Please RTFM.
> also confused by the seemingly inconsistent bd_t structures between the
> kernel and u-boot.
Will you please read the FAQ, and maybe the U-Boot and/or the kernel
code that deals with parameter passing?
> 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.
This is plain wrong/ "go" was never designed to bootLinux. Please
RTFM.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All your people must learn before you can reach for the stars.
-- Kirk, "The Gamesters of Triskelion", stardate 3259.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] help understanding bd_t passing
2006-03-28 22:16 ` Wolfgang Denk
@ 2006-03-29 2:45 ` Martin Hicks
0 siblings, 0 replies; 3+ messages in thread
From: Martin Hicks @ 2006-03-29 2:45 UTC (permalink / raw)
To: u-boot
On Wed, Mar 29, 2006 at 12:16:33AM +0200, Wolfgang Denk wrote:
>
> > 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.
>
> This is plain wrong/ "go" was never designed to bootLinux. Please
> RTFM.
Okay, I'm *glad* that this is wrong. It didn't look like it could work.
I just assumed that the guy who was doing this job before had clue;
obviously a poor assessment.
Thanks for the pointer Wolfgang.
mh
--
Martin Hicks || mort at bork.org || PGP/GnuPG: 0x4C7F2BEE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060328/b9a4666d/attachment.pgp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-03-29 2:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-28 17:13 [U-Boot-Users] help understanding bd_t passing Martin Hicks
2006-03-28 22:16 ` Wolfgang Denk
2006-03-29 2:45 ` Martin Hicks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox