1 | /** @file
|
---|
2 | IPMI SSIF Definitions
|
---|
3 |
|
---|
4 | Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
|
---|
5 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
6 |
|
---|
7 | @par Revision Reference:
|
---|
8 | - IPMI Specification
|
---|
9 | Version 2.0, Rev. 1.1
|
---|
10 |
|
---|
11 | https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html
|
---|
12 | **/
|
---|
13 |
|
---|
14 | #ifndef IPMI_SSIF_H_
|
---|
15 | #define IPMI_SSIF_H_
|
---|
16 |
|
---|
17 | ///
|
---|
18 | /// Definitions for SMBUS Commands for SSIF
|
---|
19 | /// Table 12 - Summary of SMBUS Commands for SSIF
|
---|
20 | ///
|
---|
21 |
|
---|
22 | /// Write block
|
---|
23 | #define IPMI_SSIF_SMBUS_CMD_SINGLE_PART_WRITE 0x02
|
---|
24 | #define IPMI_SSIF_SMBUS_CMD_MULTI_PART_WRITE_START 0x06
|
---|
25 | #define IPMI_SSIF_SMBUS_CMD_MULTI_PART_WRITE_MIDDLE 0x07
|
---|
26 | #define IPMI_SSIF_SMBUS_CMD_MULTI_PART_WRITE_END 0x08
|
---|
27 |
|
---|
28 | /// Read block
|
---|
29 | #define IPMI_SSIF_SMBUS_CMD_SINGLE_PART_READ 0x03
|
---|
30 | #define IPMI_SSIF_SMBUS_CMD_MULTI_PART_READ_START 0x03
|
---|
31 | #define IPMI_SSIF_SMBUS_CMD_MULTI_PART_READ_MIDDLE 0x09
|
---|
32 | #define IPMI_SSIF_SMBUS_CMD_MULTI_PART_READ_END 0x09
|
---|
33 | #define IPMI_SSIF_SMBUS_CMD_MULTI_PART_READ_RETRY 0x0A
|
---|
34 |
|
---|
35 | ///
|
---|
36 | /// Definitions for Multi-Part Read Transactions
|
---|
37 | /// Section 12.5
|
---|
38 | ///
|
---|
39 | #define IPMI_SSIF_MULTI_PART_READ_START_SIZE 0x1E
|
---|
40 | #define IPMI_SSIF_MULTI_PART_READ_START_PATTERN1 0x00
|
---|
41 | #define IPMI_SSIF_MULTI_PART_READ_START_PATTERN2 0x01
|
---|
42 | #define IPMI_SSIF_MULTI_PART_READ_END_PATTERN 0xFF
|
---|
43 |
|
---|
44 | ///
|
---|
45 | /// IPMI SSIF maximum message size
|
---|
46 | ///
|
---|
47 | #define IPMI_SSIF_INPUT_MESSAGE_SIZE_MAX 0xFF
|
---|
48 | #define IPMI_SSIF_OUTPUT_MESSAGE_SIZE_MAX 0xFF
|
---|
49 |
|
---|
50 | ///
|
---|
51 | /// IPMI SMBus system interface maximum packet size in byte
|
---|
52 | ///
|
---|
53 | #define IPMI_SSIF_MAXIMUM_PACKET_SIZE_IN_BYTES 0x20
|
---|
54 |
|
---|
55 | typedef enum {
|
---|
56 | IpmiSsifPacketStart = 0,
|
---|
57 | IpmiSsifPacketMiddle,
|
---|
58 | IpmiSsifPacketEnd,
|
---|
59 | IpmiSsifPacketSingle,
|
---|
60 | IpmiSsifPacketMax
|
---|
61 | } IPMI_SSIF_PACKET_ATTRIBUTE;
|
---|
62 |
|
---|
63 | #pragma pack (1)
|
---|
64 | ///
|
---|
65 | /// IPMI SSIF Interface Request Format
|
---|
66 | /// Section 12.2 and 12.3
|
---|
67 | ///
|
---|
68 | typedef struct {
|
---|
69 | UINT8 NetFunc;
|
---|
70 | UINT8 Command;
|
---|
71 | } IPMI_SSIF_REQUEST_HEADER;
|
---|
72 |
|
---|
73 | ///
|
---|
74 | /// IPMI SSIF Interface Response Format
|
---|
75 | /// Section 12.4 and 12.5
|
---|
76 | ///
|
---|
77 | typedef struct {
|
---|
78 | UINT8 StartPattern[2];
|
---|
79 | UINT8 NetFunc;
|
---|
80 | UINT8 Command;
|
---|
81 | } IPMI_SSIF_RESPONSE_PACKET_START;
|
---|
82 |
|
---|
83 | typedef struct {
|
---|
84 | UINT8 BlockNumber;
|
---|
85 | } IPMI_SSIF_RESPONSE_PACKET_MIDDLE;
|
---|
86 |
|
---|
87 | typedef struct {
|
---|
88 | UINT8 EndPattern;
|
---|
89 | } IPMI_SSIF_RESPONSE_PACKET_END;
|
---|
90 |
|
---|
91 | typedef struct {
|
---|
92 | UINT8 NetFunc;
|
---|
93 | UINT8 Command;
|
---|
94 | } IPMI_SSIF_RESPONSE_SINGLE_PACKET;
|
---|
95 |
|
---|
96 | #pragma pack ()
|
---|
97 |
|
---|
98 | #endif /* IPMI_SSIF_H_ */
|
---|