GSRD - Boot Flow

原文鏈接:https://rocketboards.org/foswiki/Documentation/GSRDBootFlow

Boot Flow

  • BootROM
  • Preloader
  • Bootloader
  • Booting Examples
  • Boot Flow

    The GSRD boot flow includes the following stages:

    1. BootROM
    2. Preloader
    3. U-Boot
    4. Linux
    5. gsrd-boot.png

      The BootROM and the Preloader stages are needed for all the applications in which the Cyclone V or Arria V SoC are used. They are shown in blue in the above figure. The U-boot and Linux are used by the GSRD, but a custom application may have the Preloader loading a bare-metal application directly for example.

      The following table presents a short description of the different boot stages:

      Stage Description
      BootROM Performs minimal configuration and loads Preloader into 64KB OCRAM
      Preloader Configures clocking, IOCSR, pinmuxing, DDRAM and loads U-boot into DDRAM
      U-boot Configures FPGA, loads Linux kernel
      Linux Runs the end application
      For more information about SoC FPGA booting please refer to the following documents:

      BootROM

      Upon power on, the processor executes the BootROM code which resides inside on-chip ROM.

      The main role of the BootROM is to initialize all required hardware components in order to boot up the next stage boot software, the Preloader.

      The BootROM fetches the Preloader binaries from serial NOR flash, NAND flash or SD/MMC flash memory based on the BSEL pins.

      Instead of running the Preloader from Flash, the BootROM can:

      • Run Preloader from FPGA memory,
      • Run code from RAM - this option can be used only on Warm reset
      • The BootROM uses the CSEL pins to determine the clocks to be used.

        Preloader

        The Preloader used by the GSRD is based on the SPL (Second Program Loader) framework, which is part of the U-Boot. Because of this, the Preloader and U-Boot share most of the source code, such as drivers. This gives the Preloader access to the variety of well tested drivers available for U-Boot.

        The main functions of the Preloader are:

        • Initializing the SDRAM interface including calibration and SDRAM’s PLL configuration
        • Fetching the subsequent bootloader image from NAND, SD/MMC or serial NOR flash.
        • Storing the boot image to SDRAM and pass control over to subsequent bootloader
        • In addition to the above, the Preloader:

          • Configures the SOCFPGA HPS I/Os through Scan Manager
          • Configures pin muxing through System Manager (configurable by Qsys)
          • Re-configures the PLLs based on user generated settings (configurable by Preloader Generator)
          • Releases all/certain peripherals from reset through Reset Manager (configurable by Qsys)
          • Initializes the required flash controller (either NAND, SD/MMC or QSPI) based on boot option
          • Bootloader

            The bootloader used by GSRD is U-Boot.

            U-Boot is an open source, primary boot loader used in embedded devices. U-Boot is licensed under GPL as it is an open source framework.

            For more details about U-Boot, please refer to http://www.denx.de/wiki/U-Boot/Documentation.

            The main functions of U-Boot are:

            • Setting up the OS environment
            • Fetching the OS image from NAND, SD/MMC, serial NOR flash, Ethernet through TFTP, USB mass storage
            • Storing the boot image to SDRAM and pass control over to subsequent bootloader
            • Providing a console that can be used for user operations such as modifying the Device Tree Blob (DTB) and boot arguments.
            • Booting Examples

              發表評論
              所有評論
              還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
              相關文章