linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: bpringlemeir@nbsps.com (Bill Pringlemeir)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] drivers: irq-chip: Enable SGI's for Secure-to-NonSecure communication use-cases
Date: Mon, 27 Jan 2014 16:17:17 -0500	[thread overview]
Message-ID: <87wqhl15wi.fsf@nbsps.com> (raw)
In-Reply-To: 79CD15C6BA57404B839C016229A409A83EDAD85E@DBDE04.ent.ti.com


> From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk]

>> So it seems that your intention is to use the existing infrastructure
>> for this by directing SGIs through the normal IRQ processing.
>> To that idea, I say no way.

On  6 Jan 2014, hvaibhav at ti.com wrote:

> You have any other alternative?

I think you need to put Bhupesh Sharma's comment with this.  The typical
sane mode for GIC with TZ is to have the monitor mode toggle the IRQ/FIQ
routing bits in the SCR (cp15) bits 1,2.  That is, the IRQ goes direct
to core and FIQ goes to monitor from the 'Normal' world.  In the
'Secure' world, the FIQ goes direct to core and IRQ traps to monitor.
The monitor mode vector table has a gateway from secure to normal for
IRQ and gateway from normal to secure for FIQ.

Now, consider the 'SMC' instruction and what is present in stuff like
this,

 http://lwn.net/Articles/513756/
 mach-omap2/{omap-smc.S,omap-secure.c,omap-secure.h}

Instead of messing around with the GIC, why not use something even more
generic like the 'SMC' instruction.  It has the same sort of 'end game'
which is a trap to monitor mode.  The monitor has to be a little smarter
to determine which world called but this should always be the case;
really you want to check this.

Btw, the situation is the same no matter which world Linux is in.  I
don't think Linux can be the recipient of an 'SMC' call.  But I think
most use cases would put it in the 'normal world' and the SMC is fine.

Fwiw,
Bill Pringlemeir.

  reply	other threads:[~2014-01-27 21:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06  5:09 [RFC] drivers: irq-chip: Enable SGI's for Secure-to-NonSecure communication use-cases Hiremath, Vaibhav
2014-01-06  5:32 ` bhupesh.sharma at freescale.com
2014-01-06  6:31   ` Hiremath, Vaibhav
2014-01-06 13:25 ` Russell King - ARM Linux
2014-01-06 16:12   ` Hiremath, Vaibhav
2014-01-27 21:17     ` Bill Pringlemeir [this message]
2014-01-28  5:26       ` Hiremath, Vaibhav
2014-01-28 15:18         ` Bill Pringlemeir

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=87wqhl15wi.fsf@nbsps.com \
    --to=bpringlemeir@nbsps.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).