|
RDFU
1.0
|
Functions for displaying and dumping memory map and PE files (including memory search) More...
#include "EfiScannerHeaders.h"
Go to the source code of this file.
Functions | |
| EFI_STATUS | DumpPEFile (C_PTR BaseAddr) |
| EFI_STATUS | ScanMemoryForExecutables (VOID) |
| EFI_STATUS | DumpFirmwareFromROM (VOID) |
| __inline C_PTR | IsBadAddress (C_PTR Address) |
Functions for displaying and dumping memory map and PE files (including memory search)
Definition in file DumpMem.c.
| EFI_STATUS DumpFirmwareFromROM | ( | VOID | ) |
Function dumps firmware from ROM to file (mdump\firmware.dmp). The ROM address is constant and it is described by BIOS_ROM_BASE. Typically the size of firmware is smaller than (BIOS_ROM_END-BIOS_ROM_BASE) but in this case we have just decided to dump more.
| EFI_SUCCESS | On success |
| EFI_ERROR* | On error |
Definition at line 259 of file DumpMem.c.
References BIOS_ROM_BASE, BIOS_ROM_END, DumpMemoryToFile(), EFI_STATUS(), and LogFullAscii().
Referenced by DrawBoxAndMenu().


| EFI_STATUS DumpPEFile | ( | C_PTR | BaseAddr | ) |
Function dumps Portable Executable file to file. (by default "bdump\ADDR.dmp")
| BaseAddr | Address to the located Portable Executable file in memory. |
| EFI_SUCCESS | On success |
| EFI_ERROR* | On error |
Definition at line 30 of file DumpMem.c.
References DumpMemoryToFile(), EFI_IMAGE_DOS_HEADER::e_lfanew, EFI_IMAGE_NT_SIGNATURE, LogFullAscii(), MAX_PE_MEM, EFI_IMAGE_NT_HEADERS64::OptionalHeader, EFI_IMAGE_NT_HEADERS64::Signature, and EFI_IMAGE_OPTIONAL_HEADER64::SizeOfImage.
Referenced by ScanMemoryForExecutables().


Functions tests if Address equals to StartAddr from bad addrs list (from the policy). If so it returns the EndAddr from the policy. This is done to filter the memory areas which cause machine freeze. Otherwise it returns 0.
Definition at line 295 of file DumpMem.c.
References _policy::BadAddrs, _bad_addr_entry::EndAddr, gEfiScannerPolicy, _policy::NumOfBadAddrs, and _bad_addr_entry::StartAddr.
Referenced by ScanMemoryForExecutables().

| EFI_STATUS ScanMemoryForExecutables | ( | VOID | ) |
Function scans memory for Portable Executable files and dumps them to file. It can cause machine freeze on custom mobos.
| EFI_SUCCESS | On success |
| EFI_ERROR* | On error |
Definition at line 121 of file DumpMem.c.
References DumpPEFile(), DumpTEFile(), EFI_STATUS(), FindImageByAddr(), FreeImages(), GetAllImagesWithDescription(), IsBadAddress(), LogFullAscii(), MEM_END_PROBE, MEM_START_PROBE, MemRead(), and TE_SIGNATURE.
Referenced by DrawBoxAndMenu(), and TestDumpHandles().

