SoC FPGA Bootloader Developer Center
SoC FPGA Bootloader Developer Center provides the available SoC bootloaders with main characteristics, how to get started, and additional resources.
Intel® SoC FPGAs use a bootloader to load and run the end user application on the hard processor system (HPS). The end user application may be a simple bare-metal application or a complex operating system like the Linux* operating system.
This page describes what a bootloader is, lists the available boot loaders and their main characteristics, describes how to get started with the bootloaders, and lists additional resources.
1. What is a Bootloader
Bootloader Definition
When an SoC device boots up, a piece of software called the BootROM is first run. For several reasons, the BootROM has the following limited functionality:
- It needs to fit in the on-chip ROM so it has to be small
- It is very expensive to change so it has to be very robust, which implies less features
- It does not know how the system was configured so it cannot bring up everything
The end user application on the other hand is typically large and requires the system to be configured as desired by the end user before it can run.
The bootloader's job is to bridge the gap between the BootROM and the end user application.
Single Stage Bootloader
Typical Bootloader Tasks
- Configuring the pin multiplexing and pin settings, such as slew rate, voltage, and pull-up/pull-down
- Configuring the clocks in the clock tree
- Bringing up and calibrating the SDRAM
- Initializing the flash memory
- Configuring the FPGA fabric
- Loading the end application from the flash memory
- Passing control to the end application
Besides the features listed above, bootloaders also offer the following advanced features that can enable more complex deployment and more convenient development:
- Network access that brings in the end user application from the cloud.
- Debugging tools that enable more convenient diagnosis of issues.
- Command-line interface for interactive commands.
- Application running a framework that can enable simple end user applications to be loaded and run to completion by the bootloader. After the application completes, the control is passed back to the bootloader.
Multi-Stage Bootloaders
Sometimes the bootloader process can be split into multiple stages, typically two.
For Cyclone® V SoCs, the BootROM can only load a boot loader of up to 64 KB in size because the SDRAM is not yet brought up at that stage. Similarly for Intel® Arria® 10 SoCs the BootROM can only load a bootloader of up to 256 KB in size. Because of these size limitations, advanced features such as networking or complex filesystem access cannot be accomplished. If such features are desired, the first stage of the bootloader brings up the SDRAM and then loads a second stage with more functionality. A two-stage bootloader is the default option for Cyclone V SoCs, Arria® V SoCs, and Arria® 10 SoCs.
Bootloaders for SDM-Based Devices
For Intel® Stratix® 10 SoCs, Intel® Agilex® 7 SoCs and Intel® Agilex® 5 SoCs a two-stage bootloader is typically used. The first small bootloader stage is part of the FPGA configuration bitstream and is loaded by the secure device manager (SDM) into the HPS on-chip RAM, while the second larger bootloader stage needs to be stored in a location that is accessible by the HPS.
2. Hardware Handoff
Handoff Overview
All Intel SoC FPGA projects start with a hardware project where various system settings that impact the HPS are entered by the user. These include:
- Pin multiplexing
- Pin settings
- SDRAM settings
- Clock settings
It is the bootloader's job to apply these settings and the process of the bootloader receiving these settings is called the hardware-to-software handoff.
Depending on the exact bootloader and SoC device family, the handoff can take various forms. Typically:
- For Cyclone V and Arria V SoCs, the handoff is a combination of XML files, binary files, and source code files, which are converted to source code and then compiled into the bootloader
- For Intel Arria 10 SoCs, the handoff is contained in a single XML file that is converted to a device tree file and used by the bootloader
- For Intel Stratix 10 SoCs, Intel Agilex 7 SoCs, and Intel Agilex 5 SoCs the handoff information is part of the FPGA configuration bitstream
The primary method of entering or changing the handoff information is through editing them in the Quartus Platform Designer.
In addition to the handoff information, the bootloaders also have various settings that can be selected by the user through the following methods:
- Editing the bootloader source code
- Editing the bootloader device tree when a device tree is used
Cyclone V Soc and Arria V SoC Handoff
Intel Arria 10 SoC Handoff
Intel Stratix 10 SoC, Intel Agilex 7 SoC, and Intel Agilex 5 SoC Handoff
3. Available Bootloaders
Overview of Available Bootloaders
The following table lists the available bootloaders, types of licenses, supported SoCs, and availability of two-stage support:
U-Boot
U-Boot is a bootloader that is widely used by the industry and offers numerous capabilities:
- Optional first stage called "SPL" for systems with limited on-chip RAM (for example, Cyclone V SoC and Arria V SoC)
- Networking capability
- Flash memory support
- Command-line interface
- Scripting
- U-Boot custom applications
U-Boot is developed under a general-public licence (GPL) so any contributions that are made to a product that is being delivered to the public must also be made public.
The U-Boot source code is available at the U-Boot SoC FPGA page on the GitHub website.
The main generic U-Boot home page is located at the Das U-Boot -- the Universal Boot Loader web page.
ATF
The ARM Trusted Firmware (ATF) is a reference implementation of secure world software for ARMv8-a, implementing various ARM interface standards, such as Trusted Board Boot Requirements (TBBR) and Secure Monitor Call (SMC).
The ATF is developed collaboratively under a BSD license, which allows convenient development and deployment.
The source code for Intel SoC FPGA port of ATF can be accessed at https://github.com/altera-opensource/arm-trusted-firmware.
5. Resources
User Guides
The following user guides are available:
Source Code
Source code can be obtained from the following websites: