18c2ecf20Sopenharmony_ciWhat:		/sys/firmware/gsmi
28c2ecf20Sopenharmony_ciDate:		March 2011
38c2ecf20Sopenharmony_ciContact:	Mike Waychison <mikew@google.com>
48c2ecf20Sopenharmony_ciDescription:
58c2ecf20Sopenharmony_ci		Some servers used internally at Google have firmware
68c2ecf20Sopenharmony_ci		that provides callback functionality via explicit SMI
78c2ecf20Sopenharmony_ci		triggers.  Some of the callbacks are similar to those
88c2ecf20Sopenharmony_ci		provided by the EFI runtime services page, but due to
98c2ecf20Sopenharmony_ci		historical reasons this different entry-point has been
108c2ecf20Sopenharmony_ci		used.
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci		The gsmi driver implements the kernel's abstraction for
138c2ecf20Sopenharmony_ci		these firmware callbacks.  Currently, this functionality
148c2ecf20Sopenharmony_ci		is limited to handling the system event log and getting
158c2ecf20Sopenharmony_ci		access to EFI-style variables stored in nvram.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci		Layout:
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci		/sys/firmware/gsmi/vars:
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci			This directory has the same layout (and
228c2ecf20Sopenharmony_ci			underlying implementation as /sys/firmware/efi/vars.
238c2ecf20Sopenharmony_ci			See `Documentation/ABI/*/sysfs-firmware-efi-vars`
248c2ecf20Sopenharmony_ci			for more information on how to interact with
258c2ecf20Sopenharmony_ci			this structure.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci		/sys/firmware/gsmi/append_to_eventlog - write-only:
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci			This file takes a binary blob and passes it onto
308c2ecf20Sopenharmony_ci			the firmware to be timestamped and appended to
318c2ecf20Sopenharmony_ci			the system eventlog.  The binary format is
328c2ecf20Sopenharmony_ci			interpreted by the firmware and may change from
338c2ecf20Sopenharmony_ci			platform to platform.  The only kernel-enforced
348c2ecf20Sopenharmony_ci			requirement is that the blob be prefixed with a
358c2ecf20Sopenharmony_ci			32bit host-endian type used as part of the
368c2ecf20Sopenharmony_ci			firmware call.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci		/sys/firmware/gsmi/clear_config - write-only:
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci			Writing any value to this file will cause the
418c2ecf20Sopenharmony_ci			entire firmware configuration to be reset to
428c2ecf20Sopenharmony_ci			"factory defaults".  Callers should assume that
438c2ecf20Sopenharmony_ci			a reboot is required for the configuration to be
448c2ecf20Sopenharmony_ci			cleared.
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci		/sys/firmware/gsmi/clear_eventlog - write-only:
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci			This file is used to clear out a portion/the
498c2ecf20Sopenharmony_ci			whole of the system event log.  Values written
508c2ecf20Sopenharmony_ci			should be values between 1 and 100 inclusive (in
518c2ecf20Sopenharmony_ci			ASCII) representing the fraction of the log to
528c2ecf20Sopenharmony_ci			clear.  Not all platforms support fractional
538c2ecf20Sopenharmony_ci			clearing though, and this writes to this file
548c2ecf20Sopenharmony_ci			will error out if the firmware doesn't like your
558c2ecf20Sopenharmony_ci			submitted fraction.
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci			Callers should assume that a reboot is needed
588c2ecf20Sopenharmony_ci			for this operation to complete.
59