forked from xt-sys/exectos
Implement BlGetMappingsCount() routine
This commit is contained in:
@@ -135,6 +135,11 @@ EFI_STATUS
|
||||
BlGetEfiPath(IN PWCHAR SystemPath,
|
||||
OUT PWCHAR *EfiPath);
|
||||
|
||||
XTCDECL
|
||||
VOID
|
||||
BlGetMappingsCount(IN PXTBL_PAGE_MAPPING PageMap,
|
||||
OUT PULONG NumberOfMappings);
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
BlGetMemoryMap(OUT PEFI_MEMORY_MAP MemoryMap);
|
||||
|
@@ -91,6 +91,28 @@ BlFreeMemoryPool(IN PVOID Memory)
|
||||
return EfiSystemTable->BootServices->FreePool(Memory);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of mappings in the page mapping structure.
|
||||
*
|
||||
* @param PageMap
|
||||
* Supplies a pointer to the page mapping structure.
|
||||
*
|
||||
* @param NumberOfMappings
|
||||
* Supplies a pointer to memory area where the number of mappings is returned.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTCDECL
|
||||
VOID
|
||||
BlGetMappingsCount(IN PXTBL_PAGE_MAPPING PageMap,
|
||||
OUT PULONG NumberOfMappings)
|
||||
{
|
||||
/* Return number of mappings */
|
||||
*NumberOfMappings = PageMap->MapSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the memory descriptors which define a memory map of all the physical memory ranges reserved by the UEFI.
|
||||
*
|
||||
|
@@ -630,6 +630,7 @@ BlpInstallXtLoaderProtocol()
|
||||
BlpLdrProtocol.Memory.CopyMemory = RtlCopyMemory;
|
||||
BlpLdrProtocol.Memory.FreePages = BlFreeMemoryPages;
|
||||
BlpLdrProtocol.Memory.FreePool = BlFreeMemoryPool;
|
||||
BlpLdrProtocol.Memory.GetMappingsCount = BlGetMappingsCount;
|
||||
BlpLdrProtocol.Memory.GetMemoryMap = BlGetMemoryMap;
|
||||
BlpLdrProtocol.Memory.InitializePageMap = BlInitializePageMap;
|
||||
BlpLdrProtocol.Memory.MapEfiMemory = BlMapEfiMemory;
|
||||
|
Reference in New Issue
Block a user