105 lines
4.2 KiB
C
105 lines
4.2 KiB
C
/** @file
|
|
FspDebugService PPI prototypes
|
|
|
|
@copyright
|
|
INTEL CONFIDENTIAL
|
|
Copyright 2017 Intel Corporation.
|
|
|
|
The source code contained or described herein and all documents related to the
|
|
source code ("Material") are owned by Intel Corporation or its suppliers or
|
|
licensors. Title to the Material remains with Intel Corporation or its suppliers
|
|
and licensors. The Material may contain trade secrets and proprietary and
|
|
confidential information of Intel Corporation and its suppliers and licensors,
|
|
and is protected by worldwide copyright and trade secret laws and treaty
|
|
provisions. No part of the Material may be used, copied, reproduced, modified,
|
|
published, uploaded, posted, transmitted, distributed, or disclosed in any way
|
|
without Intel's prior express written permission.
|
|
|
|
No license under any patent, copyright, trade secret or other intellectual
|
|
property right is granted to or conferred upon you by disclosure or delivery
|
|
of the Materials, either expressly, by implication, inducement, estoppel or
|
|
otherwise. Any license under such intellectual property rights must be
|
|
express and approved by Intel in writing.
|
|
|
|
Unless otherwise agreed by Intel in writing, you may not remove or alter
|
|
this notice or any other notice embedded in Materials by Intel or
|
|
Intel's suppliers or licensors in any way.
|
|
|
|
This file contains 'Framework Code' and is licensed as such under the terms
|
|
of your license agreement with Intel or your vendor. This file may not be
|
|
modified, except as allowed by additional terms of your license agreement.
|
|
|
|
@par Specification Reference:
|
|
**/
|
|
|
|
#ifndef _FSP_DEBUG_SERVICE_PPI_H_
|
|
#define _FSP_DEBUG_SERVICE_PPI_H_
|
|
|
|
#define MAX_DEBUG_MESSAGE_LENGTH 0x100
|
|
|
|
/**
|
|
Prints a debug message to the debug output device if the specified error level is enabled.
|
|
|
|
If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
|
|
GetDebugPrintErrorLevel (), then print the message specified by Format and the
|
|
associated variable argument list to the debug output device.
|
|
|
|
If Format is NULL, then ASSERT().
|
|
|
|
If the length of the message string specificed by Format is larger than the maximum allowable
|
|
record length, then directly return and not print it.
|
|
|
|
@param ErrorLevel The error level of the debug message.
|
|
@param Format Format string for the debug message to print.
|
|
@param Marker Variable argument list whose contents are accessed
|
|
based on the format string specified by Format.
|
|
|
|
**/
|
|
typedef
|
|
VOID
|
|
(EFIAPI *DEBUG_PRINT)(
|
|
IN UINTN ErrorLevel,
|
|
IN CONST CHAR8 *Format,
|
|
IN VA_LIST Marker
|
|
);
|
|
|
|
/**
|
|
Prints an assert message containing a filename, line number, and description.
|
|
This may be followed by a breakpoint or a dead loop.
|
|
|
|
Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
|
|
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
|
|
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
|
|
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
|
|
CpuDeadLoop() is called. If neither of these bits are set, then this function
|
|
returns immediately after the message is printed to the debug output device.
|
|
DebugAssert() must actively prevent recursion. If DebugAssert() is called while
|
|
processing another DebugAssert(), then DebugAssert() must return immediately.
|
|
|
|
If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.
|
|
If Description is NULL, then a <Description> string of "(NULL) Description" is printed.
|
|
|
|
@param FileName Pointer to the name of the source file that generated the assert condition.
|
|
@param LineNumber The line number in the source file that generated the assert condition
|
|
@param Description Pointer to the description of the assert condition.
|
|
@param DebugPropertyMask PropertyMask to the description of the assert.
|
|
|
|
**/
|
|
typedef
|
|
VOID
|
|
(EFIAPI *DEBUG_ASSERT)(
|
|
IN CONST CHAR8 *FileName,
|
|
IN UINTN LineNumber,
|
|
IN CONST CHAR8 *Description,
|
|
IN UINT8 DebugPropertyMask
|
|
);
|
|
|
|
typedef struct {
|
|
DEBUG_PRINT DebugPrint;
|
|
DEBUG_ASSERT DebugAssert;
|
|
} DEBUG_SERVICE_PPI;
|
|
|
|
extern EFI_GUID gFspDebugServicePpiGuid;
|
|
|
|
#endif
|