some question about phase2.c
matt_hsu at openmoko.org
Tue Aug 19 08:23:48 CEST 2008
Andy Green wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Somebody in the thread at some point said:
> | Hi Andy:
> | void (*phase2)(void) = (void
> (*)(void))((int)bootloader_second_phase +
> | TEXT_BASE);
> | where here add TEXT_BASE? i don't understand.
> | i see the new patch there is no "+ TEXT_BASE"
> TEXT_BASE is where we copy the qi image to in SDRAM, 0x33000000. Before
> I got the linker script right, it had to add 0x33000000 to
> bootloader_second_phase() so it would run the copy in SDRAM, not the
> copy in the steppingstone that starts at 0x0. Because in the old code
> bootloader_second_phase had the value like 0x800 or something: it was
Yes. The "+ TEXT_BASE" is needed to remove, if you want to boot from
SDRAM via openocd.
> compiled to run from steppingstone. All of the code was like that so
> actually until the last patches everything only worked because it fitted
> in steppingstone 4K region.
> Now the linker script is right, bootloader_second_phase() has a value in
> 0x33000xxx range already and works without any magic offsets (the rest
> of the code just works with addresses already in the copied region as
> - -Andy
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
> -----END PGP SIGNATURE-----
More information about the openmoko-kernel