Re: [PATCH] firmware: qcom: scm: Peripheral Authentication Service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 30, 2015 at 12:46:19PM -0700, Bjorn Andersson wrote:

<snip>

> While adding the 64 bit interface it might be of interest to extract the dma
> allocation in __qcom_scm_pas_init_image() into the common code and pass the
> physical pointer to instead, but I haven't looked at the differences to the 64
> bit interface.

I am currently delving into this.  I'll take this patch and see what needs to be
done.

<snip>

> +int __qcom_scm_pas_init_image(u32 peripheral, const void *metadata, size_t size)
> +{
> +	dma_addr_t mdata_phys;
> +	void *mdata_buf;
> +	u32 scm_ret;
> +	int ret;
> +	struct pas_init_image_req {
> +		u32 proc;
> +		u32 image_addr;
> +	} request;
> +
> +	/*
> +	 * During the scm call memory protection will be enabled for the meta
> +	 * data blob, so make sure it's physically contiguous, 4K aligned and
> +	 * non-cachable to avoid XPU violations.
> +	 */
> +	mdata_buf = dma_alloc_coherent(NULL, size, &mdata_phys, GFP_KERNEL);

Not sure this gives you a 4k aligned buffer every time.

<snip>

Otherwise everything looks fine to me.

-- 
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-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux