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] Question re HYP mode and IRQ/FIQ stack setting
Date: Tue, 12 Nov 2013 22:29:18 +0100	[thread overview]
Message-ID: <20131112222918.3348a707@lilith> (raw)
In-Reply-To: <CAMJs5B8McAdUk3z=eQ7ShtU_9v6Wrkx=R-UHsM1U=VrHG0LGqg@mail.gmail.com>

Hi Christoffer,

On Tue, 12 Nov 2013 09:09:23 -0800, Christoffer Dall
<christoffer.dall@linaro.org> wrote:

> I suspect that if you are in Hyp mode, you should not worry about
> FIQ/IRQ mode, but just make sure to configure Hyp mode properly to
> handle interrupts.  (it's a separate entry in the exception vector and
> you probably need to look at the HSR register whn you've taken an
> interrupt).  So, as Andre suggests below, it depends on your use case.

Ok, so les me try to sum that up from my perspective (IRQ and FIQ
stacks in U-Boot):

Some ARM U-Boot targets run in SVC32 mode, and some in HYP mode.

For targets which run in SVC32 mode: aborts execute in abort mode, IRQs
in IRQ mode, FIQs in FIQ mode, etc., each mode having its own stack.

For targets which run in HYP mode: aborts, FIQ and IRQs all run in HYP
mode, using always the same stack.

In both types of targers: prefetch and data aborts, FIQs and IRQs
execute through the usual vectors; in SVC32 mode, because there's no
other way; in HYP mode, because exceptions occurring while in HYP
mode use the normal vector, not the HYP vector.

Correct?

If so, then U-Boot stack requirements for SVC32 and HYP mode are
as follows: in SVC32, we need separate IRQ and FIQ stacks, and the main
(SVC32) stack does not have to accommodate for interrupt handler
context storage. In HYP mode, the only stack is the HYP one and
exception handlers will use it too, so it has to accommodate for
their context storage.  

Still correct?

Amicalement,
-- 
Albert.

  reply	other threads:[~2013-11-12 21:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12 11:41 [U-Boot] Question re HYP mode and IRQ/FIQ stack setting Albert ARIBAUD
2013-11-12 16:28 ` Christoffer Dall
2013-11-12 16:53   ` Andre Przywara
2013-11-12 17:09     ` Christoffer Dall
2013-11-12 21:29       ` Albert ARIBAUD [this message]
2013-11-12 22:34         ` Christoffer Dall
2013-11-13  6:22           ` Albert ARIBAUD
2013-11-13 15:16             ` Christoffer Dall

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=20131112222918.3348a707@lilith \
    --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