public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] CONFIG_ARMV7_NONSEC on altera soc (alignment issues ?)
Date: Mon, 7 Apr 2014 22:53:43 +0200	[thread overview]
Message-ID: <E1WXGY4-0000NH-RV@janus> (raw)
In-Reply-To: <5564506.u1KPOY9OcW@dabox>

Hi Tim,

On Wed, 26 Mar 2014 15:25:33 +0100, Tim Sander <tim@krieglstein.org>
wrote:

> Hi
> 
> I am currently trying to configure either Altera Soc and Xilinx Zynq to boot Linux in nonsecure-mode.
> This mail focusses on the Altera SOC.
> 
> As soon as the u-boot switched to normal mode it seems there is a problem with code alignment handling? 
> At least it seems the code which is running beforehand stops working in normal mode and stops in either
> data_abort or prefetch handler. It stopps working when it hits the call to
> stdio_devices[file]->puts(s); in console_puts (console.c:255).
> 
> print *stdio_devices[file]
> $2 = {flags = 16978471, ext = 16978464, 
> name = "$\022\003\001\202\022\003\001\360\031\003\001\020\060\220", <incomplete sequence \345>, 
>   start = 0xe92d4070, stop = 0xe2806010, putc = 0xe1530006, puts = 0xe1a04000, tstc = 0xe1a05001, 
>   getc = 0xe5810024, priv = 0x1a000007, list = { next = 0xe5831004, prev = 0xe5813000}}
> 
> As there are unaligned addresses (putc?) in these function calls i have the impression that this is not working in
> normal mode but in secure mode.
> 
> Unfortunatly i was not able to get the mainline u-boot to boot on the altera soc so i patched the altera release:
> git://git.rocketboards.org/u-boot-socfpga.git
> with the 1740999a39ea4217bf926002d10869c0d925a5dc aka socfpga_v2013.01.01-rel branch.
> 
> As the altera u-boot release socfpga_v2013.01.01-rel is to old to have the CONFIG_ARMV7_NONSEC patches
> i cherry-picked the following patches:
> d4296887544ddf95808bfb62f312008f519efb7b	extend non-secure switch to also go into HYP mode
> ba6a1698116da272f14c53a3ae41467cb7fc4372 	add SMP support for non-secure switch
> bb975455650b1f36681de31a93ffe54952ed3a6b 	trigger non-secure state switch during bootm execution
> 1ef923851ab8ffcc4265fd991815b88d9c1f12d7 	add C function to switch to non-secure state
> 16212b594f385bd594d5d316bf11b13c1186e3d7 	add assembly routine to switch to non-secure state
> 45b940d6f9a9d4989452ea67480e299bfa51ee19 	add secure monitor handler to switch to non-secure state
> d75ba503a972df09784f1a332ba356ef8b42a0a6 	ARM: prepare armv7.h to be included from assembly source
> 
> I also applied the attached hacked together patches to get the system running and fix up the stack pointer in 
> normal mode as it pointed to 0. 
> 
> Best regards
> Tim

So this is not a patch for mainline U-Boot, right?

Amicalement,
-- 
Albert.

  reply	other threads:[~2014-04-07 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26 14:25 [U-Boot] CONFIG_ARMV7_NONSEC on altera soc (alignment issues ?) Tim Sander
2014-04-07 20:53 ` Albert ARIBAUD [this message]
2014-04-07 22:41   ` Tim Sander

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=E1WXGY4-0000NH-RV@janus \
    --to=albert.u.boot@aribaud.net \
    --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