Files
slimbootloader/BootloaderCommonPkg/Include/Library/BlMemoryAllocationLib.h
T
Maurice Ma a1d5f5ea0c Change AddMemoryResourceRange API interface
Current SBL AddMemoryResourceRange() API interface is not scalable.
If more memory type needs to be added, the interface does not allow
to do that. This patch changed the interface to use array and entry
count as parameter so that more ranges can be passed in using the
standard interfaces.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-03-16 17:05:37 -07:00

46 lines
1003 B
C

/** @file
Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef __BL_MEMORY_ALLOCATION_LIB_H__
#define __BL_MEMORY_ALLOCATION_LIB_H__
#include <Library/MemoryAllocationLib.h>
typedef struct {
EFI_PHYSICAL_ADDRESS BaseAddress;
UINT32 NumberOfPages;
UINT32 Type;
} EFI_MEMORY_RANGE_ENTRY;
/**
This function allocates temporary memory pool.
@param[in] AllocationSize The memory pool size to allocate.
@retval A pointer to the allocated temporary buffer or NULL if allocation fails.
**/
VOID *
EFIAPI
AllocateTemporaryMemory (
IN UINTN AllocationSize
);
/**
This function frees temporary memory pool.
@param[in] Buffer Temporary memory pool to free.
NULL indicates to free all temporary memory pool previously allocated
**/
VOID
EFIAPI
FreeTemporaryMemory (
IN VOID *Buffer
);
#endif