xref: /titanic_41/usr/src/cmd/lms/heci/HECI_if.h (revision 7d1e83948cb684521e72cab96020be241508f449)
1 /*******************************************************************************
2  * Copyright (C) 2004-2008 Intel Corp. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  *  - Redistributions of source code must retain the above copyright notice,
8  *    this list of conditions and the following disclaimer.
9  *
10  *  - Redistributions in binary form must reproduce the above copyright notice,
11  *    this list of conditions and the following disclaimer in the documentation
12  *    and/or other materials provided with the distribution.
13  *
14  *  - Neither the name of Intel Corp. nor the names of its
15  *    contributors may be used to endorse or promote products derived from this
16  *    software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corp. OR THE CONTRIBUTORS
22  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29  *******************************************************************************/
30 
31 #ifndef __HECI_INTRFACE_H__
32 #define __HECI_INTRFACE_H__
33 
34 typedef unsigned char   UINT8;
35 typedef unsigned short  UINT16;
36 typedef unsigned int    UINT32;
37 typedef char            CHAR;
38 typedef unsigned long   ULONG;
39 typedef UINT32          AMT_STATUS;
40 typedef UINT32          AMT_BOOLEAN;
41 
42 typedef enum _HECI_STATUS {
43 	HECI_STATUS_OK                    = 0x0,
44 	HECI_STATUS_GENERAL_ERROR         = 0x2000,
45 	HECI_STATUS_LOCATE_DEVICE_ERROR,
46 	HECI_STATUS_MEMORY_ACCESS_ERROR,
47 	HECI_STATUS_WRITE_REGISTER_ERROR,
48 	HECI_STATUS_MEMORY_ALLOCATION_ERROR,
49 	HECI_STATUS_BUFFER_OVEREFLOW_ERROR,
50 	HECI_STATUS_NOT_ENOUGH_MEMORY,
51 	HECI_STATUS_MSG_TRANSMISSION_ERROR,
52 	HECI_STATUS_VERSION_MISMATCH,
53 	HECI_STATUS_UNEXPECTED_INTERRUPT_REASON,
54 	HECI_STATUS_TIMEOUT_ERROR,
55 	HECI_STATUS_UNEXPECTED_RESPONSE,
56 	HECI_STATUS_UNKNOWN_MESSAGE,
57 	HECI_STATUS_CANNOT_FOUND_HOST_CLIENT,
58 	HECI_STATUS_CANNOT_FOUND_ME_CLIENT,
59 	HECI_STATUS_CLIENT_ALREADY_CONNECTED,
60 	HECI_STATUS_NO_FREE_CONNECTION,
61 	HECI_STATUS_ILLEGAL_PARAMETER,
62 	HECI_STATUS_FLOW_CONTROL_ERROR,
63 	HECI_STATUS_NO_MESSAGE,
64 	HECI_STATUS_BUFFER_TOO_LARGE,
65 	HECI_STATUS_BUFFER_TOO_SMALL,
66 	HECI_STATUS_BUFFER_NOT_EMPTY,
67 	NUM_OF_HECI_STATUSES
68 } HECI_STATUS;
69 
70 const GUID HECI_PTHI  = {0x12f80028, 0xb4b7, 0x4b2d, {0xac, 0xa8, 0x46, 0xe0, 0xff, 0x65, 0x81, 0x4c}};
71 
72 // Define GUID used to connect to the FWUpdate client (via the HECI device)
73 // {309DCDE8-CCB1-4062-8F78-600115A34327}
74 const GUID FW_UPDATE_GUID = {0x309dcde8, 0xccb1, 0x4062, {0x8f, 0x78, 0x60, 0x1, 0x15, 0xa3, 0x43, 0x27}};
75 
76 const GUID WD_GUID    = {0x05B79A6F, 0x4628, 0x4D7F, {0x89, 0x9D, 0xA9, 0x15, 0x14, 0xCB, 0x32, 0xAB}};
77 
78 #pragma pack(1)
79 
80 typedef struct _HECI_VERSION {
81 	UINT8 major;
82 	UINT8 minor;
83 	UINT8 hotfix;
84 	UINT16 build;
85 } HECI_VERSION;
86 
87 typedef struct _HECI_CLIENT {
88 	UINT32  MaxMessageLength;
89 	UINT8 ProtocolVersion;
90 } HECI_CLIENT;
91 
92 typedef union _MEFWCAPS_SKU
93 {
94 	UINT32   Data;
95 	struct {
96 		UINT32   Reserved    :1; //Legacy
97 		UINT32   Qst         :1; //QST
98 		UINT32   Asf         :1; //ASF2
99 		UINT32   Amt         :1; //AMT Professional
100 		UINT32   AmtFund     :1; //AMT Fundamental
101 		UINT32   Tpm         :1; //TPM
102 		UINT32   Dt          :1; //Danbury Technology
103 		UINT32   Fps         :1; //Fingerprint Sensor
104 		UINT32   HomeIT      :1; //Home IT
105 		UINT32   Mctp        :1; //MCTP
106 		UINT32   WoX         :1; //Wake on X
107 		UINT32   PmcPatch    :1; //PMC Patch
108 		UINT32   Ve          :1; //VE
109 		UINT32   Tdt         :1; //Theft Deterrent Technology
110 		UINT32   Corp        :1; //Corporate
111 		UINT32   Reserved2   :17;
112 	} Fields;
113 } MEFWCAPS_SKU;
114 
115 typedef enum _MEFWCAPS_MANAGEABILITY_SUPP
116 {
117 	MEFWCAPS_MANAGEABILITY_SUPP_NONE = 0,
118 	MEFWCAPS_MANAGEABILITY_SUPP_AMT,
119 	MEFWCAPS_MANAGEABILITY_SUPP_ASF,
120 	MEFWCAPS_MANAGEABILITY_SUPP_CP
121 } MEFWCAPS_MANAGEABILITY_SUPP;
122 
123 
124 #pragma pack()
125 
126 #endif // __HECI_INTRFACE_H__
127