How to Understanding Internal SRAM (of ARM)
hi,
I am reading source of "~/lib-arm/board", and wander on the "gd_data", it's declared like:
void start_armboot (void)
{
DECLARE_GLOBAL_DATA_PTR;
:
gd_t gd_data;
:
:
/* Pointer is writable since we allocated a register for it */ gd = &gd_data;
memset ((void *)gd, 0, sizeof (gd_t));
:
}
My question is: gd_data must or may be lacated at Internal SRAM (in arm, by disable cache, it is?), but how to force the linker to allocate "gd_data" to some specific place(which I mean to Internal SRAM) instead of external RAM? (BTW, I just begin to learn to read&understanding Makefile, and lib-arm/Makefile and topdir's config.mk has been read to find some FLAGS hints, but no answer. So bother you to give me a hint, thanks )
Quoted 3 lines · In message <000e01c3d6a5$415ae650$f48ec9ca@liangalei> you wrote:
I am reading source of "~/lib-arm/board", and wander on the "
gd_data", it's declared like:
See the explanation in the README.
Quoted 2 lines
My question is:
gd_datamust or may be lacated at Internal SRAM (in arm, by disable cache, it is?), but how to force the linker to allocate "gd_data" to
The linker doesn't know about this. You initialize a reserved register with the correct value, that's all.
Best regards,
Wolfgang Denk
Signature · 3 lines
See us @ Embedded World, Nuremberg, Feb 17 - 19, Hall 12.0 Booth 440 Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Many aligators will be slain, but the swamp will remain.