public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peng Fan <van.freenix@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V4 2/3] mx7: psci: add basic psci support
Date: Thu, 31 Mar 2016 21:33:38 +0800	[thread overview]
Message-ID: <20160331133047.GA19392@linux-7smt.suse> (raw)
In-Reply-To: <20160331111707.GA6760@t450s.lan>

Hi Gary,

On Thu, Mar 31, 2016 at 01:17:07PM +0200, Gary Bisson wrote:
>Hi all,
>
>Sorry to revive an old thread but I have some questions about thit patch.
>
>On Fri, Oct 23, 2015 at 10:13:04AM +0800, Peng Fan wrote:
>> 1. add basic psci support for imx7 chip.
>> 2. support cpu_on and cpu_off.
>> 3. switch to non-secure mode when boot linux kernel.
>> 4. set csu allow accessing all peripherial register in non-secure mode.
>> 
>> Signed-off-by: Frank Li <Frank.Li@freescale.com>
>> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>> Cc: Fabio Estevam <fabio.estevam@freescale.com>
>> ---
>> [snip]
>> diff --git a/arch/arm/include/asm/arch-mx7/imx-regs.h b/arch/arm/include/asm/arch-mx7/imx-regs.h
>> index 4dc11ee..9213374 100644
>> --- a/arch/arm/include/asm/arch-mx7/imx-regs.h
>> +++ b/arch/arm/include/asm/arch-mx7/imx-regs.h
>> @@ -866,6 +866,9 @@ struct cspi_regs {
>>  	ECSPI3_BASE_ADDR, \
>>  	ECSPI4_BASE_ADDR
>>  
>> +#define CSU_INIT_SEC_LEVEL0	0x00FF00FF
>> +#define CSU_NUM_REGS		64
>
>In the security documentation (revA) it is said that there are 40 CSL,
>why is it 64 here?
>
>Also, although this seems to work, later on when the kernel boots I get
>the following CAAM errors:
>caam 30900000.caam: failed to acquire DECO 0
>...
>caam 30900000.caam: failed to acquire DECO 0
>caam 30900000.caam: failed to instantiate RNG
>caam: probe of 30900000.caam failed with error -11

This patch will let SoC switch to non sec mode. I have little knowledge
of CAAM, I guess it works in sec mode. So when kernel boots up, it will
complains a lot...

>
>If I revert this patch and therefore leave the CSU to its default state
>at bootup the above CAAM issue disappears, do you have any idea why?


Revert this patch, then all code runs in sec mode.

>
>As a FYI, I am using U-Boot v2016.03 + a few patches that adds support
>for our i.MX7 Nitrogen7 board. You can find the repo here:
>https://github.com/boundarydevices/u-boot-imx6/tree/boundary-v2016.03
>
>Also, if I base U-Boot on top of NXP repo it works too since this csu/psci
>support isn't there:
>http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/tree/?id=rel_imx_3.14.52_1.1.0_ga

Yeah. NXP code not switch to non sec mode.

You can revert this patch in your vendor tree. I am not sure whether you
have tested linux upstream tree, or you use caam code from NXP vendor
tree. If you use NXP vendor tree, and use uboot upstream code, sure
caam will complain errros. We would like to use PSCI and work in
non-sec mode, but still some works need to be done.

Regards,
Peng.

>
>Regards,
>Gary
>_______________________________________________
>U-Boot mailing list
>U-Boot at lists.denx.de
>http://lists.denx.de/mailman/listinfo/u-boot

  reply	other threads:[~2016-03-31 13:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23  2:13 [U-Boot] [PATCH V4 1/3] arm: discard relocation entries for secure text Peng Fan
2015-10-23  2:13 ` [U-Boot] [PATCH V4 2/3] mx7: psci: add basic psci support Peng Fan
2016-03-31 11:17   ` Gary Bisson
2016-03-31 13:33     ` Peng Fan [this message]
2016-03-31 14:21       ` Gary Bisson
2015-10-23  2:13 ` [U-Boot] [PATCH V4 3/3] imx: mx7: default enable non-secure mode Peng Fan
2015-10-30  8:23 ` [U-Boot] [PATCH V4 1/3] arm: discard relocation entries for secure text Peng Fan
2015-11-10 13:01   ` Peng Fan
2015-11-10 13:14 ` Albert ARIBAUD
2015-11-11  1:14   ` Peng Fan
2015-11-11 17:05     ` Stefano Babic
2015-11-12 16:32       ` Stefano Babic
  -- strict thread matches above, loose matches on Subject: below --
2015-10-22 13:03 Peng Fan
2015-10-22 13:03 ` [U-Boot] [PATCH V4 2/3] mx7: psci: add basic psci support Peng Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160331133047.GA19392@linux-7smt.suse \
    --to=van.freenix@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox