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

Woodruff, Richard r-woodruff2 at ti.com
Tue Jun 24 22:54:09 CEST 2003

Let me restate my minor point hopefully more correctly. - gd/r8 is only used
to reference things in the gd_t structure and its members.  Given the way
things currently stand for ARM something like the following might work as
well and free up a register and remove an assembly dependency:

#define DECLARE_GLOBAL_DATA_PTR gd_t *gd = &global_data 

gd_t global_data;  /* global data declaration */

	#include <someheader with extern gd_t global_data>
	/* remove stack allocation of global */

I'm NOT saying that I think this is needed.

As far as a patch goes maybe (though I can't test on anything other than
arm925), the one touchy point I noticed when looking at the code was the
partially useful (in a forward looking way) "irq handling code" would have
to regress or be redone to be made to work with the current level of the
overall code. 


Richard W.

> -----Original Message-----
> From: Wolfgang Denk [mailto:wd at denx.de] 
> Sent: Tuesday, June 24, 2003 3:29 PM
> To: Woodruff, Richard
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] Generic ARM Error with respect to 
> usage of r8 in start.S's. 
> 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

More information about the U-Boot mailing list