From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 DA54A8034A for ; Tue, 7 Mar 2017 05:49:26 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2017 05:49:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,258,1484035200"; d="scan'208";a="1139015911" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 07 Mar 2017 05:49:26 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 7 Mar 2017 05:49:25 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 7 Mar 2017 05:49:25 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Tue, 7 Mar 2017 21:49: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: AQHSk9jyIzCet3mR7ESFJhVtoeThT6GIqCxwgADDSaA= Date: Tue, 7 Mar 2017 13:49:22 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B82FAD2@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> <0C09AFA07DD0434D9E2A0C6AEB0483103B82F51B@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B82F51B@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTZhNTUzZTktZmU1MC00YzQxLTlmYzctYTcwNmUyMTlmODJhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlNFVG5lZTdRbFVvcEVnNmZpaWNSMjdMdDhKcFRnd0FHVWVMQ3h2bkhcL09VPSJ9 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 13:49:27 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Patch has been pushed at 7babb4372e6a34cbbc54249b25056272a5a9924c. -----Original Message----- From: Zeng, Star=20 Sent: Tuesday, March 7, 2017 10:10 AM To: Bi, Dandan ; edk2-devel@lists.01.org Cc: Ard Biesheuvel ; Zeng, Star Subject: RE: [patch] MdeModulePkg/DxeCore: Fix coding style issues 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