From: Robin Murphy <robin.murphy@arm.com>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org,
Alexandre Torgue <alexandre.torgue@st.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Benjamin Gaignard <benjamin.gaignard@st.com>
Subject: Re: [PATCH 0/3] STM32 Extended TrustZone Protection driver
Date: Wed, 28 Feb 2018 18:32:15 +0000 [thread overview]
Message-ID: <09775cf5-ba70-bef6-6196-5f16fd0dc08b@arm.com> (raw)
In-Reply-To: <20180228175303.h7qm3zylmfsitmwn@lakrids.cambridge.arm.com>
On 28/02/18 17:53, Mark Rutland wrote:
[...]
>> It is not about to "check" the DT but if Linux could get access to the
>> hardware. Hardware block assignment to secure or non-secure world
>> could change at runtime for example I2C block could be manage by
>> secure OS for a trusted application and when it have finish "release"
>> the it for Linux.
>
> The driver does not do this today. It probe the HW once during early
> boot, then aborts driver probes. It provides no provision for dynamic
> assignment.
>
> Is this something you plan to implement? How will the secure world
> notify the non-secure world of its intent to manage a device, or
> vice-versa?
Note that this is another thing which in general already happens -
control of (and correspondingly, hardware access to) things like display
engines and video decoders can get transferred between Linux (well,
Android at least) and a trusted OS. You need communication and
cooperation between the two sides via channels like tee-supplicant to
make it usable, though, at which point the fact that this ETZPC provides
non-secure-visible status unlike other TZASCs is rather superfluous - if
the secure side could just blindly take ownership of the I2C block in
response to some event, while the Linux I2C driver is in the middle of
its own transfer, a status bit in a register somewhere else isn't going
to be much help overall.
>> I don't think that could be done by changing DT.
>>
>> I think that dhecking hardware blocks status bits before probe them is
>> also more robust than let
>> each driver discover at probe time that it hardware isn't responding.
>
> I don't follow. Robin and I suggest that gets encoded in the DT, which
> is *more* efficient than having each driver probe the DT, begin probing,
> then abort via the notifier.
>
> This really seems like something that should be done *prior* to entering
> Linux.
Indeed; the DT by nature describes the initial state of the system at
the point that Linux takes control, and thus it really *should* reflect
whatever the current ETZPC configuration is. Note what DTSpec actually says:
"disabled"
Indicates that the device is not presently operational, but it might
become operational in the future (for example, something is not
plugged in, or switched off).
Refer to the device binding for details on what disabled means for a
given device.
The fact that the current behaviour of our OF platform code doesn't
really respect that last point and makes it tricky to bring
initially-unavailable devices to life later is a separate issue.
Robin.
prev parent reply other threads:[~2018-02-28 18:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 14:09 Benjamin Gaignard
2018-02-27 14:09 ` [PATCH 1/3] driver core: check notifier_call_chain return value Benjamin Gaignard
2018-03-15 17:10 ` Greg KH
2018-03-16 8:53 ` Benjamin Gaignard
2018-02-27 14:09 ` [PATCH 2/3] dt-bindings: stm32: Add bindings for Extended TrustZone Protection Benjamin Gaignard
2018-02-27 14:09 ` [PATCH 3/3] ARM: mach-stm32: Add Extended TrustZone Protection driver Benjamin Gaignard
2018-02-27 17:14 ` Mark Rutland
2018-02-27 19:23 ` Benjamin Gaignard
2018-02-27 17:11 ` [PATCH 0/3] STM32 " Mark Rutland
2018-02-27 19:16 ` Benjamin Gaignard
2018-02-27 19:46 ` Robin Murphy
2018-02-28 7:53 ` Benjamin Gaignard
2018-02-28 17:53 ` Mark Rutland
2018-02-28 18:32 ` Robin Murphy [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=09775cf5-ba70-bef6-6196-5f16fd0dc08b@arm.com \
--to=robin.murphy@arm.com \
--cc=alexandre.torgue@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=benjamin.gaignard@st.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=robh+dt@kernel.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
all inboxes | Powered by JetHome®