From: Greg KH <greg@kroah.com>
To: Mike Waychison <mikew@google.com>
Cc: Tim Hockin <thockin@google.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Robert Lippert <rlippert@google.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: SMBIOS / DMI Event Logs in Linux?
Date: Fri, 11 Feb 2011 11:12:16 -0800 [thread overview]
Message-ID: <20110211191216.GA11290@kroah.com> (raw)
In-Reply-To: <AANLkTimrm5zFxA++0ZgXL7csJSU17TgDx5Qb_3RdtzBU@mail.gmail.com>
On Fri, Feb 11, 2011 at 10:56:16AM -0800, Mike Waychison wrote:
> On Fri, Feb 11, 2011 at 10:32 AM, Greg KH <greg@kroah.com> wrote:
> > On Fri, Feb 11, 2011 at 10:00:37AM -0800, Mike Waychison wrote:
> >> resend as plain text, sorry :(
> >>
> >>
> >> On Thu, Feb 10, 2011 at 7:20 PM, Greg KH <greg@kroah.com> wrote:
> >> > Wait, if this is just a simple "pass through to the hardware", then just
> >> > export the thing, with the proper permissions, in a single binary sysfs
> >> > file, and do the parsing in userspace.
> >> >
> >>
> >> If you mean s/hardware/firmware/, then yes.
> >
> > Yes, sorry, that is what I ment.
> >
> >> > That would be the simplest thing to do, and fit the rules for valid
> >> > sysfs files, and keep people from having to dig through /dev/mem, right?
> >>
> >> Yup, exposing the log via a bin_attribute and allowing for blobs to be
> >> appended (with the firmware either accepting or rejecting the format
> >> will do).
> >
> > Great, that should be a simple thing to do then, right?
>
> Ya. Here's what I'm working on now:
>
> /sys/firmware/gsmi/eventlog
> - read: reads out binary bytes of the log as exported by firmware.
> - write: takes the user buffer and passes it on to the firmware via
> a SET_EVENT_LOG command and returns a mapped errno to the user.
>
> /sys/firmware/gsmi/clear_eventlog
> - write-only: takes a value between 0 and 100 and passes it to the
> firmware to clear out a percentage of the log.
>
> /sys/firmware/gsmi/clear_config
> - write-only: takes arbitrary data and tells the firmware to wipe it's config.
>
> /sys/firmware/gsmi/vars (directory)
> - same code as /sys/firmware/efi/vars except firmware calls vector
> through gsmi instead of the EFI runtime services page (I've
> abstracted it out for re-use)
>
> This covers the gsmi driver and removes the ioctls completely from it.
Wonderful, that should have hopefully also made the code cleaner.
> I've already changed the "memconsole" driver I sent out a while ago to
> export itself as an untouched binary file /sys/firmware/log .
>
> The only bit that remains that needs cleaning is the 'bootlog' driver.
> I'm going to work with Robert offline (or online if he wants to
> follow up here) with what "proper" kernel interfaces should look like
> for his purposes.
I thought that it was agreed that it too would be a binary sysfs file to
be read from? Or was that me just wishing it would be so? :)
thanks,
greg k-h
next prev parent reply other threads:[~2011-02-11 19:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 23:18 SMBIOS / DMI Event Logs in Linux? Mike Waychison
2011-02-11 1:25 ` Greg KH
2011-02-11 2:19 ` Mike Waychison
2011-02-11 3:19 ` Greg KH
2011-02-11 2:20 ` Tim Hockin
2011-02-11 3:20 ` Greg KH
[not found] ` <AANLkTin3tu-NiotpzWaQ_ubV0jumb_WsjEK5QGi5w56o@mail.gmail.com>
2011-02-11 18:00 ` Mike Waychison
2011-02-11 18:32 ` Greg KH
2011-02-11 18:56 ` Mike Waychison
2011-02-11 19:12 ` Greg KH [this message]
2011-02-11 9:54 ` Alan Cox
2011-02-11 2:04 ` Rob Lippert
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=20110211191216.GA11290@kroah.com \
--to=greg@kroah.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mikew@google.com \
--cc=rlippert@google.com \
--cc=thockin@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.