From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.54]) by mx.groups.io with SMTP id smtpd.web10.9135.1678286835259413431 for ; Wed, 08 Mar 2023 06:47:15 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=ucCFx61w; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.237.54, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gr0ZMdLXNw9Gy7+/9UyR+X7Cz+uzSKqccI5PBAR6jMaHQxybxXR0nnoXOHZaRiXKpUN6kPiYTdQQ+BYKiBVmLEr5BRJpz7yvjVPh47vpj0XBpbVlI0U9mK75yIuQYhCL7jNyyclvFPHmpdsS80qO1OhHYK7s3TgkTk5cc9x7RzSr7xfybMtVEKkqDcb1UgLLVZAyr2Epr8YJb19NTbe36FMiQvP0hvn70LNCB2AtEpq4of6ig92UA7nFGhWNIn/neRubRgj56ta/WTXEzI/D/W91FWWLSoHFxK3SvxmLeH6R0SlH6av1Zkfn999prK1Bgso3ZyYUs20EgApHs2O09g== 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=k6OI5cxQ1CPqqSDlF1StVJMj7zejjmIYNwctGb/l+pk=; b=ZIZCh5/PCP0FyMe0Vt1APMAPDSiigEeTP5SpRs/ywI4KcP6go7wyadKQH9see6eCNqWW7EmM2DRzD24CixRpVQQq3M5tKNbK6EJEqjHB2pZ37/Za687m8j52hHOqLQig7YdiVeD/wHeW9XxxeJRPonNQ9oMbtRakIpKIcD8LYCeEhKgWiq6vMcmcIkXcAqLUo0V5bIXELnob+eJwGmMbKNLjNWT+cMLL92eQ1zfum8EHqCtjRsdc1Yue8voM2z0l7EGZp9hSEHCg2pC1Q8H2gb33upfyiAoaKbjKVNlb8+UOF0QW00kg1pMAg19T/AwCe490xycn6gZq+J97OoXuhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k6OI5cxQ1CPqqSDlF1StVJMj7zejjmIYNwctGb/l+pk=; b=ucCFx61wUqgu/wYI6G5K37rq5UTE1wR1Ma2qHIV2XUXs1fCxgcSKUJT0XkEvsJXL/WvDD9mY4GU2m70A1KbPt49W0lY9AYKDgRvC2sgdYzMfzMgSknKXk/jAEKhmFouxssUFFDCH3K5BvXdI8NF2sm9NPZ/tVHKS/XfO0i5kaRo= Received: from MW4P223CA0023.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::28) by SJ0PR12MB7457.namprd12.prod.outlook.com (2603:10b6:a03:48d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.17; Wed, 8 Mar 2023 14:47:12 +0000 Received: from CO1NAM11FT043.eop-nam11.prod.protection.outlook.com (2603:10b6:303:80:cafe::28) by MW4P223CA0023.outlook.office365.com (2603:10b6:303:80::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.17 via Frontend Transport; Wed, 8 Mar 2023 14:47:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT043.mail.protection.outlook.com (10.13.174.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.18 via Frontend Transport; Wed, 8 Mar 2023 14:47:12 +0000 Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 8 Mar 2023 08:47:09 -0600 From: "Chang, Abner" To: CC: Michael D Kinney , Liming Gao , Zhiguang Liu , "Nickle Wang" , Igor Kulchytskyy , Isaac Oram , Abdul Lateef Attar Subject: [PATCH V2] MdePkg/Include: Add IPMI KCS definitions Date: Wed, 8 Mar 2023 22:46:53 +0800 Message-ID: <20230308144653.733-1-abner.chang@amd.com> X-Mailer: git-send-email 2.37.1.windows.1 MIME-Version: 1.0 Return-Path: Abner.Chang@amd.com X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT043:EE_|SJ0PR12MB7457:EE_ X-MS-Office365-Filtering-Correlation-Id: 81ee8f78-7d8b-4394-4b44-08db1fe40096 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gDn0hQzMdeORosJIPStLZGc9HtkrM5Gn4hv7sEdsvnNrzyeKNNm0C4AI8jqk1yubxMGP8vEyIked0TTrxAh2xDT5fLe93mp/8iEPyzW+5xGmbyLmLGJ8ATiXBzrwBnaUx5XT9GqPOLlpXOWB+iGo4WbzBM+uiTOyEfHkr583NmM52V5aVL3EoyA+zKHJUGKq5PVzzNb1oB/8p3nJXCfpudTxy3qgZg0SF5OdBNJS+MqfCt2x2a2HR4ahUADo2/Q+j7feDh/tDXcOZsmRf5i5m5cAVb4ypoOHrJQa/K7occmzpJFK3SlYQNCqwFq6Yz1TSys4Nh2kBthBIsEbdZnIxuraT2egBBmI8Xyaf6awmhQhixiYTja/ia4tScIqGx6c91furpOd7btiG2yeY+1JaNDyQD8oDN991ATDTaqz+XjJ8jKdbJhT2s6g9QtgcSUViZ2RXu1c0pM436wmQLjwmxXvc66N5EsIHM1pY7XyIP6ySFJWVKM1MJ8OCmmXjhlwcChbnD/NrukRz9E0Z7Q5WFVZGKAj+KvOPUofXSJ47lgUInGFGPPsZzOofj6xQ2RTzQoBBxuXfg1S8X3Y9oDpomXfVwUUYL80vtALWBXZJ+IcdwROZ7D/cnfq0vyq9JP9bFyvlY/W8psQtabYm96w4nao/2LEla8uhQvgOucAoDmwlxhh5vbEXJkg//aVXJfFkeaKjk1ApRuuTyGiqxfeNRgpM1FHJW+CTNviYknOrtc= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230025)(4636009)(396003)(136003)(346002)(376002)(39860400002)(451199018)(46966006)(36840700001)(40470700004)(82310400005)(82740400003)(83380400001)(47076005)(36756003)(36860700001)(426003)(478600001)(54906003)(356005)(40480700001)(316002)(81166007)(336012)(966005)(7696005)(40460700003)(2616005)(6666004)(1076003)(186003)(41300700001)(26005)(16526019)(5660300002)(8936002)(6916009)(70586007)(2906002)(86362001)(4326008)(8676002)(2876002)(70206006)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 14:47:12.4349 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81ee8f78-7d8b-4394-4b44-08db1fe40096 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT043.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB7457 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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 | 5 ++ MdePkg/Include/IndustryStandard/IpmiKcs.h | 76 +++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 MdePkg/Include/IndustryStandard/IpmiKcs.h diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 80b65590531..808c487bb49 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 # @@ -2339,6 +2340,10 @@ # @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. + # @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/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 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_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 --=20 2.37.1.windows.1