diff options
Diffstat (limited to 'EdkModulePkg/Universal/DataHub/DataHubStdErr')
3 files changed, 0 insertions, 262 deletions
diff --git a/EdkModulePkg/Universal/DataHub/DataHubStdErr/Dxe/DataHubStdErr.c b/EdkModulePkg/Universal/DataHub/DataHubStdErr/Dxe/DataHubStdErr.c deleted file mode 100644 index ac703fd09c..0000000000 --- a/EdkModulePkg/Universal/DataHub/DataHubStdErr/Dxe/DataHubStdErr.c +++ /dev/null @@ -1,163 +0,0 @@ -/*++
-
-Copyright (c) 2006, 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.
-
-Module Name:
-
- DataHubStdErr.c
-
-Abstract:
-
- Data Hub filter driver that takes DEBUG () info from Data Hub and writes it
- to StdErr if it exists.
-
---*/
-
-
-
-EFI_DATA_HUB_PROTOCOL *mDataHub = NULL;
-
-EFI_EVENT mDataHubStdErrEvent;
-
-STATIC
-VOID
-EFIAPI
-DataHubStdErrEventHandler (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-
-Routine Description:
- 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.
-
-Arguments:
- Event - The event that occured, not used
- Context - DataHub Protocol Pointer
-
-Returns:
- None.
-
---*/
-{
- 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_OUT_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 availible.
- //
- 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, &gEfiStatusCodeGuid)) {
- 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));
-}
-
-EFI_STATUS
-EFIAPI
-DataHubStdErrInitialize (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-/*++
-
-Routine Description:
-
- 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.
-
-Arguments:
-
- ImageHandle - Image handle of this driver.
- SystemTable - Pointer to EFI system table.
-
-Returns:
-
- EFI_SUCCESS - The event handler was registered.
- EFI_OUT_OF_RESOURCES - The event hadler was not registered due to lack of
- system resources.
-
---*/
-{
- 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/EdkModulePkg/Universal/DataHub/DataHubStdErr/Dxe/DataHubStdErr.dxs b/EdkModulePkg/Universal/DataHub/DataHubStdErr/Dxe/DataHubStdErr.dxs deleted file mode 100644 index 9603a3e140..0000000000 --- a/EdkModulePkg/Universal/DataHub/DataHubStdErr/Dxe/DataHubStdErr.dxs +++ /dev/null @@ -1,26 +0,0 @@ -/*++
-
-Copyright (c) 2006, 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.
-
-Module Name:
-
- DataHubStdErr.dxs
-
-Abstract:
-
- Dependency expression source file.
-
---*/
-#include <DxeDepex.h>
-
-
-DEPENDENCY_START
- EFI_DATA_HUB_PROTOCOL_GUID
-DEPENDENCY_END
diff --git a/EdkModulePkg/Universal/DataHub/DataHubStdErr/Dxe/DataHubStdErr.msa b/EdkModulePkg/Universal/DataHub/DataHubStdErr/Dxe/DataHubStdErr.msa deleted file mode 100644 index 1c934c6f2e..0000000000 --- a/EdkModulePkg/Universal/DataHub/DataHubStdErr/Dxe/DataHubStdErr.msa +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <MsaHeader>
- <ModuleName>DataHubStdErr</ModuleName>
- <ModuleType>DXE_DRIVER</ModuleType>
- <GuidValue>CA515306-00CE-4032-874E-11B755FF6866</GuidValue>
- <Version>1.0</Version>
- <Abstract>Component description file for Data Hub filter driver.</Abstract>
- <Description>This driver takes DEBUG () info from Data Hub and writes it to StdErr if it exists.</Description>
- <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
- <License>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.</License>
- <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
- </MsaHeader>
- <ModuleDefinitions>
- <SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
- <BinaryModule>false</BinaryModule>
- <OutputFileBasename>DataHubStdErr</OutputFileBasename>
- </ModuleDefinitions>
- <LibraryClassDefinitions>
- <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
- <Keyword>DebugLib</Keyword>
- <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>UefiDriverEntryPoint</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>BaseMemoryLib</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>UefiBootServicesTableLib</Keyword>
- </LibraryClass>
- </LibraryClassDefinitions>
- <SourceFiles>
- <Filename>DataHubStdErr.c</Filename>
- <Filename>DataHubStdErr.dxs</Filename>
- </SourceFiles>
- <PackageDependencies>
- <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
- <Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
- </PackageDependencies>
- <Protocols>
- <Protocol Usage="ALWAYS_CONSUMED">
- <ProtocolCName>gEfiDataHubProtocolGuid</ProtocolCName>
- </Protocol>
- </Protocols>
- <DataHubs>
- <DataHubRecord Usage="SOMETIMES_CONSUMED">
- <DataHubCName>DATA_HUB_STATUS_CODE_DATA_RECORD</DataHubCName>
- <HelpText>DEBUG() data that is recorded in status code data hub will be sent to Standard Error.</HelpText>
- </DataHubRecord>
- </DataHubs>
- <Guids>
- <GuidCNames Usage="SOMETIMES_CONSUMED">
- <GuidCName>gEfiStatusCodeGuid</GuidCName>
- </GuidCNames>
- <GuidCNames Usage="SOMETIMES_CONSUMED">
- <GuidCName>gEfiStatusCodeDataTypeDebugGuid</GuidCName>
- </GuidCNames>
- </Guids>
- <Externs>
- <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
- <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
- <Extern>
- <ModuleEntryPoint>DataHubStdErrInitialize</ModuleEntryPoint>
- </Extern>
- </Externs>
-</ModuleSurfaceArea>
\ No newline at end of file |