]> git.proxmox.com Git - mirror_edk2.git/commit
UefiCpuPkg: Create CpuPageTableLib for manipulating X86 paging structs
authorRay Ni <ray.ni@intel.com>
Thu, 14 Jul 2022 06:33:18 +0000 (14:33 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 9 Aug 2022 07:08:05 +0000 (07:08 +0000)
commit75e3c2435c7f10675d075ae7e5d4e9dea7331bcf
treec4a7f12186d10f552bf2a814f97079da0ea73cce
parentf1688ec9dab680ad8a56ec0a3d0b1346933d7e07
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>
UefiCpuPkg/Include/Library/CpuPageTableLib.h [new file with mode: 0644]
UefiCpuPkg/Library/CpuPageTableLib/CpuPageTable.h [new file with mode: 0644]
UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf [new file with mode: 0644]
UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c [new file with mode: 0644]
UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableParse.c [new file with mode: 0644]
UefiCpuPkg/UefiCpuPkg.dec
UefiCpuPkg/UefiCpuPkg.dsc