TianoCore EDK2
master
Loading...
Searching...
No Matches
Allocate.c
Go to the documentation of this file.
1
10
#include <
PiDxe.h
>
11
#include <
Library/UefiBootServicesTableLib.h
>
12
#include <
Library/DxeServicesLib.h
>
13
29
VOID *
30
EFIAPI
31
AllocatePeiAccessiblePages
(
32
IN
EFI_MEMORY_TYPE
MemoryType,
33
IN
UINTN
Pages
34
)
35
{
36
EFI_STATUS
Status;
37
EFI_PHYSICAL_ADDRESS
Memory;
38
39
if
(Pages == 0) {
40
return
NULL
;
41
}
42
43
Status =
gBS
->AllocatePages (
AllocateAnyPages
, MemoryType, Pages, &Memory);
44
if
(EFI_ERROR (Status)) {
45
return
NULL
;
46
}
47
48
return
(VOID *)(
UINTN
)Memory;
49
}
UINTN
UINT64 UINTN
Definition:
ProcessorBind.h:112
AllocatePeiAccessiblePages
VOID *EFIAPI AllocatePeiAccessiblePages(IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages)
Definition:
Allocate.c:31
DxeServicesLib.h
NULL
#define NULL
Definition:
Base.h:319
IN
#define IN
Definition:
Base.h:279
PiDxe.h
EFI_PHYSICAL_ADDRESS
UINT64 EFI_PHYSICAL_ADDRESS
Definition:
UefiBaseType.h:50
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
UefiBootServicesTableLib.h
gBS
EFI_BOOT_SERVICES * gBS
Definition:
UefiBootServicesTableLib.c:17
EFI_MEMORY_TYPE
EFI_MEMORY_TYPE
Definition:
UefiMultiPhase.h:38
AllocateAnyPages
@ AllocateAnyPages
Definition:
UefiSpec.h:33
MdePkg
Library
DxeServicesLib
Allocate.c
Generated on Fri Nov 15 2024 18:01:17 for TianoCore EDK2 by
1.9.6