Coverage Report

Created: 2025-07-11 06:15

/src/tpm2/Power.c
Line
Count
Source
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
#define POWER_C
9
#include "InternalRoutines.h"
10
//          Functions
11
//
12
//           TPMInit()
13
//
14
//     This function is used to process a power on event.
15
//
16
void
17
TPMInit(
18
      void
19
      )
20
231
{
21
      // Set state as not initialized. This means that Startup is required
22
231
      s_initialized = FALSE;
23
231
      return;
24
231
}
25
//
26
//
27
//           TPMRegisterStartup()
28
//
29
//     This function registers the fact that the TPM has been initialized (a TPM2_Startup() has completed
30
//     successfully).
31
//
32
void
33
TPMRegisterStartup(
34
      void
35
      )
36
231
{
37
231
      s_initialized = TRUE;
38
231
      return;
39
231
}
40
//
41
//
42
//           TPMIsStarted()
43
//
44
//     Indicates if the TPM has been initialized (a TPM2_Startup() has completed successfully after a
45
//     _TPM_Init()).
46
//
47
//     Return Value                    Meaning
48
//
49
//     TRUE                            TPM has been initialized
50
//     FALSE                           TPM has not been initialized
51
//
52
BOOL
53
TPMIsStarted(
54
      void
55
      )
56
880
{
57
880
      return s_initialized;
58
880
}