Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The flow chart below illustrates the process from i-boot's reset vector to the jump to TF-A for all cores

...

...

Source files

The source files for x-boot are located in the "boot/xobot/" directory under the project's top folder. The entry point for x-boot is the label "_start" in the assembly file "arch/arm/sp7350/start.S". Notably, "_start" is situated at an offset of 32 bytes within the x-boot module, with the initial 32-byte space reserved for a header. The "_start" subroutine initializes the C execution environment and subsequently jumps to the C main function, the "xboot_main()" subroutine in the "xboot.c" file. The "xboot.c" file serves as the top-level control file for x-boot, governing the entire flow of operations.

The table below lists and explains the main files and folders in x-boot:

Files or folders

Descriptions

adc/

Contains subroutines for ADC.

arch/arm/sp7350

Houses CPU-relevant codes, including:

  • a64up module

  • CPU and cache-related codes

  • MMU table page creating codes

  • Linker script file: boot.ld

  • Start-up file: start.S

bin/

Output folder

common/

Contains common code, such as verifying images.

configs/

Contains defconfig files for boards.

cpio/

Contains CPIO codes.

draminit/

Contains DRAM-related codes.

fat/

Contains codes for FAT file-system operations.

i2c/

Contains subroutines for I2C interface.

include/

Contains many constant definitions used in x-boot.

lib/

Contains images CRC verification codes.

nand/

Contains SPI-NAND and 8-bit NAND drivers.

otp/

Contains subroutines for accessing OTP.

romshare/

Contains the entry table for accessing secure functions in i-boot.

sdmmc/

Contains SD card and eMMC drivers.

tools/

Contains some utilities used by x-boot.

usb/

Contains USB2.0 and USB3.0 drivers.

warmboot/

Contains a concise version of x-boot for running during warm-boot.

Kconfig

Menu config file of x-boot.

Makefile

Make file of x-boot

xboot.c

Main C file of x-boot.

Driver specifications and features

x-boot supports many device drivers for accessing devices. The following table shows the locations of drivers in project diretory boot/xboot/ and features of each driverdetail specifications or features.

DriversFolders

Features

8-bit NAND

nand/

  1. Support loading U-Boot image from 8-bit NAND flash.

  2. First block of 8-bit NAND flash should contain Sunplus Boot Profile Header.

  3. Support reading 1K60 ECC sectors.

  4. U-Boot image should be stored in 1K60 sectors.

ADC

adc/

eMMC

sdmmc/

  1. Support loading U-Boot image from eMMC device.

  2. U-Boot image should be stored at User Data Area.

  3. eMMC should contain GUID Partition Table (GPT).

I2C driver

i2c/

  1. Support I2C master mode.

  2. Support 100kHz and 400kHz speeds.

NVMEN (OTP)

otp/

  1. Support read and write OTP.

SD card

sdmmc/

  1. Support loading U-Boot image from an SD card.

  2. U-Boot image should be stored at root directory of first partition of the SD card.

  3. File-name of the U-Boot image should be u-boot.img.

  4. First partition of the SD card should be FAT32 or FAT16 format.

SPI-NANDnand/

  1. Support loading U-Boot image from SPI-NAND flash.

  2. First block of SPI-NAND flash should contain Sunplus Boot Profile Header.

  3. Support reading 1K60 ECC sectors.

  4. U-Boot image should be stored in 1K60 ECC sectors.

  5. Support SPI-NAND flash mounted in X1 or X2 position.

USB2.0 Host

usb/

  1. Support loading U-Boot image from an USB flash drive in USB2.0 port.

  2. U-Boot image should be stored at root directory of first partition of the USB flash drive.

  3. File-name of the U-Boot image should be u-boot.img.

  4. First partition of the USB flash drive should be FAT32 or FAT16 format.

  5. Support high-speed read operation only

USB3.0 Host

usb/

  1. Support loading U-Boot image from an USB flash drive in USB3.0 port.

  2. U-Boot image should be stored at root directory of first partition of the USB flash drive.

  3. File-name of the U-Boot image should be u-boot.img.

  4. First partition of the USB flash drive should be FAT32 or FAT16 format.

  5. Support high-speed read operation only

Other files

The following table shows the locations of important forlders or files of x-boot in project diretory boot/xboot/.

...

Type

...

Folders

...

Files

...

machine

...

arch/arm/sp7350/

...

a64up/

...

aboot.S

...

boot.ld

...

cache.c

...

cpu/

...

include/

...

page_table/

...

start.S

...

default config files

...

configs/

...

sp7350_emmc_ev_defconfig

...

sp7350_sdcard_ev_defconfig

...

SRAM Space Allocation

To facilitate program maintenance and data sharing, x-boot and i-boot utilize the same SRAM segment division and structure. Figure 4.2 illustrates the segmentation of SRAM into 9 segments, ranging from low to high addresses: xboot_buf, bootinfo, boothead, a64up, cdata, storage_buf, stack, bootcompat, and spacc_ram.

...