From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 8662781F53 for ; Wed, 15 Feb 2017 04:59:05 -0800 (PST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D24A66CB9; Wed, 15 Feb 2017 12:59:06 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-89.phx2.redhat.com [10.3.116.89]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1FCx4fL015554; Wed, 15 Feb 2017 07:59:04 -0500 To: Jiaxin Wu , edk2-devel@ml01.01.org References: <1487061740-225728-1-git-send-email-jiaxin.wu@intel.com> Cc: Ye Ting , Fu Siyuan , Gerd Hoffmann From: Laszlo Ersek Message-ID: Date: Wed, 15 Feb 2017 13:59:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <1487061740-225728-1-git-send-email-jiaxin.wu@intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 15 Feb 2017 12:59:06 +0000 (UTC) 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 12:59:05 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Hi, this patch breaks the GCC build in two places: On 02/14/17 09:42, Jiaxin Wu wrote: > 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 declaration. > > -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 available under > the terms and conditions of the BSD License that accompanies this distribution. > The full text of the license may be found at > http://opensource.org/licenses/bsd-license.php. > @@ -34,10 +34,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > #include > #include > #include > #include > #include > +#include > > // > // UEFI Driver Model Protocols > // > #include > diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf b/NetworkPkg/HttpBootDxe/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 > > [Protocols] > ## TO_START > diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c > index 69b129f..d786d72 100644 > --- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c > +++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c > @@ -623,10 +623,43 @@ HttpBootSetHeader ( > > return EFI_SUCCESS; > } > > /** > + 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) = TRUE; > +} This function definition missed EFIAPI: typedef VOID (EFIAPI *EFI_DPC_PROCEDURE)( IN VOID *DpcContext ); > + > +/** > + 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); > +} This function also missed EFIAPI: typedef VOID (EFIAPI *EFI_EVENT_NOTIFY)( IN EFI_EVENT Event, IN VOID *Context ); Found by Gerd's Jenkins CI build env. Thanks Laszlo > + > +/** > Create a HTTP_IO to access the HTTP service. It will create and configure > a HTTP child handle. > > @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 = 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 = &HttpIo->ReqMessage; > > Status = gBS->CreateEvent ( > EVT_NOTIFY_SIGNAL, > TPL_NOTIFY, > - HttpBootCommonNotify, > + HttpIoNotify, > &HttpIo->IsRxDone, > &Event > ); > if (EFI_ERROR (Status)) { > goto ON_ERROR; >