From 5e9e151c2061cc10e5aa9f41c6f1d7d1b865954e Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Tue, 14 Feb 2017 16:36:36 +0800 Subject: 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 Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Reviewed-by: Ye Ting Reviewed-by: Fu Siyuan Reviewed-by: Sriram Subramanian Reviewed-by: Hegde Nagaraj P --- 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 7e8cd9d4f3..28145949fe 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootDxe.h +++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.h @@ -1,7 +1,7 @@ /** @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. @@ -36,6 +36,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include // // UEFI Driver Model Protocols diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf b/NetworkPkg/HttpBootDxe/HttpBootDxe.inf index 982e6b49be..ec983ba7ad 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf +++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.inf @@ -60,6 +60,7 @@ HttpLib HiiLib PrintLib + DpcLib UefiHiiServicesLib UefiBootManagerLib diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c index 69b129f9d2..d786d725dc 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c +++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c @@ -624,6 +624,39 @@ 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. @@ -730,7 +763,7 @@ HttpIoCreateIo ( Status = gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_NOTIFY, - HttpBootCommonNotify, + HttpIoNotify, &HttpIo->IsTxDone, &Event ); @@ -743,7 +776,7 @@ HttpIoCreateIo ( Status = gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_NOTIFY, - HttpBootCommonNotify, + HttpIoNotify, &HttpIo->IsRxDone, &Event ); -- cgit v1.2.3