How MLO (minimal bootloader) works?

5.7k views Asked by At

I am trying to understand how a MLO is loaded into the on-chip of a SOC and do the minimal configuration. I am using TI DM8168 soc.

I have gone through the following link to understand the MLO or x-loader:

http://omappedia.org/wiki/Bootloader_Project

I got to know that the ROM Code loads the MLO (x-loader) to the on-chip RAM of the SoC which do the minimal configuration and finally loads the uboot (universal bootloader), that finally initiates the linux kernel.

My doubt here is that my on-chip RAM size is 64 KB and the MLO size is 116 KB, then how the ROM code is loading the MLO to the on-chip RAM

1

There are 1 answers

0
Frant On

It seems that the DM8168 has more than 64KiB internal RAM: as explained in the DM816x AM389x PSP 04.00.01.13 Feature Performance Guide, it has at least two more blocks of internal RAM, referenced OMC0 and OMC1, both being 256KiB in size.

Those two banks can be used by u-boot according to this document:

OCMC0 0x40300000 - 0x4033FFFF OCMC 0 will be used by ROM Code and U-boot. Once Linux kernel boots, OCMC0 is free and kernel can use it. If OCMC0 should not be used to load u-boot if loaded using CCS.

OCMC1 0x40400000 - 0x4043FFFF OCMC 1 will be used by ROM Code and U-boot. Once Linux kernel boots, OCMC0 is free and kernel can use it.

From u-boot-omap3/board/ti/ti8168/config.mk, it seems u-boot is using OMC1

TI_LOAD_ADDR = 0x40400000

This would explain why your 116KiB u-boot image can fit in the DM8168 internal RAM.