RDFU  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Logs.c File Reference

Logging functions. More...

Include dependency graph for Logs.c:

Go to the source code of this file.

Functions

VOID LogFileAscii (CHAR8 *FormatString,...)
 
VOID LogFullAscii (CHAR8 *FormatString,...)
 
VOID LogFullUnicode (CHAR16 *FormatString,...)
 

Variables

ULONG gLogLock = 0
 

Detailed Description

Logging functions.

Author
Piotr Bania
Date
Feb 2013 Logging functions

Definition in file Logs.c.

Function Documentation

VOID LogFileAscii ( CHAR8 *  FormatString,
  ... 
)

Depending on the policy function writes the provided text data to log file or serial port.

Parameters
FormatStringFormat string (printf style)
...Additional arguments
Return values
NONE

Definition at line 40 of file Logs.c.

References ASMEnterLock(), ASMLeaveLock(), ComPutString(), gEfiScannerPolicy, gLogLock, _policy::OpUseComPort, and WriteLogFile().

Referenced by DumpEFITables(), hooked_LoadImage(), MyModImageNotify(), MyNewEventCallback(), MyNewImageNotify(), NotifyEventScannerTimer(), NotifyExitBootServices(), and ReadConfiguration().

41 {
42  VA_LIST VList;
43  CHAR8 LogBuffer[1024];
44 
45  VA_START(VList, FormatString);
46  AsciiVSPrint(LogBuffer, sizeof(LogBuffer)-1, FormatString, VList);
47  VA_END(VList);
48 
49 
51 
52  WriteLogFile(LogBuffer);
54  ComPutString(LogBuffer);
55 
57 
58 }

Here is the call graph for this function:

Here is the caller graph for this function:

VOID LogFullAscii ( CHAR8 *  FormatString,
  ... 
)

Depending on the policy function writes the provided text data to screen, log file or serial port.

Parameters
FormatStringFormat string (printf style)
...Additional arguments
Return values
NONE

Definition at line 73 of file Logs.c.

References ASMEnterLock(), ASMLeaveLock(), ComPutString(), gEfiScannerPolicy, gLogLock, _policy::OpUseComPort, PRINT_FUNC_ASCII, and WriteLogFile().

Referenced by BruteFind_gEventSignalQueueAddr(), BruteFind_gEventSignalQueueAddr2(), CheckImagesFunctionPointers(), ComConsoleStart(), CommandDriverInfo(), CommandDumpMem(), CommandEventInfo(), CommandFunction(), CommandHelp(), CommandMemInfo(), DisplayLogX64Context(), DisplayLogX86Context(), DumpAllEvents(), DumpAllHandles(), DumpAllImages(), DumpEFITables(), DumpFirmwareFromROM(), DumpGcdMemoryMap(), DumpGDT(), DumpIDT(), DumpImageToDisk(), DumpMemoryMap(), DumpMemoryToFile(), DumpPEFile(), DumpTEFile(), EfiScannerEntryPoint(), EfiScannerInitialize(), GetAllEvents(), GetAllHandles(), GetAllHandlesWithDescription(), GetgEventSignalQueueMacMini(), GetLoadedImageProtocol(), GetMemoryEntryGcdInformation(), GetMemoryMapList(), GetPEHeaders(), GetStringFromHandle(), GetStringFromHandle2(), IdtHookInterrupt(), InstallEFITableScanner(), InstallEventScanner(), InstallSniffImage(), IsEventSignalQueueAddrResolved(), MemAllocate(), ParseConfiguration(), PickBestTextMode(), ProcessCommand(), ReadConfiguration(), ScanMemoryForExecutables(), ScreenGetResolution(), ScreenInit(), ScreenShowSplashLogo(), UnInstallEFITableScanner(), UnInstallEventScanner(), and UnInstallSniffImage().

74 {
75  VA_LIST VList;
76  CHAR8 LogBuffer[1024];
77 
78  VA_START(VList, FormatString);
79  AsciiVSPrint(LogBuffer, sizeof(LogBuffer)-1, FormatString, VList);
80  VA_END(VList);
81 
83 
84  PRINT_FUNC_ASCII(LogBuffer);
85  WriteLogFile(LogBuffer);
86 
88  ComPutString(LogBuffer);
89 
91 
92 }

Here is the call graph for this function:

VOID LogFullUnicode ( CHAR16 *  FormatString,
  ... 
)

Depending on the policy function writes the provided text data to screen, log file or serial port. (unicode version)

Parameters
FormatStringFormat string (printf style)
...Additional arguments
Return values
NONE

Definition at line 108 of file Logs.c.

References ASMEnterLock(), ASMLeaveLock(), gLogLock, PRINT_FUNC, and WriteLogFile16().

109 {
110  VA_LIST VList;
111  CHAR16 LogBuffer[1024];
112 
113  VA_START(VList, FormatString);
114  UnicodeVSPrint(LogBuffer, sizeof(LogBuffer)-1, FormatString, VList);
115  VA_END(VList);
116 
118 
119  PRINT_FUNC(LogBuffer);
120  WriteLogFile16(LogBuffer);
121 
123 }

Here is the call graph for this function:

Variable Documentation

ULONG gLogLock = 0

lock used for the "logging functions" synchronization

Definition at line 24 of file Logs.c.

Referenced by EfiScannerInitialize(), LogFileAscii(), LogFullAscii(), and LogFullUnicode().