From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Star Zeng <star.zeng@intel.com>
Subject: [patch] MdeModulePkg/DxeCore: Fix coding style issues
Date: Fri, 3 Mar 2017 12:44:46 +0800 [thread overview]
Message-ID: <1488516286-44788-2-git-send-email-dandan.bi@intel.com> (raw)
In-Reply-To: <1488516286-44788-1-git-send-email-dandan.bi@intel.com>
Add comments for functions.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
MdeModulePkg/Core/Dxe/Mem/Pool.c | 19 +++++++++++++++++++
MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 6 ++++--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c b/MdeModulePkg/Core/Dxe/Mem/Pool.c
index ced6444..1e37356 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Pool.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c
@@ -289,10 +289,21 @@ CoreAllocatePool (
InstallMemoryAttributesTableOnMemoryAllocation (PoolType);
}
return Status;
}
+/**
+ Internal function. Used by the pool functions to allocate pages
+ to back pool allocation requests.
+
+ @param PoolType The type of memory for the new pool pages
+ @param NoPages No of pages to allocate
+ @param Granularity Bits to align.
+
+ @return The allocated memory, or NULL
+
+**/
STATIC
VOID *
CoreAllocatePoolPagesI (
IN EFI_MEMORY_TYPE PoolType,
IN UINTN NoPages,
@@ -551,10 +562,18 @@ CoreFreePool (
InstallMemoryAttributesTableOnMemoryAllocation (PoolType);
}
return Status;
}
+/**
+ Internal function. Frees pool pages allocated via CoreAllocatePoolPagesI().
+
+ @param PoolType The type of memory for the pool pages
+ @param Memory The base address to free
+ @param NoPages The number of pages to free
+
+**/
STATIC
VOID
CoreFreePoolPagesI (
IN EFI_MEMORY_TYPE PoolType,
IN EFI_PHYSICAL_ADDRESS Memory,
diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
index 45f360c..1c44148 100644
--- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
+++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
@@ -655,10 +655,12 @@ UnprotectUefiImage (
}
/**
Return the EFI memory permission attribute associated with memory
type 'MemoryType' under the configured DXE memory protection policy.
+
+ @param MemoryType Memory type.
**/
STATIC
UINT64
GetPermissionAttributeForMemoryType (
IN EFI_MEMORY_TYPE MemoryType
@@ -786,11 +788,11 @@ MergeMemoryMapForProtectionPolicy (
}
/**
Remove exec permissions from all regions whose type is identified by
- PcdDxeNxMemoryProtectionPolicy
+ PcdDxeNxMemoryProtectionPolicy.
**/
STATIC
VOID
InitializeDxeNxMemoryProtectionPolicy (
VOID
@@ -1051,11 +1053,11 @@ CoreInitializeMemoryProtection (
}
return ;
}
/**
- Returns whether we are currently executing in SMM mode
+ Returns whether we are currently executing in SMM mode.
**/
STATIC
BOOLEAN
IsInSmm (
VOID
--
1.9.5.msysgit.1
next prev parent reply other threads:[~2017-03-03 4:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 4:44 [patch] MdeModulePkg: Add PROMPT&HELP string of pcd to UNI file Dandan Bi
2017-03-03 4:44 ` Dandan Bi [this message]
2017-03-07 2:10 ` [patch] MdeModulePkg/DxeCore: Fix coding style issues Zeng, Star
2017-03-07 13:49 ` Zeng, Star
2017-03-07 2:09 ` [patch] MdeModulePkg: Add PROMPT&HELP string of pcd to UNI file Zeng, Star
2017-03-07 13:48 ` Zeng, Star
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1488516286-44788-2-git-send-email-dandan.bi@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox