From 001e57a103fce87245bfb7ae9c32ffb499a64135 Mon Sep 17 00:00:00 2001 From: Guo Mang Date: Thu, 27 Apr 2017 11:03:56 +0800 Subject: IntelFrameworkModulePkg: Move to new location Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang --- .../Universal/DataHubStdErrDxe/DataHubStdErr.c | 151 --------------------- .../DataHubStdErrDxe/DataHubStdErrDxe.inf | 57 -------- .../DataHubStdErrDxe/DataHubStdErrDxe.uni | 21 --- .../DataHubStdErrDxe/DataHubStdErrDxeExtra.uni | 19 --- 4 files changed, 248 deletions(-) delete mode 100644 IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErr.c delete mode 100644 IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxe.inf delete mode 100644 IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxe.uni delete mode 100644 IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxeExtra.uni (limited to 'IntelFrameworkModulePkg/Universal/DataHubStdErrDxe') diff --git a/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErr.c b/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErr.c deleted file mode 100644 index f64c5411db..0000000000 --- a/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErr.c +++ /dev/null @@ -1,151 +0,0 @@ -/** @file - Data Hub filter driver that takes DEBUG () info from Data Hub and writes it - to StdErr if it exists. - -Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -EFI_DATA_HUB_PROTOCOL *mDataHub = NULL; - -EFI_EVENT mDataHubStdErrEvent; - -/** - Event handler registered with the Data Hub to parse EFI_DEBUG_CODE. This - handler reads the Data Hub and sends any DEBUG info to StdErr. - - @param Event The event that occured, not used - @param Context DataHub Protocol Pointer -**/ -VOID -EFIAPI -DataHubStdErrEventHandler ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ - EFI_STATUS Status; - EFI_DATA_HUB_PROTOCOL *DataHub; - EFI_DATA_RECORD_HEADER *Record; - DATA_HUB_STATUS_CODE_DATA_RECORD *DataRecord; - UINT64 Mtc; - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Sto; - INT32 OldAttribute; - - DataHub = (EFI_DATA_HUB_PROTOCOL *) Context; - - // - // If StdErr is not yet initialized just return a DEBUG print in the BDS - // after consoles are connect will make sure data gets flushed properly - // when StdErr is available. - // - if (gST == NULL) { - return ; - } - - if (gST->StdErr == NULL) { - return ; - } - - // - // Mtc of zero means return the next record that has not been read by the - // event handler. - // - Mtc = 0; - do { - Status = DataHub->GetNextRecord (DataHub, &Mtc, &mDataHubStdErrEvent, &Record); - if (!EFI_ERROR (Status)) { - if (CompareGuid (&Record->DataRecordGuid, &gEfiDataHubStatusCodeRecordGuid)) { - DataRecord = (DATA_HUB_STATUS_CODE_DATA_RECORD *) (((CHAR8 *) Record) + Record->HeaderSize); - - if (DataRecord->Data.HeaderSize > 0) { - if (CompareGuid (&DataRecord->Data.Type, &gEfiStatusCodeDataTypeDebugGuid)) { - // - // If the Data record is from a DEBUG () then send it to Standard Error - // - Sto = gST->StdErr; - OldAttribute = Sto->Mode->Attribute; - Sto->SetAttribute (Sto, EFI_TEXT_ATTR (EFI_MAGENTA, EFI_BLACK)); - Sto->OutputString (Sto, (CHAR16 *) (DataRecord + 1)); - Sto->SetAttribute (Sto, OldAttribute); - } - } - } - } - } while ((Mtc != 0) && !EFI_ERROR (Status)); -} - -/** - Register an event handler with the Data Hub to parse EFI_DEBUG_CODE. This - handler reads the Data Hub and sends any DEBUG info to StdErr. - - @param ImageHandle Image handle of this driver. - @param SystemTable Pointer to EFI system table. - - @retval EFI_SUCCESS The event handler was registered. - @retval EFI_OUT_OF_RESOURCES The event hadler was not registered due to lack of system resources. -**/ -EFI_STATUS -EFIAPI -DataHubStdErrInitialize ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - UINT64 DataClass; - - gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, (VOID **) &mDataHub); - // - // Should never fail due to Depex grammer. - // - ASSERT (mDataHub != NULL); - - // - // Create an event and register it with the filter driver - // - Status = gBS->CreateEvent ( - EVT_NOTIFY_SIGNAL, - TPL_CALLBACK, - DataHubStdErrEventHandler, - mDataHub, - &mDataHubStdErrEvent - ); - if (EFI_ERROR (Status)) { - return Status; - } - - DataClass = EFI_DATA_RECORD_CLASS_DEBUG | EFI_DATA_RECORD_CLASS_ERROR; - Status = mDataHub->RegisterFilterDriver ( - mDataHub, - mDataHubStdErrEvent, - TPL_CALLBACK, - DataClass, - NULL - ); - if (EFI_ERROR (Status)) { - gBS->CloseEvent (mDataHubStdErrEvent); - } - - return Status; -} - diff --git a/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxe.inf b/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxe.inf deleted file mode 100644 index f9dede864c..0000000000 --- a/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxe.inf +++ /dev/null @@ -1,57 +0,0 @@ -## @file -# This driver takes DEBUG info from Data Hub and writes it to StdErr if it exists. -# -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
-# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -## - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = DataHubStdErrDxe - MODULE_UNI_FILE = DataHubStdErrDxe.uni - FILE_GUID = CA515306-00CE-4032-874E-11B755FF6866 - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - ENTRY_POINT = DataHubStdErrInitialize - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# - -[Sources] - DataHubStdErr.c - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec - -[LibraryClasses] - UefiBootServicesTableLib - BaseMemoryLib - UefiDriverEntryPoint - DebugLib - -[Guids] - gEfiStatusCodeDataTypeDebugGuid ## SOMETIMES_CONSUMES ## UNDEFINED # DataRecord Date Type - gEfiDataHubStatusCodeRecordGuid ## SOMETIMES_CONSUMES ## UNDEFINED # DataRecordGuid - - -[Protocols] - gEfiDataHubProtocolGuid ## CONSUMES - -[Depex] - gEfiDataHubProtocolGuid - -[UserExtensions.TianoCore."ExtraFiles"] - DataHubStdErrDxeExtra.uni diff --git a/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxe.uni b/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxe.uni deleted file mode 100644 index 23e4ef9a15..0000000000 --- a/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxe.uni +++ /dev/null @@ -1,21 +0,0 @@ -// /** @file -// This driver takes DEBUG info from Data Hub and writes it to StdErr if it exists. -// -// This driver takes DEBUG info from a Data Hub and writes it to StdErr if it exists. -// -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
-// -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// -// **/ - - -#string STR_MODULE_ABSTRACT #language en-US "Takes DEBUG information from a Data Hub; writes it to StdErr if it exists" - -#string STR_MODULE_DESCRIPTION #language en-US "This driver takes DEBUG info from a Data Hub and writes it to StdErr if it exists." - diff --git a/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxeExtra.uni b/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxeExtra.uni deleted file mode 100644 index 487291b831..0000000000 --- a/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErrDxeExtra.uni +++ /dev/null @@ -1,19 +0,0 @@ -// /** @file -// DataHubStdErrDxe Localized Strings and Content -// -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
-// -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// -// **/ - -#string STR_PROPERTIES_MODULE_NAME -#language en-US -"Data Hub stderr DXE Driver" - - -- cgit v1.2.3