MdeModulePkg DxeCore: Return memory type from internal free pool/pages
The following patch for MemoryAttributesTable will need the memory type. And CoreUpdateProfile() can also use the memory type for check. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
@ -1269,33 +1269,6 @@ CoreAllocatePages (
|
||||
IN OUT EFI_PHYSICAL_ADDRESS *Memory
|
||||
);
|
||||
|
||||
/**
|
||||
Allocates pages from the memory map.
|
||||
|
||||
@param Type The type of allocation to perform
|
||||
@param MemoryType The type of memory to turn the allocated pages
|
||||
into
|
||||
@param NumberOfPages The number of pages to allocate
|
||||
@param Memory A pointer to receive the base allocated memory
|
||||
address
|
||||
|
||||
@return Status. On success, Memory is filled in with the base address allocated
|
||||
@retval EFI_INVALID_PARAMETER Parameters violate checking rules defined in
|
||||
spec.
|
||||
@retval EFI_NOT_FOUND Could not allocate pages match the requirement.
|
||||
@retval EFI_OUT_OF_RESOURCES No enough pages to allocate.
|
||||
@retval EFI_SUCCESS Pages successfully allocated.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CoreInternalAllocatePages (
|
||||
IN EFI_ALLOCATE_TYPE Type,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN NumberOfPages,
|
||||
IN OUT EFI_PHYSICAL_ADDRESS *Memory
|
||||
);
|
||||
|
||||
/**
|
||||
Frees previous allocated pages.
|
||||
|
||||
@ -1314,24 +1287,6 @@ CoreFreePages (
|
||||
IN UINTN NumberOfPages
|
||||
);
|
||||
|
||||
/**
|
||||
Frees previous allocated pages.
|
||||
|
||||
@param Memory Base address of memory being freed
|
||||
@param NumberOfPages The number of pages to free
|
||||
|
||||
@retval EFI_NOT_FOUND Could not find the entry that covers the range
|
||||
@retval EFI_INVALID_PARAMETER Address not aligned
|
||||
@return EFI_SUCCESS -Pages successfully freed.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CoreInternalFreePages (
|
||||
IN EFI_PHYSICAL_ADDRESS Memory,
|
||||
IN UINTN NumberOfPages
|
||||
);
|
||||
|
||||
/**
|
||||
This function returns a copy of the current memory map. The map is an array of
|
||||
memory descriptors, each of which describes a contiguous block of memory.
|
||||
@ -1435,6 +1390,7 @@ CoreFreePool (
|
||||
Frees pool.
|
||||
|
||||
@param Buffer The allocated pool entry to free
|
||||
@param PoolType Pointer to pool type
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Buffer is not a valid value.
|
||||
@retval EFI_SUCCESS Pool successfully freed.
|
||||
@ -1443,7 +1399,8 @@ CoreFreePool (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CoreInternalFreePool (
|
||||
IN VOID *Buffer
|
||||
IN VOID *Buffer,
|
||||
OUT EFI_MEMORY_TYPE *PoolType OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user