Store number of mappings when mapping virtual memory
This commit is contained in:
parent
2e12d30aa4
commit
670a812649
@ -189,6 +189,7 @@ typedef struct _XTBL_MODULE_INFO
|
|||||||
typedef struct _XTBL_PAGE_MAPPING
|
typedef struct _XTBL_PAGE_MAPPING
|
||||||
{
|
{
|
||||||
LIST_ENTRY MemoryMap;
|
LIST_ENTRY MemoryMap;
|
||||||
|
ULONG MapSize;
|
||||||
PVOID PtePointer;
|
PVOID PtePointer;
|
||||||
SHORT PageMapLevel;
|
SHORT PageMapLevel;
|
||||||
PAGE_SIZE PageSize;
|
PAGE_SIZE PageSize;
|
||||||
|
@ -178,6 +178,7 @@ BlInitializePageMap(OUT PXTBL_PAGE_MAPPING PageMap,
|
|||||||
{
|
{
|
||||||
/* Initialize memory mappings */
|
/* Initialize memory mappings */
|
||||||
RtlInitializeListHead(&PageMap->MemoryMap);
|
RtlInitializeListHead(&PageMap->MemoryMap);
|
||||||
|
PageMap->MapSize = 0;
|
||||||
|
|
||||||
/* Set page map size/level and memory map address */
|
/* Set page map size/level and memory map address */
|
||||||
PageMap->PageMapLevel = PageMapLevel;
|
PageMap->PageMapLevel = PageMapLevel;
|
||||||
@ -457,8 +458,9 @@ BlMapVirtualMemory(IN OUT PXTBL_PAGE_MAPPING PageMap,
|
|||||||
ListEntry = ListEntry->Flink;
|
ListEntry = ListEntry->Flink;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Insert new mapping to the list */
|
/* Insert new mapping to the list and increase page map size */
|
||||||
RtlInsertTailList(&PageMap->MemoryMap, &Mapping1->ListEntry);
|
RtlInsertTailList(&PageMap->MemoryMap, &Mapping1->ListEntry);
|
||||||
|
PageMap->MapSize++;
|
||||||
|
|
||||||
/* Return success */
|
/* Return success */
|
||||||
return STATUS_EFI_SUCCESS;
|
return STATUS_EFI_SUCCESS;
|
||||||
|
Loading…
Reference in New Issue
Block a user