Complex SOCs have one or more processors to perform some protocol level functionality. The processors could be an MCU or DSP or any other microcontroller fetching, decoding and evaluating SW instructions from a memory.
I'm providing some steps of a system which has multiple processors, an external boot rom, an SDRAM, processor TCM, and Level 2 cache controller.

In this picture, it is the job of the Master MCU to wake up first, when the system reset is asserted. This means, the boot loader picks up the OS for the system MCU first.
Boot Loader:
The small program that starts this sequence of loading into RAM, is known as a bootstrap loader, bootstrap or boot loader. This small boot loader loads data and programs which are then executed from internal/external RAM.
Second-stage boot loader:
The small program is most often not itself an operating system, but only a second-stage boot loader. It will then be able to load the operating system properly, and transfer execution to it. The system will initialize itself, and may load device drivers etc. for the OS.
All this time, the two DSPs which are under the control of the MCU are still under reset. Once the Master MCU boots, and is ready, sometime later the reset for the DSPs is de-asserted, possibly by a direct/indirect control of the MCU.
Following is the set of steps carried out typically by a DSP/generic MCU once the reset is released/de-asserted:
1. Initially he HALT signal for the processor/DSP ensures it doesn't fetch any instructions until the processor is ready
2. The HALT is de-asserted possibly by a write from the Master MCU into a control register as shown above
3. This means the processor/DSP is free to fetch instructions & data
4. The reset vector is generally 0x0, depends you need to check the SW user manual for the processor
5. This could possibly be either an access to a TCM or SRAM
6. Code should have been already placed in to the TCM or SRAM by the MCU.
7. Once the boot code is executed, there might be a jump to the external SDRAM to fetch and execute more instructions.
The boot code itself requires some system level initialization or setup and mostly consists of the following:
1. Enable both instruction and data TCMs
2. Copy any exception vectors [for aborts, Software interrupts, IRQ, FIQ etc.]
3. Configure the settings for the MMU/MPU
4. Invalidate the cache
5. Enable the Cache and MMU/MPU
6. Initalize the cache controller for L2
7. Jump to the main program in SDRAM
No comments:
Post a Comment