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.134]) by mx.groups.io with SMTP id smtpd.web10.9502.1678175469448090663 for ; Mon, 06 Mar 2023 23:51:09 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="no key for verify" header.i=@amperemail.onmicrosoft.com header.s=selector1-amperemail-onmicrosoft-com header.b=viN2zP7w; spf=pass (domain: os.amperecomputing.com, ip: 40.107.244.134, mailfrom: tinhnguyen@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j+/1BgxppyqJhMVxLQpm91p9AaxVOo9dAvxz44T3IU5Ry9/yD86ce1rmAQSMU/ZTcX0ow4R99jmQSBkwFxfUcl3mUW9nlJYkft0YJYSqYH97VHx+0aEE3hLo3WUZ2BvEqOwtozqOKZrfM3cG3Bxzx8nJldPqcBad8+O211e+d9a3Qrb0Ntjh9FaybbINxCiSoQTbkt7tYSXeFCyYxzu5sINYnJLxsprqqptGWrllb09u7KwBlryFEBlTAb2dqiXN0dFbxQuIerIQLS2PzaOspFYpMsKHW7OrTwaTj+oh8r5CGZ+hrzQk64jcR9Lz+hqZE8bCRKNKfPLgejE3hfr8tA== 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=yx4PGu7mrkSql82zY7sm4bHKitB/9VWQMfWFez25F0M=; b=afix9EsS/hQr9REUGvLFXt3QeVTSD6/HdrW1fypitd2/gIOBJh0eIlCZivjGQpDsHGT9xKyLBWMGvKlZK8jrkSv1mdOTFwzwlcu6Q9ZXAKrmxfprZ4/GUZfcsGGF3uvVf8KBY64TzVoUqAdPfB+daswvljFx6wNaZO8FQzqkqvyBdRdFjX1WIbi//uDj+FIGfo0am//53LnySQMvqr0DRs9U1og+WEGducY06kdnYgig1XwLTwVb/OukZ0n8bjiy7P90+lpKmVd5mTi3zETnm6x+itqEcRFKhRIU3rgOf/pkSe/Mks6bF2EssrJ+nLtov8ERBfip/SCq2ZWAguhBIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=amperemail.onmicrosoft.com; dkim=pass header.d=amperemail.onmicrosoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amperemail.onmicrosoft.com; s=selector1-amperemail-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yx4PGu7mrkSql82zY7sm4bHKitB/9VWQMfWFez25F0M=; b=viN2zP7wfyO+Oe+QYofydDO2yzUO7iYq5POUOFFtzhQt8Sx27vCODAFvB4h0h8REwOn7tukIiHZonkiE8pNFZF3kZUK7+I9nBeo0hnMSSQpXmwyrKifcXwLn43jnA0OVXkwKn36wOqLIZtbDDFwHP3cxAQj2xUzeam86pyNNpVU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amperemail.onmicrosoft.com; Received: from CO6PR01MB7498.prod.exchangelabs.com (2603:10b6:303:14d::21) by BN8PR01MB5521.prod.exchangelabs.com (2603:10b6:408:b7::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.14; Tue, 7 Mar 2023 07:51:05 +0000 Received: from CO6PR01MB7498.prod.exchangelabs.com ([fe80::4a64:1a14:e8ac:b9be]) by CO6PR01MB7498.prod.exchangelabs.com ([fe80::4a64:1a14:e8ac:b9be%9]) with mapi id 15.20.6178.016; Tue, 7 Mar 2023 07:51:05 +0000 Message-ID: <2144adb4-690c-cfc5-31bf-5f952e091d47@amperemail.onmicrosoft.com> Date: Tue, 7 Mar 2023 14:50:57 +0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [edk2-devel] [PATCH] MdePkg/Include: Add IPMI KCS definitions To: devel@edk2.groups.io, abner.chang@amd.com References: <20230303023132.771-1-abner.chang@amd.com> From: "Tinh Nguyen" In-Reply-To: <20230303023132.771-1-abner.chang@amd.com> X-ClientProxiedBy: SI2P153CA0036.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::11) To CO6PR01MB7498.prod.exchangelabs.com (2603:10b6:303:14d::21) Return-Path: tinhnguyen@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR01MB7498:EE_|BN8PR01MB5521:EE_ X-MS-Office365-Filtering-Correlation-Id: ae1fea1d-10b3-4cb1-abaa-08db1ee0b436 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L0gNcYH6s0Uzibhugiho7U1266+OqDe0P5ZrlKHwF6VwvROQPF/wii/ctGttw2I/1o3+bFDpZH1F2TE+dKTExoD0rqJRuto71K41XuR1cqBPEIMxYqNnKjsi1wbwJWIKsOZmna9uMWU8lhKo6xMvG83yg3xexaTbvimOv9RZ2PGVH0nLqEi8dhlbx8qADkyZGitLsaaqsheg3v10WWM2i0N7SoUjd5ogWtSAGl1QmMZFfGQXsloKLML45EsDvQfsPsXrA8VVmAxMvai0lT8cQECaM1tq6tnNtHOCKFA6LAhUAfLcB0ahbvwEQToCBHzjWZQi9r1+TjHntOxSatBUmAj5ZggDjIsP1L+BbAlE/8+PUBSGVImPqHWcXLFMTxwevKEgTJUo1aXjphOayD+KZXqvhVqgxkDPe7WzAgm6+m1L3nUiQqWD951apTv02cwC3Hk0bpskecm/hQ3GO5MRHQzWp/t1zcJtCc/3PQ6zluTbxBjIXappTUruYGyrNbCCpwwBNnIWyqt5ZX5ggSo6B197VhKyoC22Cs8ud1hwkUpEPjZXGrH3EI6cDa5bRFAW78nfOHdF9bn33cEWSV5sSJV4oOrKhcyqqQD4fOWWJZln2DjQYnZGEyarM2XgmQgHlN3RE83urCWxJInGu6/BrPlKaRr97o6zu5quw+ix3PDYyOWxvP5g3ONEuDTXJ89ENgSp+E+6Xlpfxp4l7rEJ4+IbwuSv+sklwilGD9gA1TU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR01MB7498.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(136003)(396003)(346002)(376002)(39850400004)(451199018)(186003)(52116002)(316002)(38350700002)(83170400001)(8936002)(41300700001)(66556008)(66946007)(8676002)(5660300002)(478600001)(38100700002)(2906002)(53546011)(6506007)(6512007)(26005)(66476007)(2616005)(6486002)(42882007)(83380400001)(31696002)(31686004)(6666004)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Z3FqRXJoSmdvNWFxTHlyRFVqNlpKTUtRdDYxOVB6bk1VUmVpcHhZYzRHWmU4?= =?utf-8?B?a2xFaXpMdGZoNDJJSUxFNWxIZHVaeExiVXVTbDNBNDFETDNhSExSZ0djdjAz?= =?utf-8?B?cUJmSE9LN1Z6REpmcEgvSXhoTHZldFZTeTI1Uk1xeUR3STFCdzhGVms4dC8z?= =?utf-8?B?bjhZZU5OVTd2QjVCMjdsc1JWSWpVTUdWaXducXRvL3RhK1ZTVzVFL05JbTk0?= =?utf-8?B?enBHb0VIVW81WjJFRDBmOVY3OXRVQUZkNHRPSURPaGxCQ1BTTVkyUy9sc0ht?= =?utf-8?B?SW40bHozUWovLzNJVTEyWlRyN0JPcnpYTkc5NHRXQmdKU2ZWWmtvSUwrN0FB?= =?utf-8?B?MWdYZHJMRnNiRkp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yS3ZwM3N5Snp0?= =?utf-8?Q?4UmZKvxZH0+6hrU3rjQpCpfxGpc9Ef7IyTCFP6BVec0f?= X-OriginatorOrg: amperemail.onmicrosoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae1fea1d-10b3-4cb1-abaa-08db1ee0b436 X-MS-Exchange-CrossTenant-AuthSource: CO6PR01MB7498.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2023 07:51:05.1775 (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: yDJ42FaKnSJsPf/6BrfZ/pFY0h/WIuhFSnE3r9nwkdSat6Z9lTQBEqgEsS6QBDakwlYY2RME7ijd5MxRNPs5HMEriVcYKvGc1kyDOj4DCg/GwnKBWFU8POykiKZupDqs X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR01MB5521 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Abner, Any plan to support SMBUS system interface (ssif)? - Tinh On 03/03/2023 09:31, Chang, Abner via groups.io wrote: > From: Abner Chang > > BZ #4354 > This change adds definitions for IPMI KCS. > > Signed-off-by: Abner Chang > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Nickle Wang > Cc: Igor Kulchytskyy > Cc: Isaac Oram > Cc: Abdul Lateef Attar > --- > MdePkg/MdePkg.dec | 5 ++ > MdePkg/Include/IndustryStandard/IpmiKcs.h | 72 +++++++++++++++++++++++ > 2 files changed, 77 insertions(+) > create mode 100644 MdePkg/Include/IndustryStandard/IpmiKcs.h > > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec > index 3d08f20d15b..0ed033983bf 100644 > --- a/MdePkg/MdePkg.dec > +++ b/MdePkg/MdePkg.dec > @@ -9,6 +9,7 @@ > # (C) Copyright 2016 - 2021 Hewlett Packard Enterprise Development LP
> # Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.
> # Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.
> +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -2332,6 +2333,10 @@ > # @Prompt Memory Address of GuidedExtractHandler Table. > gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|0x1000000|UINT64|0x30001015 > > + ## This value is the IPMI KCS Interface I/O base address used to transmit IPMI commands. > + # @Prompt IPMI KCS Interface I/O Base Address > + gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsBaseAddress|0xca2|UINT16|0x00000031 > + > [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] > ## This value is used to set the base address of PCI express hierarchy. > # @Prompt PCI Express Base Address. > diff --git a/MdePkg/Include/IndustryStandard/IpmiKcs.h b/MdePkg/Include/IndustryStandard/IpmiKcs.h > new file mode 100644 > index 00000000000..2a51698b126 > --- /dev/null > +++ b/MdePkg/Include/IndustryStandard/IpmiKcs.h > @@ -0,0 +1,72 @@ > +/** @file > + IPMI KCS Register Definitions > + > + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent > +**/ > + > +#ifndef IPMI_KCS_H_ > +#define IPMI_KCS_H_ > + > +#define IPMI_KCS_STATUS_REGISTER_OFFSET 1 > +#define IPMI_KCS_COMMAND_REGISTER_OFFSET 1 > +#define IPMI_KCS_DATA_OUT_REGISTER_OFFSET 0 > +#define IPMI_KCS_DATA_IN_REGISTER_OFFSET 0 > + > +/// > +/// IPMI KCS Interface Status Bits > +/// > +#define IPMI_KCS_OBF BIT0 > +#define IPMI_KCS_IBF BIT1 > +#define IPMI_KCS_SMS_ATN BIT2 > +#define IPMI_KCS_COMMAND_DATA BIT3 > +#define IPMI_KCS_OEM1 BIT4 > +#define IPMI_KCS_OEM2 BIT5 > +#define IPMI_KCS_S0 BIT6 > +#define IPMI_KCS_S1 BIT7 > + > +/// > +/// IPMI KCS Interface Control Codes > +/// > +#define IPMI_KCS_CONTROL_CODE_GET_STATUS_ABORT 0x60 > +#define IPMI_KCS_CONTROL_CODE_WRITE_START 0x61 > +#define IPMI_KCS_CONTROL_CODE_WRITE_END 0x62 > +#define IPMI_KCS_CONTROL_CODE_READ 0x68 > + > +/// > +/// Status Codes > +/// > +#define IPMI_KCS_STATUS_NO_ERROR 0x00 > +#define IPMI_KCS_STATUS_ABORT 0x01 > +#define IPMI_KCS_STATUS_ILLEGAL 0x02 > +#define IPMI_KCS_STATUS_LENGTH_ERROR 0x06 > +#define IPMI_KCS_STATUS_UNSPECIFIED 0xFF > + > +/// > +/// KCS Interface State Bit > +/// > +typedef enum { > + IPMI_KCS_IDLE_STATE = 0, > + IPMI_KCS_READ_STATE, > + IPMI_KCS_WRITE_STATE, > + IPMI_KCS_ERROR_STATE > +} IPMI_KCS_STATE; > + > +/// > +/// IPMI KCS Interface Request Format > +/// > +typedef struct { > + UINT8 NetFunc; > + UINT8 Command; > + UINT8 Data[0]; > +} IPMI_KCS_RESQUEST_HEADER; > + > +/// > +/// IPMI KCS Interface Response Format > +/// > +typedef struct { > + UINT8 NetFunc; > + UINT8 Command; > + UINT8 CompletionCode; > +} IPMI_KCS_RESPONSE_HEADER; > +#endif