* [Query] How to pass reboot arguments to secure firmware with PSCI spec
@ 2014-08-01 10:06 Jisheng Zhang
2014-08-01 10:21 ` Sudeep Holla
0 siblings, 1 reply; 4+ messages in thread
From: Jisheng Zhang @ 2014-08-01 10:06 UTC (permalink / raw)
To: linux-arm-kernel
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?
> 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?
> }
Thanks in advance,
Jisheng
commit e71246a23acbc89e9cb4ebf1558d60e65733479f
Author: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Date: Thu Apr 17 14:38:41 2014 -0400
PSCI: Add initial support for PSCIv0.2 functions
The PSCIv0.2 spec defines standard values of function IDs
and introduces a few new functions. Detect version of PSCI
and appropriately select the right PSCI functions.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Query] How to pass reboot arguments to secure firmware with PSCI spec
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
0 siblings, 1 reply; 4+ messages in thread
From: Sudeep Holla @ 2014-08-01 10:21 UTC (permalink / raw)
To: linux-arm-kernel
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 ?
>
>> 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 ?
If you see PSCI v0.2 spec, the SYSTEM_RESET and SYSTEM_SHUTDOWN takes no
parameters.
Regards,
Sudeep
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Query] How to pass reboot arguments to secure firmware with PSCI spec
2014-08-01 10:21 ` Sudeep Holla
@ 2014-08-01 11:02 ` Jisheng Zhang
2014-08-01 14:00 ` Sudeep Holla
0 siblings, 1 reply; 4+ messages in thread
From: Jisheng Zhang @ 2014-08-01 11:02 UTC (permalink / raw)
To: linux-arm-kernel
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.
>
> >
> >> 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.
>
> If you see PSCI v0.2 spec, the SYSTEM_RESET and SYSTEM_SHUTDOWN takes no
> parameters.
Yes. I know it. That's why I need your help/suggestions about how to handle
the situation above.
Thanks for your input,
Jisheng
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Query] How to pass reboot arguments to secure firmware with PSCI spec
2014-08-01 11:02 ` Jisheng Zhang
@ 2014-08-01 14:00 ` Sudeep Holla
0 siblings, 0 replies; 4+ messages in thread
From: Sudeep Holla @ 2014-08-01 14:00 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-01 14:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).