diff options
author | Zhiguang Liu <zhiguang.liu@intel.com> | 2024-01-17 11:16:34 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-02-22 03:28:55 +0000 |
commit | 2f4b07b668323122a363eee87a2348f4a738bc8c (patch) | |
tree | 557e668a13db2d78e90404af7805604a8b77d830 /UefiCpuPkg | |
parent | 2ca8d559744319025592df10ada0f714fc3b8e15 (diff) | |
download | edk2-2f4b07b668323122a363eee87a2348f4a738bc8c.tar.gz edk2-2f4b07b668323122a363eee87a2348f4a738bc8c.tar.bz2 edk2-2f4b07b668323122a363eee87a2348f4a738bc8c.zip |
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>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/Include/Library/CpuPageTableLib.h | 1 | ||||
-rw-r--r-- | UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/UefiCpuPkg/Include/Library/CpuPageTableLib.h b/UefiCpuPkg/Include/Library/CpuPageTableLib.h index 6225a1d8e9..cd493ad69c 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 ae4caf8dfe..7c2bd25d22 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.
|