All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] fixup section problem.
@ 2007-02-12  7:53 TXEMA LOPEZ
  2007-02-12 19:26 ` Grant Likely
  0 siblings, 1 reply; 9+ messages in thread
From: TXEMA LOPEZ @ 2007-02-12  7:53 UTC (permalink / raw)
  To: u-boot

Hi Grant,
My intention is not to submit the patch. It could add some noise in all the U-Boot architectures without add any new functionality or improvement. Furthermore, my impression is that Wolfgang was not very interested in this patch so I gave up this work. Anyway, I can submit the patch to you out of the U-Boot-users list.

Best regards,

Txema

 -----Mensaje original-----
De: 	glikely at gmail.com [mailto:glikely at gmail.com]  En nombre de Grant Likely
Enviado el:	lunes, 12 de febrero de 2007 5:45
Para:	TXEMA LOPEZ
CC:	Wolfgang Denk; u-boot-users at lists.sourceforge.net
Asunto:	Re: [U-Boot-Users] fixup section problem.

On 11/3/06, Txema Lopez <tlopez@aotek.es> wrote:
> I think the method I suggest you using a new define It's quite
> reasonable. I'll summit the patch for the Lite5200's and the rest of
> boards will be not affected. If someone want to use or test the fixup
> relocation for his board only has to do two changes:
>             - cleanup the fixup section from the text section in  the
> u-boot.lds file.
>             - define CFG_FIXUP_RELOCATION in the board configuration file.

Txema,

How's your work on this patch coming along?  I've got the same problem
with new code that I've written for the Xilinx virtex boards.  I don't
want to do the manual relocation hack, so I'm very much looking
forward to seeing your fix.

Cheers,
g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [U-Boot-Users] fixup section problem.
@ 2006-11-02  9:21 Txema Lopez
  2006-11-02 11:31 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Txema Lopez @ 2006-11-02  9:21 UTC (permalink / raw)
  To: u-boot

Hi,

We are working in a MPC5200B based custom board and we are developping a 
tool to relocate a U-Boot (1.1.4 version) binary file to a different 
address in flash that it was linked. So, we have to change  the GOT and 
FIXUP entries in the original file to point at the new address. Doing 
this work, we have found that, surprisingly, the FIXUP section in U-Boot 
is empty. When U-Boot is relocated from flash to sdram these lines in 
the file start.S have no effect:
    /*
     * Now adjust the fixups and the pointers to the fixups
     * in case we need to move ourselves again.
     */
2:    li    r0,__fixup_entries at sectoff@l
    lwz    r3,GOT(_FIXUP_TABLE_)
    cmpwi    r0,0
    mtctr    r0
    addi    r3,r3,-4
    beq    4f
3:    lwzu    r4,4(r3)
    lwzux    r0,r4,r11
    add    r0,r0,r11
    stw    r10,0(r3)
    stw    r0,0(r4)
    bdnz    3b
4:
Looking into the sources we have found some places where the fixup 
elements seem to be relocated manually, i.e.:
void malloc_bin_reloc (void)
{
    DECLARE_GLOBAL_DATA_PTR;

    unsigned long *p = (unsigned long *)(&av_[2]);
    int i;
   
    for (i=2; i<(sizeof(av_)/sizeof(mbinptr)); ++i) {
        *p++ += gd->reloc_off;
    }
}
Is there any reason to leave the FIXUP section empty in U-Boot? Is it a 
bug?.

Checking the u-boot.lds file for the IceCube board we have found that 
fhe fixup section is included in the TEXT section and in the RELOC 
section, but the linker generate code only for the TEXT section. If we 
put it only in the RELOC section the FIXUP is not empty, the pointers 
adjustement in the start.S seems to work properly and the 
malloc_bin_reloc() function would be not necessary. Does anynone know if 
I'am missing something?

Any clue will be welcomed.
Best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tlopez.vcf
Type: text/x-vcard
Size: 324 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20061102/6d27a20a/attachment.vcf 

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

end of thread, other threads:[~2007-02-12 19:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12  7:53 [U-Boot-Users] fixup section problem TXEMA LOPEZ
2007-02-12 19:26 ` Grant Likely
2007-02-12 19:40   ` Stefan Roese
  -- strict thread matches above, loose matches on Subject: below --
2006-11-02  9:21 Txema Lopez
2006-11-02 11:31 ` Wolfgang Denk
2006-11-03  7:15   ` Txema Lopez
2006-11-03  8:16     ` Wolfgang Denk
2006-11-03 11:18       ` Txema Lopez
2007-02-12  4:45         ` Grant Likely

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.