forked from jonsmirl/mpc5200
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The "gsmi" driver bridges userland with firmware specific routines for accessing hardware. Currently, this driver only supports NVRAM and eventlog information. Deprecated functions have been removed from the driver, though their op-codes are left in place so that they are not re-used. This driver works by trampolining into the firmware via the smi_command outlined in the FADT table. Three protocols are used due to various limitations over time, but all are included herein. This driver should only ever load on Google boards, identified by either a "Google, Inc." board vendor string in DMI, or "GOOGLE" in the OEM strings of the FADT ACPI table. This logic happens in gsmi_system_valid(). Signed-off-by: Duncan Laurie <dlaurie@google.com> Signed-off-by: Aaron Durbin <adurbin@google.com> Signed-off-by: Mike Waychison <mikew@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- Loading branch information
Showing
6 changed files
with
1,013 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
What: /sys/firmware/gsmi | ||
Date: March 2011 | ||
Contact: Mike Waychison <mikew@google.com> | ||
Description: | ||
Some servers used internally at Google have firmware | ||
that provides callback functionality via explicit SMI | ||
triggers. Some of the callbacks are similar to those | ||
provided by the EFI runtime services page, but due to | ||
historical reasons this different entry-point has been | ||
used. | ||
|
||
The gsmi driver implements the kernel's abstraction for | ||
these firmware callbacks. Currently, this functionality | ||
is limited to handling the system event log and getting | ||
access to EFI-style variables stored in nvram. | ||
|
||
Layout: | ||
|
||
/sys/firmware/gsmi/vars: | ||
|
||
This directory has the same layout (and | ||
underlying implementation as /sys/firmware/efi/vars. | ||
See Documentation/ABI/*/sysfs-firmware-efi-vars | ||
for more information on how to interact with | ||
this structure. | ||
|
||
/sys/firmware/gsmi/append_to_eventlog - write-only: | ||
|
||
This file takes a binary blob and passes it onto | ||
the firmware to be timestamped and appended to | ||
the system eventlog. The binary format is | ||
interpreted by the firmware and may change from | ||
platform to platform. The only kernel-enforced | ||
requirement is that the blob be prefixed with a | ||
32bit host-endian type used as part of the | ||
firmware call. | ||
|
||
/sys/firmware/gsmi/clear_config - write-only: | ||
|
||
Writing any value to this file will cause the | ||
entire firmware configuration to be reset to | ||
"factory defaults". Callers should assume that | ||
a reboot is required for the configuration to be | ||
cleared. | ||
|
||
/sys/firmware/gsmi/clear_eventlog - write-only: | ||
|
||
This file is used to clear out a portion/the | ||
whole of the system event log. Values written | ||
should be values between 1 and 100 inclusive (in | ||
ASCII) representing the fraction of the log to | ||
clear. Not all platforms support fractional | ||
clearing though, and this writes to this file | ||
will error out if the firmware doesn't like your | ||
submitted fraction. | ||
|
||
Callers should assume that a reboot is needed | ||
for this operation to complete. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
config GOOGLE_SMI | ||
tristate "SMI interface for Google platforms" | ||
depends on ACPI && DMI | ||
select EFI_VARS | ||
help | ||
Say Y here if you want to enable SMI callbacks for Google | ||
platforms. This provides an interface for writing to and | ||
clearing the EFI event log and reading and writing NVRAM | ||
variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
obj-$(CONFIG_GOOGLE_SMI) += gsmi.o |
Oops, something went wrong.