From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.93]) by mx.groups.io with SMTP id smtpd.web11.542.1683049262130883451 for ; Tue, 02 May 2023 10:41:02 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=fA9o2iXH; spf=pass (domain: os.amperecomputing.com, ip: 40.107.244.93, mailfrom: tinhnguyen@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BuOv4J2S2+PtwzjbOtcok3dXf3cCIJtC96KMCouzoU0xDorLQSVR181Pq7AN1gk9mEwho/MwQaO4Lcp+mTlOnUnJF9tlieW++g1Og5VXeC7gTM/1maqGLiVJYQwFSMTwwKzqtmPJDN1a7owxRS4OV8e4qroQzNSvBmHd4Hk31674STOu3vGgazl1D33Q5+vi+ybZMoyczvPwPZjkYD+b5rm0Ya1aTSDCJVM1cY7Tc4uCn/W0ZB3J7RdlWbKsoVgvWDMNBW04GyKFU/IEEqP6YzkCNvIKJXzX/sjyTmpSsaNIWdg1lNVfWbl4tYQw3ruSEZmJM5efPbtLbRpWNJuoSQ== 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=1G7tf0GGEHRjHrE6Pb400ZvaMEdUCGWStmMMGR7jJ+4=; b=IvZLfgab8CDAeFINSReaOr7HL5KQXphxr827TDBEAaZEHvdXejDPgO9gcOjwc7YadIV2f+jqUg8mRiC/TbmFPBrH9Zqut+dOqqdGvZ5FkCA/UyYDajauPGY6NLCzcw/TqZ71nFeM+Ndm4lWpmwr2QU7nDR1L+aKS5G6O176WDbiUVeoq4ua72+tX47L9N+d8xlH2UrqIcSPHea3glp6HHc89csWAmOs5tjr2H4D4g/YcnFdOAxy+PWa8KShj10HxWXOJFjEXMLaCMje68yD3Ut5iEBA6vkqy0zxd59Uk0QrITvmGqNMiT937P9NgbtrJ1xo3ZZLUYbZGFjMy34/TqA== 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=1G7tf0GGEHRjHrE6Pb400ZvaMEdUCGWStmMMGR7jJ+4=; b=fA9o2iXHFN0LDXWDmsZ1KZeG94Za6NcQzUz55RaNhQGAsobrgvWcDtdvgylOal1n1WGsur5t094vHX+vKWnBrtI2hrAV8bHW3KbjxSEhLxl9BM9wkKS5hNYBWAfaTI7zPGg1u2bqCZ/L+ZUSb7NO9JD+pRUqe0czK1D5bwaAsCk= 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 DM6PR01MB6044.prod.exchangelabs.com (2603:10b6:5:1db::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.30; Tue, 2 May 2023 17:40:59 +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.6340.030; Tue, 2 May 2023 17:40:59 +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 v2 1/3] MdePkg/IndustryStandard: Add definitions for IPMI SSIF Date: Wed, 3 May 2023 00:39:43 +0700 Message-ID: <20230502173945.2016719-2-tinhnguyen@os.amperecomputing.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230502173945.2016719-1-tinhnguyen@os.amperecomputing.com> References: <20230502173945.2016719-1-tinhnguyen@os.amperecomputing.com> X-ClientProxiedBy: SI1PR02CA0051.apcprd02.prod.outlook.com (2603:1096:4:1f5::6) 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_|DM6PR01MB6044:EE_ X-MS-Office365-Filtering-Correlation-Id: 465dbe29-7fce-4110-009e-08db4b346435 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0Wtg0adqU0qVNrYbopDrxd3RhPowzYNH1FGWs/gVpfhN0Y7BI9LQTvD3+Joe+5ceu6KN+7ODlW0s8bH5hecYIaTYgqO7eu9LK9Ue8kMGmqaYfXJJFu4LT/tTqeo09JgE4x6pj3bR8FtwoeofXRMnKMzMDTs9mCHZSFZtCSmMXM+ulWWpxImQ8vdT9GFCR/YKBRk9wMBztISmrBlyC0palaJt+xfZy7UmRmNMS/qJwEkxa2AkkH2F17sK8/r/ukELAGvYp6vX3kiSH0HXpRJi5H2QPdSJsIuAvWnYI6b5lxhVIdtLjgg/uxRIbO244bqFtzSujuXQbsGmtbF2nSnw+MkCbMEpLJDizvo9KlcmEqDIzZFaZgFmYqqFNrpJBm1GIEWAHeSbiGvF/Ir6g3b8IjQNM/S3QypsVr1S0RaKd9jGunmViYI2N7NIt2YZy+uzB2zkrUHc9cRJetfAIv9qBToGAVALN6hQ3/K8Z2LL6z8qbxb2S8RQaTVpTebgCBfVi1iytX0mb+y6QLIGEjSaRC8NVZzx4Hj7m3eYkIivV814rJ7o+WEgssykrr89VIcL+1YCG+JbuMw/j+adQw1oJC38vnxSHjXD04mNg9J8bHQ= 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)(136003)(39850400004)(396003)(346002)(376002)(366004)(451199021)(186003)(107886003)(6512007)(6506007)(6486002)(966005)(26005)(1076003)(66476007)(2616005)(66946007)(316002)(83380400001)(4326008)(6916009)(41300700001)(8936002)(8676002)(5660300002)(66556008)(478600001)(6666004)(2906002)(52116002)(86362001)(38350700002)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?+79R7hctY53J2mx+t8agXuBlFNF6jPdQTLwgg1vnnwQ62ItoJ363+ZE1OTsS?= =?us-ascii?Q?oBrxsOhGlqqkaCdxMFaI5s3bBHkv4M/+NkqI2Tueye/Qc85E5E76Mlt5EkTR?= =?us-ascii?Q?KffwLkzPFhmNZNIKBcDxsfhKkrVroRzhy7W17rm1RhAzHUUqf3EMJD1+Rh3t?= =?us-ascii?Q?So4ciB7GHAjMqCiPEOs79QN+lGXT5Icz7KiBE3zWsha4bxGJ+OOBSYp2xXpW?= =?us-ascii?Q?YDWWX3tkwFaNmtQ0M5nXTudeXErBHUUGigocH3BAQB6BagwzqNUQSrz7L90O?= =?us-ascii?Q?fiUC7L2YE+q29jZoTxtbsCj3YK7odCE5qu4MtNNV/CBH9zTkAMuCk1/YOFe7?= =?us-ascii?Q?WlBx98Uz1FdEqrxPMc7AzMRUpzUU33t1PX3dCJt0dVKQewA9MrlVwMPwwhON?= =?us-ascii?Q?uYMKT5brzdRGpEd7d+0kkfjVbeivRrsAR59JXPy+shAVm7wNioRO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UtwhLfjvlHqTld//MNzN7G6WRNlBvrzyId4aB9BK0l87EWSgHw0?= =?us-ascii?Q?V1ply2buoJ5aidtrpEG+PgDYXTHzbG/YCq9lcN4T8HLeaK8NCPTw5Y4f3Ki5?= =?us-ascii?Q?yCuyRiP4m31FpRXOH0LBazFpzmpZicYndByjNDi+wyuFNGXNpKUJrbF2LAuX?= =?us-ascii?Q?NBmFHf8CjBoGxszBIHNAiCheMATnUhiUneyAJVLGg82Mzgwf1mMHB4Wye5O3?= =?us-ascii?Q?p2wLTozxkTxb54yLg+YOxsGYNU4JMTBEEr4hU+/G6637IFVK8J85+v6Snta+?= =?us-ascii?Q?NG2pEhzDnBL+o4qIS0HsTcoF9mCVuxohD8+CXDC6HEHa?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 465dbe29-7fce-4110-009e-08db4b346435 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3336.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2023 17:40:59.8622 (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: JTEXOh0AjEwW/1gs/fsZADmNUo5cH1iZ+tYylAzJibedaUO76l/loV4zFdY74jjrnHOwFDvdjV/WWV/dCaMrCsDQFUZL8pswmNeZNMH3a/P21A1Nvhle1O5raRuV9s2A X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR01MB6044 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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 --- 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