From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 12D8721BB2524 for ; Thu, 15 Jun 2017 01:04:40 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jun 2017 01:05:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,342,1493708400"; d="scan'208";a="981103565" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 15 Jun 2017 00:59:47 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 15 Jun 2017 00:59:47 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 15 Jun 2017 00:59:46 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0319.002; Thu, 15 Jun 2017 15:59:44 +0800 From: "Wu, Jiaxin" To: "Fu, Siyuan" , "edk2-devel@lists.01.org" CC: "Ye, Ting" Thread-Topic: [Patch 1/2] MdePkg: Add header file for HTTP Boot Callback protocol in UEFI 2.7. Thread-Index: AQHS5PHM6/AO+jdNX0S2jPHDHIMS56IlkMaA Date: Thu, 15 Jun 2017 07:59:44 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B7274162DC233@SHSMSX103.ccr.corp.intel.com> References: <20170614093642.2240-1-siyuan.fu@intel.com> <20170614093642.2240-2-siyuan.fu@intel.com> In-Reply-To: <20170614093642.2240-2-siyuan.fu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTJlMDM1NmUtYWQ4OS00Yzc0LWJmOWItYTA5NWM4MjRkZGE4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkwzQUxlaEpoY1g2OXRuQmRZTlRXMFBOV0hrN3RsRDUwRW9zQm52bzRXcDA9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 1/2] MdePkg: Add header file for HTTP Boot Callback protocol in UEFI 2.7. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2017 08:04:40 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Wu Jiaxin > -----Original Message----- > From: Fu, Siyuan > Sent: Wednesday, June 14, 2017 5:37 PM > To: edk2-devel@lists.01.org > Cc: Ye, Ting ; Wu, Jiaxin > Subject: [Patch 1/2] MdePkg: Add header file for HTTP Boot Callback proto= col > in UEFI 2.7. >=20 > Cc: Ye Ting > Cc: Wu Jiaxin > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Fu Siyuan > --- > MdePkg/Include/Protocol/HttpBootCallback.h | 100 > +++++++++++++++++++++++++++++ > MdePkg/MdePkg.dec | 7 +- > 2 files changed, 105 insertions(+), 2 deletions(-) > create mode 100644 MdePkg/Include/Protocol/HttpBootCallback.h >=20 > diff --git a/MdePkg/Include/Protocol/HttpBootCallback.h > b/MdePkg/Include/Protocol/HttpBootCallback.h > new file mode 100644 > index 0000000000..7542b30e03 > --- /dev/null > +++ b/MdePkg/Include/Protocol/HttpBootCallback.h > @@ -0,0 +1,100 @@ > +/** @file > + This file defines the EFI HTTP Boot Callback Protocol interface. > + > + Copyright (c) 2017, Intel Corporation. All rights reserved.
> + This program and the accompanying materials > + are licensed and made available under the terms and conditions of the = BSD > License > + which accompanies this distribution. The full text of the license may = be > found at > + http://opensource.org/licenses/bsd-license.php > + > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > BASIS, > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > EXPRESS OR IMPLIED. > + > + @par Revision Reference: > + This Protocol is introduced in UEFI Specification 2.7 > + > +**/ > + > +#ifndef __EFI_HTTP_BOOT_CALLBACK_H__ > +#define __EFI_HTTP_BOOT_CALLBACK_H__ > + > +#define EFI_HTTP_BOOT_CALLBACK_PROTOCOL_GUID \ > + { \ > + 0xba23b311, 0x343d, 0x11e6, {0x91, 0x85, 0x58, 0x20, 0xb1, 0xd6, 0x5= 2, > 0x99} \ > + } > + > +typedef struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL > EFI_HTTP_BOOT_CALLBACK_PROTOCOL; > + > +/// > +/// EFI_HTTP_BOOT_CALLBACK_DATA_TYPE > +/// > +typedef enum { > + /// > + /// Data points to a DHCP4 packet which is about to transmit or has > received. > + /// > + HttpBootDhcp4, > + /// > + /// Data points to a DHCP6 packet which is about to be transmit or has > received. > + /// > + HttpBootDhcp6, > + /// > + /// Data points to an EFI_HTTP_MESSAGE structure, whichcontians a HTTP > request message > + /// to be transmitted. > + /// > + HttpBootHttpRequest, > + /// > + /// Data points to an EFI_HTTP_MESSAGE structure, which contians a > received HTTP > + /// response message. > + /// > + HttpBootHttpResponse, > + /// > + /// Part of the entity body has been received from the HTTP server. Da= ta > points to the > + /// buffer of the entity body data. > + /// > + HttpBootHttpEntityBody, > + HttpBootTypeMax > +} EFI_HTTP_BOOT_CALLBACK_DATA_TYPE; > + > +/** > + Callback function that is invoked when the HTTP Boot driver is about t= o > transmit or has received a > + packet. > + > + This function is invoked when the HTTP Boot driver is about to transmi= t or > has received packet. > + Parameters DataType and Received specify the type of event and the > format of the buffer pointed > + to by Data. Due to the polling nature of UEFI device drivers, this cal= lback > function should not > + execute for more than 5 ms. > + The returned status code determines the behavior of the HTTP Boot driv= er. > + > + @param[in] This Pointer to the > EFI_HTTP_BOOT_CALLBACK_PROTOCOL instance. > + @param[in] DataType The event that occurs in the current s= tate. > + @param[in] Received TRUE if the callback is being invoked = due to a > receive event. > + FALSE if the callback is being invoked= due to a transmit > event. > + @param[in] DataLength The length in bytes of the buffer poin= ted to > by Data. > + @param[in] Data A pointer to the buffer of data, the d= ata type is > specified by > + DataType. > + > + @retval EFI_SUCCESS Tells the HTTP Boot driver to continue= the > HTTP Boot process. > + @retval EFI_ABORTED Tells the HTTP Boot driver to abort th= e current > HTTP Boot process. > +**/ > +typedef > +EFI_STATUS > +(EFIAPI * EFI_HTTP_BOOT_CALLBACK) ( > + IN EFI_HTTP_BOOT_CALLBACK_PROTOCOL *This, > + IN EFI_HTTP_BOOT_CALLBACK_DATA_TYPE DataType, > + IN BOOLEAN Received, > + IN UINT32 DataLength, > + IN VOID *Data OPTIONAL > + ); > + > +/// > +/// EFI HTTP Boot Callback Protocol is invoked when the HTTP Boot driver= is > about to transmit or > +/// has received a packet. The EFI HTTP Boot Callback Protocol must be > installed on the same handle > +/// as the Load File Protocol for the HTTP Boot. > +/// > +struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL { > + EFI_HTTP_BOOT_CALLBACK Callback; > +}; > + > +extern EFI_GUID gEfiHttpBootCallbackProtocolGuid; > + > +#endif > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec > index 7a7504b7a3..a55e8ce1d9 100644 > --- a/MdePkg/MdePkg.dec > +++ b/MdePkg/MdePkg.dec > @@ -2,7 +2,7 @@ > # This Package provides all definitions, library classes and libraries i= nstances. > # > # It also provides the definitions(including PPIs/PROTOCOLs/GUIDs) of > -# EFI1.10/UEFI2.6/PI1.4 and some Industry Standards. > +# EFI1.10/UEFI2.7/PI1.4 and some Industry Standards. > # > # Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
> # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved. > @@ -1671,6 +1671,9 @@ > ## Include/Protocol/BluetoothLeConfig.h > gEfiBluetoothLeConfigProtocolGuid =3D { 0x8f76da58, 0x1f99, 0x= 4275, > { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 } } >=20 > + ## Include/Protocol/HttpBootCallback.h > + gEfiHttpBootCallbackProtocolGuid =3D {0xba23b311, 0x343d, 0x11e6, {0= x91, > 0x85, 0x58, 0x20, 0xb1, 0xd6, 0x52, 0x99}} > + > # > # Protocols defined in Shell2.0 > # > @@ -1685,7 +1688,7 @@ > # > ## Include/Protocol/ShellDynamicCommand.h > gEfiShellDynamicCommandProtocolGuid =3D { 0x3c7200e9, 0x005f, 0x4ea4, > {0x87, 0xde, 0xa3, 0xdf, 0xac, 0x8a, 0x27, 0xc3 }} > - > + > # > # [Error.gEfiMdePkgTokenSpaceGuid] > # 0x80000001 | Invalid value provided. > -- > 2.13.0.windows.1