[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160324144741.GA4328@codeblueprint.co.uk>
Date: Thu, 24 Mar 2016 14:47:41 +0000
From: Matt Fleming <matt@...eblueprint.co.uk>
To: "Stanacar, Stefan" <stefan.stanacar@...el.com>
Cc: "Baluta, Daniel" <daniel.baluta@...el.com>,
"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Abbas, Mohamed" <mohamed.abbas@...el.com>,
"Gumbel, Matthew K" <matthew.k.gumbel@...el.com>,
"Musca, Constantin" <constantin.musca@...el.com>,
"Purdila, Octavian" <octavian.purdila@...el.com>,
Darren Hart <dvhart@...radead.org>
Subject: Re: [PATCH v2] efi: Introduce EFI bootloader control driver
(Sorry for the delay)
On Fri, 18 Mar, at 07:18:17PM, Stanacar, Stefan wrote:
>
> Hi Matt,
>
> It is possible, but that means modifying those userspace apps :)
> There are reboot implementations that do "reboot <reason>", such as
> Android's reboot command [1] and Upstart's reboot replacement [2], which
> pass the reason as an argument to the reboot syscall.
> Probably your first question will be - "Why don't you modify those
> apps?"
Your guess is correct ;)
> Well, I don't see platform-agnostic way how those could be
> modified to pass the reason to the bootloader, regardless of platform or
> bootloader.
This is true. But then again, what you're proposing isn't boot loader
or platform agnostic anyway. Yes it's transparent to both the app and
boot loader, but it's only going to work on EFI platforms running
gummiboot.
And because of that, if this is going to be merged upstream I think
something like drivers/power/reset/ would be a more appropriate place,
or drivers/platform/x86.
If this does get merged, please rework the patch to use the efivar API
instead of accessing efi.set_variable() directly. We've also got a
bunch of ucs2 string functions in lib/ucs2_string.c that you could
use. In fact, this version of the driver I found on the net is much
more like what I had in mind,
https://github.com/BORETS24/Kernel-for-Asus-Zenfone-2/blob/master/drivers/external_drivers/drivers/platform/x86/reboot_target_uefi.c
Powered by blists - more mailing lists