From nobody Tue Apr 30 21:45:54 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+100672+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 16778292669061006.4187567257965; Thu, 2 Mar 2023 23:41:06 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id LyfqYY1788612xHrpdaicU1v; Thu, 02 Mar 2023 23:41:06 -0800 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [52.100.157.233]) by mx.groups.io with SMTP id smtpd.web10.18342.1677829264522531178 for ; Thu, 02 Mar 2023 23:41:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ftnh4a7rR8EOo27uC7Zu4emFwyG0D6d+i+GUrWarPOE9se3nV8V5MSN4QgoFf39rYQMW1f/7/eaieILHgrPBABB/ThGaDLy/uK2vUA+TbFSuQhDIdZJjgZux2ReyeVzXRB9vaK7jgLFL8picufRKjeSTG4p+p4ZzTEEptypO6qvfnOnCGgnFqtsvvrp3c6Gvhsu5ugndeGSy0sE8rtAvMSz9BGtSbH1SCZ2kpa68bIStaD+Uoy1d4fgWPrfHUri8+XtdL6JtKImQErFHQQay/gaS0EGJXRUJefh3KWWOP8Aii+AN9y2U2CKsdmkLCDR8yKPrmCJoiyPAZDor84JsFg== 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=VxespLTM3gJz5p4Kvx6/IaDduo9WO4rlF5mSjpI3Tjs=; b=RiulUxsHeJsBkTe8Wm4Wd5YkqDhQxjVISMK1BQxZDAsbGeAb0ASNXCgm4DKNnjzGtxYOVlRKgsWvCQYD3cQxs2U951tf/30/NZR9itPvH8sriRqxmm1oxyILf481ezTk+be62gKLhwI+UTGXVitcHgeladhow5byS2buIbejH3K290TEQP6tZOVHg4mHrDAfQLneP4VwuOqFHzBpAyWmhKtVagDsQxwUobMDgeubmhDv/hs0WkKQQ55l3zrpzoKrHbHXoJEDjXDjpa+UTLv/I3v8Q8qbw+PkTGVdNETvx34ontjUQzOSCQ586reGnbimjcNX0bhXia09Me4cqvv2gA== 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 BN9PR03CA0153.namprd03.prod.outlook.com (2603:10b6:408:f4::8) by MN0PR12MB6126.namprd12.prod.outlook.com (2603:10b6:208:3c6::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.30; Fri, 3 Mar 2023 07:40:59 +0000 X-Received: from BN8NAM11FT088.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f4:cafe::a8) by BN9PR03CA0153.outlook.office365.com (2603:10b6:408:f4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.22 via Frontend Transport; Fri, 3 Mar 2023 07:40:58 +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+100672+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 BN8NAM11FT088.mail.protection.outlook.com (10.13.177.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6156.22 via Frontend Transport; Fri, 3 Mar 2023 07:40:58 +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; Fri, 3 Mar 2023 01:40:53 -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 1/8] ManageabilityPkg: Add Readme file Date: Fri, 3 Mar 2023 15:40:28 +0800 Message-ID: <20230303074035.1067-2-abner.chang@amd.com> In-Reply-To: <20230303074035.1067-1-abner.chang@amd.com> References: <20230303074035.1067-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: BN8NAM11FT088:EE_|MN0PR12MB6126:EE_ X-MS-Office365-Filtering-Correlation-Id: 0aa45004-6335-43d5-8632-08db1bbaa166 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: =?utf-8?B?VXR1eFl3Z05JSTIwam14YVBrMWhKNy9EMVFsRk5WajlpQ0dEOE1QQ0pQWTNO?= =?utf-8?B?Q3VodENRdGlyWndyNXh3OGIwcUN3ZENadDk1aXo3TE9UQ0pheFlGT0lwaGI2?= =?utf-8?B?Tk5WS09CbWNLNE1XcldpWHFmUWJEdThFd0x4c2thZ0F3UjRzdHhEcWxvYWZV?= =?utf-8?B?U0NVKzVlQ293aVpxTlBPYWYzKzg4Wlk4dHRyclJ4RXJmU0kzYzczV1VIR055?= =?utf-8?B?TkhsK3lHdElzN1JQR1FhU1RCRzlqYTF4cjByNzFQMUJQL3ZWRnd4QXk0alJp?= =?utf-8?B?ckJMUm43RStWbjNHL0h1MkZSRG82SmUwelRHSnlGd1JMeW9IMTF1S09mb1NW?= =?utf-8?B?TnFRM3FjeFUrZ2tiODhZUEoyb3FrWXk1eFlaWkdEd0lpVFIvbER2LzJnVXpI?= =?utf-8?B?LzgzazNXWDhneGNnMHNncUJtZkNNS0FsVWlFeEdPSVhQT1BDR2tTM3BxeC90?= =?utf-8?B?ZVhyRFF0Um0xZzcrMmNHUDBXY2FhdU4vOGxFNm1TemxLNWFzdi9xVjViTEVN?= =?utf-8?B?WVo1WHl2a0hjUmgybE80WVpKWUlKQnB1MUNCRENkR1lGUDlFWEhlQlZqbC9H?= =?utf-8?B?dDZFMWQwWHFPMUh1dWt0ZEdSQ3dIZldZZmdUcjAvYUFqL2lEQWV1VnF3di81?= =?utf-8?B?bngzVitDMDEzZkUzcFQrbnRpOVVxanJXUFcwL1pNMUJPZ1pOanhJeG9INDFX?= =?utf-8?B?VkxycC8yeW5jMXkwTHU1VG44RzQ0bGY5eExNVVhGcXF6ODVNL1hPK3hNRUtZ?= =?utf-8?B?OEZER0xnU0UySkExYlpBdm1ubHhXVk9YQnNOL1FOOVpIQ0tNSndEcVowakM2?= =?utf-8?B?R2JxTk1aS2tMOXgxSGx5M0NUVlhQVVYrajFtUmlUN3dPSktkbTI3K1IvUzhR?= =?utf-8?B?Qlh1d0JaYjg1SUYrRnB0Z3pzdWhmT0xDdzZPalE0cFRJdGNhUGVIVmptR2JU?= =?utf-8?B?WnNNOXkzd0VwNGtVYXR1M0lhNSs1VG5hMjJGNkxVVlJuUTJhSHErZ2xSYWpo?= =?utf-8?B?SGlsV3l2b1FYVHRwWDVBRXlvYTQ5QklGek5rRzRlRTVieWc4cWtRMSt3b2tG?= =?utf-8?B?YkZuNVJXN1RRdnRVNGFldFFNd0d0NnFYemFWTXBNMDNKQTQ3VE9NMHJHWGVm?= =?utf-8?B?amU1eTFnNGw5d3g4cWU3azl2VFo0TlM4OTJzLzVVdnA3VlNHZDZ3cHJHblRV?= =?utf-8?B?QU1qREtRelVKcDlTb1JEZjdwNEtLc3k3a200MmRUbytkNHBaREFBOE9TYnVD?= =?utf-8?B?Zyt6UXJFVFVwbVZDdXVjVzd5a2dUYWlpN2hQM01mVGhIRFZsU3k4UEo4MCtG?= =?utf-8?B?WjY0Z0p0WXpGTCtwaXYvK243SFZPcmhBYkNBdXk1VUl4dGRGeC9OQnFZTWFp?= =?utf-8?B?NXU3dEN6bFFDeWVlTkFRenZlYkV0ZExxbkl1Q2N3YjVKUUVQUVFjdTU5Z2Zk?= =?utf-8?B?Vk52YTBwaCsxOEQvYWhzRzdvd2ZsZzFSc2p0VTQxQy8wVGw4ZVU4eFNqQ2xz?= =?utf-8?B?UU9ZcitLNEdabDdOQlk2MXlEN2NSQmZNVTlpTHhzK0lOUFRHK25UeEM1dEpG?= =?utf-8?B?bHIwZVVSTFgzSWVHS3N3eWVEZjJSd3VVWGF6cm04cTNUOVlUcUpXK2lGMjY4?= =?utf-8?B?NUtFdXNtcXFNZ0hiZFR0bzZQVlNzcEE9PQ==?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2023 07:40:58.8150 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0aa45004-6335-43d5-8632-08db1bbaa166 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: BN8NAM11FT088.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6126 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: UVdUur1M4lyoojrHsT1dwhYXx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1677829266; bh=Ig1U5Fi6sh6LkdvaLC9mxb8CzfJtQTXoNPWMJi0CMBs=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=NxWUw6K3YEg/Bo0DoVz1OrXj3hWPo+xG/jR9r4XwVNmkNIxWKYGfEAtJrPg8vHOdOxG 1qyfzQC6mAN/OfanzyhtJ7QGuFTcEnDzmjzKvHIp99yyooa6f8LUh1Y3QRwOAnJM5fu5A UkYlris6Upwc5PLw6ZEswMROKLhNgC68KSQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1677829267817100002 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 --- 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..6743ab4c76 --- /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/changab/edk2-plat= forms/blob/Manageability_IPMI_upstream/Features/ManageabilityPkg/Documents/= Media/ManageabilityDriverStack.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..ce6aba60bc --- /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 + + + + + + + + + + + + + + + \ No newline at end of file --=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 (#100672): https://edk2.groups.io/g/devel/message/100672 Mute This Topic: https://groups.io/mt/97357746/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 Tue Apr 30 21:45:54 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+100673+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 1677829274894319.32688777360113; Thu, 2 Mar 2023 23:41:14 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id rdIsYY1788612xcpfcChcdQC; Thu, 02 Mar 2023 23:41:14 -0800 X-Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.85]) by mx.groups.io with SMTP id smtpd.web10.18344.1677829273905043243 for ; Thu, 02 Mar 2023 23:41:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VOpmg5ABFXRra8o8nDq0i4E9utO8/NRCvpQv5TNO++lZPZiZICmyo1iEPP5Qrj/4ah5TbwY/GewbFFwl5BfmbfTjtbX/eFEUa1qnhCfb7AaUWI5C2ZR173bLS6BINVruQnCOE/CB3QQ5SxEmJhrAZOMNCv3cxfmXGQmT8pojulXA4eAWXz3j9r9bivVhMmaoL2cyFgTbiSIaEb7S/OHadFwMdFwpMOSWdRz4QcEPQ7mtCoAtwtBDO0iPuvOOyOLpdxK+7ctisXCfXFzFd7/mzcPw560WTvfExgci6J1S9z/QRE/5zzzFXI7cR4q06Mz4PeFK2nEDk5F7JIS9DCepAA== 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=ZLelQpXX/QowqWSId5btWOvJv28EoAXM9svYanTxbAE=; b=g9J5x9rxO9Q1UGHbMcWBHt/WU+yxaAbB0KnIbMQzsE4Q445/IsPaZ62RMpdlnImTTEQvLLs4K0sr9mlmIV8JAqIh007OrBn6rFmGY/ti5qr1+bue25dxYttn/arO/onzfuFto62c7Ekpn5DEqjmuyXsfYOckCOVNYPkFUtW3YM1L4yqiisM/Ke/t7HxzAVkkrrmItJSXz2foTOf3IczuQSjMRON12tdtJCIK5la4lfxnN6EV4ABVmuxvGb3+sl70XWSev8ockY9Ts44nk4x6gCwFVJMgQo7nnkuzVOn6tMSTmm38A8K67dvUFtWHpB5Eynllzox+jo8hvXkMXRGZgA== 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 BN7PR02CA0005.namprd02.prod.outlook.com (2603:10b6:408:20::18) by PH7PR12MB8178.namprd12.prod.outlook.com (2603:10b6:510:2b3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.20; Fri, 3 Mar 2023 07:41:11 +0000 X-Received: from BN8NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:408:20:cafe::e9) by BN7PR02CA0005.outlook.office365.com (2603:10b6:408:20::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.21 via Frontend Transport; Fri, 3 Mar 2023 07:41: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+100673+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 BN8NAM11FT026.mail.protection.outlook.com (10.13.177.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6156.21 via Frontend Transport; Fri, 3 Mar 2023 07:41: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; Fri, 3 Mar 2023 01:40:58 -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 2/8] ManageabilityPkg: Initial package Date: Fri, 3 Mar 2023 15:40:29 +0800 Message-ID: <20230303074035.1067-3-abner.chang@amd.com> In-Reply-To: <20230303074035.1067-1-abner.chang@amd.com> References: <20230303074035.1067-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: BN8NAM11FT026:EE_|PH7PR12MB8178:EE_ X-MS-Office365-Filtering-Correlation-Id: f65c84b6-39d4-40af-c15d-08db1bbaa8d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: Ec4XMireyOKehQJTPgaB6UfrUXFCBibWYloZfYct0utzw4rpFMkDLi+OX6gFUU7dMPUjPrTXX1juJO1L8m6jTRxtoGeQYMDL88bPM9CJHzROioA7ihBYrVxUyFdaLTs5fvaHAwmiyPrbkXQsSJNf2X5slRdKrNwh3AS85npN3dcPp6kUEvxMFJIu+HclELFjP1dDgJXI8teg+6FLi7AKU+g2lmYKphWbFC57VB+vWGSMuiT8qo/GpoRp1K+s1VNUv+NDMsKMCFJKO+u7x7wNiI1dAJAbjeXaz4B7TfzzccDNIFMseIWELxVClWMuNGZJr3UroTe02PxrPUVX0PWpbFGvMao86XmdJdBASc0ttb0gXDTLKLa0rNIDpCc833n9X1+OVO4kceZ+5374WHrpBD+YTzM1+BcSAGi638MKNOQccuoGMDwXBbaQnaYgBFQEOu6zZnzJgYBhi/eJ1NQbsCixPDTrBiy8UTzBy9saVzi/+G1N8R8SZmwM+z+F7d3OhGomDveQHotlEZgB994lxZOekXD8EIASATuZEX02HRHnwrhyQRxJeJYokZh0Sb4GDt7huSJ8cibc0Z7bs/Nyr9VAIVajR58apOJIxesSXNhZS+0k6+FP3I2ZyUQ6oymakagCyHabr5Rq+xk/XZNMq1tCgsNzRP11zIRgB7cKveah4hQIPNhvgJnhrYFy83MZ/Pjx1hKN81hizwGDEVIL/adqeCKMo9lih6Ef2jJQw14= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2023 07:41:11.3036 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f65c84b6-39d4-40af-c15d-08db1bbaa8d5 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: BN8NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8178 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: yxnIVC6C3lHH3LKhHAbRrdrCx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1677829274; bh=jB7nTNXuxW3eaoegfsWGFcO6/FgE0iKHp7hJYETe6tE=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=bcO+jBGB0LuQegaHz0p/T+Fdh1uq7gYtac7NZBICPX+Ey+eZoBbq32m3QkxO1DyjafS 43jayK6Qy3wjbq5uxuElhePvUDklJ72yrwniJ/tAiYc6hfKZ8XsoDecK92CyG4kyKB69w 4xB4I3eU1dYwoQK580m2dgZ0VomEy4GkOao= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1677829275766100001 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 --- .../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 (#100673): https://edk2.groups.io/g/devel/message/100673 Mute This Topic: https://groups.io/mt/97357753/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 Tue Apr 30 21:45:54 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+100674+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 167782927928970.9381912873506; Thu, 2 Mar 2023 23:41:19 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id CJoBYY1788612xkbW0Y26D0v; Thu, 02 Mar 2023 23:41:18 -0800 X-Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.76]) by mx.groups.io with SMTP id smtpd.web11.18385.1677829277785808658 for ; Thu, 02 Mar 2023 23:41:18 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SDy9+KiG/O1OSefGOciPexZ8+HWgQpReLnLdtRktki2Vjlgsm0FS6FE+tHWB+7hto0T7M9WGWPAPsKOta00GqzsOyTkef/A3oHE2EpFU3vAGEc2orBdnwwzL0zjmk+aZeqlhgpxfJ7RTYNyBv0/7WhZtFd+s4ocTCWCluGPB2MBPXpwpJongCF4Plvh9j45QRSHLWWTlUZI2sQoOJFtlxz+neuU0mQzcEnq3Z6REmjmGv4ouQKvgOqyq4vg+TDUOBqr887Z6ZDAwg6o5TFWzqtAY3xC2K5ZJArpX06xV+ZwMlGMaDcZfsBbc1hYMKwvEVJWTuJclD9DplDxJ6hkbew== 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=hGPn1aRBHXCcK/SXXxY/l0Wi51iju71CrebJeC6TpBpIxRjrJ3im4tDprSyvtQhhLStIFVKrMgnqKSHzwuqXIRLl6c8n+sJB9wMwypGwGgA6x0nKz2Sf6AB3wndAXwxQF51N1m/1h6JbP71vGEjZtMvCxxdGMzZrQ4dz2XjhZHEniwuPgEeOblHa7p5jUYwwfQHYa8DpNIxs4M2a5RSqkhIxfzq/BKIFUUKX67tpFDu3nxJA4N/gS0v6zo4Yetj6Zx9j0fKPI8+EHNH9gFDinf4ALfyNJPY8Gg08PdzNyNc4ZFsFOwKHYOc66xdgMEbxFzQ3ZXWs2h8bTcThmuxTBg== 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 BN0PR04CA0078.namprd04.prod.outlook.com (2603:10b6:408:ea::23) by PH8PR12MB6676.namprd12.prod.outlook.com (2603:10b6:510:1c3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.17; Fri, 3 Mar 2023 07:41:15 +0000 X-Received: from BN8NAM11FT108.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ea:cafe::3b) by BN0PR04CA0078.outlook.office365.com (2603:10b6:408:ea::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.21 via Frontend Transport; Fri, 3 Mar 2023 07:41:14 +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+100674+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 BN8NAM11FT108.mail.protection.outlook.com (10.13.176.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6156.22 via Frontend Transport; Fri, 3 Mar 2023 07:41:14 +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; Fri, 3 Mar 2023 01:41:11 -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 3/8] ManageabilityPkg: Add NULL ManageabilityTransportLib Date: Fri, 3 Mar 2023 15:40:30 +0800 Message-ID: <20230303074035.1067-4-abner.chang@amd.com> In-Reply-To: <20230303074035.1067-1-abner.chang@amd.com> References: <20230303074035.1067-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: BN8NAM11FT108:EE_|PH8PR12MB6676:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f049a24-e9f6-42f0-293e-08db1bbaaaaf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: zyP6qMQFdJ25DwSJJTjYRFXvaPcW9D2vFiByMxc5emvrrxW8Ep7VBJVotjPD1RxjdaiZ53HOUBJkTc3qKuGpLweSfGxdY8yslvq+bstTUsG4UdqJqxEPb4xeJWj3KK542J1dEMat0d+67EJ3291mOdOAZLnhr8UkcDZRmCrKsfT15fiYOKVQGvjvHldEbPc8gqbizNi1iAq24ZrthTfDEjNcR1O8sl4a56pD2gwcsiDz55JORgy76uCx2FfMf7R0fA2o4wsaoqHmyiEWV0T1AYgDBtbbEErtdzOTWyy+WWh6VRwMXfO2pSt6Ay/sauC51Qapo2c7RVx5q3iZUa/Pni7cY6oCJvopKfnnDtG7MQXzbdUvNn7L2BCTT3vmQyyS50LOd/TGOswM5J0uhPc0QEF1JxKm7SjUkhaYGhAeBGxKSBRJy9KW+NoG0af50Lyv/TZdDAGJUxXLT+wPl9NL/VMOSVS4jivA5gO6lsHy+PZromyOO0RFbW4yfFhH64QcWTs+CksUKc0BtIdlRSJwEVteVeWRTCvM6MOj+uB/+zJfCpxTNLhUEKg9aDv0je4jdYWBYSNyvvOV36GwHA10jZdRRC1hy0KRs4nxvD/qLzMotAKeSQNRWU+y/0oJOPx1W9m7fI3ggTXAAPiNZMjaHtmanbGlS+KrhJzhFnQXPiO5jQU8WHkEaQx8Say6gqrj9h2oJCv/7qDS3f468T1jfQMBrFK+NGetpRvvPH7ZQ0E= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2023 07:41:14.4061 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0f049a24-e9f6-42f0-293e-08db1bbaaaaf 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: BN8NAM11FT108.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6676 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: dEsgeiX8lUjZN718bNYl3qxAx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1677829278; bh=5TU3t3+L9XflUojjZrx3uJt5JSlwtIOHyG09HRUOBK8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=nvcF/wG1iGT+jQhUy3NIbLyCv3pWSfKxZJZo9GU1rY+18hFacRd4zxy1MmlTCYLpQ9L qYy/OWT3XhObK49RMiEvTqG4ISuKnk/HYfq7YdelZqPoAM19eklD3gfJbha1PB3QbZb32 vAB8/PfDFtONmAhDByHCfXG94XGJd8Ukbxw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1677829279798100001 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 --- .../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 (#100674): https://edk2.groups.io/g/devel/message/100674 Mute This Topic: https://groups.io/mt/97357754/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 Tue Apr 30 21:45:54 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+100675+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 1677829281430985.3414758228475; Thu, 2 Mar 2023 23:41:21 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id iyVNYY1788612xXc6xfn7VOE; Thu, 02 Mar 2023 23:41:20 -0800 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.61]) by mx.groups.io with SMTP id smtpd.web10.18345.1677829280310197778 for ; Thu, 02 Mar 2023 23:41:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JxsKQMJteRErf2FcodIKhdKNxulxfpz7L1bsTlHjgIG5pxOwQhOM+hWvr8EbFDjxo1bxObwNZeJpbvHe2oxaK1qxdi28781qqcJO0q8dT4fz2k8zXCkkA5Jl8bVmcrrDo/vEOFLEq2APLxeFxnP2kBWuD3qKpGVRvDg2ctNS+I7Qn5notWIqHzlWxhp1I4sEQFoXOegfK5s3N8xK5agpzN/SQcASJh+jxczdpxCcmTonE58TVlHdYBzWDj+3zaMtoCcQ0cUcCEgCIpN2iyT+mYf9XSG7ZtKsRH6TBKs4xBbitEIYLQP4JcoirclAWX6jOOYX7kT2OAgUZRoYSOQpCA== 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=O2adqoFN8TaBEV3ZJjX2xKoVD8Uoiaj8ouQz7zh/uYNqz4uXHk3rq31mirIeN4NPdxZt24b28l0au+wMnbt9F+xxl4KKJWgOig71+g5k7Un+uQ7wSDgWQqt2fRlOHm/ZKUrUGCxHAq/cW4L/Q3uEcUsN1hrCckN46FmsWB17mCpcPmfiKEN9LVSlHF4PIMGD/DNFvQ4qoMhqHR2MdQT0gbqbRMBCXjPeiTtUS0cPvn2zdw7+fL8VonHxrPH7ErGq8PMh9/YvH80gk7A2jlymIQsZDz1qiKfwauEWXON7QNrzDWLNwnCdBMtlghdimP2at0xUZBOoCA5rcH8NkhzYmA== 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 BN9PR03CA0166.namprd03.prod.outlook.com (2603:10b6:408:f4::21) by DM4PR12MB8474.namprd12.prod.outlook.com (2603:10b6:8:181::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.19; Fri, 3 Mar 2023 07:41:17 +0000 X-Received: from BN8NAM11FT088.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f4:cafe::a9) by BN9PR03CA0166.outlook.office365.com (2603:10b6:408:f4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.19 via Frontend Transport; Fri, 3 Mar 2023 07:41:17 +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+100675+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 BN8NAM11FT088.mail.protection.outlook.com (10.13.177.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6156.22 via Frontend Transport; Fri, 3 Mar 2023 07:41:17 +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; Fri, 3 Mar 2023 01:41:14 -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 4/8] ManageabilityPkg: Add ManageabilityTransportHelperLib Date: Fri, 3 Mar 2023 15:40:31 +0800 Message-ID: <20230303074035.1067-5-abner.chang@amd.com> In-Reply-To: <20230303074035.1067-1-abner.chang@amd.com> References: <20230303074035.1067-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: BN8NAM11FT088:EE_|DM4PR12MB8474:EE_ X-MS-Office365-Filtering-Correlation-Id: 95566f61-8b3e-4636-2209-08db1bbaac79 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: oEh7FVztAYqyj9MIEMJP8Gh6ITJ4+CGa9JwW3Y184C4RkgKzZzCH8Q34lgUOVvLwL/6LYuv9hbNjZg29VjQSPMHwooGxQ5gN2Fj65r1RN1I2c5vqUwarXVWgplGloyvTc6X0krxIZYRb16iZqb9PL1wJz7mX5rXbZDJ3AHxAJp5qS43ZE9pTg4UX2GQXPw/SaHjGaNjKl6TKDHdn8E6UQ0BxQwHSqVo5/0vzIoqvS5RuBr0WjYXzzjYgCrLpUyuVlWVuWFD4yDDePMXkMDaB8a97sOr15U0rS9tQSsJUultQxVmigVr7qotDffCEaRJZ4Nr7jDK+FqDdOJIMeYKgOeLxxwuIx1JPFTIgSKFKAy5yHFNuaNgaPk78Yj9YW8Rgy/tOgDc+kW2A8tpX3zBQjR3EDlGNEcjrbWttA315noWmZp2q8LqlCWMrRHCWMWEi8JHpaBrRHcD0+Irf33Tb5KLmfaBhTjeUtvZnnicuN798ZSxT63DJVBTy99qBTCH80cPso0IrO1pgvQB+B3nHskRjJ4iF/kBnuApAJKRZX3L/JkbrzsBky+Di4LxIUz0F+RMupJwI0171t4WvbbEjOZDKA5PomjEiLD5kWNLluBDBuGDko1DnX+AXF6hImmwP6f09hSXZpdgZIJRQP0sQ+gRpiLgIVfA7Yx3wHAQHK3W4PyRgzdDubmF5Ng3AHuk/EoCkE6/yap+OqocFI9JsBn6q9S7EEJhkmSe+FqgbIr7r/C+i425JW7Ly4WIvBOw+cq4z2lCaSZNRDY4TJ2R2/w== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2023 07:41:17.4075 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 95566f61-8b3e-4636-2209-08db1bbaac79 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: BN8NAM11FT088.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB8474 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: IG6YwjmMk0fQczbMrCLRj9o2x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1677829280; bh=0Ttn3JJNQraT96FhFMvYtmycqUeTEEseVw93lNKR9oo=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=fXdolaznFQa8IG8gJNSzEOlyi4PNgdmw5ihwz14V6LhzSdPUez6v84k1XplZTwcixqA /rNF0+G7OXL2pIam8QtdpJy6vCxE3s+syx/AKLVIjkCRfIBPSTqPv/GmWEb7lL7H6A3MJ EVrW08KVCtbk84CLWWzpDP/4TePWOEawUpI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1677829281802100006 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 (#100675): https://edk2.groups.io/g/devel/message/100675 Mute This Topic: https://groups.io/mt/97357755/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 Tue Apr 30 21:45:54 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+100676+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 1677829287721949.0639334517748; Thu, 2 Mar 2023 23:41:27 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id nn9aYY1788612xJBvACJg9EC; Thu, 02 Mar 2023 23:41:27 -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.18346.1677829286312574444 for ; Thu, 02 Mar 2023 23:41:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DFuYh8diSnnnzplMO7Y7//uWCyNwlRohjxKXLK0YugKjU5yfP1Wu8dB2uRSXyFFjbRW9mlg6LHu21uTyrlZllwjVm2hZOu+DJni99rtMgVQaN3/MHLQKL/9V4LBjmaOjBvxbHUlblYaO5tJPkxUxeeYG+Z8PnrL1feGomJgP/2uv8fGP+TPv199cBiFxSCkfjBfy3KcKld5QVyofC6fBnrKZWK6UuOLG3+QQgRKTccsN2JYaXa8qgGWpxDs48eVz0Tr5c3F8ldHm+XpCqP5bv0DDeeIY1b0Ohb9XdNoG3K/ZTLGE9MYoBAH2JkDAlElnrX/4AJRowvoEB56aPO7FOA== 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=vdXW62jNxIDTJ9VuunBM9SSxeqvPM30WpTqeECCbomY=; b=ZP0l3nLJGug3IUQqjgIAWT5IQFUSofsEKmQl4TDWi5UcDaQoDOkjGt+KSaPSPFS9Vp3o6NyHCSuGbc+3exE/VzGlc+VUNy2cR0pCZWl0i7hDLqNkV8VmRX90GuUK3viDfvUXXi4AEaYIIjGJQoLjtWu3rUakqSwEM8pXnQRXsWL/yT+6KBr8WSDQygMmJeFDK7mCxRLMO5wOINFYu+i3Q20mlFy3vsEw53ogKg+1NxYaE96W1r/fJgGOX4KXmd4oryPW0SBSKomGJXYlDJ5YSfsJc9bItPb1QJPnignRJHk+W2RIiSeUUf5V7OAUIENRxTlnz9w9vxWaWzXCvW9EjQ== 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 BN6PR17CA0053.namprd17.prod.outlook.com (2603:10b6:405:75::42) by PH7PR12MB6884.namprd12.prod.outlook.com (2603:10b6:510:1ba::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.22; Fri, 3 Mar 2023 07:41:22 +0000 X-Received: from BN8NAM11FT094.eop-nam11.prod.protection.outlook.com (2603:10b6:405:75:cafe::50) by BN6PR17CA0053.outlook.office365.com (2603:10b6:405:75::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.19 via Frontend Transport; Fri, 3 Mar 2023 07:41:22 +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+100676+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 BN8NAM11FT094.mail.protection.outlook.com (10.13.176.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6156.21 via Frontend Transport; Fri, 3 Mar 2023 07:41: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; Fri, 3 Mar 2023 01:41:17 -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 5/8] ManageabilityPkg/ManageabilityTransportKcsLib Date: Fri, 3 Mar 2023 15:40:32 +0800 Message-ID: <20230303074035.1067-6-abner.chang@amd.com> In-Reply-To: <20230303074035.1067-1-abner.chang@amd.com> References: <20230303074035.1067-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: BN8NAM11FT094:EE_|PH7PR12MB6884:EE_ X-MS-Office365-Filtering-Correlation-Id: 6740b0f5-bc50-4ef2-96f3-08db1bbaaf31 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: XLiRRh+NFX03A05ZrzGEefFTOBg1NL9u0jn8KNMkqixQPFYy5u6qolgWNnMT//hSoVHPUYe4yTKSW4Hy2jAmdTByjo36Jn1cWFhvinNyteTsPghy8jyFFxIXJor4btOR3aUHaCaGWFNRlWt6aLPDNa8q/Xi9A3Fyu3zom3jbRgNuTuMU2HhLZeeFcd+ONtKMHasp03k23bQJKvNtBqzuK9sfycAhF+m4nEAhpbV0fnk5sta4n1PVuBWhshJsFIc8SVB2gQGU5w6GdDY+mjmDcOdj//BxQDhf772ZnPA4ZXdpXSn3yPPDXAgIwR5N14HEylDZOwmXtYFD6HxS3s233vXtnmaZ8rD1s2U7sBn9ho0TOShvpfh6m/VC4nYPrLXtLHbv0YsGaY+tkiylOlb0zTilj0vtQv41AzgiJE6bNDovUQbKoCvQ3F2M+0wviyg9vTJswI+F2Gu7v1hFPG2KKMI25B+obsq9lnUlENtAXQKWO/s7VCLCmdNtx3vAOFHMLkFCuJc010Kvs49PE5Q9+XTAH3JbQzcWFjxz6ciGG7gMuSUorrPI6zc5iCh13BJzOkfqK2fR6tfAhsKvsg9mfZVF1RpCHNou52GOxM7g2vYdf2UIpAb2nb1mGlNy+gNBG3tlnmn8Z/Wl2WcJsTMnktPmljv0WeRSR7DP+ktGaSka0q+7pIo/PRKpc8ctlLU+R3+1GeiRBpcC0/3G0dnpZVbdYjAeMQQjUUYXtL9AlgnYwLmJBWIskxFxeHSOjdWMWXZxSG89h1bOG0t55Bkvkw== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2023 07:41:21.9718 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6740b0f5-bc50-4ef2-96f3-08db1bbaaf31 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: BN8NAM11FT094.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6884 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: tXpsBfv8G91qJ9gNkoxg6C2Ex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1677829287; bh=DY2nUvRt2CCBIKmu33/558ea+VcD+MIkGri/daQDetA=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=f45u6ZD0OZm7ut32qpOzDptBQVPF4WrSLfJiIJrb6mZ+CQTVuFkOsPRbHrel73Vcjxp 0kh8q6tclfR5EgCtGus9r8kv2x/gekGeZBolhtsx6DzEgE4WQ6vIngOq9QCfD+wnkqemv +sLQUVvCesOmYgPtHoaRDQX4R+M0Libr68k= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1677829288976100002 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 | 375 ++++++++++++++ .../Dxe/ManageabilityTransportKcs.uni | 13 + .../Library/RiscVOpensbiLib/opensbi | 2 +- 7 files changed, 1022 insertions(+), 1 deletion(-) 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..f23321e444 --- /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), " \ + "RspNetFunction =3D 0x%x, " \ + "CompletionCode =3D 0x%x \n", + Status, + RspHeader.NetFunc, + RspHeader.CompletionCode + )); + 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..59be23df72 --- /dev/null +++ b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/Ma= nageabilityTransportKcs.c @@ -0,0 +1,375 @@ +/** @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->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__)); + 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); + 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." + diff --git a/Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/opensbi b/= Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/opensbi index a731c7e369..937caee083 160000 --- a/Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/opensbi +++ b/Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/opensbi @@ -1 +1 @@ -Subproject commit a731c7e36988c3308e1978ecde491f2f6182d490 +Subproject commit 937caee0833115f69d697ca190001ba0aa5c7368 --=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 (#100676): https://edk2.groups.io/g/devel/message/100676 Mute This Topic: https://groups.io/mt/97357756/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 Tue Apr 30 21:45:54 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+100677+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 1677829289139247.30478145300447; Thu, 2 Mar 2023 23:41:29 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id Z2SaYY1788612xn9qqD0339p; Thu, 02 Mar 2023 23:41:28 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.77]) by mx.groups.io with SMTP id smtpd.web11.18386.1677829287905717473 for ; Thu, 02 Mar 2023 23:41:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mGX9pb6zFHBXbL7vniX8twPp7LCBGMgXjryRIqnMjUPXaoA8f+6qGKeyvsOJicxBG9nHFQKmZipXDVmKx8VrKauEZ5azF83vJ90g3hW5rie4Anrjt8oKbsxGWC3dzZ/SZlozyxUtkN00AN/uOgVy0mg+ZPO6XKcDYI8jmDErGH6PRrHAxk41bwovqRD6kicworrQymAw7y2jTUuJsnrwr1vhVWLVks8Ol4usOp0gCJfCQHQ4wcBoULWvOkcdwrvHS4CHGV97SuGjyz1e2W1OHA4wiHJEC1x1t8hWL2kJZk8Kk6SHwXP/uIlrJDSh7INvYCqfIYZvuOGgiJQs/E3mWw== 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=NOYP1VlOfL1FwTuOjGnRlUhLnITj09vR7GJyVN1kYLI=; b=FBUl5kp5eBBwYFmcaN0cYysL4IqjGzu6hDMcbewX6cf0jqzUHk0mnHp4h29wbFgjjzaGQN6+B66zxFaIz9YOHoaArRnm5octxOqo3mOeadwdl9T/MMEE+hNWz2a+Iwdw7rFW5JKT9wwgmDEF+irzgdEtF6r/+Zavc4aBxldiXNg3QbG4Nnpv2x/PjSJCaK886OstHWDXIdFAoPbLqN623x/brjV+C40QdUzu0iIJdCVoqihwvt7zki0d5w4YaoQwTdRPM4FLupkPo0lsdoyYI9kyNceEjovU1TzFI9VYnjnIFc7tpoFS6BRM4S1NrcXVdWMgj/EtRCz+l9TIsoLSBw== 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 BN6PR17CA0026.namprd17.prod.outlook.com (2603:10b6:405:75::15) by CO6PR12MB5491.namprd12.prod.outlook.com (2603:10b6:303:13b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.19; Fri, 3 Mar 2023 07:41:24 +0000 X-Received: from BN8NAM11FT094.eop-nam11.prod.protection.outlook.com (2603:10b6:405:75:cafe::91) by BN6PR17CA0026.outlook.office365.com (2603:10b6:405:75::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.21 via Frontend Transport; Fri, 3 Mar 2023 07:41: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+100677+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 BN8NAM11FT094.mail.protection.outlook.com (10.13.176.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6156.21 via Frontend Transport; Fri, 3 Mar 2023 07:41: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; Fri, 3 Mar 2023 01:41:20 -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 6/8] ManageabilityPkg: Implement Ipmi Protocol/Ppi Date: Fri, 3 Mar 2023 15:40:33 +0800 Message-ID: <20230303074035.1067-7-abner.chang@amd.com> In-Reply-To: <20230303074035.1067-1-abner.chang@amd.com> References: <20230303074035.1067-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: BN8NAM11FT094:EE_|CO6PR12MB5491:EE_ X-MS-Office365-Filtering-Correlation-Id: 507254fe-ce8c-45da-f7fe-08db1bbab07c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 0LlsPJl5B7s5c+jZmc/upogOUl8uczVUl9C37obtAVXNAQYfZB9wQf2PfmwAZ6BVkPkITvl4acqpXVTO1danq+mq0JctA7ymoBlrlV/QVjx305H6+BKDXivGw0/JrY2YRPbiDzVaddG9eTfMImx+citThexw9dCwXIgnZPly3R0x4IZK/eo2xtGVMWFJw69JYWa9/L4wGZUsJ2FDbCJGDmnqSBuLA2oQMEbtgZ+29vrCfKPgOrQhg9m9axoHXUtcejQ+OfPiDjLwhPsYCtVW70jrF1xzGqbw3rxXYj0sVRuAUrYUOO/CoMqg0J7vVEDGMM1LM0KCoW0c8V3/cR1b2Z/3UJP0OojEwZdtCMdtppvY71/8re+j7t82skmYpne+3+4n5Hw+0vukUCmX5I4sXP/+rGw5bIWAI+GeDepVqlZWykaJZTQvV2GuQrmzRvjKXoreLHNOh83a4/66r6yx9MfByxUEelW81IycaziLOf3uTLDml0LZbKvsYZKr005/tq0ApINnr2CfQDcvcU7gx4LoeOLRaDDaNIoI3lkIfY0VTrUTKFOyWM9Y1aoBpLzHB4AFhgKlqqTu7teUwQJnWp9Hm+ahoRkrSUSSlRMnAg66iX4IaX5i5nz3vR+nAZ4S6dfetCsKspxN+2cIaaprhm3BXth5VUfuuB0fKKyCEjZPwDgbBiUk2EGbt7eToOaAV4Hpmfbp34srzqp9DOmDHDOWiojvdi9iCEzZl5b/iKReMkV8n6Y0kE6fxPNWrZ2sz0iR4lFE/tONY1gCSFcp3A== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2023 07:41:24.1435 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 507254fe-ce8c-45da-f7fe-08db1bbab07c 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: BN8NAM11FT094.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5491 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: EYupm9N7o7FvEyc8H4tIllYex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1677829288; bh=qBhNIj1ODhtKcZ78FmZXv1bEgRthAdcAYSUd9XC4hjA=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=iliCSuFZ6jeT6e5D0KZCTnm9z7YcA+pA4+Zcwhk6qEWWiawZ6FyvjqT+SWNUYkwEIbm eHpuiZ+WXAlxJvRyi4wdVd6v4y0v6dDRRWjXle1mjPB9LyQ7hKWvmFEvUA0dfSZ/5F8sA gzETZAP3xWUJtF2BCL/xYpqZAqelCialmIY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1677829290454100006 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 | 245 ++++++++++++++++++ .../Universal/IpmiProtocol/Dxe/IpmiProtocol.c | 177 +++++++++++++ .../Universal/IpmiProtocol/Pei/IpmiPpi.c | 151 +++++++++++ .../Universal/IpmiProtocol/Smm/IpmiProtocol.c | 147 +++++++++++ 8 files changed, 981 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..ede4dd10a8 --- /dev/null +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolC= ommon.c @@ -0,0 +1,245 @@ +/** @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 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 + ) +{ + 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; + } + + TransferToken.TransmitHeader =3D IpmiTransportHeader; + TransferToken.TransmitTrailer =3D IpmiTransportTrailer; + ZeroMem (&TransferToken, sizeof (MANAGEABILITY_TRANSFER_TOKEN)); + + // Transmit packet. + if ((ThisRequestData =3D=3D NULL) || (ThisRequestDataSize =3D=3D 0)) { + 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 (#100677): https://edk2.groups.io/g/devel/message/100677 Mute This Topic: https://groups.io/mt/97357757/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 Tue Apr 30 21:45:54 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+100678+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 1677829292025575.2429850181838; Thu, 2 Mar 2023 23:41:32 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id AgqTYY1788612xd5ER0aBzq1; Thu, 02 Mar 2023 23:41:31 -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.18387.1677829290960321423 for ; Thu, 02 Mar 2023 23:41:31 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mYGmPbPRZRpoKq5wp9Bj3fH/oIVRNKKsVODBfM+KX5ys67Kj65LqXA2jFVkLR843Qo/vK8dxMMEu+q5W4iBnekCqZyPgOgUrUMyU6DoyQXtW7VYJZL7i7BWptL+aXkN5m1rkommtnMHCIE0x+2QPUHGpmgvUJiF2+QNLnj6iUArO7zJl5pzU65Xy4PSCB8zGKSml7dzyrV3Tdgb99bixIlYFUIQFqSuwTSY2Tab4nAAuw/Qnbx67+dohaEq/EGYi4SqeaPr7qYGBV7eEYv8HR69IDpinuAy/4OXnUUs6mtu9EtaQZoTEtqYw34x8+uVQSPRtC39MXRAaa2Rfc+6OfQ== 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=BzWABP1kG8RjZMO6KgCbeGHGNJGXqLfXNC+CmETh/6403eqSfgO5jabimJwqKaDBu6/ADsnVyp2YQvpLqPOTmrVfPI7zG4x7JWH8RHzbrtDr6Yvaa7FfHmGVaKRC9gT8Q1Kf89o7OPVNd40qMGP6F/I9gfmJIuyy+z+EsNJyWT3YgHNHwK/zGaPEqgVKFRyfmL4MCXrhopvDrnjM33MQtbpcNfQGYfHrzYgJYo87uX0Yo5rBcCJ91e8te5QBPyqerfdLQjQBle8B4EYvWHvLnVq6gc9E0Q3ZZ0xUwCuvMgprLt4gnDsuzyiplETOK5riF3ik2vYxnNxq1pweTyyfjQ== 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 BN6PR17CA0045.namprd17.prod.outlook.com (2603:10b6:405:75::34) by PH8PR12MB6843.namprd12.prod.outlook.com (2603:10b6:510:1ca::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.22; Fri, 3 Mar 2023 07:41:28 +0000 X-Received: from BN8NAM11FT094.eop-nam11.prod.protection.outlook.com (2603:10b6:405:75:cafe::3) by BN6PR17CA0045.outlook.office365.com (2603:10b6:405:75::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.19 via Frontend Transport; Fri, 3 Mar 2023 07:41: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+100678+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 BN8NAM11FT094.mail.protection.outlook.com (10.13.176.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6156.21 via Frontend Transport; Fri, 3 Mar 2023 07:41: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; Fri, 3 Mar 2023 01:41: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 7/8] ManageabilityPkg: Add IpmiProtocol to Manageability Package Date: Fri, 3 Mar 2023 15:40:34 +0800 Message-ID: <20230303074035.1067-8-abner.chang@amd.com> In-Reply-To: <20230303074035.1067-1-abner.chang@amd.com> References: <20230303074035.1067-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: BN8NAM11FT094:EE_|PH8PR12MB6843:EE_ X-MS-Office365-Filtering-Correlation-Id: 2408b817-fe8c-40bb-41e2-08db1bbab2b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 6Ye3iMH+JPmcpTqLcCmbXvbKiXsbHJ6JrPeEBADKWSGkd3lfrx5RAbyTxm+HScd+SjBLcc9/cPiMEAGG2sQkGaJDzOvOyrD67qepEixkO/ZnuV4pMnVCRYZ9nK2JZZAVeyrgEu/puiZJB9F+DpQ9N1+cV2rezInkhPu88PFiRuZw2qT15oUuBEDzc7j6dUrACsZD23ibApXo+O6hWBq0VQJqxHVhcw1ACGYFgxmlbU4JJKps7IAoAgQv6799Z+a/tHUJ4isLDj6XdxB6KLFWXEvb+vikGAeJfrAidAMhhM0H82lRhx06JX6BlNx2KW3jGp0QlgEMu32IRiJh+1723LE9Z3heYNc9AiHUXQLpbtkuJVrYRTaVRzbqXG0Rzqvh57FGwmmo3ZtR+6xJ+4soztPrPnpZtlTNWcajn35FXbZ3UER3IAKc8Lnb0e+6rto+r83FQQpYAyThYjlPwJmqEjIwsLgLJsrHTni2uYvYfqbicVmOHGBYB7V2qzdSTDsmV4ka6g1L2+I0kMpoj5hIxmFa4UzznkhHduBQ0deevRE86ICuFnPfrW/jbCnnjEJIJ/jGndZFFrte1+W5zcy7ubDqmmDwjP9HlnC66CFykN2M6NwVfmAYRDQ4LJ9LobjZT1FmyC3P05FKrb+JY9WU0e+NjH8QRE6mjshKsdNKrMwwmjr/8UuItZu65tenAonJ49C463BxgkVe6JSG/K8ZZQo8M6IH6labzXXK5oI4JXU= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2023 07:41:27.8940 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2408b817-fe8c-40bb-41e2-08db1bbab2b9 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: BN8NAM11FT094.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6843 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: NonVv2glcdxUkuOXg6bfOQixx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1677829291; bh=JFlTOL9gV+iDsinyRaq5Zs3SNTagl8rdsu2sn8wctFk=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=fX3iaoEWP6pv5FCqkGdkJsNCHWHf1bnHJYT8G2hz7m/q49YgF3HRQfbeI5p2eIP23d5 FO2Ke7+RUl5qA2rQspd0UmtTneamJdyxbtI/Ke9QeekRIWMZSzURpiBrwBkSFTbQ1shVk NLi0ZNlX+k+Wm8dpRLtji1FMUEGr3m91JIE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1677829292432100010 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 --- 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 (#100678): https://edk2.groups.io/g/devel/message/100678 Mute This Topic: https://groups.io/mt/97357758/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 Tue Apr 30 21:45:54 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+100679+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 1677829293872147.97614141323402; Thu, 2 Mar 2023 23:41:33 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id Is1NYY1788612x0AFk1pzgB0; Thu, 02 Mar 2023 23:41:33 -0800 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.66]) by mx.groups.io with SMTP id smtpd.web10.18349.1677829292888133010 for ; Thu, 02 Mar 2023 23:41:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HD/eQVsf/hekPcVxqW+QKcz1UboteNKXOhQB2moVe1hoWB6oHbWcc7vkwfx6dw1vMUMgtDpyavHhrzPCoxwOxaKlFqXuv7pE1ajvobeewQAOvGIlrQIZbcZxYqJ5c8DQAbX2qwJF9cMgDl6l+2vAP5ggS5q8GGtEQjGB/9fbIXrNaLQObEDlog88rx2P1HZF81EuH6wtbi87qlrR0AOCoigiQTIgBXAI3Y/SQ/0nNY+MywXCIBJkEOSekn0All8KJEJqodmfjhRd0/CF8S/ugvqs2XQxCHcCo7yyEqIgj8RgKd8p/wfYBGJCX+BbKED/CdNd2mIHeCRYUfuNCFpgTA== 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=Ueq1OucR7QvVaO+OQZajcBVz1U4I/XkbvLXmKMa5ux4=; b=bmTO6DPuTJjMpS9H/OqeOUiDc4iCjmTuJ0GF03w+ahiY/QVlrp7DrLMj/EvOjqlUNJfitZcShP05zIQIceUd1pGL0MX5eUSdYqPfLlkiTGaEB2LUUtang60jkeGa5BW6sGaYoajmPIGkOovATe2p8UZ7rV5s+tFOt05SY8PKsWdXs6Q1BIj5gUTF7/JgcZaFwlV4os/Q1FCiCm96C1cOtktoufTBOyEbkQq+ACHFzEkXe4DpfMMv5zoaxbCLgeDVj0ZvuOaWXlqnYaFU+AL4w0HB3aPB2euk31q7sGzx9SDbSofQWGchT5Q/o22PW6TcX/RyM82f9ULFD0H54gdFsQ== 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 BN1PR13CA0027.namprd13.prod.outlook.com (2603:10b6:408:e2::32) by PH7PR12MB7378.namprd12.prod.outlook.com (2603:10b6:510:20d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.19; Fri, 3 Mar 2023 07:41:30 +0000 X-Received: from BN8NAM11FT099.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e2:cafe::aa) by BN1PR13CA0027.outlook.office365.com (2603:10b6:408:e2::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.10 via Frontend Transport; Fri, 3 Mar 2023 07:41: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+100679+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 BN8NAM11FT099.mail.protection.outlook.com (10.13.177.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6156.22 via Frontend Transport; Fri, 3 Mar 2023 07:41:30 +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; Fri, 3 Mar 2023 01:41: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 8/8] edk2-platforms: Maintainers.txt Date: Fri, 3 Mar 2023 15:40:35 +0800 Message-ID: <20230303074035.1067-9-abner.chang@amd.com> In-Reply-To: <20230303074035.1067-1-abner.chang@amd.com> References: <20230303074035.1067-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: BN8NAM11FT099:EE_|PH7PR12MB7378:EE_ X-MS-Office365-Filtering-Correlation-Id: 64e5a5cd-fc5c-4e8c-1849-08db1bbab42f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 7rUOV4TgCJyFzVWLxCxLP63XxjtkTHd0/panPyW4GBh7jo8KmAXyfFJS8BMuWovUlLmzobNZLeAfBg/DcHNhWiNF5864IaqI29ys6tQlhhmP4ddJyoL6zjnDllY23jDwCwXqukfVaO01FWUNkA3Ukj6tXuvN3GahUHc2r/fEzPLllMIEXpVAZ5t8J81Q+ji8h2rZR0W2TqBAfIWSCB22D4NHPLvl0V/SGGDbtCjEhQsEQAcqEd0qbVFz95ErkU3L0ivjGcn+49xj1DliwIsf1R/sPiUWEDfDGr7pJf/HVeQY/I2XWI+0mbpv8OGI5TqibowuIvUE627Jic1yzVFuC6IzJSyArio0hepcBj0Qisgp60cUd3Mk1eZrOmV4O9kF7hJrxTUAPvQFMYYr/emjNnNPejXzk53Sr2Mg5MDyijo8odDkmBpxOa2ooXZ4EFZB1rla0XNnssxf9/MXlzFBA/fMc/Iu9CUFskHK4BbhLyDDoSY/jKAzaz96+Yyz0f4vTkahGAMr1Vknd4LDwuP12MhO+jCn5iTRKMLON5G5kui+dOx5ByII6zUwMpbTzPzKww0G8y99Q6SdPiO+mBS2xCtM3SHwyZtCi2QVyR6/O2aGCvSgglH67jQ3mof3TaywhkWW79K5Sn2xOZtrZtl4HQcig972TgrHjWR0mc3SOMWCaDxr++RhqVkO3CV+TYewyc5B8AFlLcKV+BrTlEomeq3Br1JXfovYndvvX9ygO10= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2023 07:41:30.3440 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 64e5a5cd-fc5c-4e8c-1849-08db1bbab42f 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: BN8NAM11FT099.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7378 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: CnToPKkfVe5VyhmroFfCRE3zx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1677829293; bh=J7LVFtY2B/tcGy4mItyu+G9htfpWsvVN9Zsttayj7T0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=jTn5j0+guZ6IAiG1CngS/CPeHuysJOS95lW+58kMkEE6dAjJqboBNrdjd7mXPESGSpj 0erhJ68IIBUpWIVPzA9rKWMOqgABzm19wZ1jzAGYrmdo7xTsp8sJOHXEIcocvh/d5Synz WijMQ9ZSoUhP8Xpo4M1ILXlEykif177z0tk= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1677829294382100014 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 --- 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 (#100679): https://edk2.groups.io/g/devel/message/100679 Mute This Topic: https://groups.io/mt/97357759/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-