Versions Compared

Key

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

...

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

...

Below are explanations Let's delve into the purpose of each segment's purpose:

  • xboot_buf: This segment houses the x-boot program segment, where the x-boot program it is loaded and executed.

  • bootinfo: Contains the bootinfo segment containing with the g_bootinfo structure, which records recording essential boot-related information.

  • boothead: The boothead segment holding stores the g_boothead array, used to store for GPT data for in eMMC or header data for in NAND flashflashes.

  • a64up: a64up segment where Dedicated to the a64up program resides module, responsible for transitioning the CPU from 32-bit mode to 64-bit mode.

  • cdata: This is the C data segment containing , hosting global variables or and static variables in C.

  • storage_buf: Device Reserved for device driver data segment for related to boot devices such as like eMMC and NAND flash. Different Multiple boot device drivers share the same this space here during a single boot, as with only one boot device driver is utilized per boot.

  • mmu_pgtbl: Page The page table of MMU.

  • stack: Stack The stack segment where the stack for C is located.

  • bootcomp: CPU run control datafields.

  • reserved: This segment is designated for warm-boot reteion retention data.

During system boot, i-boot reads boot-related information from the boot switch and the OTP (One-Time Programmable) memory within the C chip. This information is then stored in the g_bootinfo structure. Consequently, the data in the C structure g_bootinfo structure determines the i-boot boot mode and the subsequent boot process. x-boot directly utilizes the data in the g_bootinfo structure to determine the boot mode and process.