...
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.
...
Below are explanations of each segment's purpose:
xboot_buf: x-boot program segment, where the x-boot program is loaded and executed.
bootinfo: bootinfo segment containing the g_bootinfo structure, which records boot-related information.
boothead: boothead segment holding the g_boothead array, used to store GPT data for eMMC or header data for NAND flash.
a64up: a64up segment where the a64up program resides, responsible for transitioning the CPU from 32-bit mode to 64-bit mode.
cdata: C data segment containing global variables or static variables in C.
storage_buf: Device driver data segment for boot devices such as eMMC and NAND flash. Different boot device drivers share the same space here during a single boot, as only one boot device driver is utilized per boot.stack: Stack segment where the stack for C is located
mmu_pgtbl: Page table of MMU.
stack: Stack segment where the stack for C is located.
spacc_ram: spacc data segment containing data used by SPAcc.bootcomp: CPU run control data.
reserved: warm-boot reteion 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 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.