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 EB7B280345 for ; Mon, 6 Mar 2017 18:10:26 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2017 18:10:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,256,1484035200"; d="scan'208";a="1105551341" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 06 Mar 2017 18:10:26 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 6 Mar 2017 18:10:25 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 6 Mar 2017 18:10:25 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Tue, 7 Mar 2017 10:10:23 +0800 From: "Zeng, Star" To: "Bi, Dandan" , "edk2-devel@lists.01.org" CC: Ard Biesheuvel , "Zeng, Star" Thread-Topic: [patch] MdeModulePkg/DxeCore: Fix coding style issues Thread-Index: AQHSk9jyIzCet3mR7ESFJhVtoeThT6GIqCxw Date: Tue, 7 Mar 2017 02:10:23 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B82F51B@shsmsx102.ccr.corp.intel.com> References: <1488516286-44788-1-git-send-email-dandan.bi@intel.com> <1488516286-44788-2-git-send-email-dandan.bi@intel.com> In-Reply-To: <1488516286-44788-2-git-send-email-dandan.bi@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: Tue, 07 Mar 2017 02:10:27 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----Original Message----- From: Bi, Dandan=20 Sent: Friday, March 3, 2017 12:45 PM To: edk2-devel@lists.01.org Cc: Ard Biesheuvel ; Zeng, Star Subject: [patch] MdeModulePkg/DxeCore: Fix coding style issues 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/P= ool.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; } =20 +/** + 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; } =20 +/** + Internal function. Frees pool pages allocated via CoreAllocatePoolPages= I(). + + @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/C= ore/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 ( } =20 /** 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 ( } =20 =20 /** Remove exec permissions from all regions whose type is identified by - PcdDxeNxMemoryProtectionPolicy + PcdDxeNxMemoryProtectionPolicy. **/ STATIC VOID InitializeDxeNxMemoryProtectionPolicy ( VOID @@ -1051,11 +1053,11 @@ CoreInitializeMemoryProtection ( } return ; } =20 /** - 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