^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/firmware/gsmi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Date: March 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Contact: Mike Waychison <mikew@google.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Some servers used internally at Google have firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) that provides callback functionality via explicit SMI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) triggers. Some of the callbacks are similar to those
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) provided by the EFI runtime services page, but due to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) historical reasons this different entry-point has been
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) The gsmi driver implements the kernel's abstraction for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) these firmware callbacks. Currently, this functionality
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) is limited to handling the system event log and getting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) access to EFI-style variables stored in nvram.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) Layout:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) /sys/firmware/gsmi/vars:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) This directory has the same layout (and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) underlying implementation as /sys/firmware/efi/vars.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) See `Documentation/ABI/*/sysfs-firmware-efi-vars`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) for more information on how to interact with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) this structure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) /sys/firmware/gsmi/append_to_eventlog - write-only:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) This file takes a binary blob and passes it onto
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) the firmware to be timestamped and appended to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) the system eventlog. The binary format is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) interpreted by the firmware and may change from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) platform to platform. The only kernel-enforced
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) requirement is that the blob be prefixed with a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 32bit host-endian type used as part of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) firmware call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) /sys/firmware/gsmi/clear_config - write-only:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) Writing any value to this file will cause the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) entire firmware configuration to be reset to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) "factory defaults". Callers should assume that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) a reboot is required for the configuration to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) cleared.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) /sys/firmware/gsmi/clear_eventlog - write-only:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) This file is used to clear out a portion/the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) whole of the system event log. Values written
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) should be values between 1 and 100 inclusive (in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) ASCII) representing the fraction of the log to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) clear. Not all platforms support fractional
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) clearing though, and this writes to this file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) will error out if the firmware doesn't like your
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) submitted fraction.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) Callers should assume that a reboot is needed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) for this operation to complete.