AnsweredAssumed Answered

Setting callback flag in ldr file

Question asked by dehkl on Feb 9, 2011
Latest reply on Feb 18, 2011 by gvasanth

Hi,

We are booting from NAND on a bf52x processor and I wish to register a decryption callback in the init code to decrypt the firmware.

Problem is how to encrypt and set the callback flag for all code (and possibly data) in the main .dxe of the ..ldr file.

 

Running elfloader.exe -h -proc ADSP-BF524 indicates that callback can be set for whole sections:

-callback [seg=segment|sec=section|sym=symbol] [arg=const32]
                        Direct the loader to isolate "symbol" into a
                        separate block, set the block header CALLBACK
                        flag and fill the block header argument field
                        with const32.  Use for boot-time callbacks.
                        For ADSP-BF50x, ADSP-BF51x, ADSP-BF52x, ADSP-BF54x, ADSP-BF54xM, and ADSP-BF59x only.

 

The loader manual doesn't mention the seg=segment or sec=section options, can I use them?

 

When using -callback flag, for example like this:

-callback sym=_init_twi

Elfloader outputs a broken .ldf, ends after the callback block (Byte Count=0)

 

Am I on the right track here, suggestions appreciated.

 

Thanks,

Jens

Outcomes