From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.43]) by mx.groups.io with SMTP id smtpd.web11.98228.1679656683508613482 for ; Fri, 24 Mar 2023 04:18:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=zGRS0xsn; 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.244.43, mailfrom: abdullateef.attar@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WMNJ6bD9ATYtZ3Ueh4X0QmDWgy4ESF74WQ8YYVyQ73FlAMB882ZZdKqY/LLFH/XPfWSNT+E3UCgjnZM34cNnUrNJMCyzVxPX3P8D2RUNQeX/+HVFYmQS4YBUXcJ+XWXE6BMWvy5HXjvHg24bNzVqrS8F/ZatNR42K5twBhjXF1TX+7xNJlw3eyxwLnMvOxp5qm6yhOa7gDQzOgk5eq2zMLSQbMhZ67zd/tsASN/1YSC2CCiNDK7kVN/sFqxICa7aM86yUlL2XFK2GKh9omgkp2YliPluAAFal8ZyHX4EDkq3Xfoc/sDvT1HtLt8F+ThndFaGpLZCZTBnp/aWC3g8+g== 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=98Eq9eaS4ekR5B57GUOQbBOB7vVj93MnHW07jSOAkpY=; b=I3Ah3Z8HHjgspk/3glbuF8rs4PIxQB3fIlj/yxbWAH8He/yl7BShBTIGawZ6dPsEHR1PI3Y1CCCVXoTTJx4y9CN/wil2EJfueNNBiQi8OMic08dCwv1EHwMQITus/mcVVkPHv2g4fTW09XYNirLj0HzeRLWVU0Gud9ruZvuQDAXzh5X+HlTufWER+JglTW8Pw2K71T8fa3T6nLAvKtFPbq7Rl1h5W5VUP1IMIE8eu6Xl7fflV+TiG+4gZrnH8t0A4+Kbelh78dkSefcIWy5dWUgEep/CHhVshoo3M5eIJHW6TnPDw+58GiTiOx4U7bOkEDZR8XcuzYprgLzOlf3QsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=98Eq9eaS4ekR5B57GUOQbBOB7vVj93MnHW07jSOAkpY=; b=zGRS0xsnj52zATJ5EJo1UV3E1TZfFGiYxd0l2hzHX4ilTV/f6w69W3OMeA6zoiQnLZnKDDCmXgXMIcV2nTMhl7GL1MBH2T5Uox9X3dPaneP9/46fqzWIUQKPqtzqGq8XoR0WS0xN4mwFCZYv+CCPDJrq2dSoyqgg60g21xdrq5M= Received: from PH7PR12MB6466.namprd12.prod.outlook.com (2603:10b6:510:1f6::22) by PH8PR12MB7160.namprd12.prod.outlook.com (2603:10b6:510:228::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Fri, 24 Mar 2023 11:18:00 +0000 Received: from PH7PR12MB6466.namprd12.prod.outlook.com ([fe80::127d:946f:b238:1151]) by PH7PR12MB6466.namprd12.prod.outlook.com ([fe80::127d:946f:b238:1151%2]) with mapi id 15.20.6156.027; Fri, 24 Mar 2023 11:18:00 +0000 From: "Attar, AbdulLateef (Abdul Lateef)" To: "Chang, Abner" , "devel@edk2.groups.io" CC: Liming Gao , Isaac Oram , Nate DeSimone , Nickle Wang , Igor Kulchytskyy Subject: Re: [PATCH v4 3/9] ManageabilityPkg: Add ManageabilityTransportLib header file Thread-Topic: [PATCH v4 3/9] ManageabilityPkg: Add ManageabilityTransportLib header file Thread-Index: AQHZXGjiuAEPIEj3g0ywd0MRbp1FUK8JrSOA Date: Fri, 24 Mar 2023 11:18:00 +0000 Message-ID: References: <20230322024840.1629-1-abner.chang@amd.com> <20230322024840.1629-3-abner.chang@amd.com> In-Reply-To: <20230322024840.1629-3-abner.chang@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=55af3abc-6949-4a47-b7b9-a538f7ca8ed9;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-03-24T09:28:22Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR12MB6466:EE_|PH8PR12MB7160:EE_ x-ms-office365-filtering-correlation-id: 11e097ee-07e9-41ab-dce8-08db2c596d4c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cD76mzd+L1C2W5giF8lUvQ8dZ0Z4q1FZDstBsVm+ItGURvxvU6vRrABQU1lOIicy/GyN4fG/rcqLkaKt90gFsN1OP+ECZ2LJw1jEFK42kvj4Fuj2m3nyHGc1GIOAwJl6pmPcbjvPG0IxXMhqnnenvQqXvItJ+mFbJQswLZBQdhiPDMAC3kaC/AMVfJFvXFIAOSuTp77quuL7MJV2KtG+/FSaBX3Fj2+OiD1c62sRX5+9lm0qGFwDDyhVKj7TF7pNdw74WLlgRDiwTk5cjwayZVpUWP4fYvsmXo15i5M+AN4N3RRqGSXHX1fvP0no7yv8s7hnN7sXOdfY1aD2jcm1aFABqRCXRSCy7gksrurEe7su8e8owsFVYDLO8WvLHoOLkgr8MBQuPbw9BVrSpV3nOa4Kq2I0gtMK+5bJ9kxaDK3PaQPKPZhU5dt/AFmjzUMUYqe1TuzauLbrzNyaZbAMRQA67jl8Kwd422NeonoQNpkgtGD6UGaM/h0J7TCKY84WAwWC82jX6v851/OahYBZr//O5SM1/DqYpbaxYn30IkPmKzC+SHAXyCi7+94l+/EwEhQ5kBveFOlzk5QxEh/Lg2DioRTboV1jYy43wFAL6yB6Um66oBMotCXBppr4SoxGujTAaPPOii/cZx/mmreMkwmOCwLYxnPLY/HH0tkXyxjSdaA+hNDx5Lr/CmI2eoN7XEgl1xCWyweGcx4OqCfdrw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR12MB6466.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(376002)(396003)(136003)(39860400002)(366004)(346002)(451199018)(4326008)(41300700001)(66446008)(8676002)(5660300002)(52536014)(2906002)(64756008)(38070700005)(66476007)(33656002)(86362001)(38100700002)(122000001)(71200400001)(7696005)(76116006)(110136005)(316002)(478600001)(83380400001)(8936002)(66556008)(30864003)(55016003)(54906003)(26005)(66946007)(6506007)(186003)(53546011)(9686003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cXE9g/2l/cPQiUVT4dj1/2t3H5PuWIewp/27LhRmw4TbUrL+UYwNqyqkj4Fh?= =?us-ascii?Q?xFoXhbCvanDLwTuZnR1LPLFEHGYT+1d0EY842lg/hY0+xn2vvooeWqK+JOJt?= =?us-ascii?Q?ohoE1Nv6TiJ+4hOfcL9uIIEaCvQYkhnBN1jStfRAVpNXFoaY7uKCyqa4U3xq?= =?us-ascii?Q?8w6gPx7jV/6FhmUsWjrNWdBP17gsTW6s96bblQrcsKnkcQs951VPMD1CQgl1?= =?us-ascii?Q?oYq8+wsyfkTv6AwbL8jjj6Ord3gHU3skzFWYrqZi8a4lcQomej9X4S+qs9+9?= =?us-ascii?Q?0vyBNayou46EYTuH9fAXrMfAUxUAzxXEwme9Y413ZNu7s/byecsQkI6Ukox3?= =?us-ascii?Q?tQzc5YuhzCrtSVNdPKZXGmJm9EhcDiRmOdl4xtvEHIiMV/Pdpzi68mqY/cwd?= =?us-ascii?Q?eBZKTi2saHVie5gNA+4wli+OYtEjwA0TZ3eebRLV91AH3PXq7MYDhl2MLvV3?= =?us-ascii?Q?ifDjVtKCfHjvayP85nkO/ZDFFpurELCPkPNJYmXcGudd1dkdT9WVKAqbZCzD?= =?us-ascii?Q?u8fU8xpHRS3qSpgJmTPxITYRWJdXfwVcBhakCoX7oPUbrmhmkIY/dtol1msD?= =?us-ascii?Q?TObCHdXzWaRlna0QomWhetiU9uC3HE4fewgGQzLQzaRSuE3lF5p7DPPTT8kp?= =?us-ascii?Q?e0rJRQ1ANtjVSopIzIi9eTR8NLSd0ukGXJhJiJX0z1vSF0ACEycxi2lMckzM?= =?us-ascii?Q?4/yHD4q9IRZBH88YskC1l+c/r2hcfHgRXFyJH+0ekzGZiwy7pqfu+fVG3Sde?= =?us-ascii?Q?2vwt1pPSXp8ARQhUxmdSe5vq/erhngbVnOoB0GxhDKHSUuU61JsJbGSGlMON?= =?us-ascii?Q?Rkg383+B90kz/s24Vmo1c5HQ42E4OcIAH+2MXgtsKEBtXByev3hBZcxwiuF9?= =?us-ascii?Q?gLkxVtwb8x68u+LuekSa7tnd2GZRFsQmyejqnuoOZ7L+WipJj6s+lj0ylEm2?= =?us-ascii?Q?vZpiMg7XM4aN1HFbCdNt25QG8x1AEwjQsZSJ94QP6ilJqmGBOfLhipigBRMZ?= =?us-ascii?Q?ihEGfcWnic/CDP7F8lzfulaOnrPp3RXUOIY0+IiSGqzMF3oGU9tSk3p3aGyE?= =?us-ascii?Q?8FKLaAHRC7V2etr/iBFKZg0rvVnDScziLLm1qdxXh8ySZqEZ0CafP8TB9GWL?= =?us-ascii?Q?GD8jqI+on7qOU/FKzWvNiVF9bvsGo8J9qOuL5nR2Hn6V2zYWIDXGr0x1o/XM?= =?us-ascii?Q?oziRNePRbDMAin1w2FKBlZ4ooC6MovRiMLTevb9M7EyK5uh134A2b/sxeofs?= =?us-ascii?Q?cjcH7Cxh3xi66aq4w1etACHN4aw2PFMfTtU7Hc+o2Ph6H9EsWKuCu3df4jb0?= =?us-ascii?Q?9mhT9a7+DbMfZAEDR2MqMHrUTVWrsMbzSQK8Qv6oVhZs0FLJ4qeXyIkyQ4Ix?= =?us-ascii?Q?A+S53/RhwUFsDZOW9dq8THQSklDvOLrpvoEbP17iHPPKR4P6CX1ptzTMD4X9?= =?us-ascii?Q?fOvCjwm0Xj5k5Tye9Xz2AcVKzX1lNi9/EotYyiGcJ+kicDk1FJPVHVLq6rij?= =?us-ascii?Q?uucx3WPx1NFS1Hcv7HAwZYgNpvcP38FXjCWJrfcv0NjQXIza+aUA0NJw06iG?= =?us-ascii?Q?K00q12JUHdV1B1QNhXd/Nl7s8V7dgK14YpxXenrz?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB6466.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11e097ee-07e9-41ab-dce8-08db2c596d4c X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2023 11:18:00.0210 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2LHYtowuRgnWO51virsgZhRjxQsPl+XIXjpH3ws2M6NjXks4rYV/PfMgyVlqh7NHPRIU6a5vep0dXHZWATzzTg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7160 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Some comments inline. -----Original Message----- From: Chang, Abner Sent: 22 March 2023 08:19 To: devel@edk2.groups.io Cc: Liming Gao ; Isaac Oram ; Nate DeSimone ; Nickle Wang ; Igor Kulchytskyy ; Attar, AbdulLateef (Abdul Lat= eef) Subject: [PATCH v4 3/9] ManageabilityPkg: Add ManageabilityTransportLib hea= der file 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 +[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/Manage= abilityPkg/Include/Library/ManageabilityTransportLib.h b/Features/Manageabi= lityPkg/Include/Library/ManageabilityTransportLib.h new file mode 100644 index 0000000000..c022b4ac5c --- /dev/null +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportLi +++ b.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_TOKEN_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 +0x00000004 #define +MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NOT_AVAILABLE 0xffffffff + +/// +/// 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_FUNCTION /// structure with the incremental versio= n 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 +manageability + 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 [Abdul] EFIAPI is missing. +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 [Abdul] EFIAPI is missing. +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 [Abdul] EFIAPI is missing. +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 +transport + interface. 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_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 +*TransportAdditionalStatus OPTIONAL + ); + +/** + This function transmit the request over target transport interface. + The generic EFI_STATUS is returned to caller directly after reseting +transport + interface. 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_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 -- 2.37.1.windows.1