From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0728.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe42::728]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D2F2E81EE0 for ; Tue, 14 Feb 2017 20:45:51 -0800 (PST) Received: from CS1PR84MB0037.NAMPRD84.PROD.OUTLOOK.COM (10.162.189.143) by CS1PR84MB0038.NAMPRD84.PROD.OUTLOOK.COM (10.162.189.144) 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 04:45:49 +0000 Received: from CS1PR84MB0037.NAMPRD84.PROD.OUTLOOK.COM ([10.162.189.143]) by CS1PR84MB0037.NAMPRD84.PROD.OUTLOOK.COM ([10.162.189.143]) with mapi id 15.01.0888.030; Wed, 15 Feb 2017 04:45:49 +0000 From: "Hegde, Nagaraj P" To: Jiaxin Wu , "edk2-devel@lists.01.org" CC: Ye Ting , Fu Siyuan Thread-Topic: [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK Thread-Index: AQHShp5KimMeiP3X+0OScBTHV5QoC6Fpf1dg Date: Wed, 15 Feb 2017 04:45:49 +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=nagaraj-p.hegde@hpe.com; x-originating-ip: [15.219.195.14] x-ms-office365-filtering-correlation-id: 264f15f4-d242-4f75-d84d-08d4555d83ea x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:CS1PR84MB0038; x-microsoft-exchange-diagnostics: 1; CS1PR84MB0038; 7:aQyBFmfMneZqAbrh9m7O67zu/ed32br2e5HCvxeO8dzry/E51cZ0P4olu0XgPuBH8UvBUS8+5z+6j7pcrnDP+Xa+uYX/O3qE7alKBB9/MbMA9w+wu+k9gBm5qyifveutliopiSTElwFgCIcueRGvVuqcu6pjyniyDbRVkdgmkrfg37Nr8Fqd8l2scBvckJsxHFcSZom0cBW2NvwlfGreic/pJtwzKAx0djRyf3jCvfHVv5qXutnwaNbgUMIMvFrgDvfeU7ap+vGbq7o7njklKHWvOoNvtH3YhTAdrCNxIsmtRehW3ZqG3T/zfafg97CpA1plHXwlNbyOgVUO/2y401p8Ti9D0FL3MXoECplxJUaVR+50V6ruoMpO5wygIdNh/NwGaUa7cDsSoUCzB9/DLPGXP37hn42HbHgYbw2/3zUm/NtW5znCWmGjeo8dUyY+tsXMB7havNVhX+C6iwBbvW/dAZTsz2sWkbEdXV3E5xnGlI+UQquMbrvjswMLsLshd8cAqsGe3JEBfz2maC4FhA== 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)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123558025)(20161123562025)(20161123564025)(20161123560025)(6072148); SRVR:CS1PR84MB0038; BCL:0; PCL:0; RULEID:; SRVR:CS1PR84MB0038; x-forefront-prvs: 021975AE46 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39860400002)(39840400002)(39410400002)(39850400002)(39450400003)(13464003)(377454003)(199003)(189002)(68736007)(3280700002)(305945005)(2501003)(6436002)(3660700001)(229853002)(33656002)(54356999)(76176999)(50986999)(2900100001)(55016002)(389900002)(106116001)(122556002)(5660300001)(8676002)(74316002)(81166006)(81156014)(106356001)(92566002)(102836003)(38730400002)(8936002)(6306002)(6506006)(6116002)(86362001)(966004)(9686003)(7696004)(7736002)(66066001)(2906002)(2950100002)(189998001)(105586002)(3846002)(6246003)(54906002)(77096006)(53936002)(4326007)(97736004)(53376002)(101416001); DIR:OUT; SFP:1102; SCL:1; SRVR:CS1PR84MB0038; H:CS1PR84MB0037.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 04:45:49.7516 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0038 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 04:45:52 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Hegde Nagaraj P -----Original Message----- From: Jiaxin Wu [mailto:jiaxin.wu@intel.com]=20 Sent: Tuesday, February 14, 2017 2:12 PM To: edk2-devel@lists.01.org Cc: Hegde, Nagaraj P ; Ye Ting = ; Fu Siyuan ; Wu Jiaxin Subject: [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as 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