[U-Boot-Users] 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 )

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.
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
The linker doesn't know about this. You initialize a reserved register with the correct value, that's all.
Best regards,
Wolfgang Denk
participants (2)
-
liang a lei
-
Wolfgang Denk