From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.100]) by mx.groups.io with SMTP id smtpd.web11.62541.1683451971102249291 for ; Sun, 07 May 2023 02:32:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=e0Q2FDBl; spf=pass (domain: os.amperecomputing.com, ip: 40.107.236.100, mailfrom: tinhnguyen@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lemJVhtnXj+/889mBH/o83bhm6CgeHOsETdZFU11C5IqEXuBdtcx4WlMyNSLbSEKViCU98yPZMtGi3VOVtVh5WQFFKI/IJpwNRbFKM1KXm7X87bS7QynQjF4c9udg/V/cgsQmj8/pihmEuvsMpNbqsdRTIo8/kEnCYpyQgifzAQowiQX6vxKHkRQScuOBeRuc5Gnm2C/xUJxrNgvz/52GFUGwJQx3DMLfqdDyFic04iDg7S8Ry3iEFodjRHTM75/BqcQlQWMOkZPXyB1FNdOwI/EeZIUcR+07wVhtF7S1HO9l9zuAeR8sXj1ipv4ck4PB83F7bKDL8DYhL15H43ptg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9nSDUyNpf3a5TsR6UbZ81i25cIBD19247h0KLTdEV+U=; b=itLGjmiLqRrgJCiFMtRD3J9qfSnA1RggmHdxQpeMJMkNK510qe5a6Qa3A8tv6Rmnxfr7XbOQrm8WOiMN0qUfSSv7QVvVTPz2Rl1KYWhuBEnF7zhmHL1EIQGqvpWpl+CkKBKIiB0n6I0Zht13XVYVnFPteCoi4NKan1J5vqGRnph+5Mz82d0wcJgQbN6GFN1r6/5dOVu9IINb1DYqWbugXK9asOE3AWknOPubImz/h0W5ME0ieAgrf2Z1LFZfO4UOg8be0Jze26gSgab8wuPLsUdxG6QdH0Ge3kobzHMNzNbQCLnA41Oj+FW2DgWRVE7lpyZQVcMS3sIYq7E3WvsBWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9nSDUyNpf3a5TsR6UbZ81i25cIBD19247h0KLTdEV+U=; b=e0Q2FDBlKdt7cbY9RxZOYu5cYm0xA5p6VDfDDCwzpo+5IRxiRDb5o56RCrmmzPxv//Q5vxfaYiVMCpkNdsUt4o8gzKZSSauR89Ov1TE+7ffYrhs5e5rzhKysRee3Grf+OUJcOxmYsXjkKffD6API+BwId2t3yMqLHnsHHK8iWT8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM5PR0102MB3336.prod.exchangelabs.com (2603:10b6:4:9f::11) by BL0PR0102MB3587.prod.exchangelabs.com (2603:10b6:207:38::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.22; Sun, 7 May 2023 09:32:49 +0000 Received: from DM5PR0102MB3336.prod.exchangelabs.com ([fe80::bb9e:46d1:ae4b:caf2]) by DM5PR0102MB3336.prod.exchangelabs.com ([fe80::bb9e:46d1:ae4b:caf2%7]) with mapi id 15.20.6363.031; Sun, 7 May 2023 09:32:49 +0000 From: "Tinh Nguyen" To: devel@edk2.groups.io CC: patches@amperecomputing.com, michael.d.kinney@intel.com, gaoliming@byosoft.com.cn, zhiguang.liu@intel.com, abner.chang@amd.com, Tinh Nguyen Subject: [PATCH v4 1/3] MdePkg/IndustryStandard: Add definitions for IPMI SSIF Date: Sun, 7 May 2023 16:29:11 +0700 Message-ID: <20230507092913.2109108-2-tinhnguyen@os.amperecomputing.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230507092913.2109108-1-tinhnguyen@os.amperecomputing.com> References: <20230507092913.2109108-1-tinhnguyen@os.amperecomputing.com> X-ClientProxiedBy: SI2PR01CA0017.apcprd01.prod.exchangelabs.com (2603:1096:4:191::19) To DM5PR0102MB3336.prod.exchangelabs.com (2603:10b6:4:9f::11) Return-Path: tinhnguyen@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR0102MB3336:EE_|BL0PR0102MB3587:EE_ X-MS-Office365-Filtering-Correlation-Id: 577ce6d2-46e2-4043-5396-08db4ede05b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yer28PdJ+SFLuBMN8tv7HYZEUUbTc9syAW5S4wUu7xRCmM1RaCo0n4yAWRArIY375Iw1dZpYivJeFB/hwzbPaSJtgCSiWfBKUPu4HKrey/WXebxV6JjzUsPuWnyGyckBDRjhBm6s5/zIhCQGPFrROVRTWNCBd8BCLkp4Suu7tOU5UJi0X5npRzUJhaezBYSBpZ6Mu9mNu2lHOGsE44yUdSnnj9H6o5cfHNz3yPwkXYParg1oCzBtUNUwbufZy8G6HbQCwYzZ1c+NXhVnxisUezwq1Qb+Jj1+LS3uMlcD6aCrgKVctmzpUk+qkFmPHWkS70bK+1/vK04dcUeMH+sF0I087+yK/4ht1ZF0lnvwx7Z6NJCK7NcwTzRvXhtMmobq++s0RIuQY5rKVJTwpWKlM03um+wIaaknc0KkcRSbhJe4+snNS7CmWbm3DUjddina642FSC/U3E+29ZQV6iXQu+5wcdaLlubuJa3o1wGwZf1xr1RAYBRpK4jVfN4fj9vZPpCa8Q4W6GeH9BucT8I4OWw+q8Jx9GRJKNf/hVLNE23+j/N/GDpQJmQAgiZDvbL9tbFXzSsvzW3NltbqP7dh7K5tjEsCmf7t2X+qnIKx1b8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR0102MB3336.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(366004)(396003)(39840400004)(136003)(376002)(451199021)(6512007)(2906002)(41300700001)(38350700002)(107886003)(38100700002)(83380400001)(6506007)(86362001)(186003)(52116002)(26005)(1076003)(8936002)(66476007)(5660300002)(966005)(316002)(6666004)(6916009)(478600001)(6486002)(4326008)(8676002)(66946007)(66556008)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?fc/YkYmuBdSsbZeHWGPIJuN3tMY7TMRTJMC1c0kPO1dS5spOWeplSb0sKfd2?= =?us-ascii?Q?+58MPjnm4HVlQpuvKFvUm/IECjy/bt5zOswg6fRvSFOY/wyu7t5N6am1s/El?= =?us-ascii?Q?f8BBC9AOrpeSk0SqZpHht8rSmep8N9PjajBaSoPvFTa130GDZig1DbQE8MAv?= =?us-ascii?Q?RiqLhQInA0+8a7iKd9os34FJO9UMw7rgVkwXXCP9ztSXBwzSTa1b+MYktszi?= =?us-ascii?Q?brhj3Anq6jpBOw5VgDeoiRMjGsRAQUGJHg1AuiWsPgVn/kQJxwEMPZD1cODT?= =?us-ascii?Q?9XfY/8zs8UhBTX+pvD38TJAlR6sdiW61whdn4F8pApqhvFnjufPIOoj1lPbx?= =?us-ascii?Q?N/y1ThmiyqgDSuUFezj7D7yfVeFzDLNGpVEJWuOlEUOmmK9c5EJGfpq/gSn9?= =?us-ascii?Q?brr+zH8RmDRDCmK20svu2d6lhiy8w2YLK9RL9qKFPEUlItLGNiQ8WUTqVbcP?=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MiGhrsTLCMwDmudjC9byVPQspix?= =?us-ascii?Q?S909cng7dLAJ8kfHf3TyP5FopsT6WSS2UpqzzQ0Vf9dNR17uY/QuOUQzeCyh?= =?us-ascii?Q?6ldRfmba44htWkuNNkxR+c/vT9zpprLKLpTMq1nrN36G98OoFwSM3tcUQUiG?= =?us-ascii?Q?Z6J2MUg1fcN5fClHHqhcFMkSGKfoQj+UZYrbYyFYuQFm9foScIL/uFmoZLWC?= =?us-ascii?Q?O8wLCN9MqlEjYjyybZ86HtE/UZhZmq0JR67YqCKYiscPzPpIBHNmmN+/P6hk?= =?us-ascii?Q?Y3+iWJXYszblkbCo3JeNalE5N3JkUnzWk8n1kgoeLFv7?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 577ce6d2-46e2-4043-5396-08db4ede05b7 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3336.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2023 09:32:49.0730 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fgiFlW0WGfP5G9sjTPOEWt/bdMGQb0iQ9kfPDPguKxxiKyc995q+IfOATQfvtlWFaIG1HceV8gVNdtviQADhcGE7zJR06ACgjUbi9Ri2uv+bbpQX/GAi3XtuxMKpevOQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR0102MB3587 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain BZ#: 4434 - Add IPMI SSIF definitions. Specification reference: https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-sec= ond-gen-interface-spec-v2-rev1-1.html Signed-off-by: Tinh Nguyen Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Abner Chang Reviewed-by: Abner Chang --- MdePkg/Include/IndustryStandard/IpmiSsif.h | 98 ++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/MdePkg/Include/IndustryStandard/IpmiSsif.h b/MdePkg/Include/In= dustryStandard/IpmiSsif.h new file mode 100644 index 000000000000..a5bfa14a9dfa --- /dev/null +++ b/MdePkg/Include/IndustryStandard/IpmiSsif.h @@ -0,0 +1,98 @@ +/** @file + IPMI SSIF Definitions + + Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + - IPMI Specification + Version 2.0, Rev. 1.1 + + https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-= second-gen-interface-spec-v2-rev1-1.html +**/ + +#ifndef IPMI_SSIF_H_ +#define IPMI_SSIF_H_ + +/// +/// Definitions for SMBUS Commands for SSIF +/// Table 12 - Summary of SMBUS Commands for SSIF +/// + +/// Write block +#define IPMI_SSIF_SMBUS_CMD_SINGLE_PART_WRITE 0x02 +#define IPMI_SSIF_SMBUS_CMD_MULTI_PART_WRITE_START 0x06 +#define IPMI_SSIF_SMBUS_CMD_MULTI_PART_WRITE_MIDDLE 0x07 +#define IPMI_SSIF_SMBUS_CMD_MULTI_PART_WRITE_END 0x08 + +/// Read block +#define IPMI_SSIF_SMBUS_CMD_SINGLE_PART_READ 0x03 +#define IPMI_SSIF_SMBUS_CMD_MULTI_PART_READ_START 0x03 +#define IPMI_SSIF_SMBUS_CMD_MULTI_PART_READ_MIDDLE 0x09 +#define IPMI_SSIF_SMBUS_CMD_MULTI_PART_READ_END 0x09 +#define IPMI_SSIF_SMBUS_CMD_MULTI_PART_READ_RETRY 0x0A + +/// +/// Definitions for Multi-Part Read Transactions +/// Section 12.5 +/// +#define IPMI_SSIF_MULTI_PART_READ_START_SIZE 0x1E +#define IPMI_SSIF_MULTI_PART_READ_START_PATTERN1 0x00 +#define IPMI_SSIF_MULTI_PART_READ_START_PATTERN2 0x01 +#define IPMI_SSIF_MULTI_PART_READ_END_PATTERN 0xFF + +/// +/// IPMI SSIF maximum message size +/// +#define IPMI_SSIF_INPUT_MESSAGE_SIZE_MAX 0xFF +#define IPMI_SSIF_OUTPUT_MESSAGE_SIZE_MAX 0xFF + +/// +/// IPMI SMBus system interface maximum packet size in byte +/// +#define IPMI_SSIF_MAXIMUM_PACKET_SIZE_IN_BYTES 0x20 + +typedef enum { + IpmiSsifPacketStart =3D 0, + IpmiSsifPacketMiddle, + IpmiSsifPacketEnd, + IpmiSsifPacketSingle, + IpmiSsifPacketMax +} IPMI_SSIF_PACKET_ATTRIBUTE; + +#pragma pack (1) +/// +/// IPMI SSIF Interface Request Format +/// Section 12.2 and 12.3 +/// +typedef struct { + UINT8 NetFunc; + UINT8 Command; +} IPMI_SSIF_REQUEST_HEADER; + +/// +/// IPMI SSIF Interface Response Format +/// Section 12.4 and 12.5 +/// +typedef struct { + UINT8 StartPattern[2]; + UINT8 NetFunc; + UINT8 Command; +} IPMI_SSIF_RESPONSE_PACKET_START; + +typedef struct { + UINT8 BlockNumber; +} IPMI_SSIF_RESPONSE_PACKET_MIDDLE; + +typedef struct { + UINT8 EndPattern; +} IPMI_SSIF_RESPONSE_PACKET_END; + +typedef struct { + UINT8 NetFunc; + UINT8 Command; +} IPMI_SSIF_RESPONSE_SINGLE_PACKET; + +#pragma pack () + +#endif /* IPMI_SSIF_H_ */ --=20 2.40.0