11 #ifndef RDFU_GLOBALS_H
12 #define RDFU_GLOBALS_H
15 #include <Library/BaseLib.h>
16 #include <Library/BaseMemoryLib.h>
17 #include <Library/DebugLib.h>
18 #include <Library/UefiBootServicesTableLib.h>
19 #include <Library/UefiRuntimeServicesTableLib.h>
20 #include <Library/UefiLib.h>
21 #include <Library/PrintLib.h>
22 #include <Library/DevicePathLib.h>
23 #include <Protocol/LoadedImage.h>
24 #include <Protocol/SimpleFileSystem.h>
25 #include <Protocol/BlockIo.h>
26 #include <Protocol/DevicePathToText.h>
27 #include <Protocol/PciRootBridgeIo.h>
38 #define CHECK_BAD_ADDRS 1 // check of bad addrs while scanning memory (pe scan)
39 #define USE_DXE_SERVICES 0 // available only for DXE drivers (UEFI app will not compile)
42 #if USE_DXE_SERVICES == 1
43 #include <Library/DxeServicesTableLib.h>
46 #define LOG_FILE L"log.txt"
47 #define LOG_INIT_LINE ": Initializing scanner ... \r\n"
48 #define LOG_EXIT_LINE ": Everything done, quiting. \r\n"
50 #define CONF_FILE_PATH L"conf.txt"
54 #define PAGE_SIZE EFI_PAGE_SIZE
57 #define MAX_VALID_IMAGES 512
58 #define MAX_MEM_DUMP_SIZE 1024*1024*10
62 #define TICKS_PER_MS 10000U
64 #define SAMPLE_INTERVAL (10 * 10 * TICKS_PER_MS)
67 #define EFI_EVENT_NOTIFY_WAIT 0x00000100
68 #define EFI_TPL_NOTIFY 16
83 IN CHAR16 *FilePathName,
85 OUT EFI_FILE_PROTOCOL **File
101 extern VOID
MemFree(VOID *Mem);
102 extern VOID
MemCopy(VOID *Dest, VOID *Src, UINTN Size);
103 extern VOID
MemZero(VOID *Mem, UINTN Size);
147 EFI_LOADED_IMAGE_PROTOCOL *LoadedImageProt,
148 BOOLEAN CalculateCrc);
247 EFI_HANDLE ImageHandle,
330 #define PRINT_FUNC if (gEfiScannerPolicy.OpUsePrint) Print
331 #define PRINT_FUNC_ASCII if (gEfiScannerPolicy.OpUsePrint) AsciiPrint