Originally posted by Ardje
View Post
And yes, it is setting up: you prepare the image at a board specific memory position, and hand over the pointer to the kernel.
On ARMv8 everything needs to be decompressed by the bootloader as well, and the bootloader also needs to know the more esoteric compression algorithms. ARMv8 also doesn't allow concatted initramfs images AFAIK.
I mean, the bootROM only executes raw code from some source (loading it to RAM first or not, usually yes nowadays). It's far too dumb to load an actual OS, and it's not supposed to. From that point on the bootloader can do whatever it wants.
an example of initramfs boot on ARMv8 http://weng-blog.com/2017/03/ARMv8-manual-boot/
Anyway: the Arm's I know probably load the first stage bootloader in cache, because you can't initialize a memory controller if you have no clue about how it is attached.
I've seen enough cases of L2 caches being disabled on boot while RAM most definitely was usable, and caches had to be enabled by the u-boot bootloader by writing some magic to a register.
My intel NAS
If it's x86 then all the initialization is done by FSP blobs and redboot is just a bootloader tasked to load a kernel.
the point is: redboot initializes memory to be able to download to.
Final point: generically a SoC doesn't know the memory that's connected to it, so it would be unable to initialize and use it,
There is a 99.9% chance that if you can download to memory it is by using a second stage bootloader like uboot's (pre) init that has already initialised memory. Or uboot is the third stage bootloader.
Look at the output, it has initialized RAM and it knows its size
HELLO!
BOOT0 is starting!
boot0 version : .3.0
dram size =1024
Succeed in opening nand flash.
Succeed in reading Boot1 file head.
The size of Boot1 is 0x00036000.
The file stored in 0X00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
On RPI the main CPU loads the second stage from microsd, which in turn initialises memory and then continues loading, and finally starts the application processor (the ARM part).
Leave a comment: