Vadim Bendebury | 5679752 | 2015-05-20 10:32:25 -0700 | [diff] [blame] | 1 | // 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 | // |
| 16 | extern 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 | // |
| 21 | extern unsigned long long s_initClock; |
| 22 | extern unsigned int s_adjustRate; |
| 23 | // |
| 24 | // From LocalityPlat.c Locality of current command |
| 25 | // |
| 26 | extern 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 | // |
| 38 | extern FILE* s_NVFile; |
| 39 | #endif |
| 40 | extern unsigned char s_NV[NV_MEMORY_SIZE]; |
| 41 | extern BOOL s_NvIsAvailable; |
| 42 | extern BOOL s_NV_unrecoverable; |
| 43 | extern BOOL s_NV_recoverable; |
| 44 | // |
| 45 | // From PPPlat.c Physical presence. It is initialized to FALSE |
| 46 | // |
| 47 | extern BOOL s_physicalPresence; |
| 48 | // |
| 49 | // From Power |
| 50 | // |
| 51 | extern BOOL s_powerLost; |
| 52 | // |
| 53 | // From Entropy.c |
| 54 | // |
| 55 | extern uint32_t lastEntropy; |
| 56 | extern int firstValue; |
| 57 | #endif // _PLATFORM_DATA_H_ |