[U-Boot] OMAP (4) boot_params

Tom Rini trini at ti.com
Thu Apr 4 21:54:52 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/04/2013 01:52 AM, Wolfgang Denk wrote:
> Dear Tom,
> 
> In message <20130403164215.GK7035 at bill-the-cat> you wrote:
>> 
>>> ... except, as I said above, at this point your code should not
>>> write at all, be int in BSS or data, until the C environment is
>>> set up. So...
>> 
>> But we have to save this ROM-passed information before we
>> overwrite it ourselves (by accident or purpose).
> 
> Thete are two official places for data storage before the full C 
> runtime environment is available: the stack, and the "global data" 
> structure.

Well, there's a 3rd "official" way, that crept in.  There's a certain
amount of that has to get run before we can have the BSS ready (which
resides in DDR) and we're still in some other form of RAM and need a
few variables that would otherwise live in the BSS available now.
Generally this is the i2c driver (so that we can see what platform
this is and what our DDR is then).  The other case is the pointer to
whatever might have come in from ROM.  We do not have stack at this
point in time yet, even, when we call save_boot_params.

> 
>> But I think, and need to re-read this thread a bit more, part of
>> the solution is to rename jump_to_image_no_args as
>> jump_to_image_uboot, keep it __weak and provide one that deals
>> with this (and perhaps more cleanly deals with VIRTIO/ZEBU
>> image_entry).  And after that we can talk about moving things
>> that can't be in the BSS out of the data section and into another
>> section.
> 
> Adding another section makes things more complicated, but not
> really better.  If you can provide writable storage, then you could
> also use it in a more regular way, say for a writable data segment,
> or bigger stack, or malloc space, or ... so it is generally useful
> instead of only this special case here.

I don't think we have much choice here.  This is really the very first
thing we do.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRXdqLAAoJENk4IS6UOR1Wf+AQAJLKAKrxpl3RcmXpQ83ecOTY
k02SCgww94WkAeQUSdhA2zHXkf1lXyF7T7C5qzB2GYwyuoSxCrK98fgauZfynZCL
0CXmoCh3rG7ZJudKMI105dQ9e5/GyF7LGKiCrpUyynNCzdAi3D30JU5oXkBVa7I8
NdmzhYz7DfmOg047oX9PlK+xM2vu9SUP+QkkFuKGJAFCD0F8IbjskMWaij/A9zuK
67eVX3Uv8/FccLriDh8eHVbPSIzku50wBM/QFEy5uB2jV3DZ/NwcOM7+DYWgx0yT
7atsjsNF5WkFzKY50u5CDNIWgMqDBKbL/a3EOZWhelIwHP1/hzMHpq1GFuvyCLxt
Rm3RwylJEBCBWD8RJ0j64vcUQxPhsuicIrKyZ0sQlw9P3iPfeXtDXoA0nw6KaoJk
zh/kohfXqczYmi5OBRFKa1/BIDCRVBVEMzfkZxBb2b2JbQLcTo/1UboTKdOPIEQr
08Il3HRawlb7/VFXWLNRQSJqpi5vSkBoMcZ1yeymucZw7WNi+pwLRwD7VnQRUpt8
kcZk/9n1y8iC26bcIZS26v6UaqXG4XjiiSUXs1Ht3fXsPIeSOZgtEbnao5b3CMyQ
isaXtVWK07hDODkcX0M8/M/3Wya+w+6AAP17F2X1C9H9wmtkb+IKe7idAL+s9zW6
4zHOQxrnH9syDBxOY5Uo
=pG9U
-----END PGP SIGNATURE-----


More information about the U-Boot mailing list