/* $Id$ */
/** @file
* DxeVBoxOemHookStatusCodeLib.c - Logging.
*/
/*
* Copyright (C) 2009-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include <Library/ReportStatusCodeLib.h>
#include <Library/OemHookStatusCodeLib.h>
#include <Library/PrintLib.h>
#include <Library/BaseMemoryLib.h>
#include <Guid/StatusCodeDataTypeId.h>
#include <Guid/StatusCodeDataTypeDebug.h>
#if 0 /* See VBoxSecExtractDebugInfo */
# include <DebugInfo.h>
#endif
#include "VBoxDebugLib.h"
#include "DevEFI.h"
{
VBoxPrintString("OemHookStatusCodeInitialize\n");
return EFI_SUCCESS;
}
#if 0 /* vvl: With thbe new version the API changed a bit and VA_LIST isn't used any more. Before applying
* any changes here I would like to understand in which cases we need this help function.
* bird: Some components sent information in this format. Search for the UUID or EFI_DEBUG_INFO usage.
*/
/**
* Helper VBoxSecPeiReportStatusCode uses for catching some odd reports.
*/
static BOOLEAN
{
return FALSE;
return TRUE;
}
#endif
/** Worker that dumps the raw data. */
static void
{
VBoxPrintString("Report: Type=");
VBoxPrintString(" Value=");
VBoxPrintString(" Instance=");
if (CallerId)
{
VBoxPrintString(" CallerId=");
}
{
}
{
}
VBoxPrintChar('\n');
}
{
/*
* Try figure out the data payload
*/
{
&pszDescription, &uLine))
{
VBoxPrintString("Assertion Failed! Line=0x");
if (pszFilename)
{
VBoxPrintString(" File=");
}
if (pszDescription)
{
VBoxPrintString(" Desc=");
}
VBoxPrintChar('\n');
}
#if 0 /* See question at VBoxSecExtractDebugInfo. */
#endif
)
{
while ( cch > 0
cch--;
VBoxPrintString("DBG/");
VBoxPrintString(": ");
VBoxPrintChar('\n');
}
else
{
/*
* Unknown data, resort to raw dump of everything.
*/
VBoxPrintString("OemReport: Unknown data type ");
VBoxPrintString(" (Size=");
VBoxPrintString(" HeaderSize=");
VBoxPrintString(")\n");
}
}
/*
* No data, do a raw dump.
*/
else
return EFI_SUCCESS;
}