]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg/HttpBootDxe: Request HTTP token notify as a DPC at TPL_CALLBACK
authorJiaxin Wu <jiaxin.wu@intel.com>
Tue, 14 Feb 2017 08:36:36 +0000 (16:36 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Wed, 15 Feb 2017 06:36:52 +0000 (14:36 +0800)
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>
NetworkPkg/HttpBootDxe/HttpBootDxe.h
NetworkPkg/HttpBootDxe/HttpBootDxe.inf
NetworkPkg/HttpBootDxe/HttpBootSupport.c

index 7e8cd9d4f3d0d839424b5330d8eba3be01b4f100..28145949fed70265ddf1294710b17fe6603d7fee 100644 (file)
@@ -1,7 +1,7 @@
 /** @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
@@ -36,6 +36,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #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
index 982e6b49bec00743f6da52d685ebc2749b978650..ec983ba7adda98f5474e54554fff914f033b7a28 100644 (file)
@@ -60,6 +60,7 @@
   HttpLib\r
   HiiLib\r
   PrintLib\r
   HttpLib\r
   HiiLib\r
   PrintLib\r
+  DpcLib\r
   UefiHiiServicesLib\r
   UefiBootManagerLib\r
 \r
   UefiHiiServicesLib\r
   UefiBootManagerLib\r
 \r
index 69b129f9d2caa4696afc09aacaaadb389f4b456c..d786d725dc2d269196f24ccebd808b06df505f2f 100644 (file)
@@ -624,6 +624,39 @@ HttpBootSetHeader (
   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
@@ -730,7 +763,7 @@ HttpIoCreateIo (
   Status = gBS->CreateEvent (\r
                   EVT_NOTIFY_SIGNAL,\r
                   TPL_NOTIFY,\r
   Status = gBS->CreateEvent (\r
                   EVT_NOTIFY_SIGNAL,\r
                   TPL_NOTIFY,\r
-                  HttpBootCommonNotify,\r
+                  HttpIoNotify,\r
                   &HttpIo->IsTxDone,\r
                   &Event\r
                   );\r
                   &HttpIo->IsTxDone,\r
                   &Event\r
                   );\r
@@ -743,7 +776,7 @@ HttpIoCreateIo (
   Status = gBS->CreateEvent (\r
                   EVT_NOTIFY_SIGNAL,\r
                   TPL_NOTIFY,\r
   Status = gBS->CreateEvent (\r
                   EVT_NOTIFY_SIGNAL,\r
                   TPL_NOTIFY,\r
-                  HttpBootCommonNotify,\r
+                  HttpIoNotify,\r
                   &HttpIo->IsRxDone,\r
                   &Event\r
                   );\r
                   &HttpIo->IsRxDone,\r
                   &Event\r
                   );\r