Part Number: AM5718
Tool/software: Linux
According to section 33.3.8.4 Image Execution of the AM5718 TRM (SPRUHZ7F), at offset 0x04 in the Booting Parameter Structure, there's a pointer to something called "Memory booting device descriptor". I was unable to find a description of that descriptor. The U-boot code that handles that descriptor is save_omap_boot_params() found in arch/arm/mach-omap2/boot-common.c. The reference is
boot_params = omap_boot_params->boot_device_descriptor;
The code then adds an offset to get to another address to which is added yet another offset to access the boot mode.
Does anyone know where that structure is documented?
P.S. That same code can potentially invoke the function omap_sys_boot_device(). For my situation, that function isn't called which is a good thing since I believe that function has a serious bug. The implementation of that function is found in arch/arm/mach-omap2/omap5. That function claims to be accessing the register that contains the latched SYS_BOOT pins. The invocation is:
sys_boot = readl((u32 *) (*ctrl)->control_status) & ((1 << 4) - 1);
According to arch/arm/mach-omap2/omap5/prcm-regs.c, control_status resolves to 0x4A002134 which Table 18-32. CTRL_CORE_STATUS of the TRM shows to be a completely different register. The bits that function is reading are marked "RESERVED". (There is code elsewhere that correctly accesses that register to determine DEVICE_TYPE.)