some question about phase2.c
andy at openmoko.com
Mon Aug 18 10:09:02 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Somebody in the thread at some point said:
| Hi Andy:
| void (*phase2)(void) = (void (*)(void))((int)bootloader_second_phase +
| 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
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 well).
-----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