1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
/** @file
Header file for SeC functionality.
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _SEC_LIB_H_
#define _SEC_LIB_H_
#include "SeCPolicyLib.h"
#include "HeciMsgLib.h"
/**
Check if SeC is enabled.
@param[in] VOID Parameter is VOID
@retval EFI_SUCCESS Command succeeded
**/
EFI_STATUS
SeCLibInit (
VOID
);
/**
Host client gets Firmware update info from SEC client
@param[in, out] SECCapability Structure of FirmwareUpdateInfo
@retval EFI_SUCCESS Command succeeded
**/
EFI_STATUS
HeciGetSeCFwInfo (
IN OUT SEC_CAP *SECCapability
);
/**
Send Get Firmware SKU Request to SEC.
@param[in] FwCapsSku Return Data from Get Firmware Capabilities MKHI Request.
@retval EFI_UNSUPPORTED Current SEC mode doesn't support this function.
@retval EFI_SUCCESS Command succeeded.
@retval EFI_DEVICE_ERROR HECI Device error, command aborts abnormally.
@retval EFI_TIMEOUT HECI does not return the buffer before timeout.
@retval EFI_BUFFER_TOO_SMALL Message Buffer is too small for the Acknowledge.
**/
EFI_STATUS
HeciGetFwCapsSku (
IN SECFWCAPS_SKU *FwCapsSku
);
/**
This message is sent by the BIOS or IntelR MEBX prior to the End of Post (EOP)
on the boot where host wants to get Ibex Peak platform type.
One of usages is to utilize this command to determine if the platform runs in
4M or 8M size firmware.
@param[out] RuleData PlatformBrand,
IntelSeCFwImageType,
SuperSku,
PlatformTargetMarketType,
PlatformTargetUsageType
@retval EFI_UNSUPPORTED Current SEC mode doesn't support this function.
@retval EFI_SUCCESS Command succeeded.
@retval EFI_DEVICE_ERROR HECI Device error, command aborts abnormally.
@retval EFI_TIMEOUT HECI does not return the buffer before timeout.
@retval EFI_BUFFER_TOO_SMALL Message Buffer is too small for the Acknowledge.
**/
EFI_STATUS
HeciGetPlatformType (
OUT PLATFORM_TYPE_RULE_DATA *RuleData
);
/**
Send Get Firmware Version Request to SEC.
@param[in,out] MsgGenGetFwVersionAckData Return themessage of FW version.
@retval EFI_UNSUPPORTED Current SEC mode doesn't support this function.
@retval EFI_SUCCESS Command succeeded.
@retval EFI_DEVICE_ERROR HECI Device error, command aborts abnormally.
@retval EFI_TIMEOUT HECI does not return the buffer before timeout.
@retval EFI_BUFFER_TOO_SMALL Message Buffer is too smallfor the Acknowledge.
**/
EFI_STATUS
HeciGetFwVersion (
IN OUT GEN_GET_FW_VER_ACK_DATA *MsgGenGetFwVersionAckData
);
/**
Dummy return for SeC signal event use.
@param[in] Event The event that triggered this notification function.
@param[in] ParentImageHandle Pointer to the notification functions context.
@return EFI_SUCCESS Always return EFI_SUCCESS.
**/
EFI_STATUS
SeCEmptyEvent (
IN EFI_EVENT Event,
IN void *ParentImageHandle
);
/**
Get AT State Information From Stored SEC platform policy.
@param[in, out] AtState Pointer to AT State Information.
@param[in, out] AtLastTheftTrigger Pointer to Variable holding the cause of last AT Stolen Stae.
@param[in, out] AtLockState Pointer to variable indicating whether AT is locked or not.
@param[in, out] AtAmPref Pointer to variable indicating whether TDTAM or PBA should be used.
@retval EFI_UNSUPPORTED Current SEC mode doesn't support this function.
@retval EFI_SUCCESS Command succeeded.
@retval EFI_DEVICE_ERROR HECI Device error, command aborts abnormally.
@retval EFI_TIMEOUT HECI does not return the buffer before timeout.
@retval EFI_BUFFER_TOO_SMALL Message Buffer is too smallfor the Acknowledge.
**/
EFI_STATUS
GetAtStateInfo (
IN OUT UINT8 *AtState,
IN OUT UINT8 *AtLastTheftTrigger,
IN OUT UINT16 *AtLockState,
IN OUT UINT16 *AtAmPref
);
#endif
|