User`s guide

3 Porting a BSP to Custom Hardware
3.2 Getting a Minimal Kernel Running
61
3
are provided in 2.2 Boot Sequence, p.7. This section reviews the steps of the
initialization sequence and supplies tips on what to check if a failure occurs at a
particular step.
Initializing ROM-Based Image Types
This section describes the initialization sequence for the ROM-based VxWorks
images vxWorks_rom and vxWorks_resrom_nosym.
romInit.s: romInit( )
At power-up (cold start) the processor begins execution at romInit( ). romInit( )
performs the minimal setup necessary to transfer control to romStart( ) (in
target/config/all/bootInit.c). Most hardware and device initialization is performed
later in the initialization sequence by sysHwInit( ) in sysLib.c.
romInit() is responsible for the following actions:
Initializing the processor.
Initializing access to target DRAM.
Jumping to romStart( ) for further initialization; passing BOOT_COLD on a
cold boot, or the parameter passed from sysToMonitor( ) on a warm boot.
For sample initialization, see the romInit.s file in your reference BSP.
Take care not to add too much initialization code to romInit( ). It is better to do the
minimum amount of initialization at this time and to perform additional
initialization later in the process. Because some BSPs do more initialization in
romInit( ) than necessary, it is wise to review the code from the reference BSP and
remove any initialization code that is unnecessary at this stage of the boot
sequence.
bootInit.c: romStart( )
The text and data segments are copied from ROM to RAM in one of the following
ways:
For vxWorks_rom, both the text and data segments are copied to RAM.
For vxWorks_resrom_nosym, only the data segment is copied to RAM.