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> 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>
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
UEFI HTTP boot driver's private data structure and interfaces declaration.
|
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>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
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 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 <Library/HttpLib.h>
|
#include <Library/HttpLib.h>
|
||||||
#include <Library/HiiLib.h>
|
#include <Library/HiiLib.h>
|
||||||
#include <Library/PrintLib.h>
|
#include <Library/PrintLib.h>
|
||||||
|
#include <Library/DpcLib.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
// UEFI Driver Model Protocols
|
// UEFI Driver Model Protocols
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
HttpLib
|
HttpLib
|
||||||
HiiLib
|
HiiLib
|
||||||
PrintLib
|
PrintLib
|
||||||
|
DpcLib
|
||||||
UefiHiiServicesLib
|
UefiHiiServicesLib
|
||||||
UefiBootManagerLib
|
UefiBootManagerLib
|
||||||
|
|
||||||
|
@ -624,6 +624,39 @@ HttpBootSetHeader (
|
|||||||
return EFI_SUCCESS;
|
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
|
Create a HTTP_IO to access the HTTP service. It will create and configure
|
||||||
a HTTP child handle.
|
a HTTP child handle.
|
||||||
@ -730,7 +763,7 @@ HttpIoCreateIo (
|
|||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
HttpBootCommonNotify,
|
HttpIoNotify,
|
||||||
&HttpIo->IsTxDone,
|
&HttpIo->IsTxDone,
|
||||||
&Event
|
&Event
|
||||||
);
|
);
|
||||||
@ -743,7 +776,7 @@ HttpIoCreateIo (
|
|||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
HttpBootCommonNotify,
|
HttpIoNotify,
|
||||||
&HttpIo->IsRxDone,
|
&HttpIo->IsRxDone,
|
||||||
&Event
|
&Event
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user