Prints an assert message containing a filename, line number, and description. \r
This may be followed by a breakpoint or a dead loop.\r
\r
- Print a message of the form \93ASSERT <FileName>(<LineNumber>): <Description>\n?\r
+ Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"\r
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of \r
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if \r
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then \r
by TYPE is compared to TestSignature. If the signatures match, then a pointer \r
to the pointer to a data structure of the type specified by TYPE is returned. \r
If the signatures do not match, then DebugAssert() is called with a description \r
- of \93CR has a bad signature?and Record is returned. \r
+ of "CR has a bad signature" and Record is returned. \r
\r
If the data type specified by TYPE does not contain the field specified by Field, \r
then the module will not compile.\r
#ifndef __PRINT_LIB_H__\r
#define __PRINT_LIB_H__\r
\r
-//\r
-// Print primitives\r
-//\r
+///\r
+/// Define the maximum number of characters that are required to\r
+/// encode a decimal, hexidecimal, GUID, or TIME value with a NULL \r
+/// terminator.\r
+/// \r
+/// Maximum Length Decimal String = 28\r
+/// "-9,223,372,036,854,775,808"\r
+/// Maximum Length Hexidecimal String = 17\r
+/// "FFFFFFFFFFFFFFFF"\r
+/// Maximum Length GUID = 37\r
+/// "00000000-0000-0000-0000-000000000000"\r
+/// Maximum Length TIME = 18\r
+/// "12/12/2006 12:12"\r
+///\r
+#define MAXIMUM_VALUE_CHARACTERS 38\r
+\r
+///\r
+/// Flags bitmask values use in UnicodeValueToString() and \r
+/// AcsiiValueToString()\r
+///\r
#define LEFT_JUSTIFY 0x01\r
#define COMMA_TYPE 0x08\r
#define PREFIX_ZERO 0x20\r
BOOLEAN\r
EFIAPI\r
ReportStatusCodeExtractAssertInfo (\r
- IN EFI_STATUS_CODE_TYPE CodeType,\r
- IN EFI_STATUS_CODE_VALUE Value, \r
- IN EFI_STATUS_CODE_DATA *Data, \r
- OUT CHAR8 **Filename,\r
- OUT CHAR8 **Description,\r
- OUT UINT32 *LineNumber\r
+ IN EFI_STATUS_CODE_TYPE CodeType,\r
+ IN EFI_STATUS_CODE_VALUE Value, \r
+ IN CONST EFI_STATUS_CODE_DATA *Data, \r
+ OUT CHAR8 **Filename,\r
+ OUT CHAR8 **Description,\r
+ OUT UINT32 *LineNumber\r
);\r
\r
\r
BOOLEAN\r
EFIAPI\r
ReportStatusCodeExtractDebugInfo (\r
- IN EFI_STATUS_CODE_DATA *Data,\r
- OUT UINT32 *ErrorLevel,\r
- OUT VA_LIST *Marker,\r
- OUT CHAR8 **Format\r
+ IN CONST EFI_STATUS_CODE_DATA *Data, \r
+ OUT UINT32 *ErrorLevel,\r
+ OUT VA_LIST *Marker,\r
+ OUT CHAR8 **Format\r
);\r
\r
\r
EFI_STATUS\r
EFIAPI\r
ReportStatusCodeWithDevicePath (\r
- IN EFI_STATUS_CODE_TYPE Type,\r
- IN EFI_STATUS_CODE_VALUE Value,\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
+ IN EFI_STATUS_CODE_TYPE Type,\r
+ IN EFI_STATUS_CODE_VALUE Value,\r
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
);\r
\r
\r
ReportStatusCodeWithExtendedData (\r
IN EFI_STATUS_CODE_TYPE Type,\r
IN EFI_STATUS_CODE_VALUE Value,\r
- IN VOID *ExtendedData,\r
+ IN CONST VOID *ExtendedData,\r
IN UINTN ExtendedDataSize\r
);\r
\r
IN EFI_STATUS_CODE_TYPE Type,\r
IN EFI_STATUS_CODE_VALUE Value,\r
IN UINT32 Instance,\r
- IN EFI_GUID *CallerId OPTIONAL,\r
- IN EFI_GUID *ExtendedDataGuid OPTIONAL,\r
- IN VOID *ExtendedData OPTIONAL,\r
+ IN CONST EFI_GUID *CallerId OPTIONAL,\r
+ IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,\r
+ IN CONST VOID *ExtendedData OPTIONAL,\r
IN UINTN ExtendedDataSize\r
);\r
\r
Prints an assert message containing a filename, line number, and description. \r
This may be followed by a breakpoint or a dead loop.\r
\r
- Print a message of the form \93ASSERT <FileName>(<LineNumber>): <Description>\n\94 \r
+ Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n" \r
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of \r
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if \r
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then \r
DebugAssert() must actively prevent recusrsion. If DebugAssert() is called while\r
processing another DebugAssert(), then DebugAssert() must return immediately.\r
\r
- If FileName is NULL, then a <FileName> string of \93(NULL) Filename\94 is printed.\r
+ If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.\r
\r
- If Description is NULL, then a <Description> string of \93(NULL) Description\94 is printed.\r
+ If Description is NULL, then a <Description> string of "(NULL) Description" is printed.\r
\r
@param FileName Pointer to the name of the source file that generated the assert condition.\r
@param LineNumber The line number in the source file that generated the assert condition\r
Prints an assert message containing a filename, line number, and description. \r
This may be followed by a breakpoint or a dead loop.\r
\r
- Print a message of the form \93ASSERT <FileName>(<LineNumber>): <Description>\n\94 \r
+ Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n" \r
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of \r
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if \r
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then \r
DebugAssert() must actively prevent recusrsion. If DebugAssert() is called while\r
processing another DebugAssert(), then DebugAssert() must return immediately.\r
\r
- If FileName is NULL, then a <FileName> string of \93(NULL) Filename\94 is printed.\r
+ If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.\r
\r
- If Description is NULL, then a <Description> string of \93(NULL) Description\94 is printed.\r
+ If Description is NULL, then a <Description> string of "(NULL) Description" is printed.\r
\r
@param FileName Pointer to the name of the source file that generated the assert condition.\r
@param LineNumber The line number in the source file that generated the assert condition\r
mov edx, [esp + 20]\r
mov edi, [esp + 8]\r
@@:\r
- mov [edi + ecx*4 - 8], eax\r
- mov [edi + ecx*4 - 4], edx\r
+ mov [edi + ecx*8 - 8], eax\r
+ mov [edi + ecx*8 - 4], edx\r
loop @B\r
mov eax, edi\r
ret\r
movl 20(%esp),%edx
movl 8(%esp),%edi
L0:
- mov %eax,-8(%edi,%ecx,4)
- mov %edx,-4(%edi,%ecx,4)
+ mov %eax,-8(%edi,%ecx,8)
+ mov %edx,-4(%edi,%ecx,8)
loop L0
movl %edi,%eax
pop %edi
UINTN EndAddress;\r
\r
ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
- ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);\r
- ASSERT ((StartAddress + Size - 1) <= 0x0FFFFFFF);\r
ASSERT (Buffer != NULL);\r
\r
EndAddress = StartAddress + Size;\r
UINTN EndAddress;\r
\r
ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
- ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);\r
- ASSERT ((StartAddress + Size - 1) <= 0x0FFFFFFF);\r
ASSERT (Buffer != NULL);\r
\r
EndAddress = StartAddress + Size;\r
UINTN EndAddress;\r
\r
ASSERT_INVALID_PCI_ADDRESS (StartAddress);\r
- ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);\r
- ASSERT ((StartAddress + Size - 1) <= 0x0FFFFFFF);\r
ASSERT (Buffer != NULL);\r
\r
EndAddress = StartAddress + Size;\r
UINTN EndAddress;\r
\r
ASSERT_INVALID_PCI_ADDRESS (StartAddress);\r
- ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);\r
- ASSERT ((StartAddress + Size - 1) <= 0x0FFFFFFF);\r
ASSERT (Buffer != NULL);\r
\r
EndAddress = StartAddress + Size;\r
@param Buffer Character buffer to print the results of the parsing\r
of Format into.\r
@param BufferSize Maximum number of characters to put into buffer.\r
- Zero means no limit.\r
@param Flags Intial flags value.\r
Can only have FORMAT_UNICODE and OUTPUT_UNICODE set\r
@param Format Null-terminated format string.\r
UINTN Radix;\r
RETURN_STATUS Status;\r
\r
+ if (BufferSize == 0) {\r
+ return 0;\r
+ }\r
ASSERT (Buffer != NULL);\r
ASSERT (Format != NULL);\r
\r
\r
//\r
// Reserve space for the Null terminator.\r
- // If BufferSize is 0, this will set BufferSize to the max unsigned value\r
//\r
BufferSize--;\r
\r
} else {\r
BasePrintLibSPrint (\r
ValueBuffer,\r
- 0, \r
+ MAXIMUM_VALUE_CHARACTERS, \r
0,\r
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",\r
TmpGuid->Data1,\r
} else {\r
BasePrintLibSPrint (\r
ValueBuffer,\r
- 0,\r
+ MAXIMUM_VALUE_CHARACTERS,\r
0,\r
"%02d/%02d/%04d %02d:%02d",\r
TmpTime->Month,\r
}\r
}\r
if (ArgumentString == ValueBuffer) {\r
- BasePrintLibSPrint ((CHAR8 *) ValueBuffer, 0, 0, "%08X", Status);\r
+ BasePrintLibSPrint ((CHAR8 *) ValueBuffer, MAXIMUM_VALUE_CHARACTERS, 0, "%08X", Status);\r
}\r
break;\r
\r
+ case '\n':\r
+ ArgumentString = "\r\n";\r
+ break;\r
+\r
case '%':\r
default:\r
//\r
break;\r
}\r
break;\r
- case '\n':\r
- ArgumentString = "\r\n";\r
- break;\r
default:\r
ArgumentString = (CHAR8 *)&FormatCharacter;\r
Flags |= ARGUMENT_UNICODE;\r
VA_LIST Marker;\r
\r
VA_START (Marker, FormatString);\r
- return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize >> 1, FormatString, Marker);\r
+ return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
}\r
\r
/**\r
UINTN Digits;\r
UINTN Index;\r
\r
+ ASSERT (Buffer != NULL);\r
+ ASSERT (Width < MAXIMUM_VALUE_CHARACTERS);\r
+ //\r
+ // Make sure Flags can only contain supported bits.\r
+ //\r
+ ASSERT ((Flags & ~(LEFT_JUSTIFY | COMMA_TYPE | PREFIX_ZERO)) == 0);\r
+\r
OriginalBuffer = Buffer;\r
\r
if (Width == 0 || (Flags & COMMA_TYPE) != 0) {\r
Flags &= (~PREFIX_ZERO);\r
}\r
\r
- if (Width == 0 || Width > (MAXIMUM_VALUE_CHARACTERS - 1)) {\r
+ if (Width == 0) {\r
Width = MAXIMUM_VALUE_CHARACTERS - 1;\r
}\r
\r
#define PRECISION 0x800\r
#define ARGUMENT_REVERSED 0x1000\r
\r
-///\r
-/// Define the maximum number of characters that are required to encode\r
-/// a decimal, hexidecimal, GUID, or TIME value with a Nll terminator.\r
-/// Maximum Length Decimal String = 28 "-9,223,372,036,854,775,808"\r
-/// Maximum Length Hexidecimal String = 17 "FFFFFFFFFFFFFFFF"\r
-/// Maximum Length GUID = 37 "00000000-0000-0000-0000-000000000000"\r
-/// Maximum Length TIME = 18 "12/12/2006 12:12"\r
-///\r
-#define MAXIMUM_VALUE_CHARACTERS 38\r
-\r
//\r
// Record date and time information\r
//\r
BOOLEAN\r
EFIAPI\r
ReportStatusCodeExtractAssertInfo (\r
- IN EFI_STATUS_CODE_TYPE CodeType,\r
- IN EFI_STATUS_CODE_VALUE Value, \r
- IN EFI_STATUS_CODE_DATA *Data, \r
- OUT CHAR8 **Filename,\r
- OUT CHAR8 **Description,\r
- OUT UINT32 *LineNumber\r
+ IN EFI_STATUS_CODE_TYPE CodeType,\r
+ IN EFI_STATUS_CODE_VALUE Value, \r
+ IN CONST EFI_STATUS_CODE_DATA *Data, \r
+ OUT CHAR8 **Filename,\r
+ OUT CHAR8 **Description,\r
+ OUT UINT32 *LineNumber\r
)\r
{\r
EFI_DEBUG_ASSERT_DATA *AssertData;\r
BOOLEAN\r
EFIAPI\r
ReportStatusCodeExtractDebugInfo (\r
- IN EFI_STATUS_CODE_DATA *Data,\r
- OUT UINT32 *ErrorLevel,\r
- OUT VA_LIST *Marker,\r
- OUT CHAR8 **Format\r
+ IN CONST EFI_STATUS_CODE_DATA *Data, \r
+ OUT UINT32 *ErrorLevel,\r
+ OUT VA_LIST *Marker,\r
+ OUT CHAR8 **Format\r
)\r
{\r
EFI_DEBUG_INFO *DebugInfo;\r
EFI_STATUS\r
EFIAPI\r
ReportStatusCodeWithDevicePath (\r
- IN EFI_STATUS_CODE_TYPE Type,\r
- IN EFI_STATUS_CODE_VALUE Value,\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
+ IN EFI_STATUS_CODE_TYPE Type,\r
+ IN EFI_STATUS_CODE_VALUE Value,\r
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
)\r
{\r
ASSERT (DevicePath != NULL);\r
ReportStatusCodeWithExtendedData (\r
IN EFI_STATUS_CODE_TYPE Type,\r
IN EFI_STATUS_CODE_VALUE Value,\r
- IN VOID *ExtendedData,\r
+ IN CONST VOID *ExtendedData,\r
IN UINTN ExtendedDataSize\r
)\r
{\r
IN EFI_STATUS_CODE_TYPE Type,\r
IN EFI_STATUS_CODE_VALUE Value,\r
IN UINT32 Instance,\r
- IN EFI_GUID *CallerId OPTIONAL,\r
- IN EFI_GUID *ExtendedDataGuid OPTIONAL,\r
- IN VOID *ExtendedData OPTIONAL,\r
+ IN CONST EFI_GUID *CallerId OPTIONAL,\r
+ IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,\r
+ IN CONST VOID *ExtendedData OPTIONAL,\r
IN UINTN ExtendedDataSize\r
)\r
{\r
IN EFI_STATUS_CODE_TYPE Type,\r
IN EFI_STATUS_CODE_VALUE Value,\r
IN UINT32 Instance,\r
- IN EFI_GUID *CallerId OPTIONAL,\r
+ IN CONST EFI_GUID *CallerId OPTIONAL,\r
IN EFI_STATUS_CODE_DATA *Data OPTIONAL \r
)\r
{\r
// A Status Code Protocol is present in the handle database, so pass in all the \r
// parameters to the ReportStatusCode() service of the Status Code Protocol\r
//\r
- return gStatusCode->ReportStatusCode (Type, Value, Instance, CallerId, Data);\r
+ return gStatusCode->ReportStatusCode (Type, Value, Instance, (EFI_GUID *)CallerId, Data);\r
}\r
\r
\r
**/\r
UINTN\r
InternalReportStatusCodeDevicePathSize (\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
)\r
{\r
- EFI_DEVICE_PATH_PROTOCOL *Start;\r
-\r
- if (DevicePath == NULL) {\r
- return 0;\r
- }\r
+ CONST EFI_DEVICE_PATH_PROTOCOL *Start;\r
\r
//\r
// Search for the end of the device path structure\r
BOOLEAN\r
EFIAPI\r
ReportStatusCodeExtractAssertInfo (\r
- IN EFI_STATUS_CODE_TYPE CodeType,\r
- IN EFI_STATUS_CODE_VALUE Value, \r
- IN EFI_STATUS_CODE_DATA *Data, \r
- OUT CHAR8 **Filename,\r
- OUT CHAR8 **Description,\r
- OUT UINT32 *LineNumber\r
+ IN EFI_STATUS_CODE_TYPE CodeType,\r
+ IN EFI_STATUS_CODE_VALUE Value, \r
+ IN CONST EFI_STATUS_CODE_DATA *Data, \r
+ OUT CHAR8 **Filename,\r
+ OUT CHAR8 **Description,\r
+ OUT UINT32 *LineNumber\r
)\r
{\r
EFI_DEBUG_ASSERT_DATA *AssertData;\r
BOOLEAN\r
EFIAPI\r
ReportStatusCodeExtractDebugInfo (\r
- IN EFI_STATUS_CODE_DATA *Data,\r
- OUT UINT32 *ErrorLevel,\r
- OUT VA_LIST *Marker,\r
- OUT CHAR8 **Format\r
+ IN CONST EFI_STATUS_CODE_DATA *Data, \r
+ OUT UINT32 *ErrorLevel,\r
+ OUT VA_LIST *Marker,\r
+ OUT CHAR8 **Format\r
)\r
{\r
EFI_DEBUG_INFO *DebugInfo;\r
EFI_STATUS\r
EFIAPI\r
ReportStatusCodeWithDevicePath (\r
- IN EFI_STATUS_CODE_TYPE Type,\r
- IN EFI_STATUS_CODE_VALUE Value,\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
+ IN EFI_STATUS_CODE_TYPE Type,\r
+ IN EFI_STATUS_CODE_VALUE Value,\r
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
)\r
{\r
ASSERT (DevicePath != NULL);\r
ReportStatusCodeWithExtendedData (\r
IN EFI_STATUS_CODE_TYPE Type,\r
IN EFI_STATUS_CODE_VALUE Value,\r
- IN VOID *ExtendedData,\r
+ IN CONST VOID *ExtendedData,\r
IN UINTN ExtendedDataSize\r
)\r
{\r
IN EFI_STATUS_CODE_TYPE Type,\r
IN EFI_STATUS_CODE_VALUE Value,\r
IN UINT32 Instance,\r
- IN EFI_GUID *CallerId OPTIONAL,\r
- IN EFI_GUID *ExtendedDataGuid OPTIONAL,\r
- IN VOID *ExtendedData OPTIONAL,\r
+ IN CONST EFI_GUID *CallerId OPTIONAL,\r
+ IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,\r
+ IN CONST VOID *ExtendedData OPTIONAL,\r
IN UINTN ExtendedDataSize\r
)\r
{\r
IN EFI_STATUS_CODE_TYPE Type,\r
IN EFI_STATUS_CODE_VALUE Value,\r
IN UINT32 Instance,\r
- IN EFI_GUID *CallerId OPTIONAL,\r
+ IN CONST EFI_GUID *CallerId OPTIONAL,\r
IN EFI_STATUS_CODE_DATA *Data OPTIONAL \r
)\r
{\r
EFI_PEI_SERVICES **PeiServices;\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
- return (*PeiServices)->PeiReportStatusCode (PeiServices, Type, Value, Instance, CallerId, Data);\r
-}\r
-\r
-\r
-/**\r
- Computes and returns the size, in bytes, of a device path.\r
-\r
- @param DevicePath A pointer to a device path.\r
-\r
- @return The size, in bytes, of DevicePath.\r
-\r
-**/\r
-UINTN\r
-InternalReportStatusCodeDevicePathSize (\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
- )\r
-{\r
- EFI_DEVICE_PATH_PROTOCOL *Start;\r
-\r
- if (DevicePath == NULL) {\r
- return 0;\r
- }\r
-\r
- //\r
- // Search for the end of the device path structure\r
- //\r
- Start = DevicePath;\r
- while (!EfiIsDevicePathEnd (DevicePath)) {\r
- DevicePath = EfiNextDevicePathNode (DevicePath);\r
- }\r
-\r
- //\r
- // Subtract the start node from the end node and add in the size of the end node\r
- //\r
- return ((UINTN) DevicePath - (UINTN) Start) + DevicePathNodeLength (DevicePath);\r
+ return (*PeiServices)->PeiReportStatusCode (\r
+ PeiServices,\r
+ Type,\r
+ Value,\r
+ Instance,\r
+ (EFI_GUID *)CallerId,\r
+ Data\r
+ );\r
}\r
\r
\r
BOOLEAN\r
EFIAPI\r
ReportStatusCodeExtractAssertInfo (\r
- IN EFI_STATUS_CODE_TYPE CodeType,\r
- IN EFI_STATUS_CODE_VALUE Value, \r
- IN EFI_STATUS_CODE_DATA *Data, \r
- OUT CHAR8 **Filename,\r
- OUT CHAR8 **Description,\r
- OUT UINT32 *LineNumber\r
+ IN EFI_STATUS_CODE_TYPE CodeType,\r
+ IN EFI_STATUS_CODE_VALUE Value, \r
+ IN CONST EFI_STATUS_CODE_DATA *Data, \r
+ OUT CHAR8 **Filename,\r
+ OUT CHAR8 **Description,\r
+ OUT UINT32 *LineNumber\r
)\r
{\r
EFI_DEBUG_ASSERT_DATA *AssertData;\r
BOOLEAN\r
EFIAPI\r
ReportStatusCodeExtractDebugInfo (\r
- IN EFI_STATUS_CODE_DATA *Data,\r
- OUT UINT32 *ErrorLevel,\r
- OUT VA_LIST *Marker,\r
- OUT CHAR8 **Format\r
+ IN CONST EFI_STATUS_CODE_DATA *Data, \r
+ OUT UINT32 *ErrorLevel,\r
+ OUT VA_LIST *Marker,\r
+ OUT CHAR8 **Format\r
)\r
{\r
EFI_DEBUG_INFO *DebugInfo;\r
EFI_STATUS\r
EFIAPI\r
ReportStatusCodeWithDevicePath (\r
- IN EFI_STATUS_CODE_TYPE Type,\r
- IN EFI_STATUS_CODE_VALUE Value,\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
+ IN EFI_STATUS_CODE_TYPE Type,\r
+ IN EFI_STATUS_CODE_VALUE Value,\r
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
)\r
{\r
ASSERT (DevicePath != NULL);\r
- return ReportStatusCodeWithExtendedData (\r
- Type, \r
- Value, \r
- (VOID *)DevicePath, \r
- InternalReportStatusCodeDevicePathSize (DevicePath)\r
- );\r
+ return EFI_UNSUPPORTED;\r
}\r
\r
\r
ReportStatusCodeWithExtendedData (\r
IN EFI_STATUS_CODE_TYPE Type,\r
IN EFI_STATUS_CODE_VALUE Value,\r
- IN VOID *ExtendedData,\r
+ IN CONST VOID *ExtendedData,\r
IN UINTN ExtendedDataSize\r
)\r
{\r
IN EFI_STATUS_CODE_TYPE Type,\r
IN EFI_STATUS_CODE_VALUE Value,\r
IN UINT32 Instance,\r
- IN EFI_GUID *CallerId OPTIONAL,\r
- IN EFI_GUID *ExtendedDataGuid OPTIONAL,\r
- IN VOID *ExtendedData OPTIONAL,\r
+ IN CONST EFI_GUID *CallerId OPTIONAL,\r
+ IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,\r
+ IN CONST VOID *ExtendedData OPTIONAL,\r
IN UINTN ExtendedDataSize\r
)\r
{\r
VOID\r
)\r
{\r
+ ASSERT (gPeiServices != NULL);\r
return gPeiServices;\r
}\r
\r
</MsaLibHeader>\r
<LibraryClassDefinitions>\r
<LibraryClass Usage="ALWAYS_PRODUCED">PeiServicesTablePointerLib</LibraryClass>\r
+ <LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>\r
</LibraryClassDefinitions>\r
<SourceFiles>\r
<Filename>PeiServicesTablePointer.c</Filename>\r
VOID\r
)\r
{\r
- return (EFI_PEI_SERVICES **)(UINTN)AsmReadMm7 ();\r
+ EFI_PEI_SERVICES **PeiServices;\r
+\r
+ PeiServices = (EFI_PEI_SERVICES **)(UINTN)AsmReadMm7 ();\r
+ ASSERT (PeiServices != NULL);\r
+ return PeiServices;\r
}\r
\r
/**\r
<LibraryClassDefinitions>\r
<LibraryClass Usage="ALWAYS_PRODUCED">PeiServicesTablePointerLib</LibraryClass>\r
<LibraryClass Usage="ALWAYS_CONSUMED">BaseLib</LibraryClass>\r
+ <LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>\r
</LibraryClassDefinitions>\r
<SourceFiles>\r
<Filename>PeiServicesTablePointer.c</Filename>\r
Prints an assert message containing a filename, line number, and description. \r
This may be followed by a breakpoint or a dead loop.\r
\r
- Print a message of the form \93ASSERT <FileName>(<LineNumber>): <Description>\n\94 \r
+ Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n" \r
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of \r
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if \r
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then \r
DebugAssert() must actively prevent recusrsion. If DebugAssert() is called while\r
processing another DebugAssert(), then DebugAssert() must return immediately.\r
\r
- If FileName is NULL, then a <FileName> string of \93(NULL) Filename\94 is printed.\r
+ If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.\r
\r
- If Description is NULL, then a <Description> string of \93(NULL) Description\94 is printed.\r
+ If Description is NULL, then a <Description> string of "(NULL) Description" is printed.\r
\r
@param FileName Pointer to the name of the source file that generated the assert condition.\r
@param LineNumber The line number in the source file that generated the assert condition\r
Prints an assert message containing a filename, line number, and description. \r
This may be followed by a breakpoint or a dead loop.\r
\r
- Print a message of the form \93ASSERT <FileName>(<LineNumber>): <Description>\n\94 \r
+ Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n" \r
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of \r
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if \r
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then \r
DebugAssert() must actively prevent recusrsion. If DebugAssert() is called while\r
processing another DebugAssert(), then DebugAssert() must return immediately.\r
\r
- If FileName is NULL, then a <FileName> string of \93(NULL) Filename\94 is printed.\r
+ If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.\r
\r
- If Description is NULL, then a <Description> string of \93(NULL) Description\94 is printed.\r
+ If Description is NULL, then a <Description> string of "(NULL) Description" is printed.\r
\r
@param FileName Pointer to the name of the source file that generated the assert condition.\r
@param LineNumber The line number in the source file that generated the assert condition\r