From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 798D682213 for ; Thu, 2 Mar 2017 20:45:02 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2017 20:45:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,235,1484035200"; d="scan'208";a="1117864378" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by fmsmga001.fm.intel.com with ESMTP; 02 Mar 2017 20:45:01 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Ard Biesheuvel , Star Zeng Date: Fri, 3 Mar 2017 12:44:46 +0800 Message-Id: <1488516286-44788-2-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1488516286-44788-1-git-send-email-dandan.bi@intel.com> References: <1488516286-44788-1-git-send-email-dandan.bi@intel.com> Subject: [patch] MdeModulePkg/DxeCore: Fix coding style issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2017 04:45:02 -0000 Add comments for functions. Cc: Ard Biesheuvel Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- 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