TianoCore EDK2 master
Loading...
Searching...
No Matches
Allocate.c File Reference

Go to the source code of this file.

Functions

VOID *EFIAPI AllocatePeiAccessiblePages (IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages)
 

Detailed Description

DxeServicesLib memory allocation routines

Copyright (c) 2018, Linaro, Ltd. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Allocate.c.

Function Documentation

◆ AllocatePeiAccessiblePages()

VOID *EFIAPI AllocatePeiAccessiblePages ( IN EFI_MEMORY_TYPE  MemoryType,
IN UINTN  Pages 
)

Allocates one or more 4KB pages of a given type from a memory region that is accessible to PEI.

Allocates the number of 4KB pages of type 'MemoryType' and returns a pointer to the allocated buffer. The buffer returned is aligned on a 4KB boundary. If Pages is 0, then NULL is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned.

Parameters
[in]MemoryTypeThe memory type to allocate
[in]PagesThe number of 4 KB pages to allocate.
Returns
A pointer to the allocated buffer or NULL if allocation fails.

Definition at line 31 of file Allocate.c.