[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110211191216.GA11290@kroah.com>
Date: Fri, 11 Feb 2011 11:12:16 -0800
From: Greg KH <greg@...ah.com>
To: Mike Waychison <mikew@...gle.com>
Cc: Tim Hockin <thockin@...gle.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Robert Lippert <rlippert@...gle.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: SMBIOS / DMI Event Logs in Linux?
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@...ah.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@...ah.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists