From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 4C532AC0A7F for ; Wed, 17 Jan 2024 06:21:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=nVkuK5NC7VTdSCg/FEGO+PYowE2hQBDHxEaC5sg85a4=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1705472505; v=1; b=RDtGbb1wa179aLX66oEvjEBSjmeHD+WSyif/Jkj4siP84AxquqPy6DauX/ZzND5KCW69rzuA NZtsCBvgRANGSaHSF0O1lhyJC3Fj9BjT1hlip+QQPYEGNy0pjuQ3rEoUBMOCSM+96ibHErjFII6 FTnOBb5JliVIPxzVbu8X+xEg= X-Received: by 127.0.0.2 with SMTP id nSnVYY7687511xLzC9OZ3UTa; Tue, 16 Jan 2024 22:21:45 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web10.3265.1705472503906274889 for ; Tue, 16 Jan 2024 22:21:44 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10955"; a="13588178" X-IronPort-AV: E=Sophos;i="6.05,200,1701158400"; d="scan'208";a="13588178" X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2024 22:21:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10955"; a="874726782" X-IronPort-AV: E=Sophos;i="6.05,200,1701158400"; d="scan'208";a="874726782" X-Received: from shwdesfp01.ccr.corp.intel.com ([10.239.158.151]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2024 22:21:41 -0800 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Zhiguang Liu , Ray Ni , Laszlo Ersek , Rahul Kumar , Gerd Hoffmann Subject: [edk2-devel] [PATCH v2 1/2] UefiCpuPkg/CpuPageTableLib: Enhance function header for PageTableMap() Date: Wed, 17 Jan 2024 14:21:34 +0800 Message-Id: <20240117062134.975-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Yn6eggwu2NJ8dykvtWdJlcGEx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=RDtGbb1w; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io PageTableMap() only modifies the PageTable root pointer when creating from zero. Explicitly explain it in function header. Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Zhiguang Liu --- UefiCpuPkg/Include/Library/CpuPageTableLib.h | 1 + UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c | 1 + 2 files changed, 2 insertions(+) diff --git a/UefiCpuPkg/Include/Library/CpuPageTableLib.h b/UefiCpuPkg/Include/Library/CpuPageTableLib.h index 78aa83b8de..755c8ab084 100644 --- a/UefiCpuPkg/Include/Library/CpuPageTableLib.h +++ b/UefiCpuPkg/Include/Library/CpuPageTableLib.h @@ -61,6 +61,7 @@ typedef enum { Create or update page table to map [LinearAddress, LinearAddress + Length) with specified attribute. @param[in, out] PageTable The pointer to the page table to update, or pointer to NULL if a new page table is to be created. + If not pointer to NULL, the value it points to won't be changed in this function. @param[in] PagingMode The paging mode. @param[in] Buffer The free buffer to be used for page table creation/updating. @param[in, out] BufferSize The buffer size. diff --git a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c index 36b2c4e6a3..25bd9fc8d8 100644 --- a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c +++ b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c @@ -620,6 +620,7 @@ PageTableLibMapInLevel ( Create or update page table to map [LinearAddress, LinearAddress + Length) with specified attribute. @param[in, out] PageTable The pointer to the page table to update, or pointer to NULL if a new page table is to be created. + If not pointer to NULL, the value it points to won't be changed in this function. @param[in] PagingMode The paging mode. @param[in] Buffer The free buffer to be used for page table creation/updating. @param[in, out] BufferSize The buffer size. -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113928): https://edk2.groups.io/g/devel/message/113928 Mute This Topic: https://groups.io/mt/103781121/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-