TianoCore EDK2 master
|
#include "CpuPageTable.h"
Go to the source code of this file.
Functions | |
UINT64 | PageTableLibGetPleBMapAttribute (IN IA32_PAGE_LEAF_ENTRY_BIG_PAGESIZE *PleB, IN IA32_MAP_ATTRIBUTE *ParentMapAttribute) |
UINT64 | PageTableLibGetPte4KMapAttribute (IN IA32_PTE_4K *Pte4K, IN IA32_MAP_ATTRIBUTE *ParentMapAttribute) |
UINT64 | PageTableLibGetPnleMapAttribute (IN IA32_PAGE_NON_LEAF_ENTRY *Pnle, IN IA32_MAP_ATTRIBUTE *ParentMapAttribute) |
BOOLEAN | IsPle (IN IA32_PAGING_ENTRY *PagingEntry, IN UINTN Level) |
VOID | PageTableLibParsePnle (IN UINT64 PageTableBaseAddress, IN UINTN Level, IN UINTN MaxLevel, IN UINT64 RegionStart, IN IA32_MAP_ATTRIBUTE *ParentMapAttribute, IN OUT IA32_MAP_ENTRY *Map, IN OUT UINTN *MapCount, IN UINTN MapCapacity, IN IA32_MAP_ENTRY **LastEntry, IN IA32_MAP_ENTRY *OneEntry) |
RETURN_STATUS EFIAPI | PageTableParse (IN UINTN PageTable, IN PAGING_MODE PagingMode, OUT IA32_MAP_ENTRY *Map, IN OUT UINTN *MapCount) |
This library implements CpuPageTableLib that are generic for IA32 family CPU.
Copyright (c) 2022 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CpuPageTableParse.c.
BOOLEAN IsPle | ( | IN IA32_PAGING_ENTRY * | PagingEntry, |
IN UINTN | Level | ||
) |
Return TRUE when the page table entry is a leaf entry that points to the physical address memory. Return FALSE when the page table entry is a non-leaf entry that points to the page table entries.
[in] | PagingEntry | Pointer to the page table entry. |
[in] | Level | Page level where the page table entry resides in. |
TRUE | It's a leaf entry. |
FALSE | It's a non-leaf entry. |
Definition at line 122 of file CpuPageTableParse.c.
UINT64 PageTableLibGetPleBMapAttribute | ( | IN IA32_PAGE_LEAF_ENTRY_BIG_PAGESIZE * | PleB, |
IN IA32_MAP_ATTRIBUTE * | ParentMapAttribute | ||
) |
Return the attribute of a 2M/1G page table entry.
[in] | PleB | Pointer to a 2M/1G page table entry. |
[in] | ParentMapAttribute | Pointer to the parent attribute. |
Definition at line 20 of file CpuPageTableParse.c.
UINT64 PageTableLibGetPnleMapAttribute | ( | IN IA32_PAGE_NON_LEAF_ENTRY * | Pnle, |
IN IA32_MAP_ATTRIBUTE * | ParentMapAttribute | ||
) |
Return the attribute of a non-leaf page table entry.
[in] | Pnle | Pointer to a non-leaf page table entry. |
[in] | ParentMapAttribute | Pointer to the parent attribute. |
Definition at line 92 of file CpuPageTableParse.c.
UINT64 PageTableLibGetPte4KMapAttribute | ( | IN IA32_PTE_4K * | Pte4K, |
IN IA32_MAP_ATTRIBUTE * | ParentMapAttribute | ||
) |
Return the attribute of a 4K page table entry.
[in] | Pte4K | Pointer to a 4K page table entry. |
[in] | ParentMapAttribute | Pointer to the parent attribute. |
Definition at line 58 of file CpuPageTableParse.c.
VOID PageTableLibParsePnle | ( | IN UINT64 | PageTableBaseAddress, |
IN UINTN | Level, | ||
IN UINTN | MaxLevel, | ||
IN UINT64 | RegionStart, | ||
IN IA32_MAP_ATTRIBUTE * | ParentMapAttribute, | ||
IN OUT IA32_MAP_ENTRY * | Map, | ||
IN OUT UINTN * | MapCount, | ||
IN UINTN | MapCapacity, | ||
IN IA32_MAP_ENTRY ** | LastEntry, | ||
IN IA32_MAP_ENTRY * | OneEntry | ||
) |
Recursively parse the non-leaf page table entries.
[in] | PageTableBaseAddress | The base address of the 512 non-leaf page table entries in the specified level. |
[in] | Level | Page level. Could be 5, 4, 3, 2, 1. |
[in] | RegionStart | The base linear address of the region covered by the non-leaf page table entries. |
[in] | ParentMapAttribute | The mapping attribute of the parent entries. |
[in,out] | Map | Pointer to an array that describes multiple linear address ranges. |
[in,out] | MapCount | Pointer to a UINTN that hold the actual number of entries in the Map. |
[in] | MapCapacity | The maximum number of entries the Map can hold. |
[in] | LastEntry | Pointer to last map entry. |
[in] | OneEntry | Pointer to a library internal storage that holds one map entry. It's used when Map array is used up. |
Definition at line 158 of file CpuPageTableParse.c.
RETURN_STATUS EFIAPI PageTableParse | ( | IN UINTN | PageTable, |
IN PAGING_MODE | PagingMode, | ||
OUT IA32_MAP_ENTRY * | Map, | ||
IN OUT UINTN * | MapCount | ||
) |
Parse page table.
[in] | PageTable | Pointer to the page table. |
[in] | PagingMode | The paging mode. |
[out] | Map | Return an array that describes multiple linear address ranges. |
[in,out] | MapCount | On input, the maximum number of entries that Map can hold. On output, the number of entries in Map. |
RETURN_UNSUPPORTED | PageLevel is not 5 or 4. |
RETURN_INVALID_PARAMETER | MapCount is NULL. |
RETURN_INVALID_PARAMETER | *MapCount is not 0 but Map is NULL. |
RETURN_BUFFER_TOO_SMALL | *MapCount is too small. |
RETURN_SUCCESS | Page table is parsed successfully. |
Definition at line 264 of file CpuPageTableParse.c.