Visible to Intel only — GUID: sfo1410070164189
Ixiasoft
Visible to Intel only — GUID: sfo1410070164189
Ixiasoft
A.6. Typical Preloader Boot Flow
This section describes a typical software flow from the preloader entry point until the software passes control to the next stage boot software.
Low-level initialization steps include reconfiguring or disabling the L4 watchdog 0 timer, invalidating the instruction cache and branch predictor, remapping the on-chip RAM to the lowest memory region, and setting up the data area.
Upon entering the preloader, the L4 watchdog 0 timer is active. The preloader can disable, reconfigure, or leave the watchdog timer unchanged. Once enabled after reset, the watchdog timer cannot be disabled, only paused.
The instruction cache and branch predictor, which were previously enabled by the boot ROM code, need to be invalidated.
The preloader needs to remap the exception vector table because the exception vectors are still pointing to the exception handler in the boot ROM when the preloader starts executing. By setting the L3 interconnect remap bit 0 to high, the on-chip RAM mirrors to the lowest region of the memory map. After this remap, the exception vectors uses the exception handlers in the preloader image.
The figure below shows the memory map before and after remap.
The preloader can reconfigure all HPS clocks. During clock reconfiguration, the preloader asserts reset to the peripherals in the HPS affected by the clock changes.
The SDRAM goes through full initialization for cold boot or a partial initialization for warm boot. For full initialization, the preloader configures the SDRAM PLL before releasing the SDRAM interface from reset. SDRAM calibration adjusts I/O delays and FIFO settings to compensate for any board skew or impairment in the board, FPGA portion of the device, or memory device. For partial initialization, SDRAM PLL configuration and SDRAM calibration is not necessary.
The preloader looks for a valid next stage boot image in the next stage boot device by checking the boot image validation data and checksum in the mirror image. Once validated, the preloader copies the next stage boot image from the next stage boot device to the SDRAM.
Before software passes control to the next stage boot software, the preloader can write a valid value (0x49535756) to be read by the preloader in the initswstate register under the romcodegrp group in the system manager. This value indicates that there is a valid boot image in the on-chip RAM. The initiswlastld register holds the index of the last preloader software image loaded by the Boot ROM from the boot device. When a warm reset occurs, the Boot ROM loads the image indicated by the initswlastld register if the BSEL value is the same as the last boot.