/** @file\r
Internal include file for Report Status Code Router Driver.\r
\r
- Copyright (c) 2009, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
#include <Library/BaseLib.h>\r
#include <Library/SynchronizationLib.h>\r
#include <Library/DebugLib.h>\r
-#include <Library/PcdLib.h>\r
#include <Library/HobLib.h>\r
#include <Library/UefiDriverEntryPoint.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
#include <Library/UefiRuntimeLib.h>\r
+#include "Library/UefiLib.h"\r
\r
#define RSC_HANDLER_CALLBACK_ENTRY_SIGNATURE SIGNATURE_32 ('r', 'h', 'c', 'e')\r
\r
UINTN Signature;\r
EFI_RSC_HANDLER_CALLBACK RscHandlerCallback;\r
EFI_TPL Tpl;\r
+ EFI_EVENT Event;\r
+ EFI_PHYSICAL_ADDRESS StatusCodeDataBuffer;\r
+ UINTN BufferSize;\r
+ EFI_PHYSICAL_ADDRESS EndPointer;\r
LIST_ENTRY Node;\r
} RSC_HANDLER_CALLBACK_ENTRY;\r
\r
typedef struct {\r
- EFI_RSC_HANDLER_CALLBACK RscHandlerCallback;\r
- EFI_STATUS_CODE_TYPE Type;\r
- EFI_STATUS_CODE_VALUE Value;\r
- UINT32 Instance;\r
- EFI_GUID *CallerId;\r
- EFI_STATUS_CODE_DATA *Data;\r
-} RSC_EVENT_CONTEXT;\r
+ EFI_STATUS_CODE_TYPE Type;\r
+ EFI_STATUS_CODE_VALUE Value;\r
+ UINT32 Instance;\r
+ UINT32 Reserved;\r
+ EFI_GUID CallerId;\r
+ EFI_STATUS_CODE_DATA Data;\r
+} RSC_DATA_ENTRY;\r
\r
/**\r
Register the callback function for ReportStatusCode() notification.\r
- \r
+\r
When this function is called the function pointer is added to an internal list and any future calls to\r
ReportStatusCode() will be forwarded to the Callback function. During the bootservices,\r
this is the callback for which this service can be invoked. The report status code router\r
2. not unregister at exit boot services so that the router will still have its callback address\r
3. the caller must be self-contained (eg. Not call out into any boot-service interfaces) and be\r
runtime safe, in general.\r
- \r
+\r
@param[in] Callback A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is called when\r
a call to ReportStatusCode() occurs.\r
- @param[in] Tpl TPL at which callback can be safely invoked. \r
- \r
+ @param[in] Tpl TPL at which callback can be safely invoked.\r
+\r
@retval EFI_SUCCESS Function was successfully registered.\r
@retval EFI_INVALID_PARAMETER The callback function was NULL.\r
@retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be\r
\r
/**\r
Remove a previously registered callback function from the notification list.\r
- \r
+\r
A callback function must be unregistered before it is deallocated. It is important that any registered\r
callbacks that are not runtime complaint be unregistered when ExitBootServices() is called.\r
- \r
+\r
@param[in] Callback A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is to be\r
unregistered.\r
- \r
+\r
@retval EFI_SUCCESS The function was successfully unregistered.\r
@retval EFI_INVALID_PARAMETER The callback function was NULL.\r
@retval EFI_NOT_FOUND The callback function was not found to be unregistered.\r