All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keerthy <j-keerthy@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] ti: ARM: svc: Question about switching to am57xx HYP mode.
Date: Thu, 23 Mar 2017 09:33:45 +0530	[thread overview]
Message-ID: <2fc1cda2-d916-e6d9-fb83-1b2c4feb8436@ti.com> (raw)
In-Reply-To: <20170322152537.1f755e40@jawa>



On Wednesday 22 March 2017 07:55 PM, Lukasz Majewski wrote:
> Dear All,
> 
> I do have a question regarding switching from SVC to HYP mode on AM57xx
> SoC.
> 
> Just after going out of reset (room bootloader):
> ------------------------------------------------
> 
> Breakpoint 1, _start () at arch/arm/lib/vectors.S:54
> 54              b       reset
> (gdb) mo info
>     Core number       : 0
>     Core state        : debug mode (ARM)
>     Debug entry cause : Breakpoint
>     Current PC        : 0x40300000
>     Current CPSR      : 0x400000d3 (Supervisor)
>     Current SPSR      : 0x00000000
> (gdb) 
> 
> Here the A bit in CPSR is cleared - the "Imprecise Data Abort mask" is
> disabled.
> 
> Then we enter the HYP mode (due to LPAE u-boot support):
> Breakpoint 39, switch_to_hypervisor () at
> arch/arm/cpu/armv7/omap-common/lowlevel_init.S:35
> 
> After end of this ASM procedure we got following CPSR for HYP mode:
> 
> Breakpoint 41, switch_to_hypervisor_ret () at
> arch/arm/cpu/armv7/start.S:57 57              and     r1, r0,
> #0x1f           @ mask mode bits (gdb) mo info
>     Core number       : 0
>     Core state        : debug mode (ARM)
>     Debug entry cause : Breakpoint
>     Current PC        : 0x4030005c
>     Current CPSR      : 0x000001da (Hyp)
>     Current SPSR      : 0x00000010
> (gdb) 
> 
> And here the A bit "Imprecise Abort Bit" [8] is masked.
> 
> Why such operation is performed in the SMC call (which switches to HYP)?
> 
> I could try to disable it by hand (cpsie A), but I'm not sure if this
> has no "side effects".

Hi Lukasz,

This seems to be the default behavior in the ROM Code when we do an SMC
call which switches to HYP mode.

A, bit[8] Asynchronous abort mask bit.
I, bit[7]
IRQ mask bit.
F, bit[6] FIQ mask bit.

Are set which means they are masked.

From the interaction i had with the ROM code team you can unmask the A
bit/bit[8] if needed.

Regards,
Keerthy
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> 

      reply	other threads:[~2017-03-23  4:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 14:25 [U-Boot] ti: ARM: svc: Question about switching to am57xx HYP mode Lukasz Majewski
2017-03-23  4:03 ` Keerthy [this message]

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=2fc1cda2-d916-e6d9-fb83-1b2c4feb8436@ti.com \
    --to=j-keerthy@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.