VBoxDebugLib.c revision de4903f1d13565a610af0e58c490a8fc9873e3e9
/* $Id$ */
/** @file
* VBoxDebugLib.c - Debug logging and assertions support routines using DevEFI.
*/
/*
* Copyright (C) 2009-2012 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.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include <Base.h>
#include <Library/PrintLib.h>
#include <Library/DebugLib.h>
#include "VBoxDebugLib.h"
#include <Protocol/DevicePath.h>
#include <Protocol/DevicePathToText.h>
#include <Uefi/UefiSpec.h>
#include <Library/UefiBootServicesTableLib.h>
#include "DevEFI.h"
#if 0
#endif
{
/* No pool noise, please. */
if (ErrorLevel == DEBUG_POOL)
return;
/* make sure it's terminated and doesn't end with a newline */
cch--;
VBoxPrintString("dbg/");
VBoxPrintChar(' ');
VBoxPrintChar('\n');
}
{
VBoxPrintString("EFI Assertion failed! File=");
VBoxPrintString(" line=0x");
VBoxPrintString("\nDescription: ");
}
{
#if 0
if (!g_DevPath2Txt)
{
{
DEBUG((DEBUG_INFO, "gEfiDevicePathToTextProtocolGuid:%g isn't instantied\n", gEfiDevicePathToTextProtocolGuid));
return NULL;
}
}
#else
return NULL;
#endif
}
{
#if 0
(VOID **)pDevicePath,
NULL,
{
rc,
hHandle));
return NULL;
}
return psz16TxtDevicePath;
#else
return NULL;
#endif
}
{
#if 0
if (!g_DevPath2Txt)
{
{
DEBUG((DEBUG_INFO, "gEfiDevicePathToTextProtocolGuid:%g isn't instantied\n", gEfiDevicePathToTextProtocolGuid));
return NULL;
}
}
#else
return NULL;
#endif
}
{
return Buffer;
}
{
return TRUE;
}
{
/** @todo some PCD for this so we can disable it in release builds. */
return TRUE;
}
{
/** @todo ditto */
return TRUE;
}
{
return FALSE;
}