[PATCH] arm: Support initrd with address in boot alias region

Russell King - ARM Linux admin linux at armlinux.org.uk
Wed Sep 30 06:35:22 EDT 2020


On Tue, Sep 29, 2020 at 10:21:35AM -0700, Florian Fainelli wrote:
> +Rob, Russell,
> 
> On 9/29/2020 12:54 AM, Matija Glavinic Pecotic wrote:
> > If bootloader passes address of initrd in boot alias region, initrd
> > will fail on memblock_is_region_memory as memblock with such address
> > doesn't exist.
> > 
> > Issue was observed with kexec which passed initrd address in boot alias
> > region, while bootloader will typically pass physical address. Commit
> > fe7db7570379 ("of/fdt: Populate phys_initrd_start/phys_initrd_size from FDT")
> > uncovered problem by removing virt_to_phys on the initrd physical
> > address. __virt_to_phys on our platform coincidentally fixed address.
> > 
> > Fix by trying to correct address in case of invalid physical address.
> > 
> > Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext at nokia.com>
> 
> This should have a Fixes tag:
> 
> fe7db7570379 ("of/fdt: Populate phys_initrd_start/phys_initrd_size from
> FDT")
> 
> I am not familiar enough with how the identity map works, but it seems to do
> what you want it to.

It seems strange to pass the initrd in using an address that is not
listed as part of the system memory map, especially as the initrd is
freed during kernel initialisation.

Which boot loader is this, and is there a reason it operates this way?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list