some question about phase2.c

xiangfu xiangfu at openmoko.org
Mon Aug 18 10:18:08 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Andy Green wrote:
> 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 can not find where the code that we move the QI from steppingstone 4K
to SDRAM.

> 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).
> 
> -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBSKkwQBFuNemPXNFjAQILDgf+PBRRB74yz2XvlaMjXoYUqZSOGwFasY4Q
Zg33XkNvzAo/P7IN915TSAwa9RZlUtGGhDWVj1DdLkQamARiDgPZaDgthlq1mp7X
Lnwzuqv0rt9ZAlAAPYueLdGiuyhNJtZVvsGqqlNtPlpI2q4l9sFk10HnwmUQrn73
2zkXT9ZWT1kyZdhZqg5CfPB8JFpoLj7V7Lq4IaV+AzTZl25Jd/NjEIWf22OmojaH
eKe3WPg7ZqbhIb8Z0Ao+r9TUTAdLC/auAH0VO2EAM52u9CqyHWZChVb596vKLLy3
2USetB3gR7zxPSywT1gwcpQ21txXD5QJ8oPxi7kPy8a4+Z6CsK9WNg==
=t4sq
-----END PGP SIGNATURE-----



More information about the openmoko-kernel mailing list