
Advanced Boot Techniques
16-28
ADSP-BF59x Blackfin Processor Hardware Reference
decompression, or hash algorithms. Checksum or hash words can be
passed through the block header
ARGUMENT
field.
Since callback routines require access to the payload data of the boot
blocks, the block data must be loaded before it can be processed. Unlike
initcodes, a callback usually resides permanently in memory. If the block
is loaded to L1 instruction memory, the
BFLAG_CALLBACK
flag is likely
combined with the
BFLAG_INDIRECT
bit. The boot kernel performs these
steps in the following order.
1. Data is loaded into the temporary buffer defined by the
pTempBuffer
variable.
2. The
CALL
to the
pCallBackFunction
is issued.
3. After the callback routine returns, the memory DMA copies data to
the destination.
If a block does not fit into the temporary buffer, for example when the
BLOCK COUNT
is greater than the
dTempByteCount
variable, the three steps
are executed multiple times until all payload data is loaded and processed.
The boot kernel passes the parameter
dCbFlags
to the callback routine to
tell it that it is being invoked the first or the last time for a specific block.
To store intermediate results across multiple calls the callback routine can
use the
uwUserShort
and
dUserLong
variables in the
ADI_BOOT_DATA
structure.
Callback routines meet C language calling conventions for subroutines.
The prototype is as follows.
s32 CallBackFunction (ADI_BOOT_DATA* pBootStruct,
ADI_BOOT_BUFFER* pCallbackStruct, s32 dCbFlags);
The Vi+ header file defines the
ADI_BOOT_CALLBACK_FUNC
type
the following way:
typedef s32 ADI_BOOT_CALLBACK_FUNC (ADI_BOOT_DATA*,
ADI_BOOT_BUFFER*, s32 ) ;
Summary of Contents for ADSP-BF59x Blackfin
Page 64: ...Development Tools 1 22 ADSP BF59x Blackfin Processor Hardware Reference...
Page 74: ...Processor Specific MMRs 2 10 ADSP BF59x Blackfin Processor Hardware Reference...
Page 244: ...Programming Examples 6 40 ADSP BF59x Blackfin Processor Hardware Reference...
Page 700: ...Programming Examples 16 78 ADSP BF59x Blackfin Processor Hardware Reference...
Page 738: ...Boundary Scan Architecture B 8 ADSP BF59x Blackfin Processor Hardware Reference...