[BOOT:MM] More work on memory manager
This commit is contained in:
56
BOOT/ENVIRON/LIB/EFI/efimm.c
Normal file
56
BOOT/ENVIRON/LIB/EFI/efimm.c
Normal file
@@ -0,0 +1,56 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2024, Quinn Stephens.
|
||||
Provided under the BSD 3-Clause license.
|
||||
|
||||
Module Name:
|
||||
|
||||
efimm.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Provides EFI memory manager routines.
|
||||
|
||||
--*/
|
||||
|
||||
#include "bootmgr.h"
|
||||
#include "efi.h"
|
||||
#include "mm.h"
|
||||
|
||||
NTSTATUS
|
||||
MmFwGetMemoryMap (
|
||||
IN OUT PMEMORY_DESCRIPTOR_LIST Mdl,
|
||||
IN ULONG Flags
|
||||
)
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Converts an NT status code into an EFI status code.
|
||||
|
||||
Arguments:
|
||||
|
||||
Status - The NT status code to be converted.
|
||||
|
||||
Return Value:
|
||||
|
||||
STATUS_SUCCESS if successful,
|
||||
STATUS_INVALID_PARAMETER if Mdl is invalid.
|
||||
|
||||
--*/
|
||||
|
||||
{
|
||||
(VOID)Flags;
|
||||
|
||||
//
|
||||
// Make sure Mdl is valid.
|
||||
//
|
||||
if (Mdl == NULL) {
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
MmMdFreeList(Mdl);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
Reference in New Issue
Block a user