MdeModulePkg: Fix unix style of EOL
Cc: Wu Hao <hao.a.wu@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
@@ -64,8 +64,8 @@ LIST_ENTRY mFreeMemoryMapEntryList = INITIALIZE_LIST_HEAD_VARIABLE (mFreeMemor
|
||||
@param[out] Memory A pointer to receive the base allocated memory
|
||||
address.
|
||||
@param[in] AddRegion If this memory is new added region.
|
||||
@param[in] NeedGuard Flag to indicate Guard page is needed
|
||||
or not
|
||||
@param[in] NeedGuard Flag to indicate Guard page is needed
|
||||
or not
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Parameters violate checking rules defined in spec.
|
||||
@retval EFI_NOT_FOUND Could not allocate pages match the requirement.
|
||||
@@ -79,8 +79,8 @@ SmmInternalAllocatePagesEx (
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN NumberOfPages,
|
||||
OUT EFI_PHYSICAL_ADDRESS *Memory,
|
||||
IN BOOLEAN AddRegion,
|
||||
IN BOOLEAN NeedGuard
|
||||
IN BOOLEAN AddRegion,
|
||||
IN BOOLEAN NeedGuard
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -115,8 +115,8 @@ AllocateMemoryMapEntry (
|
||||
EfiRuntimeServicesData,
|
||||
EFI_SIZE_TO_PAGES (RUNTIME_PAGE_ALLOCATION_GRANULARITY),
|
||||
&Mem,
|
||||
TRUE,
|
||||
FALSE
|
||||
TRUE,
|
||||
FALSE
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
if(!EFI_ERROR (Status)) {
|
||||
@@ -692,8 +692,8 @@ InternalAllocAddress (
|
||||
@param[out] Memory A pointer to receive the base allocated memory
|
||||
address.
|
||||
@param[in] AddRegion If this memory is new added region.
|
||||
@param[in] NeedGuard Flag to indicate Guard page is needed
|
||||
or not
|
||||
@param[in] NeedGuard Flag to indicate Guard page is needed
|
||||
or not
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Parameters violate checking rules defined in spec.
|
||||
@retval EFI_NOT_FOUND Could not allocate pages match the requirement.
|
||||
@@ -707,8 +707,8 @@ SmmInternalAllocatePagesEx (
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN NumberOfPages,
|
||||
OUT EFI_PHYSICAL_ADDRESS *Memory,
|
||||
IN BOOLEAN AddRegion,
|
||||
IN BOOLEAN NeedGuard
|
||||
IN BOOLEAN AddRegion,
|
||||
IN BOOLEAN NeedGuard
|
||||
)
|
||||
{
|
||||
UINTN RequestedAddress;
|
||||
@@ -730,21 +730,21 @@ SmmInternalAllocatePagesEx (
|
||||
case AllocateAnyPages:
|
||||
RequestedAddress = (UINTN)(-1);
|
||||
case AllocateMaxAddress:
|
||||
if (NeedGuard) {
|
||||
*Memory = InternalAllocMaxAddressWithGuard (
|
||||
&mSmmMemoryMap,
|
||||
NumberOfPages,
|
||||
RequestedAddress,
|
||||
MemoryType
|
||||
);
|
||||
if (*Memory == (UINTN)-1) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
} else {
|
||||
ASSERT (VerifyMemoryGuard (*Memory, NumberOfPages) == TRUE);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
if (NeedGuard) {
|
||||
*Memory = InternalAllocMaxAddressWithGuard (
|
||||
&mSmmMemoryMap,
|
||||
NumberOfPages,
|
||||
RequestedAddress,
|
||||
MemoryType
|
||||
);
|
||||
if (*Memory == (UINTN)-1) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
} else {
|
||||
ASSERT (VerifyMemoryGuard (*Memory, NumberOfPages) == TRUE);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
*Memory = InternalAllocMaxAddress (
|
||||
&mSmmMemoryMap,
|
||||
NumberOfPages,
|
||||
@@ -788,8 +788,8 @@ SmmInternalAllocatePagesEx (
|
||||
@param[in] NumberOfPages The number of pages to allocate.
|
||||
@param[out] Memory A pointer to receive the base allocated memory
|
||||
address.
|
||||
@param[in] NeedGuard Flag to indicate Guard page is needed
|
||||
or not
|
||||
@param[in] NeedGuard Flag to indicate Guard page is needed
|
||||
or not
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Parameters violate checking rules defined in spec.
|
||||
@retval EFI_NOT_FOUND Could not allocate pages match the requirement.
|
||||
@@ -803,12 +803,12 @@ SmmInternalAllocatePages (
|
||||
IN EFI_ALLOCATE_TYPE Type,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN NumberOfPages,
|
||||
OUT EFI_PHYSICAL_ADDRESS *Memory,
|
||||
IN BOOLEAN NeedGuard
|
||||
OUT EFI_PHYSICAL_ADDRESS *Memory,
|
||||
IN BOOLEAN NeedGuard
|
||||
)
|
||||
{
|
||||
return SmmInternalAllocatePagesEx (Type, MemoryType, NumberOfPages, Memory,
|
||||
FALSE, NeedGuard);
|
||||
return SmmInternalAllocatePagesEx (Type, MemoryType, NumberOfPages, Memory,
|
||||
FALSE, NeedGuard);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -837,11 +837,11 @@ SmmAllocatePages (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
BOOLEAN NeedGuard;
|
||||
BOOLEAN NeedGuard;
|
||||
|
||||
NeedGuard = IsPageTypeToGuard (MemoryType, Type);
|
||||
Status = SmmInternalAllocatePages (Type, MemoryType, NumberOfPages, Memory,
|
||||
NeedGuard);
|
||||
NeedGuard = IsPageTypeToGuard (MemoryType, Type);
|
||||
Status = SmmInternalAllocatePages (Type, MemoryType, NumberOfPages, Memory,
|
||||
NeedGuard);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
SmmCoreUpdateProfile (
|
||||
(EFI_PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS (0),
|
||||
@@ -960,7 +960,7 @@ SmmInternalFreePagesEx (
|
||||
|
||||
@param[in] Memory Base address of memory being freed.
|
||||
@param[in] NumberOfPages The number of pages to free.
|
||||
@param[in] IsGuarded Is the memory to free guarded or not.
|
||||
@param[in] IsGuarded Is the memory to free guarded or not.
|
||||
|
||||
@retval EFI_NOT_FOUND Could not find the entry that covers the range.
|
||||
@retval EFI_INVALID_PARAMETER Address not aligned, Address is zero or NumberOfPages is zero.
|
||||
@@ -971,13 +971,13 @@ EFI_STATUS
|
||||
EFIAPI
|
||||
SmmInternalFreePages (
|
||||
IN EFI_PHYSICAL_ADDRESS Memory,
|
||||
IN UINTN NumberOfPages,
|
||||
IN BOOLEAN IsGuarded
|
||||
IN UINTN NumberOfPages,
|
||||
IN BOOLEAN IsGuarded
|
||||
)
|
||||
{
|
||||
if (IsGuarded) {
|
||||
return SmmInternalFreePagesExWithGuard (Memory, NumberOfPages, FALSE);
|
||||
}
|
||||
if (IsGuarded) {
|
||||
return SmmInternalFreePagesExWithGuard (Memory, NumberOfPages, FALSE);
|
||||
}
|
||||
return SmmInternalFreePagesEx (Memory, NumberOfPages, FALSE);
|
||||
}
|
||||
|
||||
@@ -1000,10 +1000,10 @@ SmmFreePages (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
BOOLEAN IsGuarded;
|
||||
BOOLEAN IsGuarded;
|
||||
|
||||
IsGuarded = IsHeapGuardEnabled () && IsMemoryGuarded (Memory);
|
||||
Status = SmmInternalFreePages (Memory, NumberOfPages, IsGuarded);
|
||||
IsGuarded = IsHeapGuardEnabled () && IsMemoryGuarded (Memory);
|
||||
Status = SmmInternalFreePages (Memory, NumberOfPages, IsGuarded);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
SmmCoreUpdateProfile (
|
||||
(EFI_PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS (0),
|
||||
|
Reference in New Issue
Block a user