Figure A-7: Typical Preloader Bootflow
Preloader Entry
Low-Level Initialization
Ensure All HPS I/O Banks Are Frozen
by the Freeze Controller
Assert Reset to Affected Peripherals/
Components during PLL Reconfiguration
Clock Reconfiguration
Initiate Scan Manager to Configure
the HPS I/O CSR
Configure Pin Multiplexing through
the System Manager
Thaw (Unfreeze) All HPS I/O Banks
through the Freeze Controller
Reset Deassertion through the
Reset Manager
L3/L4 Interconnect Configuration
Timer & UART Initialization
SDRAM Interface Initialization (Include
Calibration & PLL Configuration)
Success?
yes
no
Next Stage Boot Device Initialization
Checking Boot Image’s Checksum
(Optional)
Checksum
Passed?
yes
no
Copy the Next Stage Boot Image from the
Next Stage Boot Device to the SDRAM
Write Magic Value to the Initial
Software State Register
Error Handler
Pass Control to Next Boot
Stage Software in SDRAM
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 either 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 will use the exception handlers in the preloader image.
The figure below shows the memory map before and after remap.
Altera Corporation
Booting and Configuration Introduction
A-13
Typical Preloader Boot Flow
cv_5400a
2013.12.30