lkml.org 
[lkml]   [2015]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] firmware: qcom: scm: Peripheral Authentication Service
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



\
 
 \ /
  Last update: 2015-07-01 01:41    [W:0.100 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site