From nobody Tue Apr 30 20:28:32 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1488516305741333.96369251239196; Thu, 2 Mar 2017 20:45:05 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8CE7882214; Thu, 2 Mar 2017 20:45:04 -0800 (PST) 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 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 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,235,1484035200"; d="scan'208";a="1117864378" From: Dandan Bi To: edk2-devel@lists.01.org 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: [edk2] [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: , Cc: Star Zeng , Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add comments for functions. Cc: Ard Biesheuvel Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi Reviewed-by: Star Zeng --- 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 --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel