xref: /titanic_41/usr/src/cmd/lms/heci/MNGCommand.h (revision 617e2443dfc17fe44fd44c0675d6aad2ffc9df42)
1*617e2443SMark Logan /*******************************************************************************
2*617e2443SMark Logan  * Copyright (C) 2004-2008 Intel Corp. All rights reserved.
3*617e2443SMark Logan  *
4*617e2443SMark Logan  * Redistribution and use in source and binary forms, with or without
5*617e2443SMark Logan  * modification, are permitted provided that the following conditions are met:
6*617e2443SMark Logan  *
7*617e2443SMark Logan  *  - Redistributions of source code must retain the above copyright notice,
8*617e2443SMark Logan  *    this list of conditions and the following disclaimer.
9*617e2443SMark Logan  *
10*617e2443SMark Logan  *  - Redistributions in binary form must reproduce the above copyright notice,
11*617e2443SMark Logan  *    this list of conditions and the following disclaimer in the documentation
12*617e2443SMark Logan  *    and/or other materials provided with the distribution.
13*617e2443SMark Logan  *
14*617e2443SMark Logan  *  - Neither the name of Intel Corp. nor the names of its
15*617e2443SMark Logan  *    contributors may be used to endorse or promote products derived from this
16*617e2443SMark Logan  *    software without specific prior written permission.
17*617e2443SMark Logan  *
18*617e2443SMark Logan  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
19*617e2443SMark Logan  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20*617e2443SMark Logan  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21*617e2443SMark Logan  * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corp. OR THE CONTRIBUTORS
22*617e2443SMark Logan  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23*617e2443SMark Logan  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24*617e2443SMark Logan  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25*617e2443SMark Logan  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26*617e2443SMark Logan  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27*617e2443SMark Logan  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28*617e2443SMark Logan  * POSSIBILITY OF SUCH DAMAGE.
29*617e2443SMark Logan  *******************************************************************************/
30*617e2443SMark Logan 
31*617e2443SMark Logan #ifndef __MNG_COMMAND_H__
32*617e2443SMark Logan #define __MNG_COMMAND_H__
33*617e2443SMark Logan 
34*617e2443SMark Logan #include "HECIUnix.h"
35*617e2443SMark Logan #include "StatusCodeDefinitions.h"
36*617e2443SMark Logan 
37*617e2443SMark Logan #pragma pack(1)
38*617e2443SMark Logan 
39*617e2443SMark Logan typedef struct _MNG_REQUEST
40*617e2443SMark Logan {
41*617e2443SMark Logan 	UINT8   Cmd;
42*617e2443SMark Logan 	UINT8   ByteCount;
43*617e2443SMark Logan 	UINT8   SubCmd;
44*617e2443SMark Logan 	UINT8   Version;
45*617e2443SMark Logan } MNG_REQUEST;
46*617e2443SMark Logan 
47*617e2443SMark Logan typedef struct _MNG_GET_ME_INFORMATION_RESPONSE
48*617e2443SMark Logan {
49*617e2443SMark Logan 	UINT32         Version;
50*617e2443SMark Logan 	MEFWCAPS_SKU   Sku;
51*617e2443SMark Logan 	MEFWCAPS_MANAGEABILITY_SUPP  MngMode;
52*617e2443SMark Logan } MNG_GET_ME_INFORMATION_RESPONSE;
53*617e2443SMark Logan 
54*617e2443SMark Logan #pragma pack(0)
55*617e2443SMark Logan 
56*617e2443SMark Logan class MNGCommand
57*617e2443SMark Logan {
58*617e2443SMark Logan public:
59*617e2443SMark Logan 	MNGCommand(bool verbose = false);
60*617e2443SMark Logan 	~MNGCommand();
61*617e2443SMark Logan 
62*617e2443SMark Logan 	HECI_STATUS GetMEInfo(MNG_GET_ME_INFORMATION_RESPONSE &infoMsg);
63*617e2443SMark Logan 
64*617e2443SMark Logan 	HECILinux MNGClient;
65*617e2443SMark Logan 
66*617e2443SMark Logan private:
67*617e2443SMark Logan 	HECI_STATUS _call(const unsigned char *command, UINT32 command_size, UINT8 **readBuffer, UINT32 *outBuffSize);
68*617e2443SMark Logan 
69*617e2443SMark Logan 	bool _verbose;
70*617e2443SMark Logan 
71*617e2443SMark Logan };
72*617e2443SMark Logan 
73*617e2443SMark Logan const MNG_REQUEST MNG_GET_ME_INFO_HEADER = {0x07, 0x02, 0x01, 0x10};
74*617e2443SMark Logan const UINT32      MNG_GET_ME_INFO_Version = 0x00010000;
75*617e2443SMark Logan 
76*617e2443SMark Logan 
77*617e2443SMark Logan #endif //__MNG_COMMAND_H__
78*617e2443SMark Logan 
79