Advanced Boot Techniques
Initialization Code
Initcode routines are subroutines that the boot kernel calls during the
booting process. The user can customize and speed up the booting
mechanisms using this feature. Traditionally, an initcode is used to set up
system PLL, bit rates, wait states. If executed early in the boot process, the
boot time can be significantly reduced.
After the payload data is loaded for a specific boot block, if the
flag is set, the boot kernel issues a
BFLAG_INIT
get address of the block.
On ADSP-BF50x Blackfin processors, initcode routines follow the
C language calling convention so they can be coded in C language or
assembly.
The expected prototype is:
void initcode(ADI_BOOT_DATA* pBootStruct)
The header files define the
typedef void ADI_BOOT_INITCODE_FUNC (ADI_BOOT_DATA* ) ;
Optionally, the initcode routine can interrogate the formatting structure
and customize its own behavior or even manipulate the regular boot pro-
cess. A pointer to the structure is passed in the
coders must ensure that the routine returns to the boot kernel by a termi-
nating
instruction.
RTS
Initcodes can rely on the validity of the stack, which resides in scratchpad
memory. The
ADI_BOOT_DATA
ister usage conform to the compiler conventions. See C++ Compiler and
Library Manual for Blackfin Processors for more information.
In the simple case, initcodes consist of a single instruction section and are
represented by a single block within the boot stream. This block has the
bit set.
BFLAG_INIT
24-24
ADI_BOOT_INITCODE_FUNC
structure resides on the stack. Rules for reg-
ADSP-BF50x Blackfin Processor Hardware Reference
instruction to the tar-
CALL
;
type:
register. Assembly
R0
Need help?
Do you have a question about the ADSP-BF506F and is the answer not in the manual?