summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhiguang Liu <zhiguang.liu@intel.com>2024-01-17 11:16:34 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-02-22 03:28:55 +0000
commit2f4b07b668323122a363eee87a2348f4a738bc8c (patch)
tree557e668a13db2d78e90404af7805604a8b77d830
parent2ca8d559744319025592df10ada0f714fc3b8e15 (diff)
downloadedk2-2f4b07b668323122a363eee87a2348f4a738bc8c.zip
edk2-2f4b07b668323122a363eee87a2348f4a738bc8c.tar.gz
edk2-2f4b07b668323122a363eee87a2348f4a738bc8c.tar.bz2
UefiCpuPkg/CpuPageTableLib: Enhance function header for PageTableMap()
PageTableMap() only modifies the PageTable root pointer when creating from zero. Explicitly explain it in function header. Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
-rw-r--r--UefiCpuPkg/Include/Library/CpuPageTableLib.h1
-rw-r--r--UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/UefiCpuPkg/Include/Library/CpuPageTableLib.h b/UefiCpuPkg/Include/Library/CpuPageTableLib.h
index 6225a1d..cd493ad 100644
--- a/UefiCpuPkg/Include/Library/CpuPageTableLib.h
+++ b/UefiCpuPkg/Include/Library/CpuPageTableLib.h
@@ -67,6 +67,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 ae4caf8..7c2bd25 100644
--- a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c
+++ b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c
@@ -640,6 +640,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.