/* This function allocates memory for extended status code data, caches the report status code service, and registers events. */
EFI_STATUS EFIAPI ReportStatusCodeLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
/* This function allocates memory for extended status code data, caches the report status code service, and registers events. */
EFI_STATUS EFIAPI ReportStatusCodeLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
{
  EFI_STATUS  Status;
  InternalGetReportStatusCode ();
  Status = gBS->CreateEventEx (
                  EVT_NOTIFY_SIGNAL,
                  TPL_NOTIFY,
                  ReportStatusCodeLibVirtualAddressChange,
                  NULL,
                  &gEfiEventVirtualAddressChangeGuid,
                  &mReportStatusCodeLibVirtualAddressChangeEvent
                  );
  ASSERT_EFI_ERROR (Status);
  Status = gBS->CreateEventEx (
                  EVT_NOTIFY_SIGNAL,
                  TPL_NOTIFY,
                  ReportStatusCodeLibExitBootServices,
                  NULL,
                  &gEfiEventExitBootServicesGuid,
                  &mReportStatusCodeLibExitBootServicesEvent
                  );
  ASSERT_EFI_ERROR (Status);
  return EFI_SUCCESS;
}