public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] powerpc SPL framework: Avoiding relocate_code
@ 2013-09-09 11:13 Prabhakar Kushwaha
  2013-09-12 17:58 ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Prabhakar Kushwaha @ 2013-09-09 11:13 UTC (permalink / raw)
  To: u-boot

Hi,

  SPL framework is used to support multi-stage booting.  Where first 
level boot loader is created via SPL having relocate_code() function.
I am working on a Freescale's SoC which has less internal SRAM.
I don't want to use relocate_code() as to support this function, I need 
to reduce SPL bin  to SRAM/2 size.

is there way to avoid relocate_code function ?

I tried with below sequence, but it is not working for me :(

     .globl    relocate_code
relocate_code:
     mr    r1,r3        /* Set new stack pointer        */
     mr    r9,r4        /* Save copy of Init Data pointer    */
     mr    r10,r5        /* Save copy of Destination Address    */

     GET_GOT
#ifndef CONFIG_SPL_BUILD

--
--
#endif
     .globl    in_ram
in_ram:

The reason is bss "variables" which are mapped to 0x0000_0000 onwards 
because "bss"section are mapped after 0xfffffffc in lds. They are not 
available during SPL execution.  is there way to relocate bss section in 
the execution range of SPL?

Please advice.

Regards,
Prabhakar

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [U-Boot] powerpc SPL framework: Avoiding relocate_code
@ 2013-09-09 11:10 Prabhakar Kushwaha
  0 siblings, 0 replies; 5+ messages in thread
From: Prabhakar Kushwaha @ 2013-09-09 11:10 UTC (permalink / raw)
  To: u-boot

Hi,

  SPL framework is used to support multi-stage booting.  Where first 
level boot loader is created via SPL having relocate_code() function.
I am working on a Freescale's SoC which has less internal SRAM.
I don't want to use relocate_code() as to support this function, I need 
to reduce SPL bin  to SRAM/2 size.

is there way to avoid relocate_code function ?

I tried with below sequence, but it is not working for me :(

     .globl    relocate_code
relocate_code:
     mr    r1,r3        /* Set new stack pointer        */
     mr    r9,r4        /* Save copy of Init Data pointer    */
     mr    r10,r5        /* Save copy of Destination Address    */

     GET_GOT
#ifndef CONFIG_SPL_BUILD

--
--
#endif
     .globl    in_ram
in_ram:

The reason is bss "variables" which are mapped to 0x0000_0000 onwards 
because "bss"section are mapped after 0xfffffffc in lds. They are not 
available during SPL execution.  is there way to relocate bss section in 
the execution range of SPL?

Please advice.

Regards,
Prabhakar

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-16 20:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09 11:13 [U-Boot] powerpc SPL framework: Avoiding relocate_code Prabhakar Kushwaha
2013-09-12 17:58 ` Scott Wood
2013-09-13  9:53   ` Prabhakar Kushwaha
2013-09-16 20:46     ` Scott Wood
  -- strict thread matches above, loose matches on Subject: below --
2013-09-09 11:10 Prabhakar Kushwaha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox