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 ( ): \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_DEAD
| 94 | |
| 95 | **/ |
| 96 | VOID |
| 97 | EFIAPI |
| 98 | DebugAssert ( |
| 99 | IN CONST CHAR8 *FileName, |
| 100 | IN UINTN LineNumber, |
| 101 | IN CONST CHAR8 *Description |
| 102 | ) |
| 103 | { |
| 104 | // |
| 105 | // Generate the ASSERT() message and log it |
| 106 | // |
| 107 | DebugPrint ( |
| 108 | DEBUG_ERROR, |
| 109 | "ASSERT [%a] %a(%d): %a\n", |
| 110 | gEfiCallerBaseName, |
| 111 | FileName, |
| 112 | LineNumber, |
| 113 | Description |
| 114 | ); |
| 115 | |
| 116 | // |
| 117 | // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings |
| 118 | // |
| 119 | if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { |
| 120 | CpuBreakpoint (); |
| 121 | } else if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { |
| 122 | CpuDeadLoop (); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | |
| 127 | /** |
nothing calls this directly
no test coverage detected