Jurasic
Jurasic

Reputation: 1956

clear RAM region before linux boot up

Is it possible to clear manual specified address range of RAM before linux kernel boot up? Or maybe in early stage of booting?

I found how RAM addresses could be excluded, but I want to use this addresses after boot.

[Update]: I have 3d party bootloader that I can't change. This bootloader using some memory from RAM for frame buffer to display some picture on the screen. In the process of booting linux kernel at stage when initramfs is decompressing we overlap this memory as assuming that this memory isn't used. So picture on the screen becomes corrupted.

[Update_2]: I zeroed that RAM area, but it didn't fix picture corruption. Linux still use this memory during boot up and overwrite the picture.

Maybe it is possible to exclude this memory area (that is used by bootloader) from booting process and add it later?

Upvotes: 0

Views: 681

Answers (1)

ThePosey
ThePosey

Reputation: 2734

From your updates it looks like what is happening is that Linux thinks that this memory region, that I assume your LCD peripheral is using DMA to shoot out to the display, is just regular RAM that it is free to use. As whatever happens to be getting written to that RAM area by linux isn't display data it is still getting output to the LCD via DMA but it is corrupt now.

Well one solution that you could use since you can't change the 3rd party bootloader is to make your own secondary bootloader and have the 3rd party bootloader jump to that instead of linux. This secondary bootloader would save all the parameters that are normally passed to linux by your 3rd party bootloader. I think what you really would want this secondary bootloader to do is to turn off the DMA that is feeding output to your LCD then your screen should go blank. Once thats done you can go ahead and jump into linux as usual. You may need to modify the parameters that linux is passed slightly if the secondary bootloader offsets some memory location parameters that linux was being passed as well.

Upvotes: 1

Related Questions