|
RDFU
1.0
|
Functions related to memory map operations. More...
#include "EfiScannerHeaders.h"
Go to the source code of this file.
Macros | |
| #define | NUM_OF_MAP_ENTRIES ((MemoryMapSize / DescriptorSize)+1) |
Functions | |
| VOID | GetMemAttributesStringAscii (CHAR8 *MemAttributesBuff, UINTN MemAttributesBuffSize, UINT64 Attributes) |
| EFI_STATUS | GetMemoryEntryGcdInformation (EFI_PHYSICAL_ADDRESS BaseAddress, memory_map_entry *MemEntry) |
| memory_map_entry_list * | GetMemoryMapList (VOID) |
| VOID | FreeMemMap (memory_map_entry_list *MemMap) |
| EFI_STATUS | DumpGcdMemoryMap (VOID) |
| memory_map_entry * | FindMapEntryByAddr (memory_map_entry_list *MemMap, EFI_PHYSICAL_ADDRESS Address) |
| EFI_STATUS | DumpMemoryMap (memory_map_entry_list *MemMap, BOOLEAN DumpToDisk, UINT32 SkipType) |
Variables | |
| CHAR8 * | memory_types [] |
Functions related to memory map operations.
Definition in file MemoryMap.c.
| #define NUM_OF_MAP_ENTRIES ((MemoryMapSize / DescriptorSize)+1) |
Referenced by GetMemoryMapList().
| EFI_STATUS DumpGcdMemoryMap | ( | VOID | ) |
Function displays the GCD memory map obtained through GetMemorySpaceMap. This function is only available in DXE drivers due to DxeServicesTableLib requirements.
| EFI_SUCCESS | On success |
| EFI_ERROR* | On error |
Definition at line 294 of file MemoryMap.c.
References EFI_STATUS(), and LogFullAscii().
Referenced by DumpMemoryMap().


| EFI_STATUS DumpMemoryMap | ( | memory_map_entry_list * | MemMap, |
| BOOLEAN | DumpToDisk, | ||
| UINT32 | SkipType | ||
| ) |
Function displays and dump the memory map.
| MemMap | Pointer to memory map obtained from GetMemoryMapList |
| DumpToDisk | Inidicates whether the data will be dumped to disk |
| SkipType | Types of memory that will be not included in the disk dump |
| EFI_SUCCESS | On success |
| EFI_ERROR* | On error |
Definition at line 381 of file MemoryMap.c.
References _memory_map_entry::Attributes, DumpGcdMemoryMap(), DumpMemoryToFile(), GetMemAttributesStringAscii(), LogFullAscii(), _memory_map_entry_list::MapKey, memory_types, _memory_map_entry_list::MemoryMapEntry, _memory_map_entry::NumberOfPages, _memory_map_entry_list::NumOfEntries, _memory_map_entry::PhysicalStart, _memory_map_entry::Type, and _memory_map_entry::VirtualStart.
Referenced by CommandMemInfo(), and DrawBoxAndMenu().


| memory_map_entry* FindMapEntryByAddr | ( | memory_map_entry_list * | MemMap, |
| EFI_PHYSICAL_ADDRESS | Address | ||
| ) |
Function finds memory map entry in the memory map list by address. Function checks if the selected address points somewhere inside the map memory entry range.
| MemMap | Pointer to the memory map |
| Address | Memory address |
| Pointer | On success function returns pointer to the located image_entry |
| NULL | On error |
Definition at line 343 of file MemoryMap.c.
References _memory_map_entry_list::MemoryMapEntry, _memory_map_entry::NumberOfPages, _memory_map_entry_list::NumOfEntries, and _memory_map_entry::PhysicalStart.
Referenced by CommandMemInfo().

| VOID FreeMemMap | ( | memory_map_entry_list * | MemMap | ) |
Function displays the GCD memory map obtained through GetMemorySpaceMap. This function is only available in DXE drivers due to DxeServicesTableLib requirements.
| MemMap | Pointer to memory map obtained from GetMemoryMapList |
Definition at line 270 of file MemoryMap.c.
References MemFree(), and _memory_map_entry_list::MemoryMapEntry.
Referenced by CommandMemInfo(), and DrawBoxAndMenu().


| VOID GetMemAttributesStringAscii | ( | CHAR8 * | MemAttributesBuff, |
| UINTN | MemAttributesBuffSize, | ||
| UINT64 | Attributes | ||
| ) |
Function converts memory Attributes to text representation.
| MemAttributesBuff | Pointer to output buffer |
| MemAttributesBuffSize | Size of the output buffer |
| Attributes | Value of memory attributes |
| NONE |
Definition at line 42 of file MemoryMap.c.
References isMEM_ATTR_MEMORY_RP(), isMEM_ATTR_MEMORY_RUNTIME(), isMEM_ATTR_MEMORY_UC(), isMEM_ATTR_MEMORY_UCE(), isMEM_ATTR_MEMORY_WB(), isMEM_ATTR_MEMORY_WC(), isMEM_ATTR_MEMORY_WP(), isMEM_ATTR_MEMORY_WT(), and isMEM_ATTR_MEMORY_XP().
Referenced by CommandMemInfo(), and DumpMemoryMap().


| EFI_STATUS GetMemoryEntryGcdInformation | ( | EFI_PHYSICAL_ADDRESS | BaseAddress, |
| memory_map_entry * | MemEntry | ||
| ) |
Definition at line 71 of file MemoryMap.c.
References EFI_STATUS(), and LogFullAscii().
Referenced by GetMemoryMapList().


| memory_map_entry_list* GetMemoryMapList | ( | VOID | ) |
Function generates current memory map. Caller is responsible for deallocating the memory.
| Pointer | On success pointer to memory_map_entry_list |
| NULL | On error |
Definition at line 114 of file MemoryMap.c.
References _memory_map_entry::Attributes, EFI_STATUS(), GetMemoryEntryGcdInformation(), LogFullAscii(), _memory_map_entry_list::MapKey, MemAllocate(), MemFree(), _memory_map_entry_list::MemoryMapEntry, NUM_OF_MAP_ENTRIES, _memory_map_entry::NumberOfPages, _memory_map_entry_list::NumOfEntries, PAGE_SIZE, _memory_map_entry::PhysicalStart, _memory_map_entry::Type, and _memory_map_entry::VirtualStart.
Referenced by CommandMemInfo(), and DrawBoxAndMenu().


| CHAR8* memory_types[] |
Definition at line 14 of file MemoryMap.c.
Referenced by DumpMemoryMap().