Changeset 67350 in vbox for trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c
- Timestamp:
- Jun 12, 2017 5:42:14 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c
r62500 r67350 29 29 *******************************************************************************/ 30 30 #include <Base.h> 31 #include <Library/BaseLib.h> 31 32 #include <Library/PrintLib.h> 32 33 #include <Library/DebugLib.h> … … 38 39 #include <Library/UefiBootServicesTableLib.h> 39 40 #include "DevEFI.h" 41 #include "iprt/asm.h" 40 42 41 43 #if 0 … … 50 52 VA_LIST va; 51 53 UINTN cch; 52 RTCCUINTREG SavedFlags;54 BOOLEAN InterruptState; 53 55 54 56 /* No pool noise, please. */ … … 67 69 szBuf[cch] = '\0'; 68 70 71 InterruptState = SaveAndDisableInterrupts(); 72 69 73 /* Output the log string. */ 70 SavedFlags = ASMIntDisableFlags();71 72 74 VBoxPrintString("dbg/"); 73 75 VBoxPrintHex(ErrorLevel, sizeof(ErrorLevel)); … … 76 78 VBoxPrintChar('\n'); 77 79 78 ASMSetFlags(SavedFlags);80 SetInterruptState(InterruptState); 79 81 } 80 82 … … 91 93 CHAR8 szBuf[384]; 92 94 VA_LIST va; 93 RTCCUINTREG SavedFlags;95 BOOLEAN InterruptState; 94 96 95 97 /* Format it. */ … … 99 101 szBuf[sizeof(szBuf) - 1] = '\0'; 100 102 103 InterruptState = SaveAndDisableInterrupts(); 104 101 105 /* Output the log string. */ 102 SavedFlags = ASMIntDisableFlags();103 104 106 VBoxPrintString(szBuf); 105 107 VBoxPrintChar('\n'); 106 108 107 ASMSetFlags(SavedFlags);109 SetInterruptState(InterruptState); 108 110 } 109 111 … … 157 159 DebugAssert(IN CONST CHAR8 *FileName, IN UINTN LineNumber, IN CONST CHAR8 *Description) 158 160 { 159 RTCCUINTREG SavedFlags = ASMIntDisableFlags();161 BOOLEAN InterruptState = SaveAndDisableInterrupts(); 160 162 161 163 ASMOutU8(EFI_PANIC_PORT, EFI_PANIC_CMD_START_MSG); … … 169 171 ASMOutU8(EFI_PANIC_PORT, EFI_PANIC_CMD_END_MSG); 170 172 171 ASMSetFlags(SavedFlags);173 SetInterruptState(InterruptState); 172 174 } 173 175
Note:
See TracChangeset
for help on using the changeset viewer.