blob: 5f0afb4713c95ac6fc5ffbb46bab0f36bcdd76f7 [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#include "PlatformData.h"
9#include "TpmError.h"
Vadim Bendebury05c62682015-05-29 18:25:23 -070010
11static BOOL s_RsaKeyCacheEnabled;
12
Vadim Bendebury56797522015-05-20 10:32:25 -070013//
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//
22LIB_EXPORT unsigned char
23_plat__LocalityGet(
24 void
25 )
26{
27 return s_locality;
28}
29//
30//
31// _plat__LocalitySet()
32//
33// Set the most recent command locality in locality value form
34//
35LIB_EXPORT void
36_plat__LocalitySet(
37 unsigned char locality
38 )
39{
40 if(locality > 4 && locality < 32)
41 locality = 0;
42 s_locality = locality;
43 return;
44}
45//
46//
47// _plat__IsRsaKeyCacheEnabled()
48//
49// This function is used to check if the RSA key cache is enabled or not.
50//
51LIB_EXPORT int
52_plat__IsRsaKeyCacheEnabled(
53 void
54 )
55{
56 return s_RsaKeyCacheEnabled;
57}