public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Jisheng Zhang <jszhang@marvell.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Will Deacon <Will.Deacon@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Query] How to pass reboot arguments to secure firmware with PSCI spec
Date: Fri, 01 Aug 2014 15:00:28 +0100	[thread overview]
Message-ID: <53DB9D7C.5000706@arm.com> (raw)
In-Reply-To: <20140801190227.116f4c39@xhacker>



On 01/08/14 12:02, Jisheng Zhang wrote:
> Hi Sudeep,
>
> On Fri, 1 Aug 2014 03:21:12 -0700
> Sudeep Holla <sudeep.holla@arm.com> wrote:
>
>>
>>
>> On 01/08/14 11:06, Jisheng Zhang wrote:
>>> Hi Catalin and Will,
>>>
>>> I noticed that the following commit implement reboot via. PSCI
>>> SYSTEM_RESET function. So my question is how to handle the reboot
>>> arguments?
>>>
>>
>> What reboot arguments do you want to handle ?
>
> man 2 reboot
>
> ...
>
> int reboot(int magic, int magic2, int cmd, void *arg);
>
> ...
>
> I want to pass "void *arg" to secure firmware.
>
>

Why ? What will secure firmware do with that ? I can't think of any
use of those arguments in the secure firmware esp. the example you have
given below. Why should secure firmware know that you are booting in
recovery mode.

And you can't do that with PSCI, the specification has no provisions
and if do that it's violation.

>>
>>>
>>>> static void psci_sys_reset(enum reboot_mode reboot_mode, const char *cmd)
>>>> {
>>>>         invoke_psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0);
>>>
>>> How to pass cmd to secure firmware?
>>>
>>
>> What cmd do you want to pass ? The function id is already handled. What
>> else do you want to pass ?
>
> the "const char *cmd", usually this is the "abc" if user type "reboot abc"
> under shell.
>
> For example, android usually type "reboot recovery", the "recovery" will be
> passed to next boot kernel boot args.
>

How did you had manage to pass these information in absence of
PSCI(i..e. other methods) ?

IIUC it's typically write to non-volatile memory indicating the reboot
reason(at-least in Android devices) through some reboot notifiers.

You can still do that now even with PSCI right ?

Yes


      reply	other threads:[~2014-08-01 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 10:06 [Query] How to pass reboot arguments to secure firmware with PSCI spec Jisheng Zhang
2014-08-01 10:21 ` Sudeep Holla
2014-08-01 11:02   ` Jisheng Zhang
2014-08-01 14:00     ` Sudeep Holla [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=53DB9D7C.5000706@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=jszhang@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.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