From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 155888211A for ; Tue, 14 Feb 2017 18:05:21 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2017 18:05:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,163,1484035200"; d="scan'208";a="58664141" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 14 Feb 2017 18:05:20 -0800 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 14 Feb 2017 18:05:20 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 14 Feb 2017 18:05:19 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Wed, 15 Feb 2017 10:05:18 +0800 From: "Ye, Ting" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Fu, Siyuan" , "Wu, Jiaxin" Thread-Topic: [edk2] [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK Thread-Index: AQHShp56c+x4AYyBT0qDtAUTZzPHW6FpUpfw Date: Wed, 15 Feb 2017 02:05:17 +0000 Message-ID: References: <1487061740-225728-1-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1487061740-225728-1-git-send-email-jiaxin.wu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2017 02:05:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ye Ting =20 -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiax= in Wu Sent: Tuesday, February 14, 2017 4:42 PM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Fu, Siyuan ; Wu, Jia= xin Subject: [edk2] [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify a= s a DPC at TPL_CALLBACK This patch is to update the HTTP token notify as a DPC at TPL_CALLBACK to a= lign with UEFI Spec. Cc: Hegde Nagaraj P Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/HttpBootDxe/HttpBootDxe.h | 3 ++- NetworkPkg/HttpBootDxe/HttpBootDxe.inf | 1 + NetworkPkg/HttpBootDxe/HttpBootSupport.c | 37 ++++++++++++++++++++++++++++= ++-- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.h b/NetworkPkg/HttpBootDxe/= HttpBootDxe.h index 7e8cd9d..2814594 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootDxe.h +++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.h @@ -1,9 +1,9 @@ /** @file UEFI HTTP boot driver's private data structure and interfaces declaratio= n. =20 -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This pro= gram and the accompanying materials are licensed and made available under = the terms and conditions of the BSD License that accompanies this distribut= ion. =20 The full text of the license may be found at http://opensource.org/licenses/bsd-license.php. = =20 @@ -34,10 +34,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITH= ER EXPRESS OR IMPLIED. #include #include #include #include #include +#include =20 // // UEFI Driver Model Protocols // #include diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf b/NetworkPkg/HttpBootDx= e/HttpBootDxe.inf index 982e6b4..ec983ba 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf +++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.inf @@ -58,10 +58,11 @@ DebugLib NetLib HttpLib HiiLib PrintLib + DpcLib UefiHiiServicesLib UefiBootManagerLib =20 [Protocols] ## TO_START diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBoot= Dxe/HttpBootSupport.c index 69b129f..d786d72 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c +++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c @@ -623,10 +623,43 @@ HttpBootSetHeader ( =20 return EFI_SUCCESS; } =20 /** + Notify the callback function when an event is triggered. + + @param[in] Context The opaque parameter to the function. + +**/ +VOID +HttpIoNotifyDpc ( + IN VOID *Context + ) +{ + *((BOOLEAN *) Context) =3D TRUE; +} + +/** + Request HttpIoNotifyDpc as a DPC at TPL_CALLBACK. + + @param[in] Event The event signaled. + @param[in] Context The opaque parameter to the function. + +**/ +VOID +HttpIoNotify ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ + // + // Request HttpIoNotifyDpc as a DPC at TPL_CALLBACK + // + QueueDpc (TPL_CALLBACK, HttpIoNotifyDpc, Context); } + +/** Create a HTTP_IO to access the HTTP service. It will create and configur= e a HTTP child handle. =20 @param[in] Image The handle of the driver image. @param[in] Controller The handle of the controller. @@ -728,11 +761,11 @@ HttpIoCreateIo ( // Create events for variuos asynchronous operations. // Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_NOTIFY, - HttpBootCommonNotify, + HttpIoNotify, &HttpIo->IsTxDone, &Event ); if (EFI_ERROR (Status)) { goto ON_ERROR; @@ -741,11 +774,11 @@ HttpIoCreateIo ( HttpIo->ReqToken.Message =3D &HttpIo->ReqMessage; =20 Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_NOTIFY, - HttpBootCommonNotify, + HttpIoNotify, &HttpIo->IsRxDone, &Event ); if (EFI_ERROR (Status)) { goto ON_ERROR; -- 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel