Coverage Report

Created: 2026-01-10 06:45

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/tpm2/LocalityPlat.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
#include "PlatformData.h"
9
#include "TpmError.h"
10
11
static BOOL s_RsaKeyCacheEnabled;
12
13
//
14
//
15
//          Functions
16
//
17
//          _plat__LocalityGet()
18
//
19
//     Get the most recent command locality in locality value form. This is an integer value for locality and not a
20
//     locality structure The locality can be 0-4 or 32-255. 5-31 is not allowed.
21
//
22
LIB_EXPORT unsigned char
23
_plat__LocalityGet(
24
     void
25
     )
26
256
{
27
256
     return s_locality;
28
256
}
29
//
30
//
31
//          _plat__LocalitySet()
32
//
33
//     Set the most recent command locality in locality value form
34
//
35
LIB_EXPORT void
36
_plat__LocalitySet(
37
     unsigned char       locality
38
     )
39
0
{
40
0
     if(locality > 4 && locality < 32)
41
0
         locality = 0;
42
0
     s_locality = locality;
43
0
     return;
44
0
}
45
//
46
//
47
//          _plat__IsRsaKeyCacheEnabled()
48
//
49
//     This function is used to check if the RSA key cache is enabled or not.
50
//
51
LIB_EXPORT int
52
_plat__IsRsaKeyCacheEnabled(
53
     void
54
     )
55
0
{
56
0
     return s_RsaKeyCacheEnabled;
57
0
}