All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Hicks <mort@bork.org>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] help understanding bd_t passing
Date: Tue, 28 Mar 2006 12:13:15 -0500	[thread overview]
Message-ID: <20060328171315.GL27792@bork.org> (raw)


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 

             reply	other threads:[~2006-03-28 17:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28 17:13 Martin Hicks [this message]
2006-03-28 22:16 ` [U-Boot-Users] help understanding bd_t passing Wolfgang Denk
2006-03-29  2:45   ` Martin Hicks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060328171315.GL27792@bork.org \
    --to=mort@bork.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.