174c5b31cSMike WaychisonWhat:		/sys/firmware/gsmi
274c5b31cSMike WaychisonDate:		March 2011
374c5b31cSMike WaychisonContact:	Mike Waychison <mikew@google.com>
474c5b31cSMike WaychisonDescription:
574c5b31cSMike Waychison		Some servers used internally at Google have firmware
674c5b31cSMike Waychison		that provides callback functionality via explicit SMI
774c5b31cSMike Waychison		triggers.  Some of the callbacks are similar to those
874c5b31cSMike Waychison		provided by the EFI runtime services page, but due to
974c5b31cSMike Waychison		historical reasons this different entry-point has been
1074c5b31cSMike Waychison		used.
1174c5b31cSMike Waychison
1274c5b31cSMike Waychison		The gsmi driver implements the kernel's abstraction for
1374c5b31cSMike Waychison		these firmware callbacks.  Currently, this functionality
1474c5b31cSMike Waychison		is limited to handling the system event log and getting
1574c5b31cSMike Waychison		access to EFI-style variables stored in nvram.
1674c5b31cSMike Waychison
1774c5b31cSMike Waychison		Layout:
1874c5b31cSMike Waychison
1974c5b31cSMike Waychison		/sys/firmware/gsmi/vars:
2074c5b31cSMike Waychison
2174c5b31cSMike Waychison			This directory has the same layout (and
2274c5b31cSMike Waychison			underlying implementation as /sys/firmware/efi/vars.
2334433332SMauro Carvalho Chehab			See `Documentation/ABI/*/sysfs-firmware-efi-vars`
2474c5b31cSMike Waychison			for more information on how to interact with
2574c5b31cSMike Waychison			this structure.
2674c5b31cSMike Waychison
2774c5b31cSMike Waychison		/sys/firmware/gsmi/append_to_eventlog - write-only:
2874c5b31cSMike Waychison
2974c5b31cSMike Waychison			This file takes a binary blob and passes it onto
3074c5b31cSMike Waychison			the firmware to be timestamped and appended to
3174c5b31cSMike Waychison			the system eventlog.  The binary format is
3274c5b31cSMike Waychison			interpreted by the firmware and may change from
3374c5b31cSMike Waychison			platform to platform.  The only kernel-enforced
3474c5b31cSMike Waychison			requirement is that the blob be prefixed with a
3574c5b31cSMike Waychison			32bit host-endian type used as part of the
3674c5b31cSMike Waychison			firmware call.
3774c5b31cSMike Waychison
3874c5b31cSMike Waychison		/sys/firmware/gsmi/clear_config - write-only:
3974c5b31cSMike Waychison
4074c5b31cSMike Waychison			Writing any value to this file will cause the
4174c5b31cSMike Waychison			entire firmware configuration to be reset to
4274c5b31cSMike Waychison			"factory defaults".  Callers should assume that
4374c5b31cSMike Waychison			a reboot is required for the configuration to be
4474c5b31cSMike Waychison			cleared.
4574c5b31cSMike Waychison
4674c5b31cSMike Waychison		/sys/firmware/gsmi/clear_eventlog - write-only:
4774c5b31cSMike Waychison
4874c5b31cSMike Waychison			This file is used to clear out a portion/the
4974c5b31cSMike Waychison			whole of the system event log.  Values written
5074c5b31cSMike Waychison			should be values between 1 and 100 inclusive (in
5174c5b31cSMike Waychison			ASCII) representing the fraction of the log to
5274c5b31cSMike Waychison			clear.  Not all platforms support fractional
5374c5b31cSMike Waychison			clearing though, and this writes to this file
5474c5b31cSMike Waychison			will error out if the firmware doesn't like your
5574c5b31cSMike Waychison			submitted fraction.
5674c5b31cSMike Waychison
5774c5b31cSMike Waychison			Callers should assume that a reboot is needed
5874c5b31cSMike Waychison			for this operation to complete.
59