[U-Boot-Users] Generic ARM Error with respect to usage of r8 in start.S's.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[U-Boot-Users] Generic ARM Error with respect to usage of r8 in start.S's.

Woodruff, Richard
>
> What is it you don't see? Why we reserve R8 for global data?
>

The u-boot for ARM code defines and uses global data which is not referenced
using r8 (can be seen by all).  The code as currently generated only uses r8
to access into the bd_info structure and its members.  As it is, the bd_info
structure is allocated on the C stack in start_armboot(), there is nothing
special about the sdram which its allocated in.  The structure could have as
easily been defined as a global above, just like flash_info[] or any other
structure is.  There is no selective relocation...it don't really use C code
features until it has a stack.

Yes the flexibility to do different things is there which is good,
unfortunately the leaving of expansion hooks which break the existing code
somewhat defeats its usefulness.

Regards,

Richard W.



Reply | Threaded
Open this post in threaded view
|

[U-Boot-Users] Generic ARM Error with respect to usage of r8 in start.S's.

Wolfgang Denk
In message <FD2AC9A020DDD51194710008C7089B20053D4CAD at dlee17.itg.ti.com> you wrote:
>
> The u-boot for ARM code defines and uses global data which is not referenced
> using r8 (can be seen by all).  The code as currently generated only uses r8
> to access into the bd_info structure and its members.  As it is, the bd_info

No. All access to the "global data pointer" ("*gd") goes through  r8,
as defined in "include/asm-arm/global_data.h":

#define DECLARE_GLOBAL_DATA_PTR     register gd_t *gd asm ("r8")


> structure is allocated on the C stack in start_armboot(), there is nothing
> special about the sdram which its allocated in.  The structure could have as

As mentioned before, the ARM initialization sequence and  memory  map
do  not  exactly  fit into the U-Boot model as it was intended to be.
The curerent state is a result of  the  port  done  for  the  ARMBoot
project,  but  this  is  a  temporary  state which will be fixed in a
future release.

> Yes the flexibility to do different things is there which is good,
> unfortunately the leaving of expansion hooks which break the existing code
> somewhat defeats its usefulness.

The problem is that we  obviously  missed  the  exception  code  when
chosing r8. If you can, please submit a patch to fix this problem.


Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
In an organization, each person rises to the level of his own  incom-
petency                                         - The Peter Principle