diff options
author | Ray Ni <ray.ni@intel.com> | 2022-07-14 14:33:18 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-08-09 07:08:05 +0000 |
commit | 75e3c2435c7f10675d075ae7e5d4e9dea7331bcf (patch) | |
tree | c4a7f12186d10f552bf2a814f97079da0ea73cce /UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf | |
parent | f1688ec9dab680ad8a56ec0a3d0b1346933d7e07 (diff) | |
download | edk2-75e3c2435c7f10675d075ae7e5d4e9dea7331bcf.tar.gz edk2-75e3c2435c7f10675d075ae7e5d4e9dea7331bcf.tar.bz2 edk2-75e3c2435c7f10675d075ae7e5d4e9dea7331bcf.zip |
UefiCpuPkg: Create CpuPageTableLib for manipulating X86 paging structs
The lib includes two APIs:
* PageTableMap
It creates/updates mapping from LA to PA.
The implementation only supports paging structures used in 64bit
mode now. PAE paging structure support will be added in future.
* PageTableParse
It parses the page table and returns the mapping relations in an
array of IA32_MAP_ENTRY.
It passed some stress tests. These test code will be upstreamed in
other patches following edk2 Unit Test framework.
Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf')
-rw-r--r-- | UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf new file mode 100644 index 0000000000..e4ead7441c --- /dev/null +++ b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf @@ -0,0 +1,35 @@ +## @file
+# This library implements CpuPageTableLib that are generic for IA32 family CPU.
+#
+# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = CpuPageTableLib
+ FILE_GUID = 524ed6a1-f661-451b-929b-b54d755c914a
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = CpuPageTableLib
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64
+#
+
+[Sources]
+ CpuPageTableMap.c
+ CpuPageTableParse.c
+ CpuPageTable.h
+
+[Packages]
+ MdePkg/MdePkg.dec
+ UefiCpuPkg/UefiCpuPkg.dec
+
+[LibraryClasses]
+ BaseLib
+ BaseMemoryLib
+ DebugLib
|