blob: 88f42941d8ee3b6c70a8dd10c9725be18a188340 [file] [log] [blame]
Vadim Bendebury56797522015-05-20 10:32:25 -07001// This file was extracted from the TCG Published
2// Trusted Platform Module Library
3// Part 4: Supporting Routines
4// Family "2.0"
5// Level 00 Revision 01.16
6// October 30, 2014
7
8#ifndef _PLATFORM_DATA_H_
9#define _PLATFORM_DATA_H_
10#include "TpmBuildSwitches.h"
11#include "Implementation.h"
12#include "bool.h"
13//
14// From Cancel.c Cancel flag. It is initialized as FALSE, which indicate the command is not being canceled
15//
16extern BOOL s_isCanceled;
17//
18// From Clock.c This variable records the time when _plat__ClockReset() is called. This mechanism allow
19// us to subtract the time when TPM is power off from the total time reported by clock() function
20//
21extern unsigned long long s_initClock;
22extern unsigned int s_adjustRate;
23//
24// From LocalityPlat.c Locality of current command
25//
26extern unsigned char s_locality;
27//
28// From NVMem.c Choose if the NV memory should be backed by RAM or by file. If this macro is defined,
29// then a file is used as NV. If it is not defined, then RAM is used to back NV memory. Comment out to use
30// RAM.
31//
32#define FILE_BACKED_NV
33#if defined FILE_BACKED_NV
34#include <stdio.h>
35//
36// A file to emulate NV storage
37//
38extern FILE* s_NVFile;
39#endif
40extern unsigned char s_NV[NV_MEMORY_SIZE];
41extern BOOL s_NvIsAvailable;
42extern BOOL s_NV_unrecoverable;
43extern BOOL s_NV_recoverable;
44//
45// From PPPlat.c Physical presence. It is initialized to FALSE
46//
47extern BOOL s_physicalPresence;
48//
49// From Power
50//
51extern BOOL s_powerLost;
52//
53// From Entropy.c
54//
55extern uint32_t lastEntropy;
56extern int firstValue;
57#endif // _PLATFORM_DATA_H_