Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
gsmi.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/spinlock.h>
#include <linux/dma-mapping.h>
#include <linux/dmapool.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/ioctl.h>
#include <linux/acpi.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/dmi.h>
#include <linux/kdebug.h>
#include <linux/reboot.h>
#include <linux/efi.h>
#include <linux/module.h>

Go to the source code of this file.

Data Structures

struct  gsmi_buf
 
struct  gsmi_device
 
struct  gsmi_nvram_var_param
 
struct  gsmi_get_next_var_param
 
struct  gsmi_set_eventlog_param
 
struct  gsmi_log_entry_type_1
 

Macros

#define GSMI_SHUTDOWN_CLEAN   0 /* Clean Shutdown */
 
#define GSMI_SHUTDOWN_NMIWDT   1 /* NMI Watchdog */
 
#define GSMI_SHUTDOWN_PANIC   2 /* Panic */
 
#define GSMI_SHUTDOWN_OOPS   3 /* Oops */
 
#define GSMI_SHUTDOWN_DIE   4 /* Die -- No longer meaningful */
 
#define GSMI_SHUTDOWN_MCE   5 /* Machine Check */
 
#define GSMI_SHUTDOWN_SOFTWDT   6 /* Software Watchdog */
 
#define GSMI_SHUTDOWN_MBE   7 /* Uncorrected ECC */
 
#define GSMI_SHUTDOWN_TRIPLE   8 /* Triple Fault */
 
#define DRIVER_VERSION   "1.0"
 
#define GSMI_GUID_SIZE   16
 
#define GSMI_BUF_SIZE   1024
 
#define GSMI_BUF_ALIGN   sizeof(u64)
 
#define GSMI_CALLBACK   0xef
 
#define GSMI_SUCCESS   0x00
 
#define GSMI_UNSUPPORTED2   0x03
 
#define GSMI_LOG_FULL   0x0b
 
#define GSMI_VAR_NOT_FOUND   0x0e
 
#define GSMI_HANDSHAKE_SPIN   0x7d
 
#define GSMI_HANDSHAKE_CF   0x7e
 
#define GSMI_HANDSHAKE_NONE   0x7f
 
#define GSMI_INVALID_PARAMETER   0x82
 
#define GSMI_UNSUPPORTED   0x83
 
#define GSMI_BUFFER_TOO_SMALL   0x85
 
#define GSMI_NOT_READY   0x86
 
#define GSMI_DEVICE_ERROR   0x87
 
#define GSMI_NOT_FOUND   0x8e
 
#define QUIRKY_BOARD_HASH   0x78a30a50
 
#define GSMI_CMD_GET_NVRAM_VAR   0x01
 
#define GSMI_CMD_GET_NEXT_VAR   0x02
 
#define GSMI_CMD_SET_NVRAM_VAR   0x03
 
#define GSMI_CMD_SET_EVENT_LOG   0x08
 
#define GSMI_CMD_CLEAR_EVENT_LOG   0x09
 
#define GSMI_CMD_CLEAR_CONFIG   0x20
 
#define GSMI_CMD_HANDSHAKE_TYPE   0xC1
 
#define GSMI_LOG_ENTRY_TYPE_KERNEL   0xDEAD
 
#define GSMI_DEFAULT_SPINCOUNT   0x10000
 

Functions

 module_param (spincount, uint, 0600)
 
 MODULE_PARM_DESC (spincount,"The number of loop iterations to use when using the spin handshake.")
 
 MODULE_DEVICE_TABLE (dmi, gsmi_dmi_table)
 
 module_init (gsmi_init)
 
 module_exit (gsmi_exit)
 
 MODULE_AUTHOR ("Google, Inc.")
 
 MODULE_LICENSE ("GPL")
 

Variables

struct gsmi_device gsmi_dev
 
struct gsmi_nvram_var_param __packed
 

Macro Definition Documentation

#define DRIVER_VERSION   "1.0"

Definition at line 43 of file gsmi.c.

#define GSMI_BUF_ALIGN   sizeof(u64)

Definition at line 46 of file gsmi.c.

#define GSMI_BUF_SIZE   1024

Definition at line 45 of file gsmi.c.

#define GSMI_BUFFER_TOO_SMALL   0x85

Definition at line 59 of file gsmi.c.

#define GSMI_CALLBACK   0xef

Definition at line 47 of file gsmi.c.

#define GSMI_CMD_CLEAR_CONFIG   0x20

Definition at line 72 of file gsmi.c.

#define GSMI_CMD_CLEAR_EVENT_LOG   0x09

Definition at line 71 of file gsmi.c.

#define GSMI_CMD_GET_NEXT_VAR   0x02

Definition at line 68 of file gsmi.c.

#define GSMI_CMD_GET_NVRAM_VAR   0x01

Definition at line 67 of file gsmi.c.

#define GSMI_CMD_HANDSHAKE_TYPE   0xC1

Definition at line 73 of file gsmi.c.

#define GSMI_CMD_SET_EVENT_LOG   0x08

Definition at line 70 of file gsmi.c.

#define GSMI_CMD_SET_NVRAM_VAR   0x03

Definition at line 69 of file gsmi.c.

#define GSMI_DEFAULT_SPINCOUNT   0x10000

Definition at line 129 of file gsmi.c.

#define GSMI_DEVICE_ERROR   0x87

Definition at line 61 of file gsmi.c.

#define GSMI_GUID_SIZE   16

Definition at line 44 of file gsmi.c.

#define GSMI_HANDSHAKE_CF   0x7e

Definition at line 55 of file gsmi.c.

#define GSMI_HANDSHAKE_NONE   0x7f

Definition at line 56 of file gsmi.c.

#define GSMI_HANDSHAKE_SPIN   0x7d

Definition at line 54 of file gsmi.c.

#define GSMI_INVALID_PARAMETER   0x82

Definition at line 57 of file gsmi.c.

#define GSMI_LOG_ENTRY_TYPE_KERNEL   0xDEAD

Definition at line 76 of file gsmi.c.

#define GSMI_LOG_FULL   0x0b

Definition at line 52 of file gsmi.c.

#define GSMI_NOT_FOUND   0x8e

Definition at line 62 of file gsmi.c.

#define GSMI_NOT_READY   0x86

Definition at line 60 of file gsmi.c.

#define GSMI_SHUTDOWN_CLEAN   0 /* Clean Shutdown */

Definition at line 32 of file gsmi.c.

#define GSMI_SHUTDOWN_DIE   4 /* Die -- No longer meaningful */

Definition at line 37 of file gsmi.c.

#define GSMI_SHUTDOWN_MBE   7 /* Uncorrected ECC */

Definition at line 40 of file gsmi.c.

#define GSMI_SHUTDOWN_MCE   5 /* Machine Check */

Definition at line 38 of file gsmi.c.

#define GSMI_SHUTDOWN_NMIWDT   1 /* NMI Watchdog */

Definition at line 34 of file gsmi.c.

#define GSMI_SHUTDOWN_OOPS   3 /* Oops */

Definition at line 36 of file gsmi.c.

#define GSMI_SHUTDOWN_PANIC   2 /* Panic */

Definition at line 35 of file gsmi.c.

#define GSMI_SHUTDOWN_SOFTWDT   6 /* Software Watchdog */

Definition at line 39 of file gsmi.c.

#define GSMI_SHUTDOWN_TRIPLE   8 /* Triple Fault */

Definition at line 41 of file gsmi.c.

#define GSMI_SUCCESS   0x00

Definition at line 50 of file gsmi.c.

#define GSMI_UNSUPPORTED   0x83

Definition at line 58 of file gsmi.c.

#define GSMI_UNSUPPORTED2   0x03

Definition at line 51 of file gsmi.c.

#define GSMI_VAR_NOT_FOUND   0x0e

Definition at line 53 of file gsmi.c.

#define QUIRKY_BOARD_HASH   0x78a30a50

Definition at line 64 of file gsmi.c.

Function Documentation

MODULE_AUTHOR ( Google,
Inc."   
)
MODULE_DEVICE_TABLE ( dmi  ,
gsmi_dmi_table   
)
module_exit ( gsmi_exit  )
module_init ( gsmi_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( spincount  ,
uint  ,
0600   
)
MODULE_PARM_DESC ( spincount  ,
"The number of loop iterations to use when using the spin handshake."   
)

Variable Documentation

struct gsmi_device gsmi_dev