From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.66]) by mx.groups.io with SMTP id smtpd.web10.34190.1679453352355285155 for ; Tue, 21 Mar 2023 19:49:12 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=rdmGGsWZ; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.223.66, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qdd6/37R6gQneibpvkvXRZ/4r62fbSJO7X9k4/QA1qX7W0hP3gdHXazGqXH+cncFnkgqKPo/566WopUmr9/Ukgp5If43qepSGw8sKTuOQWuM9YB/ZZpXGT4ydN+/XK4FpM8xRPfKEmJxC5Ru4mSmt4uqqfkB9q5hp+s251lFpaf8ejw/15FDXArH8qgwUIol1TKhSh0cjZsgUldNfKj6b7a2wrnTOF0NcXb8VXmRGm26nk7flUzXEytWxhOHoGmCCQte6Lef6Gb6K9i7L3R5a8b+FjHVjRl2yVD52pErSp4ONqEvU/7aHSE8hdh3eqKb8gihwepRA1ikrd1+uGtOcg== 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=fAR8MHfSdaIRrsY0h86FblLjQc4vQmU8pjnFNG3QmUM=; b=FYRyX/+b8IGSWzb9f842Mk5PwCbdkcd293424fvRwXKC0rWYc3AWqw1lk6dvSlv2zmU+YLWwbEsf0xtDhS2QQ9e97O7lXYh3ktyl7GqXfgPR0J7xZtWtWdvS1/17db5LJEI2nnEqrqKOu+kSr9yaHSRyMAQQMq+sgdU7P1/Gb98uQiZB3LxojJ3T79JsdDHN9z+3VfRZQwTtcetuqU/2vLo8R540rUxWJAumBMlenuk/N1ffie7t5yAmJH01ClGZp8yHazrOKnn5euTFnrlTOC2WggmGwTfp80yyzcGXYDnaNS+Dl3ZshXTTGZecNdx4ds0hZNnjWwzo1G/uyNHb8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fAR8MHfSdaIRrsY0h86FblLjQc4vQmU8pjnFNG3QmUM=; b=rdmGGsWZI/QkN1FPavbYWhsULmUSAUJeluNajzIvml6cWQiALEA7JlcAbtZAk9rQPbqiB9W758ffjLJGbrC3kvv17zBx/dJAxcn5mwlDD34d4maPCb9wHELKvebTCpZZ3s2rVr9mDRjC490YfdoubtsE65Akunh3iubmAljUYYY= Received: from DM6PR07CA0123.namprd07.prod.outlook.com (2603:10b6:5:330::24) by MN0PR12MB6080.namprd12.prod.outlook.com (2603:10b6:208:3c8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Wed, 22 Mar 2023 02:49:09 +0000 Received: from DS1PEPF0000E654.namprd02.prod.outlook.com (2603:10b6:5:330:cafe::9f) by DM6PR07CA0123.outlook.office365.com (2603:10b6:5:330::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37 via Frontend Transport; Wed, 22 Mar 2023 02:49:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0000E654.mail.protection.outlook.com (10.167.18.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.30 via Frontend Transport; Wed, 22 Mar 2023 02:49:09 +0000 Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 21 Mar 2023 21:49:06 -0500 From: "Chang, Abner" To: CC: Liming Gao , Isaac Oram , Nate DeSimone , Nickle Wang , Igor Kulchytskyy , "Abdul Lateef Attar" Subject: [PATCH v4 3/9] ManageabilityPkg: Add ManageabilityTransportLib header file Date: Wed, 22 Mar 2023 10:48:34 +0800 Message-ID: <20230322024840.1629-3-abner.chang@amd.com> X-Mailer: git-send-email 2.37.1.windows.1 In-Reply-To: <20230322024840.1629-1-abner.chang@amd.com> References: <20230322024840.1629-1-abner.chang@amd.com> MIME-Version: 1.0 Return-Path: Abner.Chang@amd.com 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: DS1PEPF0000E654:EE_|MN0PR12MB6080:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a8bd68b-276b-4cd7-2755-08db2a8002c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7RpNmqfGD8q0GLH5blqdnqlEL9cAIqRB/Cpkv1KPJ2ZiYlqUqv3T//0F8XoE8OZvZebqFDIAdZ3u6ZDJGYDvl/L4oOFDT8h6TbUJHtDqT7HXXDOdOlAuOhefp8QENOjvkmbp3bScb4Ahhs99wB0Q9EbgsqRdiku/4d5MB/WhnCmM1Rk2EN6Rwdp7FKFkDo9eXjL0aekJj3wMbYQIyJA/6B6Q7wzY/tIpHkKYj8onKLbmtvUBeAFcsECNooKK+IC/ZF+UqHBRjHqrvCGqf+BcuDM6WMWTKFe9noUkpK9mmBNOu3G3L0JAhRYusexOp/p18+eeAsZ7sMyipqk4ElFaZHb2VunPEj53OfgUMwMNdv9WA1qZgMI1AL173ADEz5D3nu3sQvutHdQQtb97MJ05JL+bFc9dZmFnH/2I5ia5ey2HBBvYTHZ4+C9UAFLOSva3xP1I2peC32btebnAbcPW4gVfoAIm0nG3HolnEFNSdwRt0QCePvjbzBh/Y3vzAt7Yvgg0HuhFFibGd5lZuE3P5xCG7WXzp4owU2CYcGWNyfettIHjnTvwQgIIwnPxet+FTs2SiazYsxMai1FwUwnWm34K7mh1Luj8A1K4dTTc8+QSSJ8ba2TFy2REzKG1vrJVL008t9mJFQNXyw9ccPklKXtkb+nCRs++vGKD6Mq9VlXvwpOTR8nLAVfKoOPhmRYMGNEUpoDwAR5PzeDm2TqhY56LI1ETh9sdqZGtjMjzJ4Q= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230025)(4636009)(396003)(39860400002)(136003)(376002)(346002)(451199018)(40470700004)(46966006)(36840700001)(40460700003)(6916009)(4326008)(356005)(86362001)(36756003)(70206006)(7696005)(316002)(70586007)(30864003)(54906003)(41300700001)(478600001)(5660300002)(8936002)(8676002)(2906002)(2876002)(426003)(36860700001)(83380400001)(40480700001)(6666004)(186003)(26005)(1076003)(81166007)(47076005)(16526019)(2616005)(82310400005)(336012)(82740400003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2023 02:49:09.2447 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a8bd68b-276b-4cd7-2755-08db2a8002c0 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: DS1PEPF0000E654.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6080 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Abner Chang Add ManageabilityTransportLib header file to package. 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 | 5 + .../Library/ManageabilityTransportLib.h | 336 ++++++++++++++++++ 2 files changed, 341 insertions(+) create mode 100644 Features/ManageabilityPkg/Include/Library/Manageability= TransportLib.h diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dec b/Features/Mana= geabilityPkg/ManageabilityPkg.dec index 71bd8a0c80..92ba4538c0 100644 --- a/Features/ManageabilityPkg/ManageabilityPkg.dec +++ b/Features/ManageabilityPkg/ManageabilityPkg.dec @@ -17,5 +17,10 @@ [Includes] Include =20 +[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/Include/Library/ManageabilityTranspo= rtLib.h b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportL= ib.h new file mode 100644 index 0000000000..c022b4ac5c --- /dev/null +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportLib.h @@ -0,0 +1,336 @@ +/** @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 0x0000000= 0 +#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_ERROR 0x0000000= 1 +#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_BUSY_IN_READ 0x0000000= 2 +#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_BUSY_IN_WRITE 0x0000000= 4 +#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NOT_AVAILABLE 0xfffffff= f + +/// +/// 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 --=20 2.37.1.windows.1