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>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
/** @file\r
UEFI HTTP boot driver's private data structure and interfaces declaration.\r
\r
/** @file\r
UEFI HTTP boot driver's private data structure and interfaces declaration.\r
\r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials are licensed and made available under \r
the terms and conditions of the BSD License that accompanies this distribution. \r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials are licensed and made available under \r
the terms and conditions of the BSD License that accompanies this distribution. \r
#include <Library/HttpLib.h>\r
#include <Library/HiiLib.h>\r
#include <Library/PrintLib.h>\r
#include <Library/HttpLib.h>\r
#include <Library/HiiLib.h>\r
#include <Library/PrintLib.h>\r
+#include <Library/DpcLib.h>\r
\r
//\r
// UEFI Driver Model Protocols\r
\r
//\r
// UEFI Driver Model Protocols\r
HttpLib\r
HiiLib\r
PrintLib\r
HttpLib\r
HiiLib\r
PrintLib\r
UefiHiiServicesLib\r
UefiBootManagerLib\r
\r
UefiHiiServicesLib\r
UefiBootManagerLib\r
\r
return EFI_SUCCESS;\r
}\r
\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+ Notify the callback function when an event is triggered.\r
+\r
+ @param[in] Context The opaque parameter to the function.\r
+\r
+**/\r
+VOID\r
+HttpIoNotifyDpc (\r
+ IN VOID *Context\r
+ )\r
+{\r
+ *((BOOLEAN *) Context) = TRUE;\r
+}\r
+\r
+/**\r
+ Request HttpIoNotifyDpc as a DPC at TPL_CALLBACK.\r
+\r
+ @param[in] Event The event signaled.\r
+ @param[in] Context The opaque parameter to the function.\r
+\r
+**/\r
+VOID\r
+HttpIoNotify (\r
+ IN EFI_EVENT Event,\r
+ IN VOID *Context\r
+ )\r
+{\r
+ //\r
+ // Request HttpIoNotifyDpc as a DPC at TPL_CALLBACK\r
+ //\r
+ QueueDpc (TPL_CALLBACK, HttpIoNotifyDpc, Context);\r
+}\r
+\r
/**\r
Create a HTTP_IO to access the HTTP service. It will create and configure\r
a HTTP child handle.\r
/**\r
Create a HTTP_IO to access the HTTP service. It will create and configure\r
a HTTP child handle.\r
Status = gBS->CreateEvent (\r
EVT_NOTIFY_SIGNAL,\r
TPL_NOTIFY,\r
Status = gBS->CreateEvent (\r
EVT_NOTIFY_SIGNAL,\r
TPL_NOTIFY,\r
- HttpBootCommonNotify,\r
&HttpIo->IsTxDone,\r
&Event\r
);\r
&HttpIo->IsTxDone,\r
&Event\r
);\r
Status = gBS->CreateEvent (\r
EVT_NOTIFY_SIGNAL,\r
TPL_NOTIFY,\r
Status = gBS->CreateEvent (\r
EVT_NOTIFY_SIGNAL,\r
TPL_NOTIFY,\r
- HttpBootCommonNotify,\r
&HttpIo->IsRxDone,\r
&Event\r
);\r
&HttpIo->IsRxDone,\r
&Event\r
);\r