From nobody Thu Apr 25 18:08:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+100867+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 167828503896337.3452997056454; Wed, 8 Mar 2023 06:17:18 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id QdlIYY1788612x3axIrOQiWF; Wed, 08 Mar 2023 06:17:18 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [52.100.173.231]) by mx.groups.io with SMTP id smtpd.web10.8086.1678285037604579423 for ; Wed, 08 Mar 2023 06:17:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lhbePEC/siKnpLA+r996FldtyAFq9aGpNyQP8CfuJpCTwXjK6mUqHMHH0SAw4yzDWvHm9Dc9lyhh0B+uibAWJ0OAiQiXzxFjeOHMdPzcJja5pOz6tNjh7vrDb6cuqPcS5ee7DK4p2fqpZUy4DHFV1viPtVjWf6W54t9x1ejHMs4voE38cNtcppzoeVOU7PuMb1N97a79rGuNZkVMTjPyyEpVKwIdNx/yNQ5ApPr1rbkqa+wJYZuSJJEl9kns78Nl26Ljk8tvadsO2GX9ouJEVErujVuPl9xGGEdUHYw3QSmrTYTg52tm/sELE0pmdbJGS35ZzsHB9wOXE2/1UdIFRA== 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=6ol7Oufcq9Cbz5mdr15Oo5IQaXoeTSuf0+5uo6+2u3A=; b=Nah/s2xxA+4g1gXhxH9QcEKb8q2JNKqWHfp9ZPe4cYZPVuqK164AKJ8fZlNknrrJEqCfci/yDtuSCV73iX2UUJiBg8kpyRz7Z18P/Ua6fiaaesGhzd1696vNjCSCfZ1SVOMH4x6Z67pL8FoqM05ZavIfR9ZMQGAwBqlY0XgXfaKurxPJzSX6KKHowdWAEql5D273hoE3MpVquOlt5S2uE+IYcAmc4reljfJnmGEycx5Zjl1eTkk29j5acWXz7hq/zTAVpJxzFiSIjlm31MX6tJ8YP3n0UshWsom+AZtJQnhnU+O4VtkrtRPifxPMtOIKbnRFt4n7wqKMrQu8fegB1Q== 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 X-Received: from CY5PR03CA0003.namprd03.prod.outlook.com (2603:10b6:930:8::11) by IA1PR12MB7759.namprd12.prod.outlook.com (2603:10b6:208:420::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Wed, 8 Mar 2023 14:17:12 +0000 X-Received: from CY4PEPF0000C982.namprd02.prod.outlook.com (2603:10b6:930:8:cafe::f1) by CY5PR03CA0003.outlook.office365.com (2603:10b6:930:8::11) 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:17:11 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+100867+1787277+3901457@groups.io; helo=mail02.groups.io; 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 X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000C982.mail.protection.outlook.com (10.167.241.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.13 via Frontend Transport; Wed, 8 Mar 2023 14:17:11 +0000 X-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:17:05 -0600 From: "Chang, Abner via groups.io" To: CC: Liming Gao , Isaac Oram , Nate DeSimone , Nickle Wang , Igor Kulchytskyy , "Abdul Lateef Attar" , Abdul Lateef Attar Subject: [edk2-devel] [edk2-platforms][PATCH V2 1/8] ManageabilityPkg: Add Readme file Date: Wed, 8 Mar 2023 22:16:40 +0800 Message-ID: <20230308141647.1318-2-abner.chang@amd.com> In-Reply-To: <20230308141647.1318-1-abner.chang@amd.com> References: <20230308141647.1318-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C982:EE_|IA1PR12MB7759:EE_ X-MS-Office365-Filtering-Correlation-Id: ad03d03b-f779-40c9-782d-08db1fdfcf26 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: =?utf-8?B?eUxhb1hzVlEranFSaXZHOTlQaWljNTE0aU1zaU90NXpnRkRkZzY5RGwyMlk3?= =?utf-8?B?RGdXamYvYkMrSmY0Q3NwZWl2UjFuRlYrNGt3SFBiUjViT2dOTmNGUHFFeld1?= =?utf-8?B?RDdaOWlZSUU3bU03dlJuUWNwZmxuU0pOK1lwbEdaSHFGb05LQnVRN3ZVbnVV?= =?utf-8?B?QnFVb25sazlEVDBUTHl4K0xmVDNBTFVPQk5heVgyZFNNb0Q2a2l5T2xoL0di?= =?utf-8?B?SThmMFVObStHZzM5QlBMK0ZEV3VGWXUxU3ZpaDhjdE9rTnhFYXd5ckdSODZF?= =?utf-8?B?RTRFUzJydWtLVXd1ZHBqQTVlRFNkMXJ5RTQwTlpkYzg1bVhHRWtnbGxMcjl3?= =?utf-8?B?Q3VRaGwyeXlsYWRTaFljWGpuL1dRU1J2NUx1RGVCZ2p2Tm56VzFBOWZXc2hQ?= =?utf-8?B?UGFFa1FoTWNkdUJRRXRxenVKQmRGdldwNnB2VmRiL3g4MzJZVlZ2Ty84ZWs0?= =?utf-8?B?NUV3cEcvdFdrRGs2S2FabkNET1ZTeWhhaEdSNXVDYUVoeVh6UjJ2UC9VRk5o?= =?utf-8?B?T2NIamN5ZEFHSE00WlFjaUM2UHR4V2JCYXZPaFdBSHkyOUdGSWZDNjc5UGhH?= =?utf-8?B?U3pMd3lUbnhBeVZnKzdmT2lwRGpNQkt6REFuSEZXeDl3YXhZTDBRMEdDOCt6?= =?utf-8?B?OUdxYmxsdmZyeHlHdEY2RnJhMXJqMnZPVWh2SnQ4bTl4Y3diMnRMaXZFN3pO?= =?utf-8?B?c1FKYUZGY1YxNXpNZTl4alhWL3Y0cGZvVDdUMDQwdDdVRm4wVFhSbUd5ZERs?= =?utf-8?B?ZzZROFl2amtMWmxiaEJOM0dvdlJySllyeHAvbDdEQVFhVlBzdlV0MzhYUVhM?= =?utf-8?B?UXNZWlBjdmYwN1VLbktXTk9BbU1Ud29ubFhCQWFzR2MxNVE1VkhmcUVtQVZX?= =?utf-8?B?dkd3RmVhTDBVOTI4ajdNRlBjS2ZTanBmbWY0OFRzcGZYYjJDYlNpWUVFWTdz?= =?utf-8?B?eEYrcVhKNzVxTGdrN21kMnlGcVAwU0MxY3JmN1JZbjFwZ2Z1RVZTVXlSZGpp?= =?utf-8?B?WndDZHB4MS8zd2RKMEt0dE5mM3lnVkhxMWg4SUhraUMwNTIzdllIalljcVE4?= =?utf-8?B?eG9OanVtNTJmdHUxYVFzL0E2U2dLOFhYS01kSGJ5MldYY00wNXRpdGJkamg0?= =?utf-8?B?bTR1VEhDeHlML2VhMStJcDY4R0l4MDNrZXE2eEtWTjIwa28zYVVzUVlXTjN5?= =?utf-8?B?LzhSSGxzLzRxUnlFc3V1T0FibTVHZTNQUU9QRE80eXphY05yT1lJUE43SFN5?= =?utf-8?B?b1NkZzVnRW5RZ1JueU00OHdVaWlwcmJnVERoallhSGVsOUtRMlcvTE1ubThN?= =?utf-8?B?d2NIMTJJVXZmR1BJSWtSTnRaWFoxTVVSMmpxSEJiUVFLa0xBVldnOUlqOFVZ?= =?utf-8?B?ME5rYnZiZUxNS0M4OHBoUzV5Z3M4Ti9GM1gyK1JKRDRCOHI3ZDlrRVN2Q2xw?= =?utf-8?B?aVJMeXVEVWtEVTNHV0JlWkN6TXNqbFVzbWJNaGNUSzZqQng2R3FjMGhaclpv?= =?utf-8?B?ZlNUK3ZOR3NpZk9wRDRnOUo2YU1qTFRxZWpKZVMyNE5WdjhYQzRrWUd4VGF5?= =?utf-8?B?UUlNQlV5QUtDNFZMTkd4LzV0UDhtdHJmNVVSSmdzSmZObVBHZTZUUTFTNm1n?= =?utf-8?B?T3VpbjBWa2ZwT1lOMEpUcXlxekN0bmc9PQ==?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 14:17:11.5537 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad03d03b-f779-40c9-782d-08db1fdfcf26 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: CY4PEPF0000C982.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7759 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com X-Gm-Message-State: FYjDYB01C6lLNGR53UavI4lDx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1678285038; bh=aFkEzEeJ6ppIFXe7VdTXjyRNMvO8GXjUTyJJqh/kIy4=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=MQVHpiI3ZO0CH0Ht5Z5J+fge1Jau3GIkdW2iMEbeBa4odyZdFfdINhQL7CLTeE0XbeA fIJEtPfqcNrJ5uUGLAwkFBMaS3yhJc2ulXmXjTNTf2qcMvrlSk/sM7WnCByTRpYtZNjgf 6LR7t+/RS82oC5J2nuNopZUlm9eRA8ldS30= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1678285039565100003 Content-Type: text/plain; charset="utf-8" From: Abner Chang Add Readme file of edk2 platform ManageabilityPkg. Signed-off-by: Abner Chang Cc: Liming Gao Cc: Isaac Oram Cc: Nate DeSimone Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Abdul Lateef Attar Reviewed-by: Abdul Lateef Attar Reviewed-by: Nickle Wang --- Features/ManageabilityPkg/Readme.md | 177 +++++ .../Media/ManageabilityDriverStack.svg | 752 ++++++++++++++++++ 2 files changed, 929 insertions(+) create mode 100644 Features/ManageabilityPkg/Readme.md create mode 100644 Features/ManageabilityPkg/Documents/Media/Manageability= DriverStack.svg diff --git a/Features/ManageabilityPkg/Readme.md b/Features/ManageabilityPk= g/Readme.md new file mode 100644 index 0000000000..b56ffb8a86 --- /dev/null +++ b/Features/ManageabilityPkg/Readme.md @@ -0,0 +1,177 @@ +# EDK2 Manageability Package + +edk2 ManageabilityPkg is introduced to provide edk2 drivers and +libraries for industry platform management standards, such as PLDM (Platfo= rm +Level Data Model), MCTP (Management Component Transfer Protocol), IPMI +(Intelligent Platform Management Interface) and others. The framework of +ManageabilityPkg is designed to flexibly support the transport interfaces = for above +industry standards, the transport interfaces such as KCS or I2C for IPMI, = PCI VDM +(Vendor Defined Message), I2C or KCS for MCTP, or the OEM proprietary tran= sports. + +Below figure shows the driver stacks which are abstracted to support dispa= rate +transports for specifications of platform management. +![Manageability Package Driver Stack](https://github.com/tianocore/edk2-pl= atforms/blob/master/Features/ManageabilityPkg/Documents/Media/Manageability= DriverStack.svg) + +## Manageability Transport edk2 Driver Stack +edk2 manageability transport library is designed to incorporated with disp= arate +manageability protocols. In order to flexibly facilitating the transport +functionalities, below functions must be provided by manageability transpo= rt +library to compliant with the framework of ManageabilityPkg design. + +* ### ***AcquireTransportSession()*** + edk2 manageability protocol driver invokes this function to acquire the + transport session to transmit manageability packet. The implementation + could reset the transport interface, initial the transport interface + internal structure and the [Manageability Transport Function Structure= ](#manageability-transport-function-structure). + The [Transport Token](#transfer-token) is returned to the caller for f= urther manageability packet + transmit and receive. + + +* ### ***GetTransportCapability()*** + edk2 Manageability protocol driver invokes this function to get the ca= pabilities + of transport interface. The implementation of manageability transport = library + can optionally support advanced features such as multi-sessions on tra= nsport + interface or asynchronous transfer. + +* ### ***ReleaseTransportSession()*** + edk2 manageability protocol driver invokes this function to release th= e transport + session. + + ### **Manageability Transport Function Structure** + + Below is the function structure initiated by the manageability transport= library and + returned in the transport token when caller invokes [AcquireTransportSes= sion](#acquiretransportsession) + function. + + + ***MANAGEABILITY_TRANSPORT_FUNCTION*** is declared as an union to acco= mmodate + different versions of transport function set. This allows the function= added to + support the new functionalities in the future and also keep the backwa= rd compatibility. + Developers can not modify the previous version of function structure, = instead + developers can create a new function structure with the increased vers= ion number + that includes the previous version of function set and new added funct= ions. + +``` + typedef union { + MANAGEABILITY_TRANSPORT_FUNCTION_V1_0 *Version1_0; + } MANAGEABILITY_TRANSPORT_FUNCTION; + + struct _MANAGEABILITY_TRANSPORT_FUNCTION_V1_0 { + MANAGEABILITY_TRANSPORT_INIT TransportInit; + MANAGEABILITY_TRANSPORT_STATUS TransportStatus; + MANAGEABILITY_TRANSPORT_RESET TransportReset; + MANAGEABILITY_TRANSPORT_TRANSMIT_RECEIVE TransportTransmitReceive; + }; +``` +* ***TransportInit()*** + + Manageability protocol driver invokes this function to initial the tra= nsport + interface with the optional hardware configuration of the transport in= terface. + Whether the transport interface requires initialization or not depends= on the + transport interface characteristics. The hardware information is optio= nal passed to + this function if the manageability protocol driver would like to use t= he different + hardware configuration of transport interface. For example, the differ= ent I/O + address of KCS interface, or the memory mapped I/O KCS interface. The = structure + format of hardware information is created according to the hardware de= sign of + transport interface. + +* ***TransportStatus()*** + + Manageability protocol driver invokes this function to get the status = of transport + interface. How does this function report the status depends on the tra= nsport + interface characteristics and the implementation of this function. + +* ***TransportReset()*** + + Manageability protocol driver can invoke this function to reset and re= cover the + transport interface in case the error status is reported by the transp= ort + interface. Whether the transport interface can be reset or not depends= on the + transport interface characteristics and the implementation of this fun= ction. + +* ***TransportTransmitReceive()*** + Manageability protocol driver invokes this function to transmit and/or= receive the + packet. Caller has to setup the [Transfer Token](#transfer-token) when= invoke to + this function. + + ### **Transfer Token** + +``` + struct _MANAGEABILITY_TRANSFER_TOKEN { + EFI_EVENT ReceiveEvent; + MANAGEABILITY_TRANSPORT_HEADER TransmitHeader; + MANAGEABILITY_TRANSPORT_TRAILER TransmitTrailer; + MANAGEABILITY_TRANSMIT_PACKAGE TransmitPackage; + MANAGEABILITY_RECEIVE_PACKAGE ReceivePackage; + EFI_STATUS TransferStatus; + MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS TransportAdditionalStatus; +}; +``` + +* ***ReceiveEvent*** + + The optional EFI event is created to wait for the signal of response d= ata + readiness. The parameter is valid only if the transport interface supp= orts + asynchronous transfer. MANAGEABILITY_TRANSPORT_CAPABILITY_ASYNCHRONOUS= _TRANSFER bit + must be set in the returned *TransportCapability* parameter in + [GetTransportCapability()](#gettransportcapability) to indicate the + transport interface is capable for asynchronous transfer. + +* ***TransmitHeader*** + + The transmit header is different according to the disparate transport = interfaces + for the manageability protocol. For example, the transmit header is di= fferent when + MCTP packet is transmitted over I2C and KCS. Having this header abstra= cted from + manageability transport library to make the transport implementation a= gnostic to the + manageability protocol specification. + +* ***TransmitTrailer*** + + The transmit trailer may be different according to the disparate trans= port + interface for the manageability protocol. Having this header abstracte= d from + manageability transport library to make the transport implementation a= gnostic to the + manageability protocol specification. + +* ***TransmitPackage*** + + The buffer of packet to transmit, this could be a value of NULL if the= manageability + protocol is going to harvest the datagram sent by the management entit= y. + +* ***ReceivePackage*** + + The receive buffer, this could be a value of NULL if the manageability + protocol is going to send the request to management endpoint which has= no response + required. + +* ***TransferStatus*** + + In order to support both synchronous and asynchronous transfer with a = unified + function, ***TransportTransmitReceive()*** is designed as a + non return value function. Instead, the status of transmit/receive is = returned + in the transfer token. When the asynchronous transfer, manageability t= ransport + library has to set the status in transfer token before signal ***Recei= veEvent***. + +* ***TransportAdditionalStatus*** + + The additional transport status after the transfer. + +## Industry Standard Manageability Protocol edk2 Driver Stack +The edk2 implementation of industry manageability standards such as IpmiPr= otocol and +MctpProtocol abstract the command layer and provide the unified protocol i= nterface to +build up the manageability packet for subordinate specifications. edk2 man= ageability +protocol driver is linked with desired manageability transport library bas= e on the +platform design. + +## Transport Implementation + + The manageability transport library could have the implementation in li= brary or + invoke the existing edk2 protocol which is defined in UEFI or PI specif= ications. + This is the implementation decision made by the developer when introduc= e a new + manageability transport library. + +## Build the Manageability Package +In order to use the modules provided by ManageabilityPkg, **PACKAGES_PATH*= * must +contains the path to point to [edk2-platform Features](https://github.com/= tianocore/edk2-platforms/tree/master/Features): + +``` +$ export PACKAGES_PATH=3D$PWD/edk2:$PWD/edk2-platforms:$PWD/edk2-platforms= /Features +``` diff --git a/Features/ManageabilityPkg/Documents/Media/ManageabilityDriverS= tack.svg b/Features/ManageabilityPkg/Documents/Media/ManageabilityDriverSta= ck.svg new file mode 100644 index 0000000000..423dfaa34f --- /dev/null +++ b/Features/ManageabilityPkg/Documents/Media/ManageabilityDriverStack.svg @@ -0,0 +1,752 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KCS Manageability Transport = Library Insta= nce + + + + + + + + I2C Manageability Transport = Library Insta= nce + + + + + + + + I3C Manageability Transport Library I= nstance + + + + + + + + USB Manageability Transport Library I= nstance + + + + + + + + PCI VDM <= tspan class=3D"TextPosition" x=3D"17165" y=3D"11472">Manageability Transport = Libr= ary Instance + + + + + + + + Others: MMBI, Block transfer,= RMII= , etc. + + + + + + + + KCS Protocol Driver + + + + + + + + SMBus Protocol = Driver + + + + + + + + PCI Protocol Driver + + + + + + + + USB Protocol Driver + + + + + + + + I3C Protocol = Driver + + + + + + + + + + + + + + PLDM Protocol + + + + + + + + MCTP Protocol + + + + + + + Transport <= tspan class=3D"TextPosition" x=3D"9728" y=3D"10248">Library + + + + + + + + IPMI Protocol + + + + + + + Transport = Library + + + + + + + + PLDM BCC<= /text> + + + + + + + + PLDM SMBIOS + + + + + + + + PLDM FRU= + + + + + + + + PLDM PMC= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PLDM + + + + + + + + NVMe Management + + + + + + + + + + + + + + + + + + + + + + IPMI NetFn + + + + + + + + + + + + + + + Redfish HI NetFn + + + + + + + + + + + + + + + + + + + + + + CXL Device CCI + + + + + + + + + + + + + + + + + + + + + + Redfish Credential NetFn + + + + + + + + + + + + + + + + + + + + + + + + + Platform = Replaceable = Library + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The gray box is the optio= nal Implementation that supports:Multiple transfe= r tokens<= tspan id=3D"id83.bp" class=3D"BulletPlaceholder"/>Asynchronous Transfer= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KCS Manageability Transport = Protocol Driv= er + + + + + + + + I2C Manageability Transport = Protocol Driv= er + + + + + + + + PCI VDM <= tspan class=3D"TextPosition" x=3D"23343" y=3D"10670">Manageability Transport = Prot= ocol Driver + + + + + + + + USB Manageability Transport Protocol = Driver + + + + + + + + I3C Manageability Transport Protocol = Driver + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Implementation can call to= the protocol + + + + + + Implementation can call to= the protocol + + + + + + Implementation can call t= o the protocol + + + + + + Implementation can call t= o the protocol + + + + + + Implementation can call t= o the protocol + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Industry Standard Manageabi= lity P= rotocol Driver Stack + + + + + + Manageability Transport Driver = Stack + + + + + + Transport = Implementation + + + + + + + + + + + + + + + --=20 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100867): https://edk2.groups.io/g/devel/message/100867 Mute This Topic: https://groups.io/mt/97473053/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 18:08:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+100866+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1678285038048988.284614468211; Wed, 8 Mar 2023 06:17:18 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id YZ0KYY1788612xTyoCcD65OH; Wed, 08 Mar 2023 06:17:17 -0800 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web10.8084.1678285036898883069 for ; Wed, 08 Mar 2023 06:17:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UrGC6pY8rAXBOq+nVX2tUwslUo5uNOJKTz777CLCebpes8mSfjmVrNFY3N6PrfvvBcHKZUniR+G4iEg0za2xVFxWRfJyDPcZtd6DQPeJsmcpqzX5LeLDIpWJWPN1OR6woNYfkvmwJUOaFhXu62HzM9BXjQH+jFTwms/eMrWRG8B/yt93aBdOaRPhNbbN0q+Fu/yUl+jVBfR3BHpvg632mgKdi9BY9ELx4fzAfC6XeK5HYcf0Fp8QXtIVlfLllJo0879wcSeViW9kZ7GAYzluiYF0KasUMVn65Xowyj1fCvZDUa3myqwRxwjoEoUZ6Qz+GVSlTlgNc4klvAeMPxBdfg== 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=W31dHcxUopXxZSHbU1uDAB9USRrS80+1WGD+yFTevqQ=; b=i7MQaduJGtjOcYRfO0Lg4M56wexrXliWkrHRIYEMIVcxkFdet3TiwpycYYHh0VIqvZjjVArVaHZ7YKpfWre59vJOtkw0NQ0deFrPgxORKqVcFq6ZVszY7nWDS7q7psc4gjjCVQ1KUkB8+1OmT/YhEXoEeXk1c184nMm3Z9M6rr0ymYdikc8H12TQBICUObU9qY2SeNX+oIizEMr1FRNJShAxET9YW+EW+I0APP0gJKH1KsAZxweM1NfBmAwZqxmrg/iO2ZVbRWaeChO89Io8P8Pr8EHUHqORVFH26aAF2lgEzBzjZRfcESrVjoCAcnvQYCIQAXFxuAlxs2rm0+dqtw== 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 X-Received: from CY5PR03CA0015.namprd03.prod.outlook.com (2603:10b6:930:8::43) by LV2PR12MB5750.namprd12.prod.outlook.com (2603:10b6:408:17e::6) 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:17:13 +0000 X-Received: from CY4PEPF0000C982.namprd02.prod.outlook.com (2603:10b6:930:8:cafe::6b) by CY5PR03CA0015.outlook.office365.com (2603:10b6:930:8::43) 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:17:13 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+100866+1787277+3901457@groups.io; helo=mail02.groups.io; 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 X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000C982.mail.protection.outlook.com (10.167.241.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.13 via Frontend Transport; Wed, 8 Mar 2023 14:17:13 +0000 X-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:17:09 -0600 From: "Chang, Abner via groups.io" To: CC: Liming Gao , Isaac Oram , Nate DeSimone , Abdul Lateef Attar , Nickle Wang , "Igor Kulchytskyy" , Abdul Lateef Attar Subject: [edk2-devel] [edk2-platforms][PATCH V2 2/8] ManageabilityPkg: Initial package Date: Wed, 8 Mar 2023 22:16:41 +0800 Message-ID: <20230308141647.1318-3-abner.chang@amd.com> In-Reply-To: <20230308141647.1318-1-abner.chang@amd.com> References: <20230308141647.1318-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C982:EE_|LV2PR12MB5750:EE_ X-MS-Office365-Filtering-Correlation-Id: 3cfc1a03-de9b-4879-3319-08db1fdfd023 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: UJrdCAOZ9RWSPk8bSALPMnnvdtbJPk/ExerPBi07Dxcztd3u2pfLjf5K7ctm9UrHG+aYpN09jolrLKQ/hJWSBuaoB9PZhkVRxEDZ4nG1204ykK85Xf27ALBQ0Q5mW8EZLevDQIwAET57zKRl8qVvM8qAlWneOjXJ04FnZNNBtk1a8u7BwRLwJCKDExVHyHShxHo9uAmuGv7qzKFkdKAVAoHmPeShZNcVk/U56Vewja0IeEDVWgeWUqX1bXlcgKYLHOWXX2Dml6SLib6tuze1RfOhNwQQMizk3f6AzYDgwgGfwwvq9OKxXhL4VitXI4XnUR/Ev5D9/z7ojBKrVgLRbusz8osy0PHoMMjeClavQW60gC5dK2eUoR2p6uvtfm9D329NeKPG2eU3cCyrzUZbG8KRtao3SHF1S/cJjD8GS6tD8yvIFZ7TEHTZGtgTS7maqgoLeDEETHTlnaupfE4O5r5eY7f/doZXF0L3NVxKmZgL0FAHGyaOv6b7GHrUn8hciJ+au1ZKrdi1Ryy3A0mwrgQfcn7DIQJJIVl5YNXALhJXYphehtIRTJB/vywWYz0jBMSWIoYohMrfJPbJqK5craYw9IwtlKWeVdHBdQSmZ6vtgyKowQkjWeWUzLZYo7DyfjTGXysyAg7UtU5KgEqGW8/pyed8xOjua4G/DguHA9Lu+hOX2Vy1t3bJUHP4jidw4/flJ92RctHaWU8Y5foj+gqG/NtfoXaUq8Y1IAWxAK4= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 14:17:13.2099 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3cfc1a03-de9b-4879-3319-08db1fdfd023 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: CY4PEPF0000C982.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5750 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com X-Gm-Message-State: wW6cXuD4IYvQvL5j12geh0kHx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1678285037; bh=jbjLZ3fSlQwYoyv5JKJGvAxVsCq6r8iEdvyj2Kpj9ng=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=LiYXMJcWrSIP4PbW49kDJEZ3t1UIVm7eKuefGn3Cc6nPFb5wsx3DN8yD0s1YdQU4hjL WX2JZlyxW6DpbZYUCn9Pqeso7I9+VMGJv0i82Z58dTNelxyd3o4/yEhzgZkHGzaSWQcni w/IvPuvKuA8FZdjhcGdq/uF+Jpdo6Xm+B1s= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1678285039466100002 Content-Type: text/plain; charset="utf-8" From: Abner Chang Initial commit of ManageabilityPkg Signed-off-by: Abner Chang Cc: Liming Gao Cc: Isaac Oram Cc: Nate DeSimone Cc: Abdul Lateef Attar Cc: Nickle Wang Cc: Igor Kulchytskyy Reviewed-by: Abdul Lateef Attar Reviewed-by: Nickle Wang --- .../ManageabilityPkg/ManageabilityPkg.dec | 18 +++++++++ .../Include/Dsc/Manageability.dsc | 16 ++++++++ .../ManageabilityPkg/ManageabilityPkg.dsc | 40 +++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 Features/ManageabilityPkg/ManageabilityPkg.dec create mode 100644 Features/ManageabilityPkg/Include/Dsc/Manageability.dsc create mode 100644 Features/ManageabilityPkg/ManageabilityPkg.dsc diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dec b/Features/Mana= geabilityPkg/ManageabilityPkg.dec new file mode 100644 index 0000000000..8a0e28f50b --- /dev/null +++ b/Features/ManageabilityPkg/ManageabilityPkg.dec @@ -0,0 +1,18 @@ +## @file +# Manageabilty Package +# This is the package provides the edk2 drivers and libraries +# those are related to the platform management. +# +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + DEC_SPECIFICATION =3D 0x0001001d + PACKAGE_NAME =3D ManageabilityPkg + PACKAGE_GUID =3D 36310119-4FB2-4BA3-959D-74C16B849F9E + PACKAGE_VERSION =3D 1.0 + +[Includes] + Include diff --git a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc b/Feat= ures/ManageabilityPkg/Include/Dsc/Manageability.dsc new file mode 100644 index 0000000000..2cb63c1ca6 --- /dev/null +++ b/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc @@ -0,0 +1,16 @@ +## @file +# Common libraries for Manageabilty Package +# +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[LibraryClasses.ARM, LibraryClasses.AARCH64] + # + # This library provides the instrinsic functions generated by a given co= mpiler. + # + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf + ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf + diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dsc b/Features/Mana= geabilityPkg/ManageabilityPkg.dsc new file mode 100644 index 0000000000..46cc215a0f --- /dev/null +++ b/Features/ManageabilityPkg/ManageabilityPkg.dsc @@ -0,0 +1,40 @@ +## @file +# Manageabilty Package +# This is the package provides edk2 drivers and libraries +# those are related to the platform management. +# +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + PLATFORM_NAME =3D ManageabilityPkg + PLATFORM_GUID =3D 7A98123A-B194-40B6-A863-A52192F6D65D + PLATFORM_VERSION =3D 1.0 + DSC_SPECIFICATION =3D 0x0001001e + OUTPUT_DIRECTORY =3D Build/ManageabilityPkg + SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64|RISCV64 + BUILD_TARGETS =3D DEBUG|RELEASE|NOOPT + SKUID_IDENTIFIER =3D DEFAULT + +[Packages] + MinPlatformPkg/MinPlatformPkg.dec + +[PcdsFeatureFlag] + # + # MinPlatform common include currently required PCD + # + gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable = |FALSE + gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable = |FALSE + gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable = |FALSE + +# +# Include common libraries +# +!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc +!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc +!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc + +!include Include/Dsc/Manageability.dsc + --=20 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100866): https://edk2.groups.io/g/devel/message/100866 Mute This Topic: https://groups.io/mt/97473052/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 18:08:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+100868+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1678285039840144.6099540535472; Wed, 8 Mar 2023 06:17:19 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id dJ1XYY1788612xotK0kuC94D; Wed, 08 Mar 2023 06:17:19 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.79]) by mx.groups.io with SMTP id smtpd.web11.8266.1678285038421243364 for ; Wed, 08 Mar 2023 06:17:18 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mSGMcgWTczp31aTDMTR78hL0ZUxs8Wmd3Wr5T1y7FRE93M/69h+Nv0MWtO4OdpD4KEGboBFqVGfyRIbqKXnowwgvcp5RJ1s1nJGEHYnmTsLXnNAxD4RMRZVvdH40qjxHgY+GPKatyZqSbNQp5JNwGX8rnYkHaVN/eWO6vrgzMv/ktyKVCvHiH74QM794PFz6a8hwF9RaHBcLKEDmAq4COXGpqxPA5my5voqyy7y2HO8c1Ji16Jp5/JUZpz8Izb2ES4SFCFY44ETm5C01GtqzA+OHNVFkZBGNo133SmHJ77kXqFaAzqe0kkM2XzAvtOp7GFdr2VgTchKDPhkYn8JNhg== 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=8JByuioA8pu6PV+JFAmF6JSXVz4O4i/5ePzTafTCQ6w=; b=kWpwxIxomfilC/fj2eTOSsFrJgsp12UglQ56e8L9lNjImOrjAW2MVwK+WtifMYSHPRShDsanncogoXHmWSf64kjNZg4nAt4uQLZHL97udTJk0pPAdx8oh/JuUGOQUoOLowa4tMlhE4dOhIt0Oxi5nM7Wwt8tp8XwywDyGRazOIDG+OAe/+GyGPzinUYyDyzwRJcT4CmqbOE1Nlx5V3FQZZCSBD9pQCq5hLShFAcrBX/peDKuT8OfAKv+3LOxz3lkwRrOZ/xrQz8/vFZE+q6LG5SGOJLbsaHID4fMZ9g/DqXybPLzchp7HQqfwv5Mp6nt1OAVEpxS24wekCvbmIwQog== 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 X-Received: from CYZPR19CA0011.namprd19.prod.outlook.com (2603:10b6:930:8e::9) by SA1PR12MB6893.namprd12.prod.outlook.com (2603:10b6:806:24c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.25; Wed, 8 Mar 2023 14:17:15 +0000 X-Received: from CY4PEPF0000C984.namprd02.prod.outlook.com (2603:10b6:930:8e:cafe::42) by CYZPR19CA0011.outlook.office365.com (2603:10b6:930:8e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18 via Frontend Transport; Wed, 8 Mar 2023 14:17:15 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+100868+1787277+3901457@groups.io; helo=mail02.groups.io; 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 X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000C984.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.15 via Frontend Transport; Wed, 8 Mar 2023 14:17:15 +0000 X-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:17:12 -0600 From: "Chang, Abner via groups.io" To: CC: Liming Gao , Isaac Oram , Nate DeSimone , Nickle Wang , Igor Kulchytskyy , "Abdul Lateef Attar" Subject: [edk2-devel] [edk2-platforms][PATCH V2 3/8] ManageabilityPkg: Add NULL ManageabilityTransportLib Date: Wed, 8 Mar 2023 22:16:42 +0800 Message-ID: <20230308141647.1318-4-abner.chang@amd.com> In-Reply-To: <20230308141647.1318-1-abner.chang@amd.com> References: <20230308141647.1318-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C984:EE_|SA1PR12MB6893:EE_ X-MS-Office365-Filtering-Correlation-Id: 55a8aac0-313a-48d8-eb12-08db1fdfd14d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: cajoqnAExZqS+yhcIrkMz2S1yaFa9/E9jOxQ2zFDh6RC2s+aYe+wURjzeCo60OJRQfSCXxsICJ0753fVtwnhSSk9q7aT7UJTArn9DrMr6TQnir5U7Yp/fR0P/MF/W+5svGj1wrI5wRrAJ9mLWobGYZ16ZkHQoQ87DeBnsbGmofN4mMdv3WBjzWretdL/n5CWAH3AATS0Kfiso8tGD041HVX10Uba6dOf/jkX9t2fGjJs+8xHy8EJ+sCQCZ7m/3vK0sqIdESjZGL11J8FIdt29fSvQyfKUrA8w0GnWFns5Dp71y9ar5tIsywd7ZchrdETDO69yUzd3lJ4xLPSMKTkkTzWVAo/8ZprWwjBwZOD8xhEcouam9R0Ivh6rI10atLrtrNDFU90t6q35dhpBxesyRVvl8biijqBeqE0xvhZvOQXvp2oYwwYQQNL2dS1lkTGo2DusnqvQpBEUHNFBfpiTjIXisC644MeiFQiXix1ne/s1bvJ/OtD3e/SjpHb3kB6u+FMv9HnTedjDHanCi5pbxjQizAfQUB8KY4xLD3HAqqL9C7n28ZJ7DwmWXGLL8PfwhMzKCaynFChQD7Gmjb+lmNWgRYfKiZGeqayULWkWfhN7ojFjoalkuin5b8DWJVV9F7w21ByWYEw6e3OaB951R5vo38u5FGj/YHZOzJ+IBRQfafoVct6SGoBxagRYyoXeZyZ1+A+RKxJHt95tr+K6eEgqBHuMkIXdDKILT1VrT0= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 14:17:15.1832 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55a8aac0-313a-48d8-eb12-08db1fdfd14d 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: CY4PEPF0000C984.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6893 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com X-Gm-Message-State: wD23LGT5eNFKUwjLElsENiU3x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1678285039; bh=mU3yqPCfyEEasEZAGryLnFYcN1iYoIhDLTsKg8kvz7M=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=QgygYZzeUZn1MUc8WxZFDivW3Baxkxh6GRzhY7aVvtfZubSIiDcp/fprcKsdBaIdnoH 6BkY5Xso6EjIW+RaMnW+vI6qBcbkdwCRiEZZ/+sF7/yQxnZJROeJekkbhZSC635es0jb8 nlk8bQeXFZvzSKiVsOjmhdXTgBorvkMUSp8= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1678285041729100001 Content-Type: text/plain; charset="utf-8" From: Abner Chang The NULL instance of ManageabilityTransportLib library. Signed-off-by: Abner Chang Cc: Liming Gao Cc: Isaac Oram Cc: Nate DeSimone Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Abdul Lateef Attar Reviewed-by: Nickle Wang --- .../ManageabilityPkg/ManageabilityPkg.dec | 9 + .../ManageabilityPkg/ManageabilityPkg.dsc | 4 +- .../BaseManageabilityTransportNull.inf | 28 ++ .../Library/ManageabilityTransportIpmiLib.h | 24 ++ .../Library/ManageabilityTransportLib.h | 335 ++++++++++++++++++ .../BaseManageabilityTransportNull.c | 64 ++++ .../BaseManageabilityTransportNull.uni | 13 + 7 files changed, 476 insertions(+), 1 deletion(-) create mode 100644 Features/ManageabilityPkg/Library/BaseManageabilityTran= sportNullLib/BaseManageabilityTransportNull.inf create mode 100644 Features/ManageabilityPkg/Include/Library/Manageability= TransportIpmiLib.h create mode 100644 Features/ManageabilityPkg/Include/Library/Manageability= TransportLib.h create mode 100644 Features/ManageabilityPkg/Library/BaseManageabilityTran= sportNullLib/BaseManageabilityTransportNull.c create mode 100644 Features/ManageabilityPkg/Library/BaseManageabilityTran= sportNullLib/BaseManageabilityTransportNull.uni diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dec b/Features/Mana= geabilityPkg/ManageabilityPkg.dec index 8a0e28f50b..ebf6e6315e 100644 --- a/Features/ManageabilityPkg/ManageabilityPkg.dec +++ b/Features/ManageabilityPkg/ManageabilityPkg.dec @@ -16,3 +16,12 @@ =20 [Includes] Include + +[LibraryClasses] + ## @libraryclass Manageability Transport Library + # Manageability Transport Library definitions + ManageabilityTransportLib|Include/Library/ManageabilityTransportLib.h + +[Guids] + gManageabilityPkgTokenSpaceGuid =3D { 0xBDEFFF48, 0x1C31, 0x49CD, { 0xA7= , 0x6D, 0x92, 0x9E, 0x60, 0xDB, 0xB9, 0xF8 } } + diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dsc b/Features/Mana= geabilityPkg/ManageabilityPkg.dsc index 46cc215a0f..0dd0ab41fc 100644 --- a/Features/ManageabilityPkg/ManageabilityPkg.dsc +++ b/Features/ManageabilityPkg/ManageabilityPkg.dsc @@ -36,5 +36,7 @@ !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc =20 -!include Include/Dsc/Manageability.dsc +[LibraryClasses] + ManageabilityTransportLib|ManageabilityPkg/Library/BaseManageabilityTran= sportNullLib/BaseManageabilityTransportNull.inf =20 +!include Include/Dsc/Manageability.dsc diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportNu= llLib/BaseManageabilityTransportNull.inf b/Features/ManageabilityPkg/Librar= y/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.inf new file mode 100644 index 0000000000..3cb97afb8b --- /dev/null +++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/B= aseManageabilityTransportNull.inf @@ -0,0 +1,28 @@ +## @file +# Null instance of Manageability Transport Library +# +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D BaseManageabilityTransportNull + MODULE_UNI_FILE =3D BaseManageabilityTransportNull.uni + FILE_GUID =3D B63DC070-FB44-44F3-8E9A-DA6CC712EF4F + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D ManageabilityTransportLib + +# +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 +# + +[Sources] + BaseManageabilityTransportNull.c + +[Packages] + ManageabilityPkg/ManageabilityPkg.dec + MdePkg/MdePkg.dec + diff --git a/Features/ManageabilityPkg/Include/Library/ManageabilityTranspo= rtIpmiLib.h b/Features/ManageabilityPkg/Include/Library/ManageabilityTransp= ortIpmiLib.h new file mode 100644 index 0000000000..7ca6acf6ef --- /dev/null +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportIpmiL= ib.h @@ -0,0 +1,24 @@ +/** @file + + This file defines the manageability IPMI protocol specific transport dat= a. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef MANAGEABILITY_TRANSPORT_IPMI_LIB_H_ +#define MANAGEABILITY_TRANSPORT_IPMI_LIB_H_ + +#include + +/// +/// The IPMI command header which is apart from +/// the payload. +/// +typedef struct { + UINT8 NetFn; + UINT8 Lun; + UINT8 Command; +} MANAGEABILITY_IPMI_TRANSPORT_HEADER; + +#endif diff --git a/Features/ManageabilityPkg/Include/Library/ManageabilityTranspo= rtLib.h b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportL= ib.h new file mode 100644 index 0000000000..2093cadbf9 --- /dev/null +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportLib.h @@ -0,0 +1,335 @@ +/** @file + + This file defines the manageability transport interface library and func= tions. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef MANAGEABILITY_TRANSPORT_LIB_H_ +#define MANAGEABILITY_TRANSPORT_LIB_H_ + +#define MANAGEABILITY_TRANSPORT_TOKEN_VERSION_MAJOR 1 +#define MANAGEABILITY_TRANSPORT_TOKEN_VERSION_MINOR 0 +#define MANAGEABILITY_TRANSPORT_TOKEN_VERSION ((MANAGEABILITY_TRANS= PORT_TOKEN_VERSION_MAJOR << 8) |\ + MANAGEABILITY_TRANSPORT_TO= KEN_VERSION_MINOR) + +typedef struct _MANAGEABILITY_TRANSPORT_FUNCTION_V1_0 MANAGEABILITY_TRAN= SPORT_FUNCTION_V1_0; +typedef struct _MANAGEABILITY_TRANSPORT MANAGEABILITY_TRAN= SPORT; +typedef struct _MANAGEABILITY_TRANSPORT_TOKEN MANAGEABILITY_TRAN= SPORT_TOKEN; +typedef struct _MANAGEABILITY_TRANSFER_TOKEN MANAGEABILITY_TRAN= SFER_TOKEN; + +/// +/// Optional transport header and trailer required +/// for the transport interface. +/// +typedef VOID *MANAGEABILITY_TRANSPORT_HEADER; +typedef VOID *MANAGEABILITY_TRANSPORT_TRAILER; + +/// +/// The transport interface specific hardware information. +/// + +typedef union { + UINT16 IoAddress16; + UINT32 IoAddress32; +} MANAGEABILITY_TRANSPORT_HARDWARE_IO; + +/// +/// Manageability KCS protocol interface hardware information. +/// +typedef struct { + BOOLEAN MemoryMap; + MANAGEABILITY_TRANSPORT_HARDWARE_IO IoBaseAddress; + MANAGEABILITY_TRANSPORT_HARDWARE_IO IoDataInAddress; + MANAGEABILITY_TRANSPORT_HARDWARE_IO IoDataOutAddress; + MANAGEABILITY_TRANSPORT_HARDWARE_IO IoCommandAddress; + MANAGEABILITY_TRANSPORT_HARDWARE_IO IoStatusAddress; +} MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO; +#define MANAGEABILITY_TRANSPORT_KCS_IO_MAP_IO FALSE +#define MANAGEABILITY_TRANSPORT_KCS_MEMORY_MAP_IO TRUE + +typedef union { + VOID *Pointer; + MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO *Kcs; +} MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION; + +/// +/// Additional transport interface status. +/// +typedef UINT32 MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS; +#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NO_ERRORS 0x00000000 +#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_ERROR 0x00000001 +#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_BUSY_IN_READ 0x00000002 +#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_BUSY_IN_WRITE 0x00000004 + +/// +/// Additional transport interface features. +/// +typedef UINT32 MANAGEABILITY_TRANSPORT_CAPABILITY; +#define MANAGEABILITY_TRANSPORT_CAPABILITY_MULTIPLE_TRANSFER_TOKENS 0x000= 00001 +#define MANAGEABILITY_TRANSPORT_CAPABILITY_ASYNCHRONOUS_TRANSFER 0x000= 00002 + +/// +/// Definitions of Manageability transport interface functions. +/// This is a union that can accommodate the new functions +/// introduced to the Manageability transport library in the future. +/// The new added function must has its own MANAGEABILITY_TRANSPORT_FUNCTI= ON +/// structure with the incremental version number. +/// e.g., MANAGEABILITY_TRANSPORT_FUNCTION_V1_1. +/// +/// The new function must be added base on the last version of +/// MANAGEABILITY_TRANSPORT_FUNCTION to keep the backward compatability. +/// +typedef union { + MANAGEABILITY_TRANSPORT_FUNCTION_V1_0 *Version1_0; +} MANAGEABILITY_TRANSPORT_FUNCTION; + +/// +/// Manageability specification GUID/Name table structure +/// +typedef struct { + EFI_GUID *SpecificationGuid; + CHAR16 *SpecificationName; +} MANAGEABILITY_SPECIFICATION_NAME; + +/// +/// Definitions of Transmit/Receive package +/// +typedef struct { + UINT8 *TransmitPayload; + UINT32 TransmitSizeInByte; + UINT32 TransmitTimeoutInMillisecond; +} MANAGEABILITY_TRANSMIT_PACKAGE; + +typedef struct { + UINT8 *ReceiveBuffer; + UINT32 ReceiveSizeInByte; + UINT32 TransmitTimeoutInMillisecond; +} MANAGEABILITY_RECEIVE_PACKAGE; + +/// +/// Definitions of Manageability transport interface. +/// +struct _MANAGEABILITY_TRANSPORT { + EFI_GUID *ManageabilityTransportSpecification= ; ///< The Manageability Transport Interface spec. + UINT16 TransportVersion; = ///< The version of transport interface + = ///< function that indicates which version + = ///< of MANAGEABILITY_TRANSPORT_FUNCTION + = ///< is unsupported by this library. + CHAR16 *TransportName; = ///< Human readable string of + = ///< this transport interface. + MANAGEABILITY_TRANSPORT_FUNCTION Function; = ///< Transport functions +}; + +/// +/// Definitions of Manageability transport token. +/// +struct _MANAGEABILITY_TRANSPORT_TOKEN { + EFI_GUID *ManageabilityProtocolSpecification; ///< The= Manageability Protocol spec. + MANAGEABILITY_TRANSPORT *Transport; +}; + +#define MANAGEABILITY_TRANSPORT_NO_TIMEOUT 0 + +/// +/// The Manageability transport receive token used to receive +/// the response from transport interface after transmitting the +/// request. +/// +struct _MANAGEABILITY_TRANSFER_TOKEN { + EFI_EVENT ReceiveEvent; = ///< The EFI event is created to + = ///< wait the signal for the readiness + = ///< of response data. + = ///< If NULL, transport library should + = ///< just return the response data in + = ///< ReceiveBuffer then the process returns + = ///< to caller. Otherwise the transport + = ///< library can signal event when the + = ///< response is ready for caller. That + = ///< means the transport library can + = ///< optionally implement the asynchronous + = ///< transfer mechanism or when the multiple + = ///< transport sessions are acquired. + MANAGEABILITY_TRANSPORT_HEADER TransmitHeader; = ///< This is the transport-specific header + = ///< which is sent discretely of payload. + = ///< This field can be NULL if the transport + = ///< doesn't require this. + MANAGEABILITY_TRANSPORT_TRAILER TransmitTrailer; = ///< This is the transport-specific trailer + = ///< which is sent discretely of payload. + = ///< This field can be NULL if the transport + = ///< doesn't require this. + MANAGEABILITY_TRANSMIT_PACKAGE TransmitPackage; = ///< The payload sent to transport interface. + MANAGEABILITY_RECEIVE_PACKAGE ReceivePackage; = ///< The buffer to receive the response. + EFI_STATUS TransferStatus; = ///< The EFI Status of the transfer. + MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS TransportAdditionalStatus; = ///< The additional status of transport + = ///< interface. +}; + +/** + This function acquires to create a transport session to transmit managea= bility + packet. A transport token is returned to caller for the follow up operat= ions. + + @param [in] ManageabilityProtocolSpec The protocol spec the transport= interface is acquired for. + @param [out] TransportToken The pointer to receive the tran= sport token created by + the target transport interface = library. + @retval EFI_SUCCESS Token is created successfully. + @retval EFI_OUT_OF_RESOURCES Out of resource to create a new= transport session. + @retval EFI_UNSUPPORTED Protocol is not supported on th= is transport interface. + @retval Otherwise Other errors. + +**/ +EFI_STATUS +AcquireTransportSession ( + IN EFI_GUID *ManageabilityProtocolSpec, + OUT MANAGEABILITY_TRANSPORT_TOKEN **TransportToken + ); + +/** + This function returns the transport capabilities. + + @param [out] TransportFeature Pointer to receive transport capab= ilities. + See the definitions of + MANAGEABILITY_TRANSPORT_CAPABILITY. + +**/ +VOID +GetTransportCapability ( + OUT MANAGEABILITY_TRANSPORT_CAPABILITY *TransportCapability + ); + +/** + This function releases the manageability transport session. + + @param [in] TransportToken The transport token acquired through + AcquireTransportSession. + @retval EFI_SUCCESS Token is released successfully. + @retval EFI_INVALID_PARAMETER Invalid TransportToken. + @retval Otherwise Other errors. + +**/ +EFI_STATUS +ReleaseTransportSession ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken + ); + +/** + This function initializes the transport interface. + + @param [in] TransportToken The transport token acquired throu= gh + AcquireTransportSession function. + @param [in] HardwareInfo This is the optional hardware info= rmation + assigned to this transport interfa= ce. + + @retval EFI_SUCCESS Transport interface is initialized + successfully. + @retval EFI_INVALID_PARAMETER The invalid transport token. + @retval EFI_NOT_READY The transport interface works fine= but + @retval is not ready. + @retval EFI_DEVICE_ERROR The transport interface has proble= ms. + @retval EFI_ALREADY_STARTED Teh protocol interface has already= initialized. + @retval Otherwise Other errors. + +**/ +typedef +EFI_STATUS +(EFIAPI *MANAGEABILITY_TRANSPORT_INIT)( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + IN MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION HardwareInfo OPTIONAL + ); + +/** + This function returns the transport interface status. + The generic EFI_STATUS is returned to caller directly, The additional + information of transport interface could be optionally returned in + TransportAdditionalStatus to describes the status that can't be + described obviously through EFI_STATUS. + See the definition of MANAGEABILITY_TRANSPORT_STATUS. + + @param [in] TransportToken The transport token acquired th= rough + AcquireTransportSession functio= n. + @param [out] TransportAdditionalStatus The additional status of transp= ort + interface. + NULL means no additional status= of this + transport interface. + + @retval EFI_SUCCESS Transport interface status is retu= rned. + @retval EFI_INVALID_PARAMETER The invalid transport token. + @retval EFI_DEVICE_ERROR The transport interface has proble= ms to return + @retval status. + Otherwise Other errors. + +**/ +typedef +EFI_STATUS +(EFIAPI *MANAGEABILITY_TRANSPORT_STATUS)( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS *TransportAdditionalStat= us OPTIONAL + ); + +/** + This function resets the transport interface. + The generic EFI_STATUS is returned to caller directly after reseting tra= nsport + interface. The additional information of transport interface could be op= tionally + returned in TransportAdditionalStatus to describes the status that can't= be + described obviously through EFI_STATUS. + See the definition of MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS. + + @param [in] TransportToken The transport token acquired th= rough + AcquireTransportSession functio= n. + @param [out] TransportAdditionalStatus The additional status of specif= ic transport + interface after the reset. + NULL means no additional status= of this + transport interface. + + @retval EFI_SUCCESS Transport interface status is retu= rned. + @retval EFI_INVALID_PARAMETER The invalid transport token. + @retval EFI_TIMEOUT The reset process is time out. + @retval EFI_DEVICE_ERROR The transport interface has proble= ms to return + status. + Otherwise Other errors. + +**/ +typedef +EFI_STATUS +(EFIAPI *MANAGEABILITY_TRANSPORT_RESET)( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS *TransportAdditionalStatu= s OPTIONAL + ); + +/** + This function transmit the request over target transport interface. + The generic EFI_STATUS is returned to caller directly after reseting tra= nsport + interface. The additional information of transport interface could be op= tionally + returned in TransportAdditionalStatus to describes the status that can't= be + described obviously through EFI_STATUS. + See the definition of MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS. + + @param [in] TransportToken The transport token acquired throu= gh + AcquireTransportSession function. + @param [in] TransferToken The transfer token, see the defini= tion of + MANAGEABILITY_TRANSFER_TOKEN. + + @retval The EFI status is returned in MANAGEABILITY_TRANSFER_TOKEN. + +**/ +typedef +VOID +(EFIAPI *MANAGEABILITY_TRANSPORT_TRANSMIT_RECEIVE)( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + IN MANAGEABILITY_TRANSFER_TOKEN *TransferToken + ); + +/// +/// The first version of Manageability transport interface function. +/// +struct _MANAGEABILITY_TRANSPORT_FUNCTION_V1_0 { + MANAGEABILITY_TRANSPORT_INIT TransportInit; //= /< Initial the transport. + MANAGEABILITY_TRANSPORT_STATUS TransportStatus; //= /< Get the transport status. + MANAGEABILITY_TRANSPORT_RESET TransportReset; //= /< Reset the transport. + MANAGEABILITY_TRANSPORT_TRANSMIT_RECEIVE TransportTransmitReceive; //= /< Transmit the packet over + //= /< transport and get the + //= /< response back. +}; + +#endif diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportNu= llLib/BaseManageabilityTransportNull.c b/Features/ManageabilityPkg/Library/= BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.c new file mode 100644 index 0000000000..49fc8c0f71 --- /dev/null +++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/B= aseManageabilityTransportNull.c @@ -0,0 +1,64 @@ +/** @file + Null instance of Manageability Transport Library + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include + +/** + This function acquires to create a transport session to transmit managea= bility + packet. A transport token is returned to caller for the follow up operat= ions. + + @param [in] ManageabilityProtocolSpec The protocol spec the transport= interface is acquired. + @param [out] TransportToken The pointer to receive the tran= sport token created by + the target transport interface = library. + @retval EFI_SUCCESS Token is created successfully. + @retval EFI_OUT_OF_RESOURCES Out of resource to create a new= transport session. + @retval EFI_UNSUPPORTED Protocol is not supported on th= is transport interface. + @retval Otherwise Other errors. + +**/ +EFI_STATUS +AcquireTransportSession ( + IN EFI_GUID *ManageabilityProtocolSpec, + OUT MANAGEABILITY_TRANSPORT_TOKEN **TransportToken + ) +{ + return EFI_UNSUPPORTED; +} + +/** + This function returns the transport capabilities. + + @param [out] TransportFeature Pointer to receive transport capab= ilities. + See the definitions of + MANAGEABILITY_TRANSPORT_CAPABILITY. + +**/ +VOID +GetTransportCapability ( + OUT MANAGEABILITY_TRANSPORT_CAPABILITY *TransportCapability + ) +{ + *TransportCapability =3D 0; +} + +/** + This function releases the manageability session. + + @param [in] TransportToken The transport token acquired through + AcquireTransportSession. + @retval EFI_SUCCESS Token is released successfully. + Otherwise Other errors. + +**/ +EFI_STATUS +ReleaseTransportSession ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken + ) +{ + return EFI_SUCCESS; +} diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportNu= llLib/BaseManageabilityTransportNull.uni b/Features/ManageabilityPkg/Librar= y/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.uni new file mode 100644 index 0000000000..2211037072 --- /dev/null +++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/B= aseManageabilityTransportNull.uni @@ -0,0 +1,13 @@ +// /** @file +// Null instance of Manageability Transport Library +// +// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + +#string STR_MODULE_ABSTRACT #language en-US "Null instance of = Manageability Transport Library" + +#string STR_MODULE_DESCRIPTION #language en-US "Manageability Tra= nsport library implementation for build ManageabilityPkg only." + --=20 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100868): https://edk2.groups.io/g/devel/message/100868 Mute This Topic: https://groups.io/mt/97473054/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 18:08:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+100869+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1678285047959412.9413082875519; Wed, 8 Mar 2023 06:17:27 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id RtBHYY1788612xEmp25GIbwu; Wed, 08 Mar 2023 06:17:27 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.88]) by mx.groups.io with SMTP id smtpd.web11.8268.1678285041503014594 for ; Wed, 08 Mar 2023 06:17:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HZBC85Iyfx5nVq0AL8rsAoFhZbUWp0IOk2AW7WdCxOqHhMr99p/jIL4PiS/DcE0XhML5tuRJ03WWDPsw/vbuG3OvLpevKo55Z+uCM+Z13Y2wpK2uVre9/c9pSAnUn53/B4vTKQ9Gdsx8SbGzqHJSCoo7ME1k2htltqNzXxzUHDC8VGefC+AsNJE1G7XdT8IeO/SUj6WrBUIDTDWWcTK73FkKyyERfQ9mUw51M0TaMKTpkEoffW0dT3C9Lk7f7UI45tjk8OQbOMnI1SoAvuT68yXMt2cENTWFb3b5SYsNCx0hduypcWlK9M2reptelnxHcP6W6bUord76+E3IEuZDiQ== 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=ykOgzJw6T8/cNQPR+EeX7wDRoau20FMko6rICFltBBY=; b=X7caVWb2tQNyYxVGZLzDSL4bI8OE2Ni5zhpLu8zSNem8gWG1ZLrshOju6PpM0HXgkgjDkDnbLMhJ9/KNZIfqDar1fXWtNDZeDcIvk8hb8loNwVN8V0EILr/1QnDqSL3RmMaskaEntinx0lJZAcpl6r3yhe5Nlfr/RdxvJbtGO87sx9Euh9ttX5DQ5qx/g40HGXToMZJZzKFBb2DrM/DrK5SDXsxYXlsLfa6nGS1+qo/LVFVHdp6Q0JLBYb6rOD7LfykOb9E9Na2qm6rG0KkS1d4Y++vf7pSjPwyBSJcx/oDDJKORNro7Yd6noeygiiySxK+P6kw/CS63VG6KvU+LAw== 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 X-Received: from CYZPR20CA0006.namprd20.prod.outlook.com (2603:10b6:930:a2::28) by PH7PR12MB7283.namprd12.prod.outlook.com (2603:10b6:510:20a::21) 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:17:18 +0000 X-Received: from CY4PEPF0000C985.namprd02.prod.outlook.com (2603:10b6:930:a2:cafe::1b) by CYZPR20CA0006.outlook.office365.com (2603:10b6:930:a2::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:17:18 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+100869+1787277+3901457@groups.io; helo=mail02.groups.io; 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 X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000C985.mail.protection.outlook.com (10.167.241.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.13 via Frontend Transport; Wed, 8 Mar 2023 14:17:18 +0000 X-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:17:15 -0600 From: "Chang, Abner via groups.io" To: CC: Liming Gao , Isaac Oram , Nate DeSimone , Nickle Wang , Igor Kulchytskyy , "Abdul Lateef Attar" Subject: [edk2-devel] [edk2-platforms][PATCH V2 4/8] ManageabilityPkg: Add ManageabilityTransportHelperLib Date: Wed, 8 Mar 2023 22:16:43 +0800 Message-ID: <20230308141647.1318-5-abner.chang@amd.com> In-Reply-To: <20230308141647.1318-1-abner.chang@amd.com> References: <20230308141647.1318-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C985:EE_|PH7PR12MB7283:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d7cf2e7-7a83-4571-b020-08db1fdfd339 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: LJo8CJ+aNxCTK8nB3xSAfNpEVOCDIZPraWdDCnDFqXYeWsURJTJCaXSjP187vFcChCoZ6jv4IeD65EfNTitHVX+Ab2oiwKBqL+YA3yb+wFfrh+YX80OsUQOxAG/4yDlu/3Uxa4o2yoBIDOOocEw98FXj7x0kuggEl+Gu5DlZcVDUaHlax4/hjX2EBWVKREzTyUcgt+dvJvGjU6dP6nA/Bt35mt+26Otsfbt+aWlpa382qAJtfBH9ZtLIhVtP6cQ9jde2Mcu/XGIGlUKClH6pfDZHzp7e99Ojl3362VwdFtm+W/skPp9sUKjhBCrWlidcPedoZBDiSvTp1yku/aPYps2r1mSOM9lItAxkSV6yRZCI3lp5tKk3QukquA9H+25aeBc0NBAgktulQOcNi4nIXgGPJOGO58b/oKdQDGjdGt/dxg6qIwE6AgY51XtaBqJ8zzW8sJlyi6QFAK0YtCNwIqT4T9RiGSJSusQG6C+ufWxW6BrYmf2EwLtye8rFt4M5gveXRxOOpfMOGJsyo6FFuO5SJdh0pszNFI90baB5E0HxslnU61DuEMn8Q1rwocdH0yaKspb65e2lfr6RbozVE0bdZAM9DjHOm2oneKqY2Ok+M2MT8OGFmUf6g9ycjTzVGU/W80y43wONd8dAk8B2MlMVpzyaxSsZfuUTi7HPfARQO8xzHI3brkrfy+cr2t71q4kTwh/u3JzDBIToTzprKJR+WndZvKDwT6a5/S+9ub5X6SYJ4FZ5hd6/V26pkcI28to5410ymK3uEQThyNWl4Q== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 14:17:18.3904 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7d7cf2e7-7a83-4571-b020-08db1fdfd339 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: CY4PEPF0000C985.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7283 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com X-Gm-Message-State: VyfkZ6tGrC1DppCR4yQRjRuAx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1678285047; bh=/umWxhxOobBV+yRq4sNkT5PFUmjXAJ913DxbaxuWwPU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=PkJGbgbuOZE/6s1eR40BCUSK5NSa7UvqvUFsJ8iNaGK9NI1GEeXKrdss5LVu5fOAAUa AjrY4epV+Dzjs7LbD1I4jUBgV7DvY3I/1k5VpCZifb2+0kHGYYV1H1fb5kWFsy+4Qn0q/ 7v7v3lDlMDanFb2kAnHmrZEa72b+h4q75rw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1678285049554100005 Content-Type: text/plain; charset="utf-8" From: Abner Chang The helper functions library facilitates reducing duplicated code in the manageability transport library instances. Signed-off-by: Abner Chang Cc: Liming Gao Cc: Isaac Oram Cc: Nate DeSimone Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Abdul Lateef Attar --- .../ManageabilityPkg/ManageabilityPkg.dec | 23 +- .../Include/Dsc/Manageability.dsc | 2 + .../BaseManageabilityTransportHelper.inf | 40 +++ .../Library/ManageabilityTransportHelperLib.h | 93 +++++++ .../BaseManageabilityTransportHelper.c | 242 ++++++++++++++++++ .../BaseManageabilityTransportHelper.uni | 13 + 6 files changed, 412 insertions(+), 1 deletion(-) create mode 100644 Features/ManageabilityPkg/Library/BaseManageabilityTran= sportHelperLib/BaseManageabilityTransportHelper.inf create mode 100644 Features/ManageabilityPkg/Include/Library/Manageability= TransportHelperLib.h create mode 100644 Features/ManageabilityPkg/Library/BaseManageabilityTran= sportHelperLib/BaseManageabilityTransportHelper.c create mode 100644 Features/ManageabilityPkg/Library/BaseManageabilityTran= sportHelperLib/BaseManageabilityTransportHelper.uni diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dec b/Features/Mana= geabilityPkg/ManageabilityPkg.dec index ebf6e6315e..ebbb04dc0e 100644 --- a/Features/ManageabilityPkg/ManageabilityPkg.dec +++ b/Features/ManageabilityPkg/ManageabilityPkg.dec @@ -22,6 +22,27 @@ # Manageability Transport Library definitions ManageabilityTransportLib|Include/Library/ManageabilityTransportLib.h =20 + ## @libraryclass Manageability Transport Helper Library + # Provide the help functions to use ManageabilityTransportLib + ManageabilityTransportHelperLib|Include/Library/ManageabilityTransportHe= lperLib.h + [Guids] - gManageabilityPkgTokenSpaceGuid =3D { 0xBDEFFF48, 0x1C31, 0x49CD, { 0xA7= , 0x6D, 0x92, 0x9E, 0x60, 0xDB, 0xB9, 0xF8 } } + gManageabilityPkgTokenSpaceGuid =3D { 0xBDEFFF48, 0x1C31, 0x49CD, { 0x= A7, 0x6D, 0x92, 0x9E, 0x60, 0xDB, 0xB9, 0xF8 } } + + # Manageability Transport Interface type + # + # Manageability Transport KCS + gManageabilityTransportKcsGuid =3D { 0x5A6E64E9, 0xFD47, 0x4086, { 0x= AA, 0xB0, 0x7A, 0x5F, 0xD7, 0x6B, 0x02, 0x2E } } + # Manageability Transport I2C + gManageabilityTransportI2CGuid =3D { 0x5B174658, 0x8263, 0x4CB8, { 0x= A0, 0x0F, 0xD6, 0x82, 0xE6, 0xBC, 0x74, 0x93 } } + # Manageability Transport PCI VDM + gManageabilityTransportPciVdmGuid =3D { 0x388021A7, 0xFB59, 0x4811, { 0x= 9D, 0xA7, 0xD5, 0x63, 0x7D, 0x04, 0xA7, 0x2F } } =20 + # Manageability Protocol Specification + # + # Manageability Protocol IPMI + gManageabilityProtocolIpmiGuid =3D { 0x36ACA47C, 0xCC80, 0x473B, { 0x= AB, 0xEC, 0xF3, 0x98, 0xFF, 0x87, 0x74, 0x5B } } + # Manageability Protocol MCTP + gManageabilityProtocolMctpGuid =3D { 0x76FED8F1, 0x0BE5, 0x4269, { 0x= A3, 0x1A, 0x38, 0x0F, 0x54, 0xF1, 0xA1, 0x8A } } + # Manageability Protocol PLDM + gManageabilityProtocolPldmGuid =3D { 0x3958090D, 0x69DD, 0x4868, { 0x= 9C, 0x41, 0xC9, 0xAC, 0x31, 0xB5, 0x25, 0xC5 } } diff --git a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc b/Feat= ures/ManageabilityPkg/Include/Dsc/Manageability.dsc index 2cb63c1ca6..994c93f17c 100644 --- a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc +++ b/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc @@ -5,6 +5,8 @@ # SPDX-License-Identifier: BSD-2-Clause-Patent # ## +[LibraryClasses] + ManageabilityTransportHelperLib|ManageabilityPkg/Library/BaseManageabili= tyTransportHelperLib/BaseManageabilityTransportHelper.inf =20 [LibraryClasses.ARM, LibraryClasses.AARCH64] # diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHe= lperLib/BaseManageabilityTransportHelper.inf b/Features/ManageabilityPkg/Li= brary/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.= inf new file mode 100644 index 0000000000..39abcbcb53 --- /dev/null +++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib= /BaseManageabilityTransportHelper.inf @@ -0,0 +1,40 @@ +## @file +# Null instance of Manageability Transport Helper Library +# +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D BaseManageabilityTransportHelper + MODULE_UNI_FILE =3D BaseManageabilityTransportHelper.uni + FILE_GUID =3D 52F2DE11-A8FC-4A06-B8C6-10DCF4A7397C + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D ManageabilityTransportHelperLib + +# +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 +# + +[Sources] + BaseManageabilityTransportHelper.c + +[LibraryClasses] + BaseMemoryLib + DebugLib + +[Packages] + ManageabilityPkg/ManageabilityPkg.dec + MdePkg/MdePkg.dec + +[Guids] + gManageabilityTransportKcsGuid + gManageabilityTransportI2CGuid + gManageabilityTransportPciVdmGuid + gManageabilityProtocolIpmiGuid + gManageabilityProtocolMctpGuid + gManageabilityProtocolPldmGuid + diff --git a/Features/ManageabilityPkg/Include/Library/ManageabilityTranspo= rtHelperLib.h b/Features/ManageabilityPkg/Include/Library/ManageabilityTran= sportHelperLib.h new file mode 100644 index 0000000000..718ac34a1f --- /dev/null +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelpe= rLib.h @@ -0,0 +1,93 @@ +/** @file + + This file defines the manageability transport interface library and func= tions. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef MANAGEABILITY_TRANSPORT_HELPER_LIB_H_ +#define MANAGEABILITY_TRANSPORT_HELPER_LIB_H_ + +#include + +typedef struct _MANAGEABILITY_PROTOCOL_NAME MANAGEABILITY_PROTOCOL_NAME; + +/** + Helper function returns the human readable name of Manageability specifi= cation. + + @param[out] SpecificationGuid The Manageability specification G= UID + + @retval !NULL Human readable name is returned; + @retval NULL No string found, the given Manageability specificati= on is + not supported. +**/ +CHAR16 * +HelperManageabilitySpecName ( + IN EFI_GUID *SpecificationGuid + ); + +/** + Helper function to check if the Manageability specification is supported + by transport interface or not. + + @param[in] TransportGuid GUID of the transport = interface. + @param[in] SupportedManageabilityProtocolArray The Manageability prot= ocols supported + by the transport inter= face. + @param[in] NumberOfSupportedProtocolInArray Number of protocols in= the array. + @param[in] ManageabilityProtocolToCheck The Manageability spec= ification to check. + + @retval EFI_SUCCESS Token is created successfully. + @retval EFI_INVALID_PARAMETER Either NumberOfSupportedProtocolInAr= ray =3D 0 or + SupportedManageabilityProtocolArray = =3D NULL. + @retval EFI_UNSUPPORTED Out of resource to create a new tran= sport session. + Otherwise Other errors. +**/ +EFI_STATUS +HelperManageabilityCheckSupportedSpec ( + IN EFI_GUID *TransportGuid, + IN EFI_GUID **SupportedManageabilityProtocolArray, + IN UINT8 NumberOfSupportedProtocolInArray, + IN EFI_GUID *ManageabilityProtocolToCheck + ); + +/** + Helper function to acquire the Manageability transport token. + + @param[in] ManageabilityProtocolSpec The Manageability protocol speci= fication. + @param[out] TransportToken Pointer to receive Manageability= transport + token. + + @retval EFI_SUCCESS Token is created successfully. + @retval EFI_OUT_OF_RESOURCES Out of resource to create a new tran= sport session. + @retval EFI_UNSUPPORTED Token is created successfully. + @retval EFI_DEVICE_ERROR The transport interface has problems + @retval EFI_INVALID_PARAMETER INput parameter is not valid. + Otherwise Other errors. +**/ +EFI_STATUS +HelperAcquireManageabilityTransport ( + IN EFI_GUID *ManageabilityProtocolSpec, + OUT MANAGEABILITY_TRANSPORT_TOKEN **TransportToken + ); + +/** + Helper function to initial the transport interface. + + @param[in] TransportToken Transport token. + @param[in] HardwareInfo Optional hardware information of= transport interface. + @param[out] TransportAdditionalStatus Transport additional status. + + @retval EFI_SUCCESS Transport interface is initiated suc= cessfully. + @retval EFI_DEVICE_ERROR The transport interface has problems + @retval EFI_INVALID_PARAMETER INput parameter is not valid. + Otherwise Other errors. +**/ +EFI_STATUS +HelperInitManageabilityTransport ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + IN MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION HardwareInfo OPTIONAL, + OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS *TransportAdditionalSt= atus OPTIONAL + ); + +#endif diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHe= lperLib/BaseManageabilityTransportHelper.c b/Features/ManageabilityPkg/Libr= ary/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c new file mode 100644 index 0000000000..9b00f001e0 --- /dev/null +++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib= /BaseManageabilityTransportHelper.c @@ -0,0 +1,242 @@ +/** @file + Null instance of Manageability Transport Helper Library + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include + +MANAGEABILITY_SPECIFICATION_NAME ManageabilitySpecNameTable[] =3D { + { &gManageabilityTransportKcsGuid, L"KCS" }, + { &gManageabilityTransportI2CGuid, L"I2C" }, + { &gManageabilityTransportPciVdmGuid, L"PCI VDM" }, + { &gManageabilityProtocolIpmiGuid, L"IPMI" }, + { &gManageabilityProtocolMctpGuid, L"MCTP" }, + { &gManageabilityProtocolPldmGuid, L"PLDM" } +}; + +UINT16 ManageabilitySpecNum =3D sizeof (ManageabilitySpecNameTable)/ size= of (MANAGEABILITY_SPECIFICATION_NAME); + +/** + Helper function returns the human readable name of Manageability specifi= cation. + + @param[in] SpecificationGuid The Manageability specification GU= ID + + @retval !NULL Human readable name is returned; + @retval NULL No string found, the given Manageability specificati= on is + not supported. +**/ +CHAR16 * +HelperManageabilitySpecName ( + IN EFI_GUID *SpecificationGuid + ) +{ + UINT16 Index; + MANAGEABILITY_SPECIFICATION_NAME *ThisSpec; + + if (ManageabilitySpecNum =3D=3D 0) { + return NULL; + } + + ThisSpec =3D ManageabilitySpecNameTable; + for (Index =3D 0; Index < ManageabilitySpecNum; Index++) { + if (CompareGuid ( + SpecificationGuid, + ThisSpec->SpecificationGuid + )) + { + return ThisSpec->SpecificationName; + } + + ThisSpec++; + } + + return NULL; +} + +/** + Helper function to check if the Manageability specification is supported + by transport interface or not. + + @param[in] TransportGuid GUID of the transport = interface. + @param[in] SupportedManageabilityProtocolArray The Manageability prot= ocols supported + by the transport inter= face. + @param[in] NumberOfSupportedProtocolInArray Number of protocols in= the array. + @param[in] ManageabilityProtocolToCheck The Manageability spec= ification to check. + + @retval EFI_SUCCESS Token is created successfully. + @retval EFI_INVALID_PARAMETER Either NumberOfSupportedProtocolInAr= ray =3D 0 or + SupportedManageabilityProtocolArray = =3D NULL. + @retval EFI_UNSUPPORTED Out of resource to create a new tran= sport session. + Otherwise Other errors. +**/ +EFI_STATUS +HelperManageabilityCheckSupportedSpec ( + IN EFI_GUID *TransportGuid, + IN EFI_GUID **SupportedManageabilityProtocolArray, + IN UINT8 NumberOfSupportedProtocolInArray, + IN EFI_GUID *ManageabilityProtocolToCheck + ) +{ + UINT16 Index; + EFI_GUID *ThisSpecGuid; + + if ((NumberOfSupportedProtocolInArray =3D=3D 0) || (SupportedManageabili= tyProtocolArray =3D=3D NULL)) { + return EFI_INVALID_PARAMETER; + } + + ThisSpecGuid =3D *SupportedManageabilityProtocolArray; + for (Index =3D 0; Index < NumberOfSupportedProtocolInArray; Index++) { + if (CompareGuid ( + ThisSpecGuid, + ManageabilityProtocolToCheck + )) + { + DEBUG (( + DEBUG_VERBOSE, + "%a: Transport interface %s supports %s manageability specificatio= n.\n", + __FUNCTION__, + HelperManageabilitySpecName (TransportGuid), + HelperManageabilitySpecName (ManageabilityProtocolToCheck) + )); + return EFI_SUCCESS; + } + + ThisSpecGuid++; + } + + DEBUG (( + DEBUG_ERROR, + "%a: Transport interface %s doesn't support %s manageability specifica= tion.\n", + __FUNCTION__, + HelperManageabilitySpecName (TransportGuid), + HelperManageabilitySpecName (ManageabilityProtocolToCheck) + )); + return EFI_UNSUPPORTED; +} + +/** + Helper function to acquire the Manageability transport token. + + @param[in] ManageabilityProtocolSpec The Manageability protocol speci= fication. + @param[out] TransportToken Pointer to receive Manageability= transport + token. + + @retval EFI_SUCCESS Token is created successfully. + @retval EFI_OUT_OF_RESOURCES Out of resource to create a new tran= sport session. + @retval EFI_UNSUPPORTED Token is created successfully. + @retval EFI_INVALID_PARAMETER Input parameter is not valid. + Otherwise Other errors. +**/ +EFI_STATUS +HelperAcquireManageabilityTransport ( + IN EFI_GUID *ManageabilityProtocolSpec, + OUT MANAGEABILITY_TRANSPORT_TOKEN **TransportToken + ) +{ + EFI_STATUS Status; + CHAR16 *ManageabilityProtocolName; + CHAR16 *ManageabilityTransportName; + + DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__)); + if ((TransportToken =3D=3D NULL) || (ManageabilityProtocolSpec =3D=3D NU= LL)) { + DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is NULL= .\n", __FUNCTION__)); + return EFI_INVALID_PARAMETER; + } + + *TransportToken =3D NULL; + ManageabilityProtocolName =3D HelperManageabilitySpecName (Manageability= ProtocolSpec); + if (ManageabilityProtocolName =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Protocol Specifica= tion\n", __FUNCTION__)); + return EFI_UNSUPPORTED; + } + + DEBUG ((DEBUG_INFO, " Manageability protocol %s is going to acquire tra= nsport interface token...\n", ManageabilityProtocolName)); + + Status =3D AcquireTransportSession (ManageabilityProtocolSpec, Transport= Token); + if (Status =3D=3D EFI_UNSUPPORTED) { + DEBUG ((DEBUG_ERROR, "%a: No supported transport interface for %s pack= et.\n", __FUNCTION__, ManageabilityProtocolName)); + return Status; + } + + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "%a: Fail to acquire Manageability transport token for %s (%r).\n", + __FUNCTION__, + ManageabilityProtocolName, + Status + )); + return Status; + } + + ManageabilityTransportName =3D HelperManageabilitySpecName ((*TransportT= oken)->Transport->ManageabilityTransportSpecification); + if (ManageabilityTransportName =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Transport Interfac= e Specification\n", __FUNCTION__)); + return EFI_UNSUPPORTED; + } + + DEBUG ((DEBUG_INFO, "%a: This is the transfer session for %s over %s\n",= __FUNCTION__, ManageabilityProtocolName, ManageabilityTransportName)); + return Status; +} + +/** + Helper function to initial the transport interface. + + @param[in] TransportToken Transport token. + @param[in] HardwareInfo Optional hardware information of= transport interface. + @param[out] TransportAdditionalStatus Transport additional status. + + @retval EFI_SUCCESS Transport interface is initiated suc= cessfully. + @retval EFI_DEVICE_ERROR The transport interface has problems + @retval EFI_INVALID_PARAMETER INput parameter is not valid. + Otherwise Other errors. +**/ +EFI_STATUS +HelperInitManageabilityTransport ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + IN MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION HardwareInfo OPTIONAL, + OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS *TransportAdditionalSt= atus OPTIONAL + ) +{ + EFI_STATUS Status; + + if (TransportToken =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: TransportToken is invalid.\n", __FUNCTION__)= ); + return EFI_INVALID_PARAMETER; + } + + // Initial transport interface. + Status =3D TransportToken->Transport->Function.Version1_0->TransportInit= (TransportToken, HardwareInfo); + if ((Status !=3D EFI_SUCCESS) && (Status !=3D EFI_ALREADY_STARTED)) { + if (Status =3D=3D EFI_DEVICE_ERROR) { + // Try to reset the transport and initialize it again. + Status =3D TransportToken->Transport->Function.Version1_0->Transport= Reset ( + Transport= Token, + Transport= AdditionalStatus + ); + if (EFI_ERROR (Status)) { + if (Status =3D=3D EFI_UNSUPPORTED) { + DEBUG ((DEBUG_ERROR, "%a: Transport interface doesn't have reset= capability.\n", __FUNCTION__)); + } else { + DEBUG ((DEBUG_ERROR, "%a: Fail to reset transport interface (%r)= .\n", __FUNCTION__, Status)); + } + + Status =3D EFI_DEVICE_ERROR; + } else { + Status =3D TransportToken->Transport->Function.Version1_0->Transpo= rtInit (TransportToken, HardwareInfo); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use= after the reset (%r).\n", __FUNCTION__, Status)); + } + } + } else { + DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use (%r= ).\n", __FUNCTION__, Status)); + } + } + + return Status; +} diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHe= lperLib/BaseManageabilityTransportHelper.uni b/Features/ManageabilityPkg/Li= brary/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.= uni new file mode 100644 index 0000000000..dfb6051aeb --- /dev/null +++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib= /BaseManageabilityTransportHelper.uni @@ -0,0 +1,13 @@ +// /** @file +// Null instance of Manageability Transport Helper Library +// +// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + +#string STR_MODULE_ABSTRACT #language en-US "Manageability Tra= nsport Helper Library" + +#string STR_MODULE_DESCRIPTION #language en-US "Manageability Tra= nsport Helper Functions." + --=20 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100869): https://edk2.groups.io/g/devel/message/100869 Mute This Topic: https://groups.io/mt/97473055/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 18:08:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+100870+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1678285046333703.7070126219231; Wed, 8 Mar 2023 06:17:26 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id p0zqYY1788612xUD22KYEFt0; Wed, 08 Mar 2023 06:17:26 -0800 X-Received: from NAM04-MW2-obe.outbound.protection.outlook.com (NAM04-MW2-obe.outbound.protection.outlook.com [40.107.101.52]) by mx.groups.io with SMTP id smtpd.web11.8270.1678285044931822970 for ; Wed, 08 Mar 2023 06:17:25 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q7+oAr0cRaA6+pMW6QPfssf/ZuXtA9K9IIWSC1TS9lcF8m9s71voQVRXSEmUYn8F7jhi6HXuCwjHnkeB3386pcBKTo7kuBadX4/+AAOElnSlRvLy5ZMhH6EEV6CEmUxgIfXbp82c7OnOcO4OQxCK3TwYuP1/ySec5an5EjzLSGzxLEzdy5BSmxIH8JgFpyvEkBh3G8f4Hh0AKENt3QqNXf3VcwvORq6gtQIPMFqpdEALaHLHSkJB02dsW+zBnWe+U3eDjhuGGnK945iEx7n3/8FrR+YaLtW/2Lo78NSJHai8sI6C36hFLfu0H7hA1Eqkc/sx69jH51TdKn1hk+Lmhw== 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=M/kmYzw3084JalU6kxYJym1dpfSRlyzV2SxWG0Vi+Mc=; b=VAhobsmQ/Pnr4C/ypulreK2EAj6zFxCabtGjxAzAEJWSG21uwLgwIH+wHtnMGO514u8RdrUKB+p8JVtwW5ZGIQLg3+S+FsmRDXv9adLKGjoOhS/pKYwqcpONhjd3Z54HlfjhS8pl5gNyGlTVu6pQOm9RY95KhK3SOtnDmgIKH/V5xbPvDCIQG1VipI8cKYwnSZvD+fLAIfRo2vTLL7wW1oO9c/EoJCOjFbXtnzSKMpT9NEj3CAuIajHiuKtVfst379wl1TYF4rytnTzjHH0rYi4B55qbTTG4Qt0+VLHyhxendI0/frTGFaKNXhrhXNutIDq45/ViplLak3ZxgaF9qA== 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 X-Received: from CY5PR15CA0092.namprd15.prod.outlook.com (2603:10b6:930:7::6) by SJ2PR12MB7824.namprd12.prod.outlook.com (2603:10b6:a03:4c4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.28; Wed, 8 Mar 2023 14:17:21 +0000 X-Received: from CY4PEPF0000C97E.namprd02.prod.outlook.com (2603:10b6:930:7:cafe::73) by CY5PR15CA0092.outlook.office365.com (2603:10b6:930:7::6) 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:17:21 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+100870+1787277+3901457@groups.io; helo=mail02.groups.io; 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 X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000C97E.mail.protection.outlook.com (10.167.241.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.12 via Frontend Transport; Wed, 8 Mar 2023 14:17:21 +0000 X-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:17:18 -0600 From: "Chang, Abner via groups.io" To: CC: Liming Gao , Isaac Oram , Nate DeSimone , Abdul Lateef Attar , Nickle Wang , "Igor Kulchytskyy" Subject: [edk2-devel] [edk2-platforms][PATCH V2 5/8] ManageabilityPkg/ManageabilityTransportKcsLib Date: Wed, 8 Mar 2023 22:16:44 +0800 Message-ID: <20230308141647.1318-6-abner.chang@amd.com> In-Reply-To: <20230308141647.1318-1-abner.chang@amd.com> References: <20230308141647.1318-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C97E:EE_|SJ2PR12MB7824:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a627cb5-5c1b-4475-852b-08db1fdfd501 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: AmQ8uGX4c/It/g33N/t6MEpRrbk1ThsHehdn/uZXVTnx/h2S6o7OFMmHgHIGwPMFpr9CIEbqYKR6T0GmSX5wNt8gGGEK3L0EmybKAFjSNIvLRjKWS9kHL6mYUISnB8Ovs1EIn6API94nm9QJHFni1yFcFG0gBpfpa8/fv36xiW28vNMH9WtH+P/kaQVFtRb8i83AUyAh5rwZwl0xgZDOb6Jn8hh/7KdKRaSngl188uV0kxpVOLA5j8kFufoq0KHRUn7vPkmKY/sHYxtIP2EgVX9KLOaf3Im9d1Hb9ZGTF3DE2jqu1sZsKkwEUuiLn47omY1O2Nx+2CIu2ktZYjxCmWIxtHfDJ+kVPS0hLwO+cXw7PS/gWAi0ShtA5/Su42BG82jajBpOlY+iI/myyIZimJcEj+9W0AhXuDOK/pKtzT+LuzJxq99qKiQcvcRw/SOlcQON5sN7Rh2Q7TbU8Lk8364ziea6E0AhY8zj4PJnblT5Dsk6UYEZwkXKYUcgzCU78P2WewnOjJuOxKzy/ZJEK4RfWyOCta9f/L1iwelVbS13xNrKDH19Q+pCq40NTXC0Zyix5TNRIPEJVfRsm98/ekR7DAtZwyyLxnGLpv8lYykFecwlabEvhaq/BfHI++tBhOPTqtnxv6A+b2fYR3HSnpTMmTmFafjTwpIgnZhn/L7cLDM7hE7X/mL70krB/jIijLr5jNDThCgL8I1aVFH/8QDNxGPJ8JUhPAONNDIhLIQKj7ELdQ+k+w3z4bKTndVWF+NjxzHvx4XcYXHcYlJNSA== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 14:17:21.3777 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a627cb5-5c1b-4475-852b-08db1fdfd501 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: CY4PEPF0000C97E.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7824 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com X-Gm-Message-State: DqZynI427s8Nz52b9PK31q4Zx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1678285046; bh=sapJAmWL/GMaGL9cQy/FuZzzcFA8MoNGg3abvVomvLo=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=CXJwkKp8EQoHNM8tlMu/igrp9sLgr5B47WlKBz34GZMMN2kg5Xrq9zWswJRFeDf3ndg sTpYiXrgDP5o2ufa25Fz8VDua8ISpfd26BlK55egXWouIxITI+iTRkziS7oYbzY5OxRJG m0nAQm84uO00LXM0Pik1aChCS2cQ10CM5GI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1678285047573100002 Content-Type: text/plain; charset="utf-8" From: Abner Chang This is the KCS manageability transport library instance follows the design guidance described in Readme file under ManageabilityPkg. Signed-off-by: Abner Chang Cc: Liming Gao Cc: Isaac Oram Cc: Nate DeSimone Cc: Abdul Lateef Attar Cc: Nickle Wang Cc: Igor Kulchytskyy --- .../ManageabilityPkg/ManageabilityPkg.dsc | 3 + .../Dxe/DxeManageabilityTransportKcs.inf | 44 ++ .../Common/ManageabilityTransportKcs.h | 106 ++++ .../Common/KcsCommon.c | 480 ++++++++++++++++++ .../Dxe/ManageabilityTransportKcs.c | 384 ++++++++++++++ .../Dxe/ManageabilityTransportKcs.uni | 13 + 6 files changed, 1030 insertions(+) create mode 100644 Features/ManageabilityPkg/Library/ManageabilityTranspor= tKcsLib/Dxe/DxeManageabilityTransportKcs.inf create mode 100644 Features/ManageabilityPkg/Library/ManageabilityTranspor= tKcsLib/Common/ManageabilityTransportKcs.h create mode 100644 Features/ManageabilityPkg/Library/ManageabilityTranspor= tKcsLib/Common/KcsCommon.c create mode 100644 Features/ManageabilityPkg/Library/ManageabilityTranspor= tKcsLib/Dxe/ManageabilityTransportKcs.c create mode 100644 Features/ManageabilityPkg/Library/ManageabilityTranspor= tKcsLib/Dxe/ManageabilityTransportKcs.uni diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dsc b/Features/Mana= geabilityPkg/ManageabilityPkg.dsc index 0dd0ab41fc..45e07ac34f 100644 --- a/Features/ManageabilityPkg/ManageabilityPkg.dsc +++ b/Features/ManageabilityPkg/ManageabilityPkg.dsc @@ -36,6 +36,9 @@ !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc =20 +[Components] + ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/DxeManageabili= tyTransportKcs.inf + [LibraryClasses] ManageabilityTransportLib|ManageabilityPkg/Library/BaseManageabilityTran= sportNullLib/BaseManageabilityTransportNull.inf =20 diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib= /Dxe/DxeManageabilityTransportKcs.inf b/Features/ManageabilityPkg/Library/M= anageabilityTransportKcsLib/Dxe/DxeManageabilityTransportKcs.inf new file mode 100644 index 0000000000..f0a6afa074 --- /dev/null +++ b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/Dx= eManageabilityTransportKcs.inf @@ -0,0 +1,44 @@ +## @file +# KCS instance of Manageability Transport Library +# +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D DxeManageabilityTransportKcs + MODULE_UNI_FILE =3D ManageabilityTransportKcs.uni + FILE_GUID =3D FCCC8B34-145A-4927-9F08-553ADC579AF7 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D ManageabilityTransportLib + +# +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 +# + +[Sources] + ManageabilityTransportKcs.c + ../Common/KcsCommon.c + ../Common/ManageabilityTransportKcs.h + +[Packages] + ManageabilityPkg/ManageabilityPkg.dec + MdePkg/MdePkg.dec + +[LibraryClasses] + DebugLib + IoLib + TimerLib + MemoryAllocationLib + +[Guids] + gManageabilityTransportKcsGuid + gManageabilityProtocolMctpGuid + gManageabilityProtocolIpmiGuid + +[FixedPcd] + gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsBaseAddress # Used as default KCS I= /O base adddress + diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib= /Common/ManageabilityTransportKcs.h b/Features/ManageabilityPkg/Library/Man= ageabilityTransportKcsLib/Common/ManageabilityTransportKcs.h new file mode 100644 index 0000000000..d5a16efc81 --- /dev/null +++ b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common= /ManageabilityTransportKcs.h @@ -0,0 +1,106 @@ +/** @file + + Manageability transport KCS internal used definitions. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef MANAGEABILITY_TRANSPORT_KCS_LIB_H_ +#define MANAGEABILITY_TRANSPORT_KCS_LIB_H_ + +#include + +#define MANAGEABILITY_TRANSPORT_KCS_SIGNATURE SIGNATURE_32 ('M', 'T', 'K'= , 'C') + +#define KCS_BASE_ADDRESS mKcsHardwareInfo.IoBaseAddress +#define KCS_REG_DATA_IN mKcsHardwareInfo.IoDataInAddress +#define KCS_REG_DATA_OUT mKcsHardwareInfo.IoDataOutAddress +#define KCS_REG_COMMAND mKcsHardwareInfo.IoCommandAddress +#define KCS_REG_STATUS mKcsHardwareInfo.IoStatusAddress + +/// +/// Manageability transport KCS internal data structure. +/// +typedef struct { + UINTN Signature; + MANAGEABILITY_TRANSPORT_TOKEN Token; +} MANAGEABILITY_TRANSPORT_KCS; + +#define MANAGEABILITY_TRANSPORT_KCS_FROM_LINK(a) CR (a, MANAGEABILITY_TRA= NSPORT_KCS, Token, MANAGEABILITY_TRANSPORT_KCS_SIGNATURE) + +#define IPMI_KCS_GET_STATE(s) (s >> 6) +#define IPMI_KCS_SET_STATE(s) (s << 6) + +/// 5 sec, according to IPMI spec +#define IPMI_KCS_TIMEOUT_5_SEC 5000*1000 +#define IPMI_KCS_TIMEOUT_1MS 1000 + +/** + This service communicates with BMC using KCS protocol. + + @param[in] NetFunction Net function of the command. + @param[in] Command IPMI Command. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Data. + @param[out] ResponseData Command Response Data. The complet= ion + code is the first byte of response + data. + @param[in, out] ResponseDataSize Size of Command Response Data. + + @retval EFI_SUCCESS The command byte stream was + successfully submit to the device = and a + response was successfully received. + @retval EFI_NOT_FOUND The command was not successfully s= ent + to the device or a response was not + successfully received from the dev= ice. + @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi + command access. + @retval EFI_DEVICE_ERROR Ipmi Device hardware error. + @retval EFI_TIMEOUT The command time out. + @retval EFI_UNSUPPORTED The command was not successfully s= ent to + the device. + @retval EFI_OUT_OF_RESOURCES The resource allocation is out of + resource or data size error. +**/ + +EFI_STATUS +EFIAPI +KcsTransportSendCommand ( + IN UINT8 NetFunction, + IN UINT8 Command, + IN UINT8 *RequestData, + IN UINT32 RequestDataSize, + OUT UINT8 *ResponseData, + IN OUT UINT32 *ResponseDataSize + ); + +/** + This function reads 8-bit value from register address. + + @param[in] Address This represents either 16-bit IO a= ddress + or 32-bit memory mapped address. + + @retval UINT8 8-bit value. +**/ +UINT8 +KcsRegisterRead8 ( + MANAGEABILITY_TRANSPORT_HARDWARE_IO Address + ); + +/** + This function writes 8-bit value to register address. + + @param[in] Address This represents either 16-bit IO a= ddress + or 32-bit memory mapped address. + @param[in] Value 8-bit value write to register addr= ess + + @retval UINT8 8-bit value. +**/ +VOID +KcsRegisterWrite8 ( + MANAGEABILITY_TRANSPORT_HARDWARE_IO Address, + UINT8 Value + ); + +#endif diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib= /Common/KcsCommon.c b/Features/ManageabilityPkg/Library/ManageabilityTransp= ortKcsLib/Common/KcsCommon.c new file mode 100644 index 0000000000..ff20f4a18e --- /dev/null +++ b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common= /KcsCommon.c @@ -0,0 +1,480 @@ +/** @file + + KCS instance of Manageability Transport Library + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#include +#include +#include +#include +#include +#include +#include + +#include "ManageabilityTransportKcs.h" + +extern MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO mKcsHardwareInfo; + +/** + This function waits for parameter Flag to set. + Checks status flag in every 1ms internal till 5 seconds elapses. + + @param[in] Flag KCS Flag to test. + @retval EFI_SUCCESS The KCS flag under test is set. + @retval EFI_TIMEOUT The KCS flag didn't set in 5 second windows. +**/ +EFI_STATUS +WaitStatusSet ( + IN UINT8 Flag + ) +{ + UINT64 Timeout =3D 0; + + while (!(KcsRegisterRead8 (KCS_REG_STATUS) & Flag)) { + MicroSecondDelay (IPMI_KCS_TIMEOUT_1MS); + Timeout =3D Timeout + IPMI_KCS_TIMEOUT_1MS; + if (Timeout >=3D IPMI_KCS_TIMEOUT_5_SEC) { + return EFI_TIMEOUT; + } + } + + return EFI_SUCCESS; +} + +/** + This function waits for parameter Flag to get cleared. + Checks status flag in every 1ms internal till 5 seconds elapses. + + @param[in] Flag KCS Flag to test. + + @retval EFI_SUCCESS The KCS flag under test is clear. + @retval EFI_TIMEOUT The KCS flag didn't cleared in 5 second windows. +**/ +EFI_STATUS +WaitStatusClear ( + IN UINT8 Flag + ) +{ + UINT64 Timeout =3D 0; + + while (KcsRegisterRead8 (KCS_REG_STATUS) & Flag) { + MicroSecondDelay (IPMI_KCS_TIMEOUT_1MS); + Timeout =3D Timeout + IPMI_KCS_TIMEOUT_1MS; + if (Timeout >=3D IPMI_KCS_TIMEOUT_5_SEC) { + return EFI_TIMEOUT; + } + } + + return EFI_SUCCESS; +} + +/** + This function validates KCS OBF bit. + Checks whether OBF bit is set or not. + + @retval EFI_SUCCESS OBF bit is set. + @retval EFI_NOT_READY OBF bit is not set. +**/ +EFI_STATUS +ClearOBF ( + VOID + ) +{ + if (KcsRegisterRead8 (KCS_REG_STATUS) & IPMI_KCS_OBF) { + KcsRegisterRead8 (KCS_REG_DATA_IN); // read the data to clear the OBF + if (KcsRegisterRead8 (KCS_REG_STATUS) & IPMI_KCS_OBF) { + return EFI_NOT_READY; + } + } + + return EFI_SUCCESS; +} + +/** + This function writes/sends data to the KCS port. + Algorithm is based on flow chart provided in IPMI spec 2.0 + Figure 9-6, KCS Interface BMC to SMS Write Transfer Flow Chart + + @param[in] NetFunction Net function of the command. + @param[in] Command IPMI Command. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Data. + + @retval EFI_SUCCESS The command byte stream was successful= ly + submit to the device and a response was + successfully received. + @retval EFI_NOT_FOUND The command was not successfully sent = to the + device or a response was not successfu= lly + received from the device. + @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi comm= and + access. + @retval EFI_DEVICE_ERROR Ipmi Device hardware error. + @retval EFI_TIMEOUT The command time out. + @retval EFI_UNSUPPORTED The command was not successfully sent = to + the device. + @retval EFI_OUT_OF_RESOURCES The resource allocation is out of reso= urce or + data size error. +**/ +EFI_STATUS +KcsTransportWrite ( + IN UINT8 NetFunction, + IN UINT8 Command, + IN UINT8 *RequestData, + IN UINT32 RequestDataSize + ) +{ + EFI_STATUS Status; + UINT32 Length; + UINT8 *Buffer; + UINT8 *BufferPtr; + + Length =3D sizeof (NetFunction) + sizeof (Command); + if (RequestData !=3D NULL) { + Length =3D Length + RequestDataSize; + } + + Buffer =3D AllocateZeroPool (Length); + if (Buffer =3D=3D NULL) { + return EFI_OUT_OF_RESOURCES; + } + + // + // Buffer[0] =3D NetFunction + // Buffer[1] =3D Command + // Buffer [2..RequestDataSize] =3D RequestData + // + BufferPtr =3D Buffer; + CopyMem (BufferPtr, &NetFunction, sizeof (NetFunction)); + BufferPtr +=3D sizeof (NetFunction); + CopyMem (BufferPtr, &Command, sizeof (Command)); + BufferPtr +=3D sizeof (Command); + if (Length > (sizeof (NetFunction) + sizeof (Command))) { + CopyMem (BufferPtr, RequestData, RequestDataSize); + } + + BufferPtr =3D Buffer; + + // Step 1. wait for IBF to get clear + Status =3D WaitStatusClear (IPMI_KCS_IBF); + if (EFI_ERROR (Status)) { + FreePool (Buffer); + return Status; + } + + // Step 2. clear OBF + if (EFI_ERROR (ClearOBF ())) { + FreePool (Buffer); + return EFI_NOT_READY; + } + + // Step 3. WR_START to CMD, phase=3Dwr_start + KcsRegisterWrite8 (KCS_REG_COMMAND, IPMI_KCS_CONTROL_CODE_WRITE_START); + + // Step 4. wait for IBF to get clear + Status =3D WaitStatusClear (IPMI_KCS_IBF); + if (EFI_ERROR (Status)) { + FreePool (Buffer); + return Status; + } + + // Step 5. check state it should be WRITE_STATE, else exit with error + if (IPMI_KCS_GET_STATE (KcsRegisterRead8 (KCS_REG_STATUS)) !=3D IPMI_KCS= _WRITE_STATE) { + FreePool (Buffer); + return EFI_NOT_READY; + } + + // Step 6, Clear OBF + if (EFI_ERROR (ClearOBF ())) { + FreePool (Buffer); + return EFI_NOT_READY; + } + + while (Length > 1) { + // Step 7, phase wr_data, write one byte of Data + KcsRegisterWrite8 (KCS_REG_DATA_OUT, *BufferPtr); + Length--; + BufferPtr++; + + // Step 8. wait for IBF clear + Status =3D WaitStatusClear (IPMI_KCS_IBF); + if (EFI_ERROR (Status)) { + FreePool (Buffer); + return Status; + } + + // Step 9. check state it should be WRITE_STATE, else exit with error + if (IPMI_KCS_GET_STATE (KcsRegisterRead8 (KCS_REG_STATUS)) !=3D IPMI_K= CS_WRITE_STATE) { + FreePool (Buffer); + return EFI_NOT_READY; + } + + // Step 10 + if (EFI_ERROR (ClearOBF ())) { + FreePool (Buffer); + return EFI_NOT_READY; + } + + // + // Step 11, check for DATA completion if more than one byte; + // if still need to be transferred then go to step 7 and repeat + // + } + + // Step 12, WR_END to CMD + KcsRegisterWrite8 (KCS_REG_COMMAND, IPMI_KCS_CONTROL_CODE_WRITE_END); + + // Step 13. wait for IBF to get clear + Status =3D WaitStatusClear (IPMI_KCS_IBF); + if (EFI_ERROR (Status)) { + FreePool (Buffer); + return Status; + } + + // Step 14. check state it should be WRITE_STATE, else exit with error + if (IPMI_KCS_GET_STATE (KcsRegisterRead8 (KCS_REG_STATUS)) !=3D IPMI_KCS= _WRITE_STATE) { + FreePool (Buffer); + return EFI_NOT_READY; + } + + // Step 15 + if (EFI_ERROR (ClearOBF ())) { + FreePool (Buffer); + return EFI_NOT_READY; + } + + // Step 16, write the last byte + KcsRegisterWrite8 (KCS_REG_DATA_OUT, *BufferPtr); + FreePool (Buffer); + return EFI_SUCCESS; +} + +/** + This function sends/receives data from KCS port. + Algorithm is based on flow chart provided in IPMI spec 2.0 + Figure 9-7, KCS Interface BMC to SMS Read Transfer Flow Chart + + @param [in] DataBytes Buffer to hold the read Data. + @param [in, out] Length Number of Bytes read from KCS po= rt. + @retval EFI_SUCCESS The command byte stream was + successfully submit to the devic= e and + a response was successfully rece= ived. + @retval EFI_NOT_FOUND The command was not successfully= sent + to the device or a response was = not + successfully received from the + device. + @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi + command access. + @retval EFI_DEVICE_ERROR Ipmi Device hardware error. + @retval EFI_TIMEOUT The command time out. + @retval EFI_UNSUPPORTED The command was not successfully= set + to the device. + @retval EFI_OUT_OF_RESOURCES The resource allocation is out of + resource or data size error. +**/ +EFI_STATUS +KcsTransportRead ( + OUT UINT8 *DataByte, + IN OUT UINT32 *Length + ) +{ + EFI_STATUS Status; + UINT32 ReadLength; + + ReadLength =3D 0; + while (ReadLength < *Length) { + // Step 1. wait for IBF to get clear + Status =3D WaitStatusClear (IPMI_KCS_IBF); + if (EFI_ERROR (Status)) { + *Length =3D ReadLength; + return Status; + } + + // Step 2. check state it should be READ_STATE, else exit with error + if (IPMI_KCS_GET_STATE (KcsRegisterRead8 (KCS_REG_STATUS)) =3D=3D IPMI= _KCS_READ_STATE) { + // Step 2.1.1 check of OBF to get clear + Status =3D WaitStatusSet (IPMI_KCS_OBF); + if (EFI_ERROR (Status)) { + *Length =3D ReadLength; + return Status; + } + + // Step 2.1.2 read data from data out + DataByte[ReadLength++] =3D KcsRegisterRead8 (KCS_REG_DATA_IN); + Status =3D WaitStatusClear (IPMI_KCS_IBF); + if (EFI_ERROR (Status)) { + *Length =3D ReadLength; + return Status; + } + + // Step 2.1.3 Write READ byte to data in register. + KcsRegisterWrite8 (KCS_REG_DATA_OUT, IPMI_KCS_CONTROL_CODE_READ); + } else if (IPMI_KCS_GET_STATE (KcsRegisterRead8 (KCS_REG_STATUS)) =3D= =3D IPMI_KCS_IDLE_STATE) { + // Step 2.2.1 + Status =3D WaitStatusSet (IPMI_KCS_OBF); + if (EFI_ERROR (Status)) { + *Length =3D ReadLength; + return Status; + } + + // Step 2.2.2 read dummy data + KcsRegisterRead8 (KCS_REG_DATA_IN); // Dummy read as per IPMI spec + *Length =3D ReadLength; + return EFI_SUCCESS; + } else { + *Length =3D ReadLength; + return EFI_DEVICE_ERROR; + } + } + + *Length =3D ReadLength; + return EFI_SUCCESS; +} + +/** + This service communicates with BMC using KCS protocol. + + @param[in] NetFunction Net function of the command. + @param[in] Command IPMI Command. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Data. + @param[out] ResponseData Command Response Data. The complet= ion + code is the first byte of response + data. + @param[in, out] ResponseDataSize Size of Command Response Data. + + @retval EFI_SUCCESS The command byte stream was + successfully submit to the device = and a + response was successfully received. + @retval EFI_NOT_FOUND The command was not successfully s= ent + to the device or a response was not + successfully received from the dev= ice. + @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi + command access. + @retval EFI_DEVICE_ERROR Ipmi Device hardware error. + @retval EFI_TIMEOUT The command time out. + @retval EFI_UNSUPPORTED The command was not successfully s= ent to + the device. + @retval EFI_OUT_OF_RESOURCES The resource allocation is out of + resource or data size error. +**/ +EFI_STATUS +EFIAPI +KcsTransportSendCommand ( + IN UINT8 NetFunction, + IN UINT8 Command, + IN UINT8 *RequestData, + IN UINT32 RequestDataSize, + OUT UINT8 *ResponseData, + IN OUT UINT32 *ResponseDataSize + ) +{ + EFI_STATUS Status; + UINT32 RspHeaderSize; + IPMI_KCS_RESPONSE_HEADER RspHeader; + + if ((RequestData !=3D NULL) && (RequestDataSize <=3D 0)) { + return EFI_INVALID_PARAMETER; + } + + Status =3D KcsTransportWrite ( + (NetFunction << 2), + Command, + RequestData, + RequestDataSize + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "IPMI KCS Write Failed with Status(%r) for NetFunction(0x%x)," \ + " Command(0x%x).\n", + Status, + NetFunction, + Command + )); + return Status; + } + + // + // Read the response header + RspHeaderSize =3D sizeof (IPMI_KCS_RESPONSE_HEADER); + Status =3D KcsTransportRead ((UINT8 *)&RspHeader, &RspHeaderSize); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "IPMI KCS read response header failed Status(%r), " \ + "RspNetFunctionLun =3D 0x%x, " \ + "Comamnd =3D 0x%x \n", + Status, + RspHeader.NetFunc, + RspHeader.Command + )); + return (Status); + } + + Status =3D KcsTransportRead ((UINT8 *)ResponseData, ResponseDataSize); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "IPMI KCS response read Failed with Status(%r) for NetFunction(0x%x)= ," \ + " Command(0x%x).\n", + Status, + NetFunction, + Command + )); + } + + return Status; +} + +/** + This function reads 8-bit value from register address. + + @param[in] Address This represents either 16-bit IO a= ddress + or 32-bit memory mapped address. + + @retval UINT8 8-bit value. +**/ +UINT8 +KcsRegisterRead8 ( + MANAGEABILITY_TRANSPORT_HARDWARE_IO Address + ) +{ + UINT8 Value; + + if (mKcsHardwareInfo.MemoryMap =3D=3D MANAGEABILITY_TRANSPORT_KCS_MEMORY= _MAP_IO) { + // Read 8-bit value from 32-bit Memory mapped address. + Value =3D MmioRead8 ((UINTN)Address.IoAddress32); + } else { + // Read 8-bit value from 16-bit I/O address + Value =3D IoRead8 ((UINTN)Address.IoAddress16); + } + + return Value; +} + +/** + This function writes 8-bit value to register address. + + @param[in] Address This represents either 16-bit IO a= ddress + or 32-bit memory mapped address. + @param[in] Value 8-bit value write to register addr= ess + + @retval UINT8 8-bit value. +**/ +VOID +KcsRegisterWrite8 ( + MANAGEABILITY_TRANSPORT_HARDWARE_IO Address, + UINT8 Value + ) +{ + if (mKcsHardwareInfo.MemoryMap =3D=3D MANAGEABILITY_TRANSPORT_KCS_MEMORY= _MAP_IO) { + // Write 8-bit value to 32-bit Memory mapped address. + MmioWrite8 ((UINTN)Address.IoAddress32, Value); + } else { + // Write 8-bit value to 16-bit I/O address + IoWrite8 ((UINTN)Address.IoAddress16, Value); + } +} diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib= /Dxe/ManageabilityTransportKcs.c b/Features/ManageabilityPkg/Library/Manage= abilityTransportKcsLib/Dxe/ManageabilityTransportKcs.c new file mode 100644 index 0000000000..7eb39ddc7a --- /dev/null +++ b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/Ma= nageabilityTransportKcs.c @@ -0,0 +1,384 @@ +/** @file + + KCS instance of Manageability Transport Library + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ManageabilityTransportKcs.h" + +MANAGEABILITY_TRANSPORT_KCS *mSingleSessionToken =3D NULL; + +EFI_GUID *SupportedManageabilityProtocol[] =3D { + &gManageabilityProtocolIpmiGuid, + &gManageabilityProtocolMctpGuid +}; + +UINT8 NumberOfSupportedProtocol =3D (sizeof (SupportedManageabilityProtoc= ol)/sizeof (EFI_GUID *)); + +MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO mKcsHardwareInfo; + +/** + This function initializes the transport interface. + + @param [in] TransportToken The transport token acquired throu= gh + AcquireTransportSession function. + @param [in] HardwareInfo The hardware information + assigned to KCS transport interfac= e. + + @retval EFI_SUCCESS Transport interface is initialized + successfully. + @retval EFI_INVALID_PARAMETER The invalid transport token. + @retval EFI_NOT_READY The transport interface works fine= but + @retval is not ready. + @retval EFI_DEVICE_ERROR The transport interface has proble= ms. + @retval EFI_ALREADY_STARTED Teh protocol interface has already= initialized. + @retval Otherwise Other errors. + +**/ +EFI_STATUS +EFIAPI +KcsTransportInit ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + IN MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION HardwareInfo OPTIONAL + ) +{ + CHAR16 *ManageabilityProtocolName; + + if (TransportToken =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__)); + return EFI_INVALID_PARAMETER; + } + + if (HardwareInfo.Kcs =3D=3D NULL) { + DEBUG ((DEBUG_INFO, "%a: Hardware information is not provided, use dfa= ult settings.\n", __FUNCTION__)); + mKcsHardwareInfo.MemoryMap =3D MANAGEABILITY_TRANSP= ORT_KCS_IO_MAP_IO; + mKcsHardwareInfo.IoBaseAddress.IoAddress16 =3D PcdGet16 (PcdIpmiKcs= BaseAddress); + mKcsHardwareInfo.IoDataInAddress.IoAddress16 =3D mKcsHardwareInfo.IoB= aseAddress.IoAddress16 + IPMI_KCS_DATA_IN_REGISTER_OFFSET; + mKcsHardwareInfo.IoDataOutAddress.IoAddress16 =3D mKcsHardwareInfo.IoB= aseAddress.IoAddress16 + IPMI_KCS_DATA_OUT_REGISTER_OFFSET; + mKcsHardwareInfo.IoCommandAddress.IoAddress16 =3D mKcsHardwareInfo.IoB= aseAddress.IoAddress16 + IPMI_KCS_COMMAND_REGISTER_OFFSET; + mKcsHardwareInfo.IoStatusAddress.IoAddress16 =3D mKcsHardwareInfo.IoB= aseAddress.IoAddress16 + IPMI_KCS_STATUS_REGISTER_OFFSET; + } else { + mKcsHardwareInfo.MemoryMap =3D ((MANAGEABILITY_TRANSPORT_KCS_HA= RDWARE_INFO *)HardwareInfo.Kcs)->MemoryMap; + mKcsHardwareInfo.IoBaseAddress =3D ((MANAGEABILITY_TRANSPORT_KCS_HA= RDWARE_INFO *)HardwareInfo.Kcs)->IoBaseAddress; + mKcsHardwareInfo.IoDataInAddress =3D ((MANAGEABILITY_TRANSPORT_KCS_HA= RDWARE_INFO *)HardwareInfo.Kcs)->IoDataInAddress; + mKcsHardwareInfo.IoDataOutAddress =3D ((MANAGEABILITY_TRANSPORT_KCS_HA= RDWARE_INFO *)HardwareInfo.Kcs)->IoDataOutAddress; + mKcsHardwareInfo.IoCommandAddress =3D ((MANAGEABILITY_TRANSPORT_KCS_HA= RDWARE_INFO *)HardwareInfo.Kcs)->IoCommandAddress; + mKcsHardwareInfo.IoStatusAddress =3D ((MANAGEABILITY_TRANSPORT_KCS_HA= RDWARE_INFO *)HardwareInfo.Kcs)->IoStatusAddress; + } + + // Get protocol specification name. + ManageabilityProtocolName =3D HelperManageabilitySpecName (TransportToke= n->ManageabilityProtocolSpecification); + + DEBUG ((DEBUG_INFO, "%a: KCS transport hardware for %s is:\n", __FUNCTIO= N__, ManageabilityProtocolName)); + if (mKcsHardwareInfo.MemoryMap) { + DEBUG ((DEBUG_INFO, "Memory Map I/O\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "Base Memory Address : 0x%08x\n", mKcsHardwareInfo= .IoBaseAddress.IoAddress32)); + DEBUG ((DEBUG_INFO, "Data in Address : 0x%08x\n", mKcsHardwareInfo= .IoDataInAddress.IoAddress32)); + DEBUG ((DEBUG_INFO, "Data out Address : 0x%08x\n", mKcsHardwareInfo= .IoDataOutAddress.IoAddress32)); + DEBUG ((DEBUG_INFO, "Command Address : 0x%08x\n", mKcsHardwareInfo= .IoCommandAddress.IoAddress32)); + DEBUG ((DEBUG_INFO, "Status Address : 0x%08x\n", mKcsHardwareInfo= .IoStatusAddress.IoAddress32)); + } else { + DEBUG ((DEBUG_INFO, "I/O Map I/O\n")); + DEBUG ((DEBUG_INFO, "Base I/O port : 0x%04x\n", mKcsHardwareInfo.Io= BaseAddress.IoAddress16)); + DEBUG ((DEBUG_INFO, "Data in I/O port : 0x%04x\n", mKcsHardwareInfo.Io= DataInAddress.IoAddress16)); + DEBUG ((DEBUG_INFO, "Data out I/O port: 0x%04x\n", mKcsHardwareInfo.Io= DataOutAddress.IoAddress16)); + DEBUG ((DEBUG_INFO, "Command I/O port : 0x%04x\n", mKcsHardwareInfo.Io= CommandAddress.IoAddress16)); + DEBUG ((DEBUG_INFO, "Status I/O port : 0x%04x\n", mKcsHardwareInfo.Io= StatusAddress.IoAddress16)); + } + + return EFI_SUCCESS; +} + +/** + This function returns the transport interface status. + The generic EFI_STATUS is returned to caller directly, The additional + information of transport interface could be optionally returned in + TransportAdditionalStatus to describes the status that can't be + described obviously through EFI_STATUS. + See the definition of MANAGEABILITY_TRANSPORT_STATUS. + + @param [in] TransportToken The transport token acquired th= rough + AcquireTransportSession functio= n. + @param [out] TransportAdditionalStatus The additional status of transp= ort + interface. + NULL means no additional status= of this + transport interface. + + @retval EFI_SUCCESS Transport interface status is retu= rned. + @retval EFI_INVALID_PARAMETER The invalid transport token. + @retval EFI_DEVICE_ERROR The transport interface has proble= ms to return + @retval EFI_UNSUPPORTED The transport interface doesn't ha= ve status report. + Otherwise Other errors. + +**/ +EFI_STATUS +EFIAPI +KcsTransportStatus ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS *TransportAdditionalStatu= s OPTIONAL + ) +{ + UINT8 TransportStatus; + + if (TransportToken =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__)); + return EFI_INVALID_PARAMETER; + } + + if (TransportAdditionalStatus =3D=3D NULL) { + return EFI_SUCCESS; + } + + TransportStatus =3D IPMI_KCS_GET_STATE (KcsRegisterRead8 (KCS= _REG_STATUS)); + *TransportAdditionalStatus =3D MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS= _NO_ERRORS; + if (TransportStatus !=3D IPMI_KCS_IDLE_STATE) { + if (TransportStatus =3D=3D IPMI_KCS_READ_STATE) { + // + // Transport is in read state. + *TransportAdditionalStatus |=3D MANAGEABILITY_TRANSPORT_ADDITIONAL_S= TATUS_BUSY_IN_READ; + return EFI_NOT_READY; + } else if (TransportStatus =3D=3D IPMI_KCS_WRITE_STATE) { + // + // Transport is in read state. + *TransportAdditionalStatus |=3D MANAGEABILITY_TRANSPORT_ADDITIONAL_S= TATUS_BUSY_IN_WRITE; + return EFI_NOT_READY; + } else { + return EFI_DEVICE_ERROR; + } + } + + return EFI_SUCCESS; +} + +/** + This function resets the transport interface. + The generic EFI_STATUS is returned to caller directly after reseting tra= nsport + interface. The additional information of transport interface could be op= tionally + returned in TransportAdditionalStatus to describes the status that can't= be + described obviously through EFI_STATUS. + See the definition of MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS. + + @param [in] TransportToken The transport token acquired th= rough + AcquireTransportSession functio= n. + @param [out] TransportAdditionalStatus The additional status of specif= ic transport + interface after the reset. + NULL means no additional status= of this + transport interface. + + @retval EFI_SUCCESS Transport interface status is retu= rned. + @retval EFI_INVALID_PARAMETER The invalid transport token. + @retval EFI_TIMEOUT The reset process is time out. + @retval EFI_DEVICE_ERROR The transport interface has proble= ms to return + status. + Otherwise Other errors. + +**/ +EFI_STATUS +EFIAPI +KcsTransportReset ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS *TransportAdditionalStatu= s OPTIONAL + ) +{ + return EFI_UNSUPPORTED; +} + +/** + This function transmit the request over target transport interface. + The generic EFI_STATUS is returned to caller directly after reseting tra= nsport + interface. The additional information of transport interface could be op= tionally + returned in TransportAdditionalStatus to describes the status that can't= be + described obviously through EFI_STATUS. + See the definition of MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS. + + @param [in] TransportToken The transport token acquired throu= gh + AcquireTransportSession function. + @param [in] TransferToken The transfer token, see the defini= tion of + MANAGEABILITY_TRANSFER_TOKEN. + + @retval The EFI status is returned in MANAGEABILITY_TRANSFER_TOKEN. + +**/ +VOID +EFIAPI +KcsTransportTransmitReceive ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + IN MANAGEABILITY_TRANSFER_TOKEN *TransferToken + ) +{ + EFI_STATUS Status; + MANAGEABILITY_IPMI_TRANSPORT_HEADER *TransmitHeader; + + if (TransportToken =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__)); + return; + } + + TransmitHeader =3D (MANAGEABILITY_IPMI_TRANSPORT_HEADER *)TransferToken-= >TransmitHeader; + if (TransmitHeader =3D=3D NULL) { + TransferToken->TransferStatus =3D EFI_INVALID_PARAMETER; + return; + } + + Status =3D KcsTransportSendCommand ( + TransmitHeader->NetFn, + TransmitHeader->Command, + TransferToken->TransmitPackage.TransmitPayload, + TransferToken->TransmitPackage.TransmitSizeInByte, + TransferToken->ReceivePackage.ReceiveBuffer, + &TransferToken->ReceivePackage.ReceiveSizeInByte + ); + + TransferToken->TransferStatus =3D Status; + KcsTransportStatus (TransportToken, &TransferToken->TransportAdditionalS= tatus); +} + +/** + This function acquires to create a transport session to transmit managea= bility + packet. A transport token is returned to caller for the follow up operat= ions. + + @param [in] ManageabilityProtocolSpec The protocol spec the transport= interface is acquired. + @param [out] TransportToken The pointer to receive the tran= sport token created by + the target transport interface = library. + @retval EFI_SUCCESS Token is created successfully. + @retval EFI_OUT_OF_RESOURCES Out of resource to create a new= transport session. + @retval EFI_UNSUPPORTED Protocol is not supported on th= is transport interface. + @retval Otherwise Other errors. + +**/ +EFI_STATUS +AcquireTransportSession ( + IN EFI_GUID *ManageabilityProtocolSpec, + OUT MANAGEABILITY_TRANSPORT_TOKEN **TransportToken + ) +{ + EFI_STATUS Status; + MANAGEABILITY_TRANSPORT_KCS *KcsTransportToken; + + if (ManageabilityProtocolSpec =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification spec= ified.\n", __FUNCTION__)); + return EFI_INVALID_PARAMETER; + } + + Status =3D HelperManageabilityCheckSupportedSpec ( + &gManageabilityTransportKcsGuid, + SupportedManageabilityProtocol, + NumberOfSupportedProtocol, + ManageabilityProtocolSpec + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport = interface.\n", __FUNCTION__)); + return EFI_UNSUPPORTED; + } + + if (mSingleSessionToken !=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only su= pports one session transport token.\n", __FUNCTION__)); + return EFI_OUT_OF_RESOURCES; + } + + KcsTransportToken =3D AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_= KCS)); + if (KcsTransportToken =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TR= ANSPORT_KCS\n", __FUNCTION__)); + return EFI_OUT_OF_RESOURCES; + } + KcsTransportToken->Token.Transport =3D AllocateZeroPool (sizeof (MANAGEA= BILITY_TRANSPORT)); + if (KcsTransportToken->Token.Transport =3D=3D NULL) { + FreePool (KcsTransportToken); + DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TR= ANSPORT\n", __FUNCTION__)); + return EFI_OUT_OF_RESOURCES; + } + + KcsTransportToken->Signature = =3D MANAGEABILITY_TRANSPORT_KCS_SIGNATURE; + KcsTransportToken->Token.ManageabilityProtocolSpecification = =3D ManageabilityProtocolSpec; + KcsTransportToken->Token.Transport->TransportVersion = =3D MANAGEABILITY_TRANSPORT_TOKEN_VERSION; + KcsTransportToken->Token.Transport->ManageabilityTransportSpecification = =3D &gManageabilityTransportKcsGuid; + KcsTransportToken->Token.Transport->TransportName = =3D L"KCS"; + KcsTransportToken->Token.Transport->Function.Version1_0 = =3D AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_FUNCTION_V1_0)); + if (KcsTransportToken->Token.Transport->Function.Version1_0 =3D=3D NULL)= { + DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TR= ANSPORT_FUNCTION_V1_0\n", __FUNCTION__)); + FreePool (KcsTransportToken); + FreePool (KcsTransportToken->Token.Transport); + return EFI_OUT_OF_RESOURCES; + } + + KcsTransportToken->Token.Transport->Function.Version1_0->TransportInit = =3D KcsTransportInit; + KcsTransportToken->Token.Transport->Function.Version1_0->TransportReset = =3D KcsTransportReset; + KcsTransportToken->Token.Transport->Function.Version1_0->TransportStatus= =3D KcsTransportStatus; + KcsTransportToken->Token.Transport->Function.Version1_0->TransportTransm= itReceive =3D KcsTransportTransmitReceive; + + mSingleSessionToken =3D KcsTransportToken; + *TransportToken =3D &KcsTransportToken->Token; + return EFI_SUCCESS; +} + +/** + This function returns the transport capabilities. + + @param [out] TransportFeature Pointer to receive transport capab= ilities. + See the definitions of + MANAGEABILITY_TRANSPORT_CAPABILITY. + +**/ +VOID +GetTransportCapability ( + OUT MANAGEABILITY_TRANSPORT_CAPABILITY *TransportCapability + ) +{ + if (TransportCapability !=3D NULL) { + *TransportCapability =3D 0; + } +} + +/** + This function releases the manageability session. + + @param [in] TransportToken The transport token acquired through + AcquireTransportSession. + @retval EFI_SUCCESS Token is released successfully. + @retval EFI_INVALID_PARAMETER Invalid TransportToken. + @retval Otherwise Other errors. + +**/ +EFI_STATUS +ReleaseTransportSession ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken + ) +{ + EFI_STATUS Status; + MANAGEABILITY_TRANSPORT_KCS *KcsTransportToken; + + if (TransportToken =3D=3D NULL) { + Status =3D EFI_INVALID_PARAMETER; + } + + KcsTransportToken =3D MANAGEABILITY_TRANSPORT_KCS_FROM_LINK (TransportTo= ken); + if (mSingleSessionToken !=3D KcsTransportToken) { + Status =3D EFI_INVALID_PARAMETER; + } + + if (KcsTransportToken !=3D NULL) { + FreePool (KcsTransportToken->Token.Transport->Function.Version1_0); + FreePool (KcsTransportToken->Token.Transport); + FreePool (KcsTransportToken); + mSingleSessionToken =3D NULL; + Status =3D EFI_SUCCESS; + } + + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Fail to release KCS transport token (%r).\n"= , __FUNCTION__, Status)); + } + + return Status; +} diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib= /Dxe/ManageabilityTransportKcs.uni b/Features/ManageabilityPkg/Library/Mana= geabilityTransportKcsLib/Dxe/ManageabilityTransportKcs.uni new file mode 100644 index 0000000000..61a3e8b588 --- /dev/null +++ b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/Ma= nageabilityTransportKcs.uni @@ -0,0 +1,13 @@ +// /** @file +// KCS instance of Manageability Transport Library +// +// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + +#string STR_MODULE_ABSTRACT #language en-US "KCS instance of M= anageability Transport Library" + +#string STR_MODULE_DESCRIPTION #language en-US "KCS Manageability= Transport library implementation." + --=20 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100870): https://edk2.groups.io/g/devel/message/100870 Mute This Topic: https://groups.io/mt/97473057/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 18:08:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+100871+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1678285049911205.281825054951; Wed, 8 Mar 2023 06:17:29 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id pkO8YY1788612xZ2hdyLjrxY; Wed, 08 Mar 2023 06:17:29 -0800 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web11.8271.1678285048612898019 for ; Wed, 08 Mar 2023 06:17:29 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gRFfnmsXV/KlbgAem/ySc4+aj6RSbFoSEggqmGWuuscD0B6jw95wqv10xnP6A8ACTBMUnTWatsIBPcnX8BlaJWeLcWWXOY51faRmQE6ndQMIMFz5Ib5reyErtvaIm+0JMGEEfeaqDdmmrJBJryAyYDjeYQMororpmEf2Fdug6yfe1yqmKDbnzAXtOB/5drr5qe40W9WVaGiXww1jwO7dGrqmbLhfU2lNR0LPl0vTR532X+PcZ+0xKSUJR/7DVGMHzKYiygDTTvcCsnkSkuLXsgvH8iLYEIJA8ZGXuB1p0LMZNLmVSGULuvAfLJTqM+1/mIQfbWTDf5nbUz1X1sNLwg== 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=Cx3TvwQjG591f5o+dGiXnLtRyGhusIZyhouYNe5Wwdk=; b=inMbdP2c66vUDHyyqfyYEAEIuemm2/TGixtHsUqkz2oC5lL0teUoBT4ehu8Wu/QkJSsXNZQqrUU/DwYsTpPojXk9bczItD7IwAbPWmZT1P2nf/Lw/l6kfx+Pbu+hAZpEB8UZ++ws4cDDB9KDR8mFntnr9U1myR8wvJa8EoaMbOkDmGfi9MNf1BwmapNXmgA0SJd4OdSh3oj4qJqMPe4aPq7bkPbrbV6onVBk4A58v0g0iM3xoAvoao6jxCYyfWsVzlPE4aed5mzapsxnoqCFb19TfbSB23EN+7owNYqJ8boQah0x6wLl1G4kmvUITlfEQ7NEnA/pUo8UQ210XjonwA== 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 X-Received: from CY5PR04CA0004.namprd04.prod.outlook.com (2603:10b6:930:1e::26) by CY8PR12MB7587.namprd12.prod.outlook.com (2603:10b6:930:9a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.16; Wed, 8 Mar 2023 14:17:24 +0000 X-Received: from CY4PEPF0000C97F.namprd02.prod.outlook.com (2603:10b6:930:1e:cafe::9) by CY5PR04CA0004.outlook.office365.com (2603:10b6:930:1e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18 via Frontend Transport; Wed, 8 Mar 2023 14:17:24 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+100871+1787277+3901457@groups.io; helo=mail02.groups.io; 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 X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000C97F.mail.protection.outlook.com (10.167.241.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.13 via Frontend Transport; Wed, 8 Mar 2023 14:17:24 +0000 X-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:17:21 -0600 From: "Chang, Abner via groups.io" To: CC: Liming Gao , Isaac Oram , Nate DeSimone , Abdul Lateef Attar , Nickle Wang , "Igor Kulchytskyy" Subject: [edk2-devel] [edk2-platforms][PATCH V2 6/8] ManageabilityPkg: Implement Ipmi Protocol/Ppi Date: Wed, 8 Mar 2023 22:16:45 +0800 Message-ID: <20230308141647.1318-7-abner.chang@amd.com> In-Reply-To: <20230308141647.1318-1-abner.chang@amd.com> References: <20230308141647.1318-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C97F:EE_|CY8PR12MB7587:EE_ X-MS-Office365-Filtering-Correlation-Id: 2fe02042-a1d7-4fe9-e04c-08db1fdfd6b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: B0mMHbOz4gAa+AqatDg9wlp2rLAhWEsVd98/6Npaijl3Ky9Kupj/h3F7s7NOxyyQTwXjKN09l627+YPkLOE0jFfZtR4ypNmNYzOfitOcq5I19SP6deYQfGXZxrbb3JePf2FIfob2Uf7D4fkI7SNvueh6jfeqrngTRLQlA+NmX17SowsFX3M84yLqeTQdekYLbA+HM/mNvRwry9thHssfk3VEit90utNKOU0BpuD0e9gj7ZMBcuBqZ2Ir9RMcOvUX+Nuu0VxoJ9rzCKP+SRZyO/1wqJDEt+HjWY8D69Ty3TLwSGYPuHCxv9/F0J9qKFhXIn6lFqXl8jQOupDowXFhyHGhZhBPUExGSGNcXpFlSbLX+6xJBKzhSOd8iqRSbHhFT4UyYfOg86Dp/HRvoNqRP4O2gtcwi7lUOyiORpHlTaaZZxXYldRTLKfpIe41VbN9Ot4ZzL4iP+Ico5wBgt1WjQCD7HjNQuw7bZhPd3T3Sg5eYITDkhMxXkByFo3Cowf+wImimhBkdSiXSCg3yMSb2+HDor82P8cSNlvOPVjx35pRhO0tr9O09dBo/t59tyaouRfSnQoU/jOGVryDI1UfOjhE2WyPE1pc5RhRV0rAne2veZNA2qU+yT2QHtk8zWVef2dbrBsHvRszJpUch1FQ345GV/0eu27gDadcbd0YNZGuSeQx/pjGk7xkm+caEnsLlpDtzUkWystRatC7MTpNuxVW3dFGuQgkT9/uWl97inln5UsDrHTNeSot+Ld+7IO5hNyqKLwPlBwosq3pQpNKBg== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 14:17:24.2308 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2fe02042-a1d7-4fe9-e04c-08db1fdfd6b4 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: CY4PEPF0000C97F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7587 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com X-Gm-Message-State: 2CWx9PY6OWUddCunqOHyZw8bx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1678285049; bh=YGBiO3ReA3GsiJEZpn1B/xKoL0lgZkbjjO/siVhnKKE=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=XVrSqWiHfD/odpk9WXAH9h7eeIS/a8ez0FnycMVAhKaBK/8fK/JwLuvUrnSeQ4x5N19 ENCPNiRgRr7jOMswsw+w7SMmJ7Fv8P3gbn14+AbR+dfMxjSuEDRIPXLr9+WBU2yxROrAV 3AVWZrp0pCmcnSlE3XJ8PuUvYPJdYXi/NTA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1678285051573100009 Content-Type: text/plain; charset="utf-8" From: Abner Chang Add Ipmi Protocol/Ppi/SMM implementations. The underlying implementation of transport interface depends on the binded ManageabilityTransportLib. Signed-off-by: Abner Chang Cc: Liming Gao Cc: Isaac Oram Cc: Nate DeSimone Cc: Abdul Lateef Attar Cc: Nickle Wang Cc: Igor Kulchytskyy --- .../IpmiProtocol/Dxe/IpmiProtocolDxe.inf | 50 ++++ .../Universal/IpmiProtocol/Pei/IpmiPpiPei.inf | 51 ++++ .../IpmiProtocol/Smm/IpmiProtocolSmm.inf | 52 ++++ .../IpmiProtocol/Common/IpmiProtocolCommon.h | 108 ++++++++ .../IpmiProtocol/Common/IpmiProtocolCommon.c | 247 ++++++++++++++++++ .../Universal/IpmiProtocol/Dxe/IpmiProtocol.c | 177 +++++++++++++ .../Universal/IpmiProtocol/Pei/IpmiPpi.c | 151 +++++++++++ .../Universal/IpmiProtocol/Smm/IpmiProtocol.c | 147 +++++++++++ 8 files changed, 983 insertions(+) create mode 100644 Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/Ip= miProtocolDxe.inf create mode 100644 Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/Ip= miPpiPei.inf create mode 100644 Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/Ip= miProtocolSmm.inf create mode 100644 Features/ManageabilityPkg/Universal/IpmiProtocol/Common= /IpmiProtocolCommon.h create mode 100644 Features/ManageabilityPkg/Universal/IpmiProtocol/Common= /IpmiProtocolCommon.c create mode 100644 Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/Ip= miProtocol.c create mode 100644 Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/Ip= miPpi.c create mode 100644 Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/Ip= miProtocol.c diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProto= colDxe.inf b/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProto= colDxe.inf new file mode 100644 index 0000000000..ff5ec56c73 --- /dev/null +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocolDxe.= inf @@ -0,0 +1,50 @@ +## @file +# IPMI Protocol DXE Driver. +# +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +[Defines] + INF_VERSION =3D 0x0001001d + BASE_NAME =3D IpmiDxe + FILE_GUID =3D BC41B0C2-9D8A-42B5-A28F-02CE0D4A6C28 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D DxeIpmiEntry + UNLOAD_IMAGE =3D IpmiUnloadImage + +# +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 +# + +[Sources] + IpmiProtocol.c + ../Common/IpmiProtocolCommon.c + ../Common/IpmiProtocolCommon.h + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + ManageabilityPkg/ManageabilityPkg.dec + +[LibraryClasses] + BaseMemoryLib + DebugLib + ManageabilityTransportHelperLib + ManageabilityTransportLib + UefiDriverEntryPoint + UefiBootServicesTableLib + +[Protocols] + gIpmiProtocolGuid # PROTOCOL ALWAYS_PRODUCED + +[Guids] + gManageabilityProtocolIpmiGuid + gManageabilityTransportKcsGuid + +[FixedPcd] + gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsBaseAddress + +[Depex] + TRUE diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpiPe= i.inf b/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpiPei.inf new file mode 100644 index 0000000000..058bfb63cb --- /dev/null +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpiPei.inf @@ -0,0 +1,51 @@ +## @file +# IPMI Protocol PEI Driver. +# +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +[Defines] + INF_VERSION =3D 0x0001001d + BASE_NAME =3D IpmiPei + FILE_GUID =3D 7832F989-CB72-4715-ADCA-35C0B031856C + MODULE_TYPE =3D PEIM + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D PeiIpmiEntry + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 +# + +[Sources] + IpmiPpi.c + ../Common/IpmiProtocolCommon.c + ../Common/IpmiProtocolCommon.h + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + ManageabilityPkg/ManageabilityPkg.dec + +[LibraryClasses] + BaseMemoryLib + DebugLib + ManageabilityTransportHelperLib + ManageabilityTransportLib + PeimEntryPoint + ManageabilityTransportLib + +[Ppis] + gPeiIpmiPpiGuid # PPI ALWAYS PRODUCED + +[Guids] + gManageabilityProtocolIpmiGuid + gManageabilityTransportKcsGuid + +[FixedPcd] + gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsBaseAddress + +[Depex] + TRUE diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProto= colSmm.inf b/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProto= colSmm.inf new file mode 100644 index 0000000000..cae1462f4f --- /dev/null +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocolSmm.= inf @@ -0,0 +1,52 @@ +## @file +# IPMI Protocol SMM Driver. +# +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 +# +[Defines] + INF_VERSION =3D 0x0001001d + BASE_NAME =3D IpmiSmm + FILE_GUID =3D CDD5D1DE-E3D3-4B1F-8689-DCC66156= 1BB4 + MODULE_TYPE =3D DXE_SMM_DRIVER + PI_SPECIFICATION_VERSION =3D 0x0001000A + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D SmmIpmiEntry + +[Sources] + IpmiProtocol.c + ../Common/IpmiProtocolCommon.c + ../Common/IpmiProtocolCommon.h + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + ManageabilityPkg/ManageabilityPkg.dec + +[LibraryClasses] + BaseMemoryLib + DebugLib + ManageabilityTransportHelperLib + ManageabilityTransportLib + SmmServicesTableLib + UefiDriverEntryPoint + UefiBootServicesTableLib + +[Protocols] + gSmmIpmiProtocolGuid # PROTOCOL ALWAYS_PRODUCED + +[Guids] + gManageabilityProtocolIpmiGuid + gManageabilityTransportKcsGuid + +[FixedPcd] + gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsBaseAddress + +[Depex] + TRUE diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiPr= otocolCommon.h b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/Ip= miProtocolCommon.h new file mode 100644 index 0000000000..39684d0617 --- /dev/null +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolC= ommon.h @@ -0,0 +1,108 @@ +/** @file + + IPMI Manageability Protocol common header file. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef MANAGEABILITY_IPMI_COMMON_H_ +#define MANAGEABILITY_IPMI_COMMON_H_ + +#include +#include + +/// +/// IPMI KCS hardware information. +/// +#define IPMI_KCS_BASE_ADDRESS PcdGet16 (PcdIpmiKcsBaseAddress) +#define IPMI_KCS_REG_DATA_IN IPMI_KCS_BASE_ADDRESS + IPMI_KCS_DATA_IN_RE= GISTER_OFFSET +#define IPMI_KCS_REG_DATA_OUT IPMI_KCS_BASE_ADDRESS + IPMI_KCS_DATA_OUT_R= EGISTER_OFFSET +#define IPMI_KCS_REG_COMMAND IPMI_KCS_BASE_ADDRESS + IPMI_KCS_COMMAND_RE= GISTER_OFFSET +#define IPMI_KCS_REG_STATUS IPMI_KCS_BASE_ADDRESS + IPMI_KCS_STATUS_REG= ISTER_OFFSET + +/** + This functions setup the IPMI transport hardware information according + to the specification of transport token acquired from transport library. + + @param[in] TransportToken The transport interface. + @param[out] HardwareInformation Pointer to receive the hardware = information. + + @retval EFI_SUCCESS Hardware information is returned in Hardw= areInformation. + Caller must free the memory allocated for= HardwareInformation + once it doesn't need it. + @retval EFI_UNSUPPORTED No hardware information for the specifica= tion specified + in the transport token. +**/ +EFI_STATUS +SetupIpmiTransportHardwareInformation ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + OUT MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION *HardwareInformation + ); + +/** + This functions setup the final header/body/trailer packets for + the acquired transport interface. + + @param[in] TransportToken The transport interface. + @param[in] NetFunction IPMI function. + @param[in] Command IPMI command. + @param[out] PacketHeader The pointer to receive header of requ= est. + @param[in, out] PacketBody The request body. + When IN, it is the caller's request b= ody. + When OUT and NULL, the request body i= s not + changed. + Whee out and non-NULL, the request bo= dy is + changed to comfort the transport inte= rface. + @param[in, out] PacketBodySize The request body size. + When IN and non-zero, it is the new d= ata + length of request body. + When IN and zero, the request body is= unchanged. + @param[out] PacketTrailer The pointer to receive trailer of req= uest. + + @retval EFI_SUCCESS Request packet is returned. + @retval EFI_UNSUPPORTED Request packet is not returned because + the unsupported transport interface. +**/ +EFI_STATUS +SetupIpmiRequestTransportPacket ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + IN UINT8 NetFunction, + IN UINT8 Command, + OUT MANAGEABILITY_TRANSPORT_HEADER *PacketHeader, + IN OUT UINT8 **PacketBody, + IN OUT UINT32 *PacketBodySize, + OUT MANAGEABILITY_TRANSPORT_TRAILER *PacketTrailer + ); + +/** + Common code to submit IPMI commands + + @param[in] TransportToken TRansport token. + @param[in] NetFunction Net function of the command. + @param[in] Command IPMI Command. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Data. + @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data. + @param[in, out] ResponseDataSize Size of Command Response Data. + + @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received. + @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device. + @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi command= access. + @retval EFI_DEVICE_ERROR Ipmi Device hardware error. + @retval EFI_TIMEOUT The command time out. + @retval EFI_UNSUPPORTED The command was not successfully sent to = the device. + @retval EFI_OUT_OF_RESOURCES The resource allocation is out of resourc= e or data size error. +**/ +EFI_STATUS +CommonIpmiSubmitCommand ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + IN UINT8 NetFunction, + IN UINT8 Command, + IN UINT8 *RequestData, + IN UINT32 RequestDataSize, + OUT UINT8 *ResponseData, + IN OUT UINT32 *ResponseDataSize + ); + +#endif diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiPr= otocolCommon.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/Ip= miProtocolCommon.c new file mode 100644 index 0000000000..8e9dd7bf9d --- /dev/null +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolC= ommon.c @@ -0,0 +1,247 @@ +/** @file + + IPMI Manageability Protocol common file. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#include +#include +#include +#include +#include +#include + +#include "IpmiProtocolCommon.h" + +extern CHAR16 *mTransportName; + +MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION mHardwareInformation; + +/** + This functions setup the IPMI transport hardware information according + to the specification of transport token acquired from transport library. + + @param[in] TransportToken The transport interface. + @param[out] HardwareInformation Pointer to receive the hardware = information. + + @retval EFI_SUCCESS Hardware information is returned in Hardw= areInformation. + Caller must free the memory allocated for= HardwareInformation + once it doesn't need it. + @retval EFI_UNSUPPORTED No hardware information for the specifica= tion specified + in the transport token. + #retval EFI_OUT_OF_RESOURCES Not enough memory for MANAGEABILITY_TRANS= PORT_KCS_HARDWARE_INFO. +**/ +EFI_STATUS +SetupIpmiTransportHardwareInformation ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + OUT MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION *HardwareInformation + ) +{ + MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO *KcsHardwareInfo; + + KcsHardwareInfo =3D AllocatePool (sizeof (MANAGEABILITY_TRANSPORT_KCS_HA= RDWARE_INFO)); + if (KcsHardwareInfo =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_TRANSPOR= T_KCS_HARDWARE_INFO.\n", __FUNCTION__)); + return EFI_OUT_OF_RESOURCES; + } + + if (CompareGuid (&gManageabilityTransportKcsGuid, TransportToken->Transp= ort->ManageabilityTransportSpecification)) { + // This is KCS transport interface. + KcsHardwareInfo->MemoryMap =3D MANAGEABILITY_TRANSP= ORT_KCS_IO_MAP_IO; + KcsHardwareInfo->IoBaseAddress.IoAddress16 =3D IPMI_KCS_BASE_ADDRES= S; + KcsHardwareInfo->IoDataInAddress.IoAddress16 =3D IPMI_KCS_REG_DATA_IN; + KcsHardwareInfo->IoDataOutAddress.IoAddress16 =3D IPMI_KCS_REG_DATA_OU= T; + KcsHardwareInfo->IoCommandAddress.IoAddress16 =3D IPMI_KCS_REG_COMMAND; + KcsHardwareInfo->IoStatusAddress.IoAddress16 =3D IPMI_KCS_REG_STATUS; + *HardwareInformation =3D + (MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION)KcsHardwareInfo; + return EFI_SUCCESS; + } else { + DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware inform= ation.", __FUNCTION__)); + ASSERT (FALSE); + } + + return EFI_UNSUPPORTED; +} + +/** + This functions setup the final header/body/trailer packets for + the acquired transport interface. + + @param[in] TransportToken The transport interface. + @param[in] NetFunction IPMI function. + @param[in] Command IPMI command. + @param[out] PacketHeader The pointer to receive header of requ= est. + @param[in, out] PacketBody The request body. + When IN, it is the caller's request b= ody. + When OUT and NULL, the request body i= s not + changed. + When OUT and non-NULL, the request bo= dy is + changed to conform the transport inte= rface. + @param[in, out] PacketBodySize The request body size. + When OUT and non-zero, it is the new = data + length of request body. + When OUT and zero, the request body i= s unchanged. + @param[out] PacketTrailer The pointer to receive trailer of req= uest. + + @retval EFI_SUCCESS Request packet is returned. + @retval EFI_UNSUPPORTED Request packet is not returned because + the unsupported transport interface. +**/ +EFI_STATUS +SetupIpmiRequestTransportPacket ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + IN UINT8 NetFunction, + IN UINT8 Command, + OUT MANAGEABILITY_TRANSPORT_HEADER *PacketHeader, + IN OUT UINT8 **PacketBody, + IN OUT UINT32 *PacketBodySize, + OUT MANAGEABILITY_TRANSPORT_TRAILER *PacketTrailer + ) +{ + MANAGEABILITY_IPMI_TRANSPORT_HEADER *IpmiHeader; + + if (CompareGuid (&gManageabilityTransportKcsGuid, TransportToken->Transp= ort->ManageabilityTransportSpecification)) { + // This is KCS transport interface. + IpmiHeader =3D AllocateZeroPool (sizeof (MANAGEABILITY_IPMI_TRANSPORT_= HEADER)); + if (IpmiHeader =3D=3D NULL) { + return EFI_OUT_OF_RESOURCES; + } + + IpmiHeader->Command =3D Command; + IpmiHeader->Lun =3D 0; + IpmiHeader->NetFn =3D NetFunction; + *PacketHeader =3D (MANAGEABILITY_TRANSPORT_HEADER *)IpmiHeader; + *PacketTrailer =3D NULL; + *PacketBody =3D NULL; + *PacketBodySize =3D 0; + } else { + DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.", _= _FUNCTION__)); + ASSERT (FALSE); + } + + return EFI_SUCCESS; +} + +/** + Common code to submit IPMI commands + + @param[in] TransportToken TRansport token. + @param[in] NetFunction Net function of the command. + @param[in] Command IPMI Command. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Data. + @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data. + @param[in, out] ResponseDataSize Size of Command Response Data. + + @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received. + @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device. + @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi command= access. + @retval EFI_DEVICE_ERROR Ipmi Device hardware error. + @retval EFI_TIMEOUT The command time out. + @retval EFI_UNSUPPORTED The command was not successfully sent to = the device. + @retval EFI_OUT_OF_RESOURCES The resource allocation is out of resourc= e or data size error. +**/ +EFI_STATUS +CommonIpmiSubmitCommand ( + IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, + IN UINT8 NetFunction, + IN UINT8 Command, + IN UINT8 *RequestData, + IN UINT32 RequestDataSize, + OUT UINT8 *ResponseData, + IN OUT UINT32 *ResponseDataSize + ) +{ + EFI_STATUS Status; + UINT8 *ThisRequestData; + UINT32 ThisRequestDataSize; + MANAGEABILITY_TRANSFER_TOKEN TransferToken; + MANAGEABILITY_TRANSPORT_HEADER IpmiTransportHeader; + MANAGEABILITY_TRANSPORT_TRAILER IpmiTransportTrailer; + MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS TransportAdditionalStatus; + + if (TransportToken =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: No transport toke for IPMI\n", __FUNCTION__)= ); + return EFI_UNSUPPORTED; + } + + Status =3D TransportToken->Transport->Function.Version1_0->TransportStat= us ( + TransportToke= n, + &TransportAdd= itionalStatus + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Transport %s for IPMI has problem - (%r)\n",= __FUNCTION__, mTransportName, Status)); + return Status; + } + + ThisRequestData =3D RequestData; + ThisRequestDataSize =3D RequestDataSize; + IpmiTransportHeader =3D NULL; + IpmiTransportTrailer =3D NULL; + Status =3D SetupIpmiRequestTransportPacket ( + TransportToken, + NetFunction, + Command, + &IpmiTransportHeader, + &ThisRequestData, + &ThisRequestDataSize, + &IpmiTransportTrailer + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __FUNCTION_= _, Status)); + return Status; + } + + ZeroMem (&TransferToken, sizeof (MANAGEABILITY_TRANSFER_TOKEN)); + TransferToken.TransmitHeader =3D IpmiTransportHeader; + TransferToken.TransmitTrailer =3D IpmiTransportTrailer; + + // Transmit packet. + if ((ThisRequestData =3D=3D NULL) || (ThisRequestDataSize =3D=3D 0)) { + + // Transmit parameter were not changed by SetupIpmiRequestTransportPac= ket(). + TransferToken.TransmitPackage.TransmitPayload =3D RequestData; + TransferToken.TransmitPackage.TransmitSizeInByte =3D RequestDataSize; + } else { + TransferToken.TransmitPackage.TransmitPayload =3D ThisRequestData; + TransferToken.TransmitPackage.TransmitSizeInByte =3D ThisRequestDataSi= ze; + } + + TransferToken.TransmitPackage.TransmitTimeoutInMillisecond =3D MANAGEABI= LITY_TRANSPORT_NO_TIMEOUT; + + // Receive packet. + TransferToken.ReceivePackage.ReceiveBuffer =3D ResponseDa= ta; + TransferToken.ReceivePackage.ReceiveSizeInByte =3D *ResponseD= ataSize; + TransferToken.ReceivePackage.TransmitTimeoutInMillisecond =3D MANAGEABIL= ITY_TRANSPORT_NO_TIMEOUT; + TransportToken->Transport->Function.Version1_0->TransportTransmitReceive= ( + TransportToken, + &TransferToken + ); + + if (IpmiTransportHeader !=3D NULL) { + FreePool ((VOID *)IpmiTransportHeader); + } + + if (IpmiTransportTrailer !=3D NULL) { + FreePool ((VOID *)IpmiTransportTrailer); + } + + if (ThisRequestData !=3D NULL) { + FreePool ((VOID *)ThisRequestData); + } + + // Return transfer status. + // + Status =3D TransferToken.TransferStatus; + TransportAdditionalStatus =3D TransferToken.TransportAdditionalStatus; + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Failed to send IPMI command over %s\n", __FU= NCTION__, mTransportName)); + return Status; + } + + *ResponseDataSize =3D TransferToken.ReceivePackage.ReceiveSizeInByte; + return Status; +} diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProto= col.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c new file mode 100644 index 0000000000..6d3720581c --- /dev/null +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c @@ -0,0 +1,177 @@ +/** @file + This file provides IPMI Protocol implementation. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "IpmiProtocolCommon.h" + +MANAGEABILITY_TRANSPORT_TOKEN *mTransportToken =3D NULL; +CHAR16 *mTransportName; + +extern MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION mHardwareInformation; + +/** + This service enables submitting commands via Ipmi. + + @param[in] This This point for IPMI_PROTOCOL struct= ure. + @param[in] NetFunction Net function of the command. + @param[in] Command IPMI Command. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Data. + @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data. + @param[in, out] ResponseDataSize Size of Command Response Data. + + @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received. + @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device. + @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi command= access. + @retval EFI_DEVICE_ERROR Ipmi Device hardware error. + @retval EFI_TIMEOUT The command time out. + @retval EFI_UNSUPPORTED The command was not successfully sent to = the device. + @retval EFI_OUT_OF_RESOURCES The resource allocation is out of resourc= e or data size error. +**/ +EFI_STATUS +EFIAPI +DxeIpmiSubmitCommand ( + IN IPMI_PROTOCOL *This, + IN UINT8 NetFunction, + IN UINT8 Command, + IN UINT8 *RequestData, + IN UINT32 RequestDataSize, + OUT UINT8 *ResponseData, + IN OUT UINT32 *ResponseDataSize + ) +{ + EFI_STATUS Status; + + Status =3D CommonIpmiSubmitCommand ( + mTransportToken, + NetFunction, + Command, + RequestData, + RequestDataSize, + ResponseData, + ResponseDataSize + ); + return Status; +} + +static IPMI_PROTOCOL mIpmiProtocol =3D { + DxeIpmiSubmitCommand +}; + +/** + The entry point of the Ipmi DXE driver. + + @param[in] ImageHandle - Handle of this driver image + @param[in] SystemTable - Table containing standard EFI services + + @retval EFI_SUCCESS - IPMI Protocol is installed successfully. + @retval Otherwise - Other errors. +**/ +EFI_STATUS +EFIAPI +DxeIpmiEntry ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + EFI_HANDLE Handle; + MANAGEABILITY_TRANSPORT_CAPABILITY TransportCapability; + MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS TransportAdditionalStatus; + + GetTransportCapability (&TransportCapability); + + Status =3D HelperAcquireManageabilityTransport ( + &gManageabilityProtocolIpmiGuid, + &mTransportToken + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IP= MI protocol - %r\n", __FUNCTION__, Status)); + return Status; + } + + mTransportName =3D HelperManageabilitySpecName (mTransportToken->Transpo= rt->ManageabilityTransportSpecification); + DEBUG ((DEBUG_ERROR, "%a: IPMI protocol over %s.\n", __FUNCTION__, mTran= sportName)); + + // + // Setup hardware information according to the transport interface. + Status =3D SetupIpmiTransportHardwareInformation ( + mTransportToken, + &mHardwareInformation + ); + if (EFI_ERROR (Status)) { + if (Status =3D=3D EFI_UNSUPPORTED) { + DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport in= terface.\n", __FUNCTION__, mTransportName)); + } + + return Status; + } + + // + // Initial transport interface with the hardware information assigned. + Status =3D HelperInitManageabilityTransport ( + mTransportToken, + mHardwareInformation, + &TransportAdditionalStatus + ); + if (EFI_ERROR (Status)) { + return Status; + } + + Handle =3D NULL; + Status =3D gBS->InstallProtocolInterface ( + &Handle, + &gIpmiProtocolGuid, + EFI_NATIVE_INTERFACE, + (VOID **)&mIpmiProtocol + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI protocol - %r\n", __F= UNCTION__, Status)); + } + + return Status; +} + +/** + This is the unload handler for IPMI protocol module. + + Release the MANAGEABILITY_TRANSPORT_TOKEN acquired at entry point. + + @param[in] ImageHandle The drivers' driver image. + + @retval EFI_SUCCESS The image is unloaded. + @retval Others Failed to unload the image. + +**/ +EFI_STATUS +EFIAPI +IpmiUnloadImage ( + IN EFI_HANDLE ImageHandle + ) +{ + EFI_STATUS Status; + + Status =3D EFI_SUCCESS; + if (mTransportToken !=3D NULL) { + Status =3D ReleaseTransportSession (mTransportToken); + } + + if (mHardwareInformation.Pointer !=3D NULL) { + FreePool (mHardwareInformation.Pointer); + } + + return Status; +} diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c= b/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c new file mode 100644 index 0000000000..f31dbc9f4d --- /dev/null +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c @@ -0,0 +1,151 @@ +/** @file + This file provides IPMI PPI implementation. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "IpmiProtocolCommon.h" + +MANAGEABILITY_TRANSPORT_TOKEN *mTransportToken =3D NULL; +CHAR16 *mTransportName; + +extern MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION mHardwareInformation; + +/** + This service enables submitting commands via Ipmi. + + @param[in] This This point for PEI_IPMI_PPI structu= re. + @param[in] NetFunction Net function of the command. + @param[in] Command IPMI Command. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Data. + @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data. + @param[in, out] ResponseDataSize Size of Command Response Data. + + @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received. + @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device. + @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi command= access. + @retval EFI_DEVICE_ERROR Ipmi Device hardware error. + @retval EFI_TIMEOUT The command time out. + @retval EFI_UNSUPPORTED The command was not successfully sent to = the device. + @retval EFI_OUT_OF_RESOURCES The resource allocation is out of resourc= e or data size error. +**/ +EFI_STATUS +EFIAPI +PeiIpmiSubmitCommand ( + IN PEI_IPMI_PPI *This, + IN UINT8 NetFunction, + IN UINT8 Command, + IN UINT8 *RequestData, + IN UINT32 RequestDataSize, + OUT UINT8 *ResponseData, + IN OUT UINT32 *ResponseDataSize + ) +{ + EFI_STATUS Status; + + Status =3D CommonIpmiSubmitCommand ( + mTransportToken, + NetFunction, + Command, + RequestData, + RequestDataSize, + ResponseData, + ResponseDataSize + ); + return Status; +} + +static PEI_IPMI_PPI mPeiIpmiPpi =3D { + PeiIpmiSubmitCommand +}; + +static EFI_PEI_PPI_DESCRIPTOR mIpmiPpiList[] =3D { + { + (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), + &gPeiIpmiPpiGuid, + &mPeiIpmiPpi + } +}; + +/** + The entry point of the Ipmi PPI PEIM. + + @param FileHandle Handle of the file being invoked. + @param PeiServices Describes the list of possible PEI Services. + + @retval EFI_SUCCESS Indicates that Ipmi initialization completed succe= ssfully. + @retval Others Indicates that Ipmi initialization could not compl= ete successfully. +**/ +EFI_STATUS +EFIAPI +PeiIpmiEntry ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + EFI_STATUS Status; + MANAGEABILITY_TRANSPORT_CAPABILITY TransportCapability; + MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS TransportAdditionalStatus; + + GetTransportCapability (&TransportCapability); + + Status =3D HelperAcquireManageabilityTransport ( + &gManageabilityProtocolIpmiGuid, + &mTransportToken + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IP= MI protocol - %r\n", __FUNCTION__, Status)); + return Status; + } + + mTransportName =3D HelperManageabilitySpecName (mTransportToken->Transpo= rt->ManageabilityTransportSpecification); + DEBUG ((DEBUG_ERROR, "%a: IPMI protocol over %s.\n", __FUNCTION__, mTran= sportName)); + + // + // Setup hardware information according to the transport interface. + Status =3D SetupIpmiTransportHardwareInformation ( + mTransportToken, + &mHardwareInformation + ); + if (EFI_ERROR (Status)) { + if (Status =3D=3D EFI_UNSUPPORTED) { + DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport in= terface.\n", __FUNCTION__, mTransportName)); + } + + return Status; + } + + // + // Initial transport interface with the hardware information assigned. + Status =3D HelperInitManageabilityTransport ( + mTransportToken, + mHardwareInformation, + &TransportAdditionalStatus + ); + if (EFI_ERROR (Status)) { + return Status; + } + + // + // Install IPMI PPI. + // + Status =3D PeiServicesInstallPpi (&mIpmiPpiList[0]); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI PPI - %r\n", __FUNCTI= ON__, Status)); + } + + return Status; +} diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProto= col.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c new file mode 100644 index 0000000000..227f6f7114 --- /dev/null +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c @@ -0,0 +1,147 @@ +/** @file + This file provides IPMI SMM Protocol implementation. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "IpmiProtocolCommon.h" + +MANAGEABILITY_TRANSPORT_TOKEN *mTransportToken =3D NULL; +CHAR16 *mTransportName; + +extern MANAGEABILITY_TRANSPORT_HARDWARE_INFORMATION mHardwareInformation; + +/** + This service enables submitting commands via Ipmi. + + @param[in] This This point for IPMI_PROTOCOL struct= ure. + @param[in] NetFunction Net function of the command. + @param[in] Command IPMI Command. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Data. + @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data. + @param[in, out] ResponseDataSize Size of Command Response Data. + + @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received. + @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device. + @retval EFI_NOT_READY Ipmi Device is not ready for Ipmi command= access. + @retval EFI_DEVICE_ERROR Ipmi Device hardware error. + @retval EFI_TIMEOUT The command time out. + @retval EFI_UNSUPPORTED The command was not successfully sent to = the device. + @retval EFI_OUT_OF_RESOURCES The resource allocation is out of resourc= e or data size error. +**/ +EFI_STATUS +EFIAPI +SmmIpmiSubmitCommand ( + IN IPMI_PROTOCOL *This, + IN UINT8 NetFunction, + IN UINT8 Command, + IN UINT8 *RequestData, + IN UINT32 RequestDataSize, + OUT UINT8 *ResponseData, + IN OUT UINT32 *ResponseDataSize + ) +{ + EFI_STATUS Status; + + Status =3D CommonIpmiSubmitCommand ( + mTransportToken, + NetFunction, + Command, + RequestData, + RequestDataSize, + ResponseData, + ResponseDataSize + ); + return Status; +} + +static IPMI_PROTOCOL mIpmiProtocol =3D { + SmmIpmiSubmitCommand +}; + +/** + The entry point of the Ipmi DXE driver. + + @param[in] ImageHandle - Handle of this driver image + @param[in] SystemTable - Table containing standard EFI services + + @retval EFI_SUCCESS - IPMI Protocol is installed successfully. + @retval Otherwise - Other errors. +**/ +EFI_STATUS +EFIAPI +SmmIpmiEntry ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + EFI_HANDLE Handle; + MANAGEABILITY_TRANSPORT_CAPABILITY TransportCapability; + MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS TransportAdditionalStatus; + + GetTransportCapability (&TransportCapability); + + Status =3D HelperAcquireManageabilityTransport ( + &gManageabilityProtocolIpmiGuid, + &mTransportToken + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IP= MI protocol - %r\n", __FUNCTION__, Status)); + return Status; + } + + mTransportName =3D HelperManageabilitySpecName (mTransportToken->Transpo= rt->ManageabilityTransportSpecification); + DEBUG ((DEBUG_ERROR, "%a: IPMI protocol over %s.\n", __FUNCTION__, mTran= sportName)); + + // + // Setup hardware information according to the transport interface. + Status =3D SetupIpmiTransportHardwareInformation ( + mTransportToken, + &mHardwareInformation + ); + if (EFI_ERROR (Status)) { + if (Status =3D=3D EFI_UNSUPPORTED) { + DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport in= terface.\n", __FUNCTION__, mTransportName)); + } + + return Status; + } + + // + // Initial transport interface with the hardware information assigned. + Status =3D HelperInitManageabilityTransport ( + mTransportToken, + mHardwareInformation, + &TransportAdditionalStatus + ); + if (EFI_ERROR (Status)) { + return Status; + } + + Handle =3D NULL; + Status =3D gSmst->SmmInstallProtocolInterface ( + &Handle, + &gSmmIpmiProtocolGuid, + EFI_NATIVE_INTERFACE, + (VOID **)&mIpmiProtocol + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI SMM protocol - %r\n",= __FUNCTION__, Status)); + } + + return Status; +} --=20 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100871): https://edk2.groups.io/g/devel/message/100871 Mute This Topic: https://groups.io/mt/97473058/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 18:08:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+100872+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1678285050844760.4890762811115; Wed, 8 Mar 2023 06:17:30 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id kLV8YY1788612x2aRzH3pmSA; Wed, 08 Mar 2023 06:17:30 -0800 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.40]) by mx.groups.io with SMTP id smtpd.web11.8275.1678285049753466399 for ; Wed, 08 Mar 2023 06:17:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tjz7Lc7d8jvb/ryZiDMP887xwJb+oAlH4drMzSe3kAqAuA/Zi7UTVtnW6Xl1HVCPrdUOE51KqPw9KnODQIhnrFGu+J05c/gq0t39rekKegpsmTGggCeWnSQ4IKhgSrO3Z7JyGVmb4evmVIryBeLlGPrn1pSm5SpVSwQ01RjHssbojJ5puNNmP0WuVTC4oWNr2h6lcFIwmLTDNfKvT4i1ZmKaQXGObYjfou+o7yAlHRatC1+745h9iRLHleyM+5ORlllxvhZysFTUZfeCSzXoX3z0X7D79kfwjI6Y3wP8XLZZql5nFsoIVs00Q2FY0qmSTs66XoZ/vISvioD1K/iONg== 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=Uerz7PGS+pezrgxiGRM6FquAsaoDMa0B+9DzaJHy5po=; b=SbsCbAPKA0KXrihlfAkcBbk21DjvgZa+4Zsb7n8Qnsw6bTSPszQ3u2OIcL/LeRSed614iz3HDCskoOfHiXnyCwpDCE+uwGqYbXLjn7MOPgft0hIzCmi8rTxs42HJ8SK7yBXy2YfH8Z3kS7NEohqVF4150m4j2xem1TuVVxinPjMzgVjMVlQHu673fI5kLvw5Pm6eSrtqW9HUNIQO/F2N1fBIWycVNu2bBQJI5+0+PNL6qom9mjH42ATq0LJ8D3k4G+sbeD0ILnWgYkmpCKHdCDgKFd1gDjsjAJhidBVl5IFVleZvYbdcxum7h9j0vuLAve5QZUepZNAJzb0ZUQNTNQ== 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 X-Received: from CY5PR03CA0024.namprd03.prod.outlook.com (2603:10b6:930:8::35) by CO6PR12MB5427.namprd12.prod.outlook.com (2603:10b6:5:358::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.28; Wed, 8 Mar 2023 14:17:27 +0000 X-Received: from CY4PEPF0000C982.namprd02.prod.outlook.com (2603:10b6:930:8::4) by CY5PR03CA0024.outlook.office365.com (2603:10b6:930:8::35) 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:17:27 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+100872+1787277+3901457@groups.io; helo=mail02.groups.io; 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 X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000C982.mail.protection.outlook.com (10.167.241.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.13 via Frontend Transport; Wed, 8 Mar 2023 14:17:27 +0000 X-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:17:24 -0600 From: "Chang, Abner via groups.io" To: CC: Liming Gao , Isaac Oram , Nate DeSimone , Abdul Lateef Attar , Nickle Wang , "Igor Kulchytskyy" Subject: [edk2-devel] [edk2-platforms][PATCH V2 7/8] ManageabilityPkg: Add IpmiProtocol to Manageability Package Date: Wed, 8 Mar 2023 22:16:46 +0800 Message-ID: <20230308141647.1318-8-abner.chang@amd.com> In-Reply-To: <20230308141647.1318-1-abner.chang@amd.com> References: <20230308141647.1318-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C982:EE_|CO6PR12MB5427:EE_ X-MS-Office365-Filtering-Correlation-Id: f2b08732-02b4-481c-7b3f-08db1fdfd85c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: slsWBkm3rCW25NY5MEPCXR9EcmDN89eDMy+bPQxFqy4TueuQ/JRhKS/r/7Cb1mBo9oQZhTlmpxqtG7fVhOZcZkrhBxJiKY56vE6gfSEtx4gP4GiE1Iq/9UzG/uA+rsTcD7KOW5t4d86E+9FXdsmn3ovEn2wAinu0uuZZ37iZNwFnv/pkTIBla/Plu04UH0kvZftev6Jd8Owkg8SDTHoSdCixs7muO6sklJK5inI9JCwbJzL1HuzUMNngZUW9E3C/Nk6mEo9dssZ+snkHr2DQ+EJDDryDHVqqW7dYQQC9PBI3Sf8fIjL3Ava+jq97xs12G1+M03IxXg0hPtK5uSrLwOWYfNJnQK5qrkUZTyR/EyFpL7dfKZOv7hJnW0wOiVDZO4W4MWcvC6I7xcK44NiLNuq7gdFibV9NCKxqLCn4aGhLJDlAPK9aTYwnm9rtrq3Xdb0RJ+u8Dq2HIDPFnfzanpB6kQ9CwGJhWtZ+TcapE5C6rTbkRPWpIOb6Pv5CLAc3FtKk8NtVKHp1P633AUcNXsaDqeglRDq9MB2lNjgI8UyFZwBaGCn7VCwjTfOi9rYHaWVYopsfHUtuQE5JuHXoa+y3a5x5Fo5dBO/WW8zDUK7XflPo1RYLv4E4boHX6S/3QkvwMIwtu+jgvxMilyb39bMt5o/YLljSw9noN20Ao3T0oHqNlxdVOTNzz/G/3Z4eJqr19qBdcSGI1QE1zw8xZRAHBTjla2P75ZnnydjF+HY= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 14:17:27.0070 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f2b08732-02b4-481c-7b3f-08db1fdfd85c 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: CY4PEPF0000C982.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5427 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com X-Gm-Message-State: y7eFlK7wQIdjMAIFoMUM69X8x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1678285050; bh=e9cbkR/CStpFUMvnLC0QrYCaSp5WSJWnJmehbP2T/Ao=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=TaMwxQtK4p8s+Ohku+Meei46Rd7WtXJeX444SiN0496unrN2JruKRHGoF0zV/3sKTLm 8FkeKTWHQjx/AEKyKCG5EKEi9V2GfCKYPNBbCHUQsOs3uiWCCknB0Mv9Z8izNE5OMr0Eb YLM094n1wrgfVH9V7KyLwm3jDizw+pEjO24= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1678285051517100007 Content-Type: text/plain; charset="utf-8" From: Abner Chang Add Ipmi Protocol/Ppi/SMM modules to ManageabilityPkg. Signed-off-by: Abner Chang Cc: Liming Gao Cc: Isaac Oram Cc: Nate DeSimone Cc: Abdul Lateef Attar Cc: Nickle Wang Cc: Igor Kulchytskyy Reviewed-by: Nickle Wang --- Features/ManageabilityPkg/Include/Dsc/Manageability.dsc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc b/Feat= ures/ManageabilityPkg/Include/Dsc/Manageability.dsc index 994c93f17c..0d868fdf4a 100644 --- a/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc +++ b/Features/ManageabilityPkg/Include/Dsc/Manageability.dsc @@ -16,3 +16,10 @@ NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf =20 +[Components.IA32] + ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpiPei.inf + +[Components.X64] + ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocolDxe.inf + ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocolSmm.inf + --=20 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100872): https://edk2.groups.io/g/devel/message/100872 Mute This Topic: https://groups.io/mt/97473060/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 18:08:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+100873+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1678285057975938.8939408429787; Wed, 8 Mar 2023 06:17:37 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id a5DuYY1788612xNBzE8YVHlu; Wed, 08 Mar 2023 06:17:37 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.72]) by mx.groups.io with SMTP id smtpd.web10.8092.1678285057039974857 for ; Wed, 08 Mar 2023 06:17:37 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AX3YUWpChX2Sab3OXmdxfB3iSH/+l9+1mEA6U4CGDrEQfAI0Vs+8sWxyM9YMMGGpIb9i82wKHsU52SVSu02dSDf8IaC+wAb24p+iAWixOA0ADPdz+WaJNLHrFaYSpWqCQJlIRSfuBTWz+XkktqNfIXSgmRy2Yy++NeODgonZZG8psAdBi+RkDFKc9YX0ZnKmHwh3G7dqcWLt+BKtuxCqUz3g0tla6fpZQW81OLy7iAHQFpc48LqgYiryxZ2YxSjRfX9VwkjL2ZAzh12qfavtu0+0Zj3zOWEBIpPGqKu+GjPoBTL3SO4RaC16VCgnolwyJyGqfSJNkkrVyNqmRhc71Q== 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=mXIlwXctD59b99AtK6SYUZCCN9rxoJvPC+EUcNdw/y8=; b=Kay0YdUSNAIkmKnSrECQS5i7TYxAn/IE8d2siMDDUo41q6HaPpXyoyBBnS47iyQdx91Kw83F4rutO0nr3rVVBwupskzpDvzK1c4u3eqP7rBOEKBdJONM8mbFnPO3dTUzsdt200pyWWtBtTTP3XWJd0wodOqYDq7VSmGDtNxGeoS9qiA1Y8nMcQzCgBY9MyVDbyYulh2ArYkVKPGxdA4d/pURxD2FvUWcTdzIbbvQepIZr5tog42k764hllqtRo+AVUOk294IHgzKv7wIvEzrQq10THp1QAgyD8auTikjOyuCr1qWV3Ps9RprnRxxdrzmiU/zE2NGJckPOxF0FvGTRw== 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 X-Received: from CYZPR12CA0007.namprd12.prod.outlook.com (2603:10b6:930:8b::25) by CY5PR12MB6298.namprd12.prod.outlook.com (2603:10b6:930:21::7) 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:17:30 +0000 X-Received: from CY4PEPF0000C981.namprd02.prod.outlook.com (2603:10b6:930:8b:cafe::a5) by CYZPR12CA0007.outlook.office365.com (2603:10b6:930:8b::25) 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:17:30 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+100873+1787277+3901457@groups.io; helo=mail02.groups.io; 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 X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000C981.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.13 via Frontend Transport; Wed, 8 Mar 2023 14:17:29 +0000 X-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:17:27 -0600 From: "Chang, Abner via groups.io" To: CC: Abdul Lateef Attar , Leif Lindholm , Michael D Kinney , Liming Gao , Isaac Oram , Nickle Wang Subject: [edk2-devel] [edk2-platforms][PATCH V2 8/8] edk2-platforms: Maintainers.txt Date: Wed, 8 Mar 2023 22:16:47 +0800 Message-ID: <20230308141647.1318-9-abner.chang@amd.com> In-Reply-To: <20230308141647.1318-1-abner.chang@amd.com> References: <20230308141647.1318-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C981:EE_|CY5PR12MB6298:EE_ X-MS-Office365-Filtering-Correlation-Id: aaeb3c8a-6a21-4206-e010-08db1fdfda10 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: gDE6aqEys+xa6wZzHtyV6PZxYXkBh9ERFZcvtE+j48Wms+CXetMn4YZd/tcPyb6XCKhekCPpyOI8jO4o9GQ4X+OX+qR0t88Q5/2P5X+TucnqY2W5TVN8tz63e9ROSxs0kHYnkNZLYAsC0utodZ98OvLcPMBAlUgoODhSpUIkDumM6+OHZLAKfw0nCBZigTVQmHnpKeM+PEKBLUhcTwboZu8mVkJUA9RfaYc4lX5v38lQDR+CbPjV7Jwf2P9z17YrYpnz07gRqXEbb6rD9YYodETdxgLTE4epyh2wmIcLWu4J+aPadRPc5w3Ez47sKYtSoGwUasLO5BYyr6z3tEOeNnDVaRFut+3Gj5KWFpreusZzXchIh8NCmM6sMOJBtUJJtMtd//opE9xC3gHS3VdiR7is1Ey0JeElGFDkHvVi37z3Jjk+mi3bymZOQbj9H+/eXK+PfUCAeHEo0MK6XbrEGr3RpLW3wA8IIpEg0e4Hr65PJKTfA0/KLzduOGosmpcve5wwm6V/GZL8dG3pPKJaDbTbfuKEF4CLo+o+P2Hp4+ZZAZLV0qCGf0HzBKEMpynaDmAJ/8N8cyTbyaYwat8cAvXQOyF1Hg3PVBEn9WMZFQftsgYssiEqzK3WuAAu9Z+/5QB+OPkxham0xniskm3vRDkdhExQ4HdCi8Fkk6ICy2mdKjzCuGIByYEfrJ/Co4vIF8+SuUckRGOlP8PXNGLnKYXaMIOtSQwxzS4g3ye1/BA= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 14:17:29.8514 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aaeb3c8a-6a21-4206-e010-08db1fdfda10 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: CY4PEPF0000C981.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6298 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com X-Gm-Message-State: 73HW0NPu1evCeckNS96ggN5lx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1678285057; bh=cX2tWJzER3/UyWj7ft+2EJklmB7d+5KTcfUGjJt0L9g=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=fksIFB7PdfuwGeUJF4pZyFTwpArFquBUBKLcFIViV53iXp1Wf59w0+TAW1AogzRxh+5 5cahYU8zH+reE46fZyXx/cCKEpxmk+0l+h5TNY6uCS+oYBKX9zBfm/WgW6reu1lzreGPC DDSpeLxtzcBfZwvkZmSmBNOG16NF8rHc+I0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1678285059582100002 Content-Type: text/plain; charset="utf-8" From: Abner Chang Add maintainer and reviewer of ManageabilityPkg. Signed-off-by: Abner Chang Cc: Abdul Lateef Attar Cc: Leif Lindholm Cc: Michael D Kinney Cc: Liming Gao Cc: Isaac Oram Cc: Nickle Wang Reviewed-by: Michael D Kinney Reviewed-by: Nickle Wang --- Maintainers.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index 7471913660..8279a8ac5d 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -164,6 +164,13 @@ F: Features/Intel/UserInterface/ M: Dandan Bi R: Liming Gao =20 +Features/ManageabilityPkg +F: Features/ManageabilityPkg/ +M: Abner Chang +M: Isaac Oram +R: Abdul Lateef Attar +R: Nickle Wang + Platform/Intel F: Platform/Intel/ M: Sai Chaganty @@ -326,10 +333,10 @@ R: Yuwei Chen =20 Loongson platforms F: Platform/Loongson/ -M: Bibo Mao =20 +M: Bibo Mao M: Xianglai li M: Chao Li -=20 + Marvell platforms and silicon F: Platform/Marvell/ F: Platform/SolidRun/Armada80x0McBin/ --=20 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100873): https://edk2.groups.io/g/devel/message/100873 Mute This Topic: https://groups.io/mt/97473065/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-