All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] ti: ARM: svc: Question about switching to am57xx HYP mode.
Date: Wed, 22 Mar 2017 15:25:37 +0100	[thread overview]
Message-ID: <20170322152537.1f755e40@jawa> (raw)

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".




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-22 14:25 UTC|newest]

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

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=20170322152537.1f755e40@jawa \
    --to=lukma@denx.de \
    --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.