VirtualBox

儲存庫 vbox 的更動 67350


忽略:
時間撮記:
2017-6-12 下午05:42:14 (7 年 以前)
作者:
vboxsync
訊息:

EFI/Firmware: fix compiler confusion caused by using ASMIntDisableFlags which resulted in truncated EFI debug output, plus some minor cleanup

位置:
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib
檔案:
修改 5 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c

    r62500 r67350  
    2929*******************************************************************************/
    3030#include <Base.h>
     31#include <Library/BaseLib.h>
    3132#include <Library/PrintLib.h>
    3233#include <Library/DebugLib.h>
     
    3839#include <Library/UefiBootServicesTableLib.h>
    3940#include "DevEFI.h"
     41#include "iprt/asm.h"
    4042
    4143#if 0
     
    5052    VA_LIST     va;
    5153    UINTN       cch;
    52     RTCCUINTREG SavedFlags;
     54    BOOLEAN     InterruptState;
    5355
    5456    /* No pool noise, please. */
     
    6769    szBuf[cch] = '\0';
    6870
     71    InterruptState = SaveAndDisableInterrupts();
     72
    6973    /* Output the log string. */
    70     SavedFlags = ASMIntDisableFlags();
    71 
    7274    VBoxPrintString("dbg/");
    7375    VBoxPrintHex(ErrorLevel, sizeof(ErrorLevel));
     
    7678    VBoxPrintChar('\n');
    7779
    78     ASMSetFlags(SavedFlags);
     80    SetInterruptState(InterruptState);
    7981}
    8082
     
    9193    CHAR8       szBuf[384];
    9294    VA_LIST     va;
    93     RTCCUINTREG SavedFlags;
     95    BOOLEAN     InterruptState;
    9496
    9597    /* Format it. */
     
    99101    szBuf[sizeof(szBuf) - 1] = '\0';
    100102
     103    InterruptState = SaveAndDisableInterrupts();
     104
    101105    /* Output the log string. */
    102     SavedFlags = ASMIntDisableFlags();
    103 
    104106    VBoxPrintString(szBuf);
    105107    VBoxPrintChar('\n');
    106108
    107     ASMSetFlags(SavedFlags);
     109    SetInterruptState(InterruptState);
    108110}
    109111
     
    157159DebugAssert(IN CONST CHAR8 *FileName, IN UINTN LineNumber, IN CONST CHAR8 *Description)
    158160{
    159     RTCCUINTREG SavedFlags = ASMIntDisableFlags();
     161    BOOLEAN InterruptState = SaveAndDisableInterrupts();
    160162
    161163    ASMOutU8(EFI_PANIC_PORT, EFI_PANIC_CMD_START_MSG);
     
    169171    ASMOutU8(EFI_PANIC_PORT, EFI_PANIC_CMD_END_MSG);
    170172
    171     ASMSetFlags(SavedFlags);
     173    SetInterruptState(InterruptState);
    172174}
    173175
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintChar.c

    r62500 r67350  
    3030#include "VBoxDebugLib.h"
    3131#include "DevEFI.h"
     32#include "iprt/asm.h"
    3233
    3334
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintHex.c

    r62500 r67350  
    3232#include "VBoxDebugLib.h"
    3333#include "DevEFI.h"
     34#include "iprt/asm.h"
    3435
    3536
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintHexDump.c

    r62500 r67350  
    3030*   Header Files                                                               *
    3131*******************************************************************************/
     32#include <ctype.h>
    3233#include "VBoxDebugLib.h"
    3334#include "DevEFI.h"
    34 #include <iprt/ctype.h>
     35#include "iprt/asm.h"
    3536
    3637
     
    8081        cchPrinted += VBoxPrintString("  ");
    8182        for (i = 0; i < 16 && i < cb; i++)
    82             cchPrinted += vboxPrintHexDumpChar(pb[i] == ' '
    83                                                ? ' '
    84                                                : RT_C_IS_GRAPH(pb[i])
     83            cchPrinted += vboxPrintHexDumpChar(isprint(pb[i])
    8584                                               ? pb[i]
    8685                                               : '.');
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxPrintString.c

    r62500 r67350  
    3131#include "VBoxDebugLib.h"
    3232#include "DevEFI.h"
     33#include "iprt/asm.h"
    3334
    3435
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette