On Fri, Jul 24, 2015 at 6:38 AM, Ard Biesheuvel
<[email protected]> wrote:
>
> +               /*
> +                * First, try a straight allocation at the preferred offset.
> +                * This will work around the issue where, if dram_base == 0x0,
> +                * efi_low_alloc() refuses to allocate at 0x0 (to prevent the
> +                * address of the allocation to be mistaken for a FAIL return
> +                * value or a NULL pointer). It will also ensure that, on
> +                * platforms where the [dram_base, dram_base + TEXT_OFFSET)
> +                * interval is partially occupied by the firmware (like on APM
> +                * Mustang), we can still place the kernel at the address
> +                * 'dram_base + TEXT_OFFSET'.
> +                */
> +               *image_addr = *reserve_addr = dram_base + TEXT_OFFSET;
> +               nr_pages = round_up(kernel_memsize, EFI_ALLOC_ALIGN) /
> +                          EFI_PAGE_SIZE;
> +               status = efi_call_early(allocate_pages, EFI_ALLOCATE_ADDRESS,
> +                                       EFI_LOADER_DATA, nr_pages,
> +                                       (efi_physical_addr_t *)reserve_addr);

This causes our kernel to crash, because on our system, dram_base is
not 2MB aligned.  I'll be posting a patch soon that fixes this.

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to