TianoCore EDK2 master
Loading...
Searching...
No Matches
PageTable.h File Reference
#include <Base.h>

Go to the source code of this file.

Data Structures

union  PAGE_MAP_AND_DIRECTORY_POINTER
 
union  PAGE_TABLE_4K_ENTRY
 
union  PAGE_TABLE_ENTRY
 
union  PAGE_TABLE_1G_ENTRY
 

Macros

#define IA32_PG_P   BIT0
 
#define IA32_PG_RW   BIT1
 
#define IA32_PG_PS   BIT7
 
#define PAGING_PAE_INDEX_MASK   0x1FF
 
#define PAGING_4K_ADDRESS_MASK_64   0x000FFFFFFFFFF000ull
 
#define PAGING_2M_ADDRESS_MASK_64   0x000FFFFFFFE00000ull
 
#define PAGING_1G_ADDRESS_MASK_64   0x000FFFFFC0000000ull
 
#define PAGING_L1_ADDRESS_SHIFT   12
 
#define PAGING_L2_ADDRESS_SHIFT   21
 
#define PAGING_L3_ADDRESS_SHIFT   30
 
#define PAGING_L4_ADDRESS_SHIFT   39
 
#define PAGING_PML4E_NUMBER   4
 
#define PAGETABLE_ENTRY_MASK   ((1UL << 9) - 1)
 
#define PML4_OFFSET(x)   ( (x >> 39) & PAGETABLE_ENTRY_MASK)
 
#define PDP_OFFSET(x)   ( (x >> 30) & PAGETABLE_ENTRY_MASK)
 
#define PDE_OFFSET(x)   ( (x >> 21) & PAGETABLE_ENTRY_MASK)
 
#define PTE_OFFSET(x)   ( (x >> 12) & PAGETABLE_ENTRY_MASK)
 
#define PAGING_1G_ADDRESS_MASK_64   0x000FFFFFC0000000ull
 

Detailed Description

x86_64 Page Tables structures

Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
Copyright (c) 2017 - 2020, AMD Incorporated. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Code is derived from MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h

Definition in file PageTable.h.

Macro Definition Documentation

◆ IA32_PG_P

#define IA32_PG_P   BIT0

Definition at line 137 of file PageTable.h.

◆ IA32_PG_PS

#define IA32_PG_PS   BIT7

Definition at line 139 of file PageTable.h.

◆ IA32_PG_RW

#define IA32_PG_RW   BIT1

Definition at line 138 of file PageTable.h.

◆ PAGETABLE_ENTRY_MASK

#define PAGETABLE_ENTRY_MASK   ((1UL << 9) - 1)

Definition at line 154 of file PageTable.h.

◆ PAGING_1G_ADDRESS_MASK_64 [1/2]

#define PAGING_1G_ADDRESS_MASK_64   0x000FFFFFC0000000ull

Definition at line 159 of file PageTable.h.

◆ PAGING_1G_ADDRESS_MASK_64 [2/2]

#define PAGING_1G_ADDRESS_MASK_64   0x000FFFFFC0000000ull

Definition at line 159 of file PageTable.h.

◆ PAGING_2M_ADDRESS_MASK_64

#define PAGING_2M_ADDRESS_MASK_64   0x000FFFFFFFE00000ull

Definition at line 144 of file PageTable.h.

◆ PAGING_4K_ADDRESS_MASK_64

#define PAGING_4K_ADDRESS_MASK_64   0x000FFFFFFFFFF000ull

Definition at line 143 of file PageTable.h.

◆ PAGING_L1_ADDRESS_SHIFT

#define PAGING_L1_ADDRESS_SHIFT   12

Definition at line 147 of file PageTable.h.

◆ PAGING_L2_ADDRESS_SHIFT

#define PAGING_L2_ADDRESS_SHIFT   21

Definition at line 148 of file PageTable.h.

◆ PAGING_L3_ADDRESS_SHIFT

#define PAGING_L3_ADDRESS_SHIFT   30

Definition at line 149 of file PageTable.h.

◆ PAGING_L4_ADDRESS_SHIFT

#define PAGING_L4_ADDRESS_SHIFT   39

Definition at line 150 of file PageTable.h.

◆ PAGING_PAE_INDEX_MASK

#define PAGING_PAE_INDEX_MASK   0x1FF

Definition at line 141 of file PageTable.h.

◆ PAGING_PML4E_NUMBER

#define PAGING_PML4E_NUMBER   4

Definition at line 152 of file PageTable.h.

◆ PDE_OFFSET

#define PDE_OFFSET (   x)    ( (x >> 21) & PAGETABLE_ENTRY_MASK)

Definition at line 157 of file PageTable.h.

◆ PDP_OFFSET

#define PDP_OFFSET (   x)    ( (x >> 30) & PAGETABLE_ENTRY_MASK)

Definition at line 156 of file PageTable.h.

◆ PML4_OFFSET

#define PML4_OFFSET (   x)    ( (x >> 39) & PAGETABLE_ENTRY_MASK)

Definition at line 155 of file PageTable.h.

◆ PTE_OFFSET

#define PTE_OFFSET (   x)    ( (x >> 12) & PAGETABLE_ENTRY_MASK)

Definition at line 158 of file PageTable.h.