From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0730.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::730]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1F5058212F for ; Tue, 14 Feb 2017 18:59:58 -0800 (PST) Received: from DF4PR84MB0041.NAMPRD84.PROD.OUTLOOK.COM (10.162.192.143) by DF4PR84MB0043.NAMPRD84.PROD.OUTLOOK.COM (10.162.192.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Wed, 15 Feb 2017 02:59:56 +0000 Received: from DF4PR84MB0041.NAMPRD84.PROD.OUTLOOK.COM ([10.162.192.143]) by DF4PR84MB0041.NAMPRD84.PROD.OUTLOOK.COM ([10.162.192.143]) with mapi id 15.01.0888.030; Wed, 15 Feb 2017 02:59:56 +0000 From: "Subramanian, Sriram" To: Jiaxin Wu , "edk2-devel@lists.01.org" CC: Ye Ting , Fu Siyuan Thread-Topic: [edk2] [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK Thread-Index: AQHShp5IeVuq9rgrbEeWQnKdaMD+L6FpYdnQ Date: Wed, 15 Feb 2017 02:59:56 +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: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sriram-s@hpe.com; x-originating-ip: [15.219.195.2] x-ms-office365-filtering-correlation-id: c3b16648-b0ce-41a0-fe7a-08d4554eb8e6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:DF4PR84MB0043; x-microsoft-exchange-diagnostics: 1; DF4PR84MB0043; 7:GcSvWWhjdJvFakpTtKjW07gHWRq8ajAo1OVXfPqsZxb+FQ8+ogexXcQ7PEyjyurDb1hfMa9C3XAD/fAYIv2TJwGhUsI2hYR3utRCvOmHfZucJL+W+XGwrbfI7iWY8wVeXYDp5mZtKnCOVh6Ce+jWlbTs5gaV1WsMW0wRVcbeUO2Vvanb932MD5rmKkBJP5j/ky6gPL3NsZZwkxkCBsOlw+MifF1sUbI4ePcRCZ8ygETz7iDdxOA+qw6TkKnxa8J2V998Nm9q4X5rcR77tqWcSl1FvJBJ0QWKipiU59VUGfMjlWAL9DfLJb6Vl1LP8o+t1ajqLiImbFGYYY9iryCm3Qy3fL9VMH623fZgzh/sdfyf7+w3wIzkX4hLuU2fVDSVeV+HnmdH8w+9BzOj/+JkWn4Fz7yKceVkej9wp8vK8GMuq9j6S6mWU/Qis+fxwjLSo05vk4G3M1cVCQxecIxApAgkm8/bZBMPIjnjUaByCFjRkefTOi2TBL3NdzL2TyikqxLV1Dsczwg+N0ZPUqGjXw== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123558025)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:DF4PR84MB0043; BCL:0; PCL:0; RULEID:; SRVR:DF4PR84MB0043; x-forefront-prvs: 021975AE46 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39840400002)(39410400002)(39850400002)(39860400002)(39450400003)(13464003)(199003)(189002)(377454003)(9686003)(77096006)(6306002)(6506006)(7736002)(305945005)(6436002)(92566002)(68736007)(3280700002)(3660700001)(66066001)(76176999)(2900100001)(2906002)(54356999)(55016002)(389900002)(7696004)(50986999)(2501003)(4326007)(5660300001)(54906002)(229853002)(122556002)(102836003)(2950100002)(189998001)(6116002)(33656002)(8936002)(101416001)(81166006)(53376002)(81156014)(38730400002)(53936002)(106116001)(105586002)(74316002)(6246003)(8676002)(966004)(106356001)(86362001)(97736004)(3846002); DIR:OUT; SFP:1102; SCL:1; SRVR:DF4PR84MB0043; H:DF4PR84MB0041.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2017 02:59:56.3167 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0043 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:59:58 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Sriram Subramanian -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiax= in Wu Sent: Tuesday, February 14, 2017 2:12 PM To: edk2-devel@lists.01.org Cc: Ye Ting ; Fu Siyuan ; Wu Jiaxin= 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 align 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 program and the accompanying materials are licensed and made availabl= e under=20 the terms and conditions of the BSD License that accompanies this distribu= tion. =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; --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel