TianoCore EDK2 master
|
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | CoreAllocatePages (IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN NumberOfPages, IN OUT EFI_PHYSICAL_ADDRESS *Memory) |
EFI_STATUS EFIAPI | CoreFreePages (IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN NumberOfPages) |
EFI_STATUS EFIAPI | CoreAllocatePool (IN EFI_MEMORY_TYPE PoolType, IN UINTN Size, OUT VOID **Buffer) |
EFI_STATUS EFIAPI | CoreFreePool (IN VOID *Buffer) |
Contains function prototypes for Memory Services in DxeCore.
This header file borrows the DxeCore Memory Allocation services as the primitive for memory allocation.
Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DxeCoreMemoryAllocationServices.h.
EFI_STATUS EFIAPI CoreAllocatePages | ( | IN EFI_ALLOCATE_TYPE | Type, |
IN EFI_MEMORY_TYPE | MemoryType, | ||
IN UINTN | NumberOfPages, | ||
IN OUT EFI_PHYSICAL_ADDRESS * | Memory | ||
) |
Allocates pages from the memory map.
Type | The type of allocation to perform |
MemoryType | The type of memory to turn the allocated pages into |
NumberOfPages | The number of pages to allocate |
Memory | A pointer to receive the base allocated memory address |
EFI_INVALID_PARAMETER | Parameters violate checking rules defined in spec. |
EFI_NOT_FOUND | Could not allocate pages match the requirement. |
EFI_OUT_OF_RESOURCES | No enough pages to allocate. |
EFI_SUCCESS | Pages successfully allocated. |
EFI_STATUS EFIAPI CoreAllocatePool | ( | IN EFI_MEMORY_TYPE | PoolType, |
IN UINTN | Size, | ||
OUT VOID ** | Buffer | ||
) |
Allocate pool of a particular type.
PoolType | Type of pool to allocate |
Size | The amount of pool to allocate |
Buffer | The address to return a pointer to the allocated pool |
EFI_INVALID_PARAMETER | PoolType not valid |
EFI_OUT_OF_RESOURCES | Size exceeds max pool size or allocation failed. |
EFI_SUCCESS | Pool successfully allocated. |
Allocate pool of a particular type.
PoolType | Type of pool to allocate |
Size | The amount of pool to allocate |
Buffer | The address to return a pointer to the allocated pool |
EFI_INVALID_PARAMETER | Buffer is NULL. PoolType is in the range EfiMaxMemoryType..0x6FFFFFFF. PoolType is EfiPersistentMemory. |
EFI_OUT_OF_RESOURCES | Size exceeds max pool size or allocation failed. |
EFI_SUCCESS | Pool successfully allocated. |
EFI_STATUS EFIAPI CoreFreePages | ( | IN EFI_PHYSICAL_ADDRESS | Memory, |
IN UINTN | NumberOfPages | ||
) |
Frees previous allocated pages.
Memory | Base address of memory being freed |
NumberOfPages | The number of pages to free |
EFI_NOT_FOUND | Could not find the entry that covers the range |
EFI_INVALID_PARAMETER | Address not aligned |
EFI_STATUS EFIAPI CoreFreePool | ( | IN VOID * | Buffer | ) |