* [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK
@ 2017-02-14 8:42 Jiaxin Wu
2017-02-15 2:05 ` Ye, Ting
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Jiaxin Wu @ 2017-02-14 8:42 UTC (permalink / raw)
To: edk2-devel; +Cc: Hegde Nagaraj P, Ye Ting, Fu Siyuan, Wu Jiaxin
This patch is to update the HTTP token notify as a DPC at
TPL_CALLBACK to align with UEFI Spec.
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
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.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
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 <Library/DebugLib.h>
#include <Library/NetLib.h>
#include <Library/HttpLib.h>
#include <Library/HiiLib.h>
#include <Library/PrintLib.h>
+#include <Library/DpcLib.h>
//
// UEFI Driver Model Protocols
//
#include <Protocol/DriverBinding.h>
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;
+}
+
+/**
+ 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 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;
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK
2017-02-14 8:42 [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK Jiaxin Wu
@ 2017-02-15 2:05 ` Ye, Ting
2017-02-15 2:39 ` Fu, Siyuan
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Ye, Ting @ 2017-02-15 2:05 UTC (permalink / raw)
To: Wu, Jiaxin, edk2-devel@lists.01.org; +Cc: Fu, Siyuan, Wu, Jiaxin
Reviewed-by: Ye Ting <ting.ye@intel.com>
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiaxin Wu
Sent: Tuesday, February 14, 2017 4:42 PM
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [edk2] [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 align with UEFI Spec.
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
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.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> 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 <Library/DebugLib.h>
#include <Library/NetLib.h>
#include <Library/HttpLib.h>
#include <Library/HiiLib.h>
#include <Library/PrintLib.h>
+#include <Library/DpcLib.h>
//
// UEFI Driver Model Protocols
//
#include <Protocol/DriverBinding.h>
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;
+}
+
+/**
+ 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 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;
--
1.9.5.msysgit.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK
2017-02-14 8:42 [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK Jiaxin Wu
2017-02-15 2:05 ` Ye, Ting
@ 2017-02-15 2:39 ` Fu, Siyuan
2017-02-15 2:59 ` Subramanian, Sriram
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Fu, Siyuan @ 2017-02-15 2:39 UTC (permalink / raw)
To: Wu, Jiaxin, edk2-devel@lists.01.org; +Cc: Ye, Ting, Wu, Jiaxin
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiaxin Wu
Sent: 2017年2月14日 16:42
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [edk2] [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 align with UEFI Spec.
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
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.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> 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 <Library/DebugLib.h>
#include <Library/NetLib.h>
#include <Library/HttpLib.h>
#include <Library/HiiLib.h>
#include <Library/PrintLib.h>
+#include <Library/DpcLib.h>
//
// UEFI Driver Model Protocols
//
#include <Protocol/DriverBinding.h>
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;
+}
+
+/**
+ 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 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;
--
1.9.5.msysgit.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK
2017-02-14 8:42 [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK Jiaxin Wu
2017-02-15 2:05 ` Ye, Ting
2017-02-15 2:39 ` Fu, Siyuan
@ 2017-02-15 2:59 ` Subramanian, Sriram
2017-02-15 4:45 ` Hegde, Nagaraj P
2017-02-15 12:59 ` Laszlo Ersek
4 siblings, 0 replies; 7+ messages in thread
From: Subramanian, Sriram @ 2017-02-15 2:59 UTC (permalink / raw)
To: Jiaxin Wu, edk2-devel@lists.01.org; +Cc: Ye Ting, Fu Siyuan
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiaxin Wu
Sent: Tuesday, February 14, 2017 2:12 PM
To: edk2-devel@lists.01.org
Cc: Ye Ting <ting.ye@intel.com>; Fu Siyuan <siyuan.fu@intel.com>; Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [edk2] [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 align with UEFI Spec.
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
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.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
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 <Library/DebugLib.h>
#include <Library/NetLib.h>
#include <Library/HttpLib.h>
#include <Library/HiiLib.h>
#include <Library/PrintLib.h>
+#include <Library/DpcLib.h>
//
// UEFI Driver Model Protocols
//
#include <Protocol/DriverBinding.h>
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;
+}
+
+/**
+ 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 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;
--
1.9.5.msysgit.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK
2017-02-14 8:42 [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK Jiaxin Wu
` (2 preceding siblings ...)
2017-02-15 2:59 ` Subramanian, Sriram
@ 2017-02-15 4:45 ` Hegde, Nagaraj P
2017-02-15 12:59 ` Laszlo Ersek
4 siblings, 0 replies; 7+ messages in thread
From: Hegde, Nagaraj P @ 2017-02-15 4:45 UTC (permalink / raw)
To: Jiaxin Wu, edk2-devel@lists.01.org; +Cc: Ye Ting, Fu Siyuan
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
-----Original Message-----
From: Jiaxin Wu [mailto:jiaxin.wu@intel.com]
Sent: Tuesday, February 14, 2017 2:12 PM
To: edk2-devel@lists.01.org
Cc: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com>; Ye Ting <ting.ye@intel.com>; Fu Siyuan <siyuan.fu@intel.com>; Wu Jiaxin <jiaxin.wu@intel.com>
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 align with UEFI Spec.
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
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.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> 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 <Library/DebugLib.h>
#include <Library/NetLib.h>
#include <Library/HttpLib.h>
#include <Library/HiiLib.h>
#include <Library/PrintLib.h>
+#include <Library/DpcLib.h>
//
// UEFI Driver Model Protocols
//
#include <Protocol/DriverBinding.h>
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;
+}
+
+/**
+ 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 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;
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK
2017-02-14 8:42 [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK Jiaxin Wu
` (3 preceding siblings ...)
2017-02-15 4:45 ` Hegde, Nagaraj P
@ 2017-02-15 12:59 ` Laszlo Ersek
2017-02-16 0:30 ` Wu, Jiaxin
4 siblings, 1 reply; 7+ messages in thread
From: Laszlo Ersek @ 2017-02-15 12:59 UTC (permalink / raw)
To: Jiaxin Wu, edk2-devel; +Cc: Ye Ting, Fu Siyuan, Gerd Hoffmann
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 <nagaraj-p.hegde@hpe.com>
> Cc: Ye Ting <ting.ye@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
> ---
> 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.<BR>
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
> 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 <Library/DebugLib.h>
> #include <Library/NetLib.h>
> #include <Library/HttpLib.h>
> #include <Library/HiiLib.h>
> #include <Library/PrintLib.h>
> +#include <Library/DpcLib.h>
>
> //
> // UEFI Driver Model Protocols
> //
> #include <Protocol/DriverBinding.h>
> 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;
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK
2017-02-15 12:59 ` Laszlo Ersek
@ 2017-02-16 0:30 ` Wu, Jiaxin
0 siblings, 0 replies; 7+ messages in thread
From: Wu, Jiaxin @ 2017-02-16 0:30 UTC (permalink / raw)
To: Laszlo Ersek, edk2-devel@ml01.01.org; +Cc: Ye, Ting, Fu, Siyuan, Gerd Hoffmann
Laszlo,
Thanks your report, I will fix it ASAP.
Best Regards,
Jiaxin
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Wednesday, February 15, 2017 8:59 PM
> To: Wu, Jiaxin <jiaxin.wu@intel.com>; edk2-devel@ml01.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Gerd
> Hoffmann <kraxel@redhat.com>
> Subject: Re: [edk2] [Patch] NetworkPkg/HttpBootDxe: Request HTTP token
> notify as a DPC at TPL_CALLBACK
>
> 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 <nagaraj-p.hegde@hpe.com>
> > Cc: Ye Ting <ting.ye@intel.com>
> > Cc: Fu Siyuan <siyuan.fu@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
> > ---
> > 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.<BR>
> > +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> > (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
> > 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 <Library/DebugLib.h>
> > #include <Library/NetLib.h>
> > #include <Library/HttpLib.h>
> > #include <Library/HiiLib.h>
> > #include <Library/PrintLib.h>
> > +#include <Library/DpcLib.h>
> >
> > //
> > // UEFI Driver Model Protocols
> > //
> > #include <Protocol/DriverBinding.h>
> > 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;
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-02-16 0:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14 8:42 [Patch] NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK Jiaxin Wu
2017-02-15 2:05 ` Ye, Ting
2017-02-15 2:39 ` Fu, Siyuan
2017-02-15 2:59 ` Subramanian, Sriram
2017-02-15 4:45 ` Hegde, Nagaraj P
2017-02-15 12:59 ` Laszlo Ersek
2017-02-16 0:30 ` Wu, Jiaxin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox