TianoCore EDK2 master
|
#include <Base.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/CpuPageTableLib.h>
Go to the source code of this file.
Data Structures | |
struct | IA32_PAGE_COMMON_ENTRY |
union | IA32_PAGE_NON_LEAF_ENTRY |
union | IA32_PAGE_LEAF_ENTRY_BIG_PAGESIZE |
union | IA32_PTE_4K |
union | IA32_PDPTE_PAE |
union | IA32_PAGING_ENTRY |
Macros | |
#define | IA32_PE_BASE_ADDRESS_MASK_40 0xFFFFFFFFFF000ull |
#define | IA32_PE_BASE_ADDRESS_MASK_39 0xFFFFFFFFFE000ull |
#define | REGION_LENGTH(l) LShiftU64 (1, (l) * 9 + 3) |
#define | MAX_PAE_PDPTE_NUM 4 |
#define | IA32_PNLE_PAGE_TABLE_BASE_ADDRESS(pa) ((pa)->Uint64 & IA32_PE_BASE_ADDRESS_MASK_40) |
#define | IA32_PLEB_PAGE_TABLE_BASE_ADDRESS(pa) ((pa)->Uint64 & IA32_PE_BASE_ADDRESS_MASK_39) |
#define | IA32_PTE4K_PAGE_TABLE_BASE_ADDRESS(pa) ((pa)->Uint64 & IA32_PE_BASE_ADDRESS_MASK_40) |
Typedefs | |
typedef IA32_PAGE_NON_LEAF_ENTRY | IA32_PML5E |
typedef IA32_PAGE_NON_LEAF_ENTRY | IA32_PML4E |
typedef IA32_PAGE_NON_LEAF_ENTRY | IA32_PDPTE |
typedef IA32_PAGE_NON_LEAF_ENTRY | IA32_PDE |
typedef IA32_PAGE_LEAF_ENTRY_BIG_PAGESIZE | IA32_PDE_2M |
typedef IA32_PAGE_LEAF_ENTRY_BIG_PAGESIZE | IA32_PDPTE_1G |
Enumerations | |
enum | IA32_PAGE_LEVEL { Pte = 1 , Pde = 2 , Pdpte = 3 , Pml4 = 4 , Pml5 = 5 } |
Functions | |
BOOLEAN | IsPle (IN IA32_PAGING_ENTRY *PagingEntry, IN UINTN Level) |
UINT64 | PageTableLibGetPleBMapAttribute (IN IA32_PAGE_LEAF_ENTRY_BIG_PAGESIZE *PleB, IN IA32_MAP_ATTRIBUTE *ParentMapAttribute) |
UINT64 | PageTableLibGetPnleMapAttribute (IN IA32_PAGE_NON_LEAF_ENTRY *Pnle, IN IA32_MAP_ATTRIBUTE *ParentMapAttribute) |
Internal header for CpuPageTableLib.
Copyright (c) 2022 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CpuPageTable.h.
#define IA32_PE_BASE_ADDRESS_MASK_39 0xFFFFFFFFFE000ull |
Definition at line 19 of file CpuPageTable.h.
#define IA32_PE_BASE_ADDRESS_MASK_40 0xFFFFFFFFFF000ull |
Definition at line 18 of file CpuPageTable.h.
#define IA32_PLEB_PAGE_TABLE_BASE_ADDRESS | ( | pa | ) | ((pa)->Uint64 & IA32_PE_BASE_ADDRESS_MASK_39) |
Definition at line 112 of file CpuPageTable.h.
#define IA32_PNLE_PAGE_TABLE_BASE_ADDRESS | ( | pa | ) | ((pa)->Uint64 & IA32_PE_BASE_ADDRESS_MASK_40) |
Definition at line 65 of file CpuPageTable.h.
#define IA32_PTE4K_PAGE_TABLE_BASE_ADDRESS | ( | pa | ) | ((pa)->Uint64 & IA32_PE_BASE_ADDRESS_MASK_40) |
Definition at line 148 of file CpuPageTable.h.
#define MAX_PAE_PDPTE_NUM 4 |
Definition at line 23 of file CpuPageTable.h.
#define REGION_LENGTH | ( | l | ) | LShiftU64 (1, (l) * 9 + 3) |
Definition at line 21 of file CpuPageTable.h.
typedef IA32_PAGE_NON_LEAF_ENTRY IA32_PDE |
Format of a Page-Directory Entry that References a Page Table
Definition at line 85 of file CpuPageTable.h.
Format of a Page-Directory Entry that Maps a 2-MByte Page
Definition at line 117 of file CpuPageTable.h.
typedef IA32_PAGE_NON_LEAF_ENTRY IA32_PDPTE |
Format of a Page-Directory-Pointer-Table Entry (PDPTE) that References a Page Directory
Definition at line 80 of file CpuPageTable.h.
Format of a Page-Directory-Pointer-Table Entry (PDPTE) that Maps a 1-GByte Page
Definition at line 122 of file CpuPageTable.h.
typedef IA32_PAGE_NON_LEAF_ENTRY IA32_PML4E |
Format of a PML4 Entry (PML4E) that References a Page-Directory-Pointer Table
Definition at line 75 of file CpuPageTable.h.
typedef IA32_PAGE_NON_LEAF_ENTRY IA32_PML5E |
Format of a PML5 Entry (PML5E) that References a PML4 Table
Definition at line 70 of file CpuPageTable.h.
enum IA32_PAGE_LEVEL |
Definition at line 25 of file CpuPageTable.h.
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.