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 6FA8B94163F for ; Wed, 17 Jan 2024 10:23:33 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=on+P2BDzl49vAfMUoou5l4Gu+RVVw3m26l8ZIlAtuc4=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1705487012; v=1; b=nPZavrsq36AJBJXSNod5F0gO6e23hfcI3yzaAuLcfXKiDRRBwSlwO2D/QvYJ2YAbnk7zGnZ6 knwtOhB5N6ad0f9+1mTm5Wb1tBDMgeQH/D5q9CvL9Db10slKN1s3Ya5Omr2QpWxUMgc/F7RpF2B 5gSpsZWudEJac3l1jpKRVhdc= X-Received: by 127.0.0.2 with SMTP id elImYY7687511xdXZxlKjVFv; Wed, 17 Jan 2024 02:23:32 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.6382.1705487011417279275 for ; Wed, 17 Jan 2024 02:23:31 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-113--8kzPldnPb6mmTRPGmIjzw-1; Wed, 17 Jan 2024 05:23:27 -0500 X-MC-Unique: -8kzPldnPb6mmTRPGmIjzw-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7D67E85A58C; Wed, 17 Jan 2024 10:23:27 +0000 (UTC) X-Received: from [10.39.192.21] (unknown [10.39.192.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B20A851E3; Wed, 17 Jan 2024 10:23:26 +0000 (UTC) Message-ID: <2f267d2f-ff69-19b6-7d6d-a3857b12852d@redhat.com> Date: Wed, 17 Jan 2024 11:23:25 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v2 1/2] UefiCpuPkg/CpuPageTableLib: Enhance function header for PageTableMap() To: devel@edk2.groups.io, zhiguang.liu@intel.com Cc: Ray Ni , Rahul Kumar , Gerd Hoffmann References: <20240117062134.975-1-zhiguang.liu@intel.com> From: "Laszlo Ersek" In-Reply-To: <20240117062134.975-1-zhiguang.liu@intel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: w7seWWopnGbm0aSCEtZ8Ls4gx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=nPZavrsq; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.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 On 1/17/24 07:21, Zhiguang Liu wrote: > PageTableMap() only modifies the PageTable root pointer when creating fro= m zero. > Explicitly explain it in function header. >=20 > 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(+) >=20 > diff --git a/UefiCpuPkg/Include/Library/CpuPageTableLib.h b/UefiCpuPkg/In= clude/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 + Len= gth) with specified attribute. > =20 > @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 po= ints 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 tab= le creation/updating. > @param[in, out] BufferSize The buffer size. > diff --git a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c b/UefiC= puPkg/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 + Len= gth) with specified attribute. > =20 > @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 po= ints 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 tab= le creation/updating. > @param[in, out] BufferSize The buffer size. Reviewed-by: Laszlo Ersek (applying this is going to be difficult, because the patch emails were not sent in response to a common cover letter, or in response to each other= ) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113945): https://edk2.groups.io/g/devel/message/113945 Mute This Topic: https://groups.io/mt/103781121/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-