From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.79580.1679593006160141205 for ; Thu, 23 Mar 2023 10:36:46 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=M2RVRNHG; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: isaac.w.oram@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679593006; x=1711129006; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=j87wVsUtxR9kSDCJAa2P+VXliulfuKsgYA9L+yIZlmc=; b=M2RVRNHGxTdA11Kkb5BPzLpGx/cdRdbm+hSaN69GguM4/tf3Dv4oEn8a ulf2+3TMmWbDFx3qJK14hNlo9awyoSIQyHOCjCLQYA1i7vs3rkGYTuVl0 9RlZqwoGHq1b7hnKoyNDfIi686wKb6bHirFGnAyyvR9F/rp8l1Gcl0wLu YEF5fXgu4ZUExvJDw6bqs07xguZayVytD3FMwCrmwnuwDKaz13o7L7DbO 9JQPytUM7nUmVJP1U0SDz90ya9xZ9hkNR9ubwPyAupwuoRFaPR9pINOU8 iniAMg2WxXT6zZS0Zh+lC/nU4JzS8th14fdCaQ1zpxEB09WeoKc7X4raQ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="425845608" X-IronPort-AV: E=Sophos;i="5.98,285,1673942400"; d="scan'208";a="425845608" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 10:36:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="712754470" X-IronPort-AV: E=Sophos;i="5.98,285,1673942400"; d="scan'208";a="712754470" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga008.jf.intel.com with ESMTP; 23 Mar 2023 10:36:34 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 23 Mar 2023 10:36:32 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 23 Mar 2023 10:36:32 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Thu, 23 Mar 2023 10:36:32 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Thu, 23 Mar 2023 10:36:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PssI+1874An0ld14K3TKNZvo7u9omSXFm8I9iR6+eeumOlOgOqWd92hruyuZFBh6Gr/0BkQezmXpLS0iUJ6nYD9In62DOdYF0QhDpx3DpfD4dIdw/YNsebR3Il1hsmL1QHwP3Z5ZL4OFcID/Kx0FiZDvu6Mzbe0FElUZ6c2uwP9HTlP/c0jU5rS2I3TuE5D/I6aJJpvx0wleZglFwU/EkY3dmD2ZQZHtGK1uUAxKbtAyI45XPDCReoZBkBNm6DELXKGd2TtoUyQj5DUYs19fHhS0Hmpea+yq3VAiRfdEbaq0/Gyuh/H/U64HY10UW6af6cO7W9rCLNzSTiVU5J67eA== 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=q1wTstoj3d/qEOcag3mRGlbruRbpQSziyuZtz5rP0d8=; b=bc9u/TVQzkrYP2J6P3wb+t5/YV7XP27Z/KIlMo/4SuHmKZqtl5I9OsythEZlQtOZMvWtmPmyHckS0szGJ8h0R1K0hsYitpre5DxJwU7iANXMnPMmatgkaTUiN3qout6BrM3rB+WEz0e4fLyUIDxIuRxrEaQmUckrQLr6Zyyg6Shzn4pFT1xUf/XqGZ8ljlUrcJsS8fnYneefhFpW9kBSUqqOI077gsUCgOPBr9DXOZChkufmQXn0Zf9faIvtyvQ72WpdMdFD/fzvoO3oV+spUhku+YwqGRZu9v8hIxbKFD4Dbla5X4f0mdux8mlY0C/tWLrEWs570fl1sAhTzGbueQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SA1PR11MB5801.namprd11.prod.outlook.com (2603:10b6:806:23d::13) by CH3PR11MB7392.namprd11.prod.outlook.com (2603:10b6:610:145::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Thu, 23 Mar 2023 17:36:29 +0000 Received: from SA1PR11MB5801.namprd11.prod.outlook.com ([fe80::5fe4:fb10:27ba:d2ad]) by SA1PR11MB5801.namprd11.prod.outlook.com ([fe80::5fe4:fb10:27ba:d2ad%9]) with mapi id 15.20.6178.037; Thu, 23 Mar 2023 17:36:29 +0000 From: "Isaac Oram" To: "abner.chang@amd.com" , "devel@edk2.groups.io" CC: "Kinney, Michael D" , "Gao, Liming" , "Liu, Zhiguang" , "Nickle Wang" , Igor Kulchytskyy , "Abdul Lateef Attar" Subject: Re: [PATCH v3] MdePkg/Include: Add IPMI KCS definitions Thread-Topic: [PATCH v3] MdePkg/Include: Add IPMI KCS definitions Thread-Index: AQHZXY+Np6z7cUTLrEiRtyzm3x6t+a8IoNzQ Date: Thu, 23 Mar 2023 17:36:29 +0000 Message-ID: References: <20230323135737.1473-1-abner.chang@amd.com> In-Reply-To: <20230323135737.1473-1-abner.chang@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SA1PR11MB5801:EE_|CH3PR11MB7392:EE_ x-ms-office365-filtering-correlation-id: 89639bff-6412-4edf-e4d8-08db2bc522ed x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uDjFUzfiJ3yVSjDlyPbpWR+2o0hqmQyj5evlXgCBFFN9aNuuIo+eEkMCxVsEzXtfIO5kToQMrRJNN/5fxhnMHVjkTkkUpCDqxrq1GGOL08Y5Xfk4ubVfEEf67UCw31YwV3cKzZhG/wZ9P5rT3GBZeAyWo7G7NEGlHQs2nJGIHZ3otdTAXiP7x0W3jG2LtAtBL/RPdw1DLckmHfCLHM5xwnEmQe3mBHH6ldM+8xAu5m4abqMVRG97z4N4pCGK13UnMeouJE0xlU/UaasYp8QgOfj+xydBqslLB6ecwoOGRHuhz3NoPYf6TRHMdWieWQiBvSwIvYhWrsOhOJDWzUPsphS6t/qUczBnHqhWPy3NG7jkRI3v56VE8aBrEigZuTz0vFU4JYzLrvkuv5fn6ivshUgFBgiGyXKCqIKGfOM6gzJxxXu7lvBUX8d/6ATQAlITNEOgknQ/V7LOapZYKPyCymLD4IqQkwr2mAlXDYPuvw+OtRzCEboJxVFXJXw7Chx/ub9dBXFWjx7ga+o/2MD+rvBEofo0FQuRdRE0GaCP7/NMhEi+2j8UcBenKAeoG05e7ayLV1EKsvw9gcsjwSz1nP4GoilIkR9LPyH+nTVJx57sjQpTu9FZbq8TADv45Cuk5Y+duTmlr6yrJN3z4J1cHC6Fqh4dN7LSpQ8srb1i4eyJqM9QkFx00ePHTHrgzB6OSliKwZa1tAdav/CAhVURXyHXjCiXY1Y7++dzJdowt9M= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR11MB5801.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(346002)(366004)(136003)(396003)(376002)(39860400002)(451199018)(4326008)(66476007)(64756008)(8676002)(52536014)(5660300002)(41300700001)(66446008)(2906002)(71200400001)(86362001)(38070700005)(33656002)(82960400001)(122000001)(38100700002)(7696005)(966005)(26005)(76116006)(478600001)(110136005)(316002)(8936002)(66556008)(55016003)(83380400001)(54906003)(6506007)(66946007)(53546011)(9686003)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?8CVk8Y9E06tBCEkV4jt75kbvv2SwBNxRE9ORpWMpGStaMYDzyte1xeLo5cIH?= =?us-ascii?Q?Zls9VL9N2xDCPcsHZpdXnrBBRrQJ/qqNEtrc41Zrjobnp/Uimk2Cf+hpQTYf?= =?us-ascii?Q?297n+eKyGUtwfLfWuIZGycKvELTxG4Do1AVp6yvBRh+ARqZfc1AQmS3OK2aO?= =?us-ascii?Q?vNyHgv30fHF+vitYwnISAGS0dJ/tFu6dTZZxzrffiRXglSF+63mPwTdwNEHc?= =?us-ascii?Q?ToykeXwKADgRfW73oNLtdgGJvzV6l8N0V+V5GBraiGxkNU3ivexq9v9KqAf8?= =?us-ascii?Q?BoRVpg9N91H/68IZda2WOc6b3MUnPP9UXmJNqMPW4QJDnwCP81ET/BNllGGJ?= =?us-ascii?Q?XVa2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wWSVfIUk?= =?us-ascii?Q?r4N57CeDEkWPQRjpjf1iT2FRhNyEdAIBan12p/lgmgqb/O5s8EYlIRRxymoT?= =?us-ascii?Q?PaerzTSXlLkTq2X9LbGX3qKl3XOpMvCTK4aHLJ9TV2KGm72Tk89HJdCj8xn2?= =?us-ascii?Q?cQc3s6LzjEiXN9tL85abpe1k4WsNHTaWh4cjP2vs3RLjNOkAJH4uvnqFvWS1?= =?us-ascii?Q?+bafc0qYPj43UN2YCW6fRm5rgA3FYV1J4ylBqd7x3drue1M6TwWHNSUl/oKH?= =?us-ascii?Q?Cm+wiWsDkNWKeyTBm52CtpBlLsMFH+ctGx3BocMvJNcu5aIJenuyb8n19TlU?= =?us-ascii?Q?YuYwD64khW9dgpXBRxmZLvBfQTPF8a8Au5BnfD9e?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB5801.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89639bff-6412-4edf-e4d8-08db2bc522ed X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2023 17:36:29.6999 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lEY37WQa9f1pB5Ra7cYPFeZ++SdUFKbr/bjVmbqYa1RZriCPG+jKjfuaGswQrPBnA6XOo2O9OZvhjA7fjbTBaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7392 Return-Path: isaac.w.oram@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Acked-by: Isaac Oram -----Original Message----- From: abner.chang@amd.com =20 Sent: Thursday, March 23, 2023 6:58 AM To: devel@edk2.groups.io Cc: Kinney, Michael D ; Gao, Liming ; Liu, Zhiguang ; Nickle Wang ; Igor Kulchytskyy ; Oram, Isaac W ; Abdul Lateef Attar Subject: [PATCH v3] MdePkg/Include: Add IPMI KCS definitions From: Abner Chang BZ #4354 This change adds definitions for IPMI KCS. Spec ref: 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: 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 Acked-by: Isaac Oram --- MdePkg/MdePkg.dec | 6 ++ MdePkg/Include/IndustryStandard/IpmiKcs.h | 76 +++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 MdePkg/Include/IndustryStandard/IpmiKcs.h diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 2d643bede1d..5cf04= bc0cb6 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 reserve= d.
+# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights=20 +reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -2342,6 +2343,11 @@ # @Prompt Memory Address of GuidedExtractHandler Table. gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|0x1000000|U= INT64|0x30001015 =20 + ## This value is the IPMI KCS Interface I/O base address used to transmi= t IPMI commands. + # The value of 0xca2 is the default I/O base address defined in IPMI sp= ecification. + # @Prompt IPMI KCS Interface I/O Base Address + =20 + gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsIoBaseAddress|0xca2|UINT16|0x000000 + 31 + [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/Ind= ustryStandard/IpmiKcs.h new file mode 100644 index 00000000000..c3baf80bd76 --- /dev/null +++ b/MdePkg/Include/IndustryStandard/IpmiKcs.h @@ -0,0 +1,76 @@ +/** @file + IPMI KCS Register Definitions + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights=20 + reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + IPMI Specification + Version 2.0, Rev. 1.1 + =20 +https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi +-second-gen-interface-spec-v2-rev1-1.html +**/ + +#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 =3D 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; +} IPMI_KCS_RESPONSE_HEADER; +#endif -- 2.37.1.windows.1