* [U-Boot-Users] ./cpu/mpc8260/cpu_init.c: cpu_init_f() gd pointing to wrong location?
@ 2005-03-18 7:28 KokHow Teh
2005-03-25 1:36 ` Zachary Landau
0 siblings, 1 reply; 3+ messages in thread
From: KokHow Teh @ 2005-03-18 7:28 UTC (permalink / raw)
To: u-boot
Hi;
I am using ppc-2004-11-10.iso and I am referring to cpu/mpc8260 arch.
The MPC8260ADS.h defines the temporary ram and the global data structure
locations as follows:
#define CFG_INIT_RAM_ADDR CFG_IMMR
#define CFG_INIT_RAM_END 0x2000 /* End of used area in DPRAM */
#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
does cpu_init_f() in cpu_init.c calculate the address of gd pointer wrongly?
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET);
Shouldn't it be:
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) (CFG_GBL_DATA_OFFSET);
???
Regards,
TEH
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot-Users] ./cpu/mpc8260/cpu_init.c: cpu_init_f() gd pointing to wrong location?
2005-03-18 7:28 [U-Boot-Users] ./cpu/mpc8260/cpu_init.c: cpu_init_f() gd pointing to wrong location? KokHow Teh
@ 2005-03-25 1:36 ` Zachary Landau
0 siblings, 0 replies; 3+ messages in thread
From: Zachary Landau @ 2005-03-25 1:36 UTC (permalink / raw)
To: u-boot
> I am using ppc-2004-11-10.iso and I am referring to cpu/mpc8260 arch.
> The MPC8260ADS.h defines the temporary ram and the global data structure
> locations as follows:
>
> #define CFG_INIT_RAM_ADDR CFG_IMMR
> #define CFG_INIT_RAM_END 0x2000 /* End of used area in DPRAM */
> #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
> #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
> #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
>
> does cpu_init_f() in cpu_init.c calculate the address of gd pointer wrongly?
>
> /* Pointer is writable since we allocated a register for it */
> gd = (gd_t *) (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET);
>
> Shouldn't it be:
>
> /* Pointer is writable since we allocated a register for it */
> gd = (gd_t *) (CFG_GBL_DATA_OFFSET);
I don't know if you are still looking for an answer to this but:
I believe CFG_INIT_RAM_END specificies the length of the RAM, not the
absolute location. So (CFG_INIT_RAM_ADDR +
(CFG_INIT_RAM_END-CFG_GBL_DATA_OFFSET) should put the global data at
the end of ram, where it is supposed to be.
--
Zachary P. Landau <kapheine@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] ./cpu/mpc8260/cpu_init.c: cpu_init_f(): gd pointing to wrong location?
@ 2005-03-23 3:00 KokHow Teh
0 siblings, 0 replies; 3+ messages in thread
From: KokHow Teh @ 2005-03-23 3:00 UTC (permalink / raw)
To: u-boot
Hi;
I am using u-boot-1.1.2.tar.bz2 and I am referring to cpu/mpc8260
arch.
The MPC8260ADS.h defines the temporary ram and the global data structure
locations as follows:
#define CFG_INIT_RAM_ADDR CFG_IMMR
#define CFG_INIT_RAM_END 0x2000 /* End of used area in DPRAM */
#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for
initial data */
#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
does cpu_init_f() in cpu_init.c calculate the address of gd pointer
wrongly?
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET);
Shouldn't it be:
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) (CFG_GBL_DATA_OFFSET);
???
Am I missing something..?
Regards,
TEH
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-25 1:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-18 7:28 [U-Boot-Users] ./cpu/mpc8260/cpu_init.c: cpu_init_f() gd pointing to wrong location? KokHow Teh
2005-03-25 1:36 ` Zachary Landau
-- strict thread matches above, loose matches on Subject: below --
2005-03-23 3:00 [U-Boot-Users] ./cpu/mpc8260/cpu_init.c: cpu_init_f(): " KokHow Teh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox