Skip to content
  • Michael Walle's avatar
    armv8: layerscape: use memalign() to allocate spintable code · cdf8534b
    Michael Walle authored and Priyanka Jain's avatar Priyanka Jain committed
    
    
    Don't use efi_allocate_pages(). The allocated memory isn't carved out of
    the lmb allocations. The memory might then be allocated twice.
    Particulary, this might happened with the fdt_high/initrd_high feature
    which will relocate the fdt/ramdisk. This might then overlap with the
    spin table.
    
    Instead use memalign() which allocates on memory on the heap which is
    correctly carved out by lmb.
    
    Please note, that the memory is later reserved in the device tree as
    well as in the EFI memory map in ft_fixup_cpu() (in
    arch/arm/cpu/armv8/fsl-layerscape/fdt.c).
    
    Signed-off-by: default avatarMichael Walle <michael@walle.cc>
    Reviewed-by: Priyanka Jain's avatarPriyanka Jain <priyanka.jain@nxp.com>
    cdf8534b