Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
tpm.h File Reference
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/miscdevice.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/tpm.h>

Go to the source code of this file.

Data Structures

struct  tpm_vendor_specific
 
struct  tpm_chip
 
struct  tpm_input_header
 
struct  tpm_output_header
 
struct  stclear_flags_t
 
struct  tpm_version_t
 
struct  tpm_version_1_2_t
 
struct  timeout_t
 
struct  duration_t
 
struct  permanent_flags_t
 
union  cap_t
 
struct  tpm_getcap_params_in
 
struct  tpm_getcap_params_out
 
struct  tpm_readpubek_params_out
 
union  tpm_cmd_header
 
struct  tpm_pcrread_out
 
struct  tpm_pcrread_in
 
struct  tpm_pcrextend_in
 
struct  tpm_getrandom_out
 
struct  tpm_getrandom_in
 
union  tpm_cmd_params
 
struct  tpm_cmd_t
 

Macros

#define TPM_WARN_DOING_SELFTEST   0x802
 
#define TPM_ERR_DEACTIVATED   0x6
 
#define TPM_ERR_DISABLED   0x7
 
#define TPM_HEADER_SIZE   10
 
#define TPM_VID_INTEL   0x8086
 
#define to_tpm_chip(n)   container_of(n, struct tpm_chip, vendor)
 
#define TPM_DIGEST_SIZE   20
 
#define TPM_MAX_RNG_DATA   128
 

Enumerations

enum  tpm_const { TPM_MINOR = 224, TPM_BUFSIZE = 4096, TPM_NUM_DEVICES = 256 }
 
enum  tpm_timeout { TPM_TIMEOUT = 5 }
 
enum  tpm_addr { TPM_SUPERIO_ADDR = 0x2E, TPM_ADDR = 0x4E }
 

Functions

ssize_t tpm_show_pubek (struct device *, struct device_attribute *attr, char *)
 
ssize_t tpm_show_pcrs (struct device *, struct device_attribute *attr, char *)
 
ssize_t tpm_show_caps (struct device *, struct device_attribute *attr, char *)
 
ssize_t tpm_show_caps_1_2 (struct device *, struct device_attribute *attr, char *)
 
ssize_t tpm_store_cancel (struct device *, struct device_attribute *attr, const char *, size_t)
 
ssize_t tpm_show_enabled (struct device *, struct device_attribute *attr, char *)
 
ssize_t tpm_show_active (struct device *, struct device_attribute *attr, char *)
 
ssize_t tpm_show_owned (struct device *, struct device_attribute *attr, char *)
 
ssize_t tpm_show_temp_deactivated (struct device *, struct device_attribute *attr, char *)
 
ssize_t tpm_show_durations (struct device *, struct device_attribute *attr, char *)
 
ssize_t tpm_show_timeouts (struct device *, struct device_attribute *attr, char *)
 
struct tpm_input_header __attribute__ ((packed))
 
ssize_t tpm_getcap (struct device *, __be32, cap_t *, const char *)
 
int tpm_get_timeouts (struct tpm_chip *)
 
void tpm_gen_interrupt (struct tpm_chip *)
 
int tpm_do_selftest (struct tpm_chip *)
 
unsigned long tpm_calc_ordinal_duration (struct tpm_chip *, u32)
 
struct tpm_chiptpm_register_hardware (struct device *, const struct tpm_vendor_specific *)
 
int tpm_open (struct inode *, struct file *)
 
int tpm_release (struct inode *, struct file *)
 
void tpm_dev_vendor_release (struct tpm_chip *)
 
ssize_t tpm_write (struct file *, const char __user *, size_t, loff_t *)
 
ssize_t tpm_read (struct file *, char __user *, size_t, loff_t *)
 
void tpm_remove_hardware (struct device *)
 
int tpm_pm_suspend (struct device *)
 
int tpm_pm_resume (struct device *)
 
int wait_for_tpm_stat (struct tpm_chip *, u8, unsigned long, wait_queue_head_t *)
 

Variables

typedef __attribute__
 
__be16 tag
 
__be32 length
 
__be32 ordinal
 
__be32 return_code
 
u8 deactivated
 
u8 disableForceClear
 
u8 physicalPresence
 
u8 physicalPresenceLock
 
u8 bGlobalLock
 
u8 Major
 
u8 Minor
 
u8 revMajor
 
u8 revMinor
 
__be32 a
 
__be32 b
 
__be32 c
 
__be32 d
 
__be32 tpm_short
 
__be32 tpm_medium
 
__be32 tpm_long
 
u8 disable
 
u8 ownership
 
u8 readPubek
 
u8 disableOwnerClear
 
u8 allowMaintenance
 
u8 physicalPresenceLifetimeLock
 
u8 physicalPresenceHWEnable
 
u8 physicalPresenceCMDEnable
 
u8 CEKPUsed
 
u8 TPMpost
 
u8 TPMpostLock
 
u8 FIPS
 
u8 operator
 
u8 enableRevokeEK
 
u8 nvLocked
 
u8 readSRKPub
 
u8 tpmEstablished
 
u8 maintenanceDone
 
u8 disableFullDALogicInfo
 
__be32 cap
 
__be32 subcap_size
 
__be32 subcap
 
__be32 cap_size
 
u8 algorithm [4]
 
u8 encscheme [2]
 
u8 sigscheme [2]
 
__be32 paramsize
 
u8 parameters [12]
 
__be32 keysize
 
u8 modulus [256]
 
u8 checksum [20]
 
u8 pcr_result [TPM_DIGEST_SIZE]
 
__be32 pcr_idx
 
u8 hash [TPM_DIGEST_SIZE]
 
__be32 rng_data_len
 
u8 rng_data [TPM_MAX_RNG_DATA]
 
__be32 num_bytes
 
tpm_cmd_header header
 
tpm_cmd_params params
 

Macro Definition Documentation

#define to_tpm_chip (   n)    container_of(n, struct tpm_chip, vendor)

Definition at line 135 of file tpm.h.

#define TPM_DIGEST_SIZE   20

Definition at line 265 of file tpm.h.

#define TPM_ERR_DEACTIVATED   0x6

Definition at line 48 of file tpm.h.

#define TPM_ERR_DISABLED   0x7

Definition at line 49 of file tpm.h.

#define TPM_HEADER_SIZE   10

Definition at line 51 of file tpm.h.

#define TPM_MAX_RNG_DATA   128

Definition at line 283 of file tpm.h.

#define TPM_VID_INTEL   0x8086

Definition at line 109 of file tpm.h.

#define TPM_WARN_DOING_SELFTEST   0x802

Definition at line 47 of file tpm.h.

Enumeration Type Documentation

enum tpm_addr
Enumerator:
TPM_SUPERIO_ADDR 
TPM_ADDR 

Definition at line 42 of file tpm.h.

enum tpm_const
Enumerator:
TPM_MINOR 
TPM_BUFSIZE 
TPM_NUM_DEVICES 

Definition at line 31 of file tpm.h.

Enumerator:
TPM_TIMEOUT 

Definition at line 37 of file tpm.h.

Function Documentation

struct tpm_input_header __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

unsigned long tpm_calc_ordinal_duration ( struct tpm_chip ,
u32   
)

Definition at line 349 of file tpm.c.

void tpm_dev_vendor_release ( struct tpm_chip )

Definition at line 1388 of file tpm.c.

int tpm_do_selftest ( struct tpm_chip chip)

tpm_do_selftest - have the TPM continue its selftest and wait until it can receive further commands : TPM chip to use

Returns 0 on success, < 0 in case of fatal error or a value > 0 representing a TPM error code.

Definition at line 823 of file tpm.c.

void tpm_gen_interrupt ( struct tpm_chip )

Definition at line 516 of file tpm.c.

int tpm_get_timeouts ( struct tpm_chip )

Definition at line 531 of file tpm.c.

ssize_t tpm_getcap ( struct device ,
__be32  ,
cap_t ,
const char  
)

Definition at line 488 of file tpm.c.

int tpm_open ( struct inode ,
struct file  
)

Definition at line 1125 of file tpm.c.

int tpm_pm_resume ( struct device )

Definition at line 1323 of file tpm.c.

int tpm_pm_suspend ( struct device )

Definition at line 1290 of file tpm.c.

ssize_t tpm_read ( struct file ,
char __user ,
size_t  ,
loff_t *   
)

Definition at line 1223 of file tpm.c.

struct tpm_chip* tpm_register_hardware ( struct device ,
const struct tpm_vendor_specific  
)
read

Definition at line 1427 of file tpm.c.

int tpm_release ( struct inode ,
struct file  
)

Definition at line 1166 of file tpm.c.

void tpm_remove_hardware ( struct device )

Definition at line 1253 of file tpm.c.

ssize_t tpm_show_active ( struct device ,
struct device_attribute attr,
char  
)

Definition at line 658 of file tpm.c.

ssize_t tpm_show_caps ( struct device ,
struct device_attribute attr,
char  
)

Definition at line 982 of file tpm.c.

ssize_t tpm_show_caps_1_2 ( struct device ,
struct device_attribute attr,
char  
)

Definition at line 1008 of file tpm.c.

ssize_t tpm_show_durations ( struct device ,
struct device_attribute attr,
char  
)

Definition at line 1034 of file tpm.c.

ssize_t tpm_show_enabled ( struct device ,
struct device_attribute attr,
char  
)

Definition at line 642 of file tpm.c.

ssize_t tpm_show_owned ( struct device ,
struct device_attribute attr,
char  
)

Definition at line 674 of file tpm.c.

ssize_t tpm_show_pcrs ( struct device ,
struct device_attribute attr,
char  
)

Definition at line 887 of file tpm.c.

ssize_t tpm_show_pubek ( struct device ,
struct device_attribute attr,
char  
)

Definition at line 924 of file tpm.c.

ssize_t tpm_show_temp_deactivated ( struct device ,
struct device_attribute attr,
char  
)

Definition at line 690 of file tpm.c.

ssize_t tpm_show_timeouts ( struct device ,
struct device_attribute attr,
char  
)

Definition at line 1051 of file tpm.c.

ssize_t tpm_store_cancel ( struct device ,
struct device_attribute attr,
const char ,
size_t   
)

Definition at line 1066 of file tpm.c.

ssize_t tpm_write ( struct file ,
const char __user ,
size_t  ,
loff_t *   
)

Definition at line 1181 of file tpm.c.

int wait_for_tpm_stat ( struct tpm_chip ,
u8  ,
unsigned  long,
wait_queue_head_t  
)

Definition at line 1078 of file tpm.c.

Variable Documentation

typedef __attribute__
__be32 a

Definition at line 195 of file tpm.h.

u8 algorithm[4]

Definition at line 259 of file tpm.h.

u8 allowMaintenance

Definition at line 231 of file tpm.h.

__be32 b

Definition at line 196 of file tpm.h.

u8 bGlobalLock

Definition at line 178 of file tpm.h.

__be32 c

Definition at line 197 of file tpm.h.

cap_t cap

Definition at line 243 of file tpm.h.

__be32 cap_size

Definition at line 248 of file tpm.h.

u8 CEKPUsed

Definition at line 235 of file tpm.h.

u8 checksum[20]

Definition at line 266 of file tpm.h.

__be32 d

Definition at line 198 of file tpm.h.

u8 deactivated

Definition at line 174 of file tpm.h.

u8 disable

Definition at line 226 of file tpm.h.

u8 disableForceClear

Definition at line 175 of file tpm.h.

u8 disableFullDALogicInfo

Definition at line 245 of file tpm.h.

u8 disableOwnerClear

Definition at line 230 of file tpm.h.

u8 enableRevokeEK

Definition at line 240 of file tpm.h.

u8 encscheme[2]

Definition at line 260 of file tpm.h.

u8 FIPS

Definition at line 238 of file tpm.h.

Definition at line 279 of file tpm.h.

Definition at line 310 of file tpm.h.

__be32 keysize

Definition at line 264 of file tpm.h.

__be32 length

Definition at line 159 of file tpm.h.

u8 maintenanceDone

Definition at line 244 of file tpm.h.

u8 Major

Definition at line 180 of file tpm.h.

u8 Minor

Definition at line 181 of file tpm.h.

unsigned char modulus

Definition at line 265 of file tpm.h.

__be32 num_bytes

Definition at line 293 of file tpm.h.

u8 nvLocked

Definition at line 241 of file tpm.h.

u8 operator

Definition at line 239 of file tpm.h.

__be32 ordinal

Definition at line 160 of file tpm.h.

u8 ownership

Definition at line 227 of file tpm.h.

:framebuffer variable parameters

mx3fb_check_var() - check and adjust framebuffer variable parameters.

: framebuffer information pointer

Definition at line 263 of file tpm.h.

Definition at line 311 of file tpm.h.

__be32 paramsize

Definition at line 262 of file tpm.h.

__be32 pcr_idx

Definition at line 273 of file tpm.h.

u8 pcr_result[TPM_DIGEST_SIZE]

Definition at line 269 of file tpm.h.

u8 physicalPresence

Definition at line 176 of file tpm.h.

u8 physicalPresenceCMDEnable

Definition at line 234 of file tpm.h.

u8 physicalPresenceHWEnable

Definition at line 233 of file tpm.h.

u8 physicalPresenceLifetimeLock

Definition at line 232 of file tpm.h.

u8 physicalPresenceLock

Definition at line 177 of file tpm.h.

u8 readPubek

Definition at line 229 of file tpm.h.

u8 readSRKPub

Definition at line 242 of file tpm.h.

__u16 return_code

Definition at line 166 of file tpm.h.

u8 revMajor

Definition at line 182 of file tpm.h.

u8 revMinor

Definition at line 183 of file tpm.h.

u8 rng_data[TPM_MAX_RNG_DATA]

Definition at line 290 of file tpm.h.

__be32 rng_data_len

Definition at line 289 of file tpm.h.

u8 sigscheme[2]

Definition at line 261 of file tpm.h.

__be32 subcap

Definition at line 245 of file tpm.h.

__be32 subcap_size

Definition at line 244 of file tpm.h.

Definition at line 158 of file tpm.h.

__be32 tpm_long

Definition at line 203 of file tpm.h.

__be32 tpm_medium

Definition at line 202 of file tpm.h.

__be32 tpm_short

Definition at line 201 of file tpm.h.

u8 tpmEstablished

Definition at line 243 of file tpm.h.

u8 TPMpost

Definition at line 236 of file tpm.h.

u8 TPMpostLock

Definition at line 237 of file tpm.h.