Xen Test Framework
Macros | Typedefs | Functions
page.h File Reference
#include <xtf/numbers.h>
#include "page-pae.h"
#include "page-pse.h"
+ Include dependency graph for page.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PAGE_SHIFT   12
 
#define PAGE_SIZE   (_AC(1, L) << PAGE_SHIFT)
 
#define PAGE_MASK   (~(PAGE_SIZE - 1))
 
#define PADDR_BITS   52
 
#define PADDR_MASK   ((_AC(1, ULL) << PADDR_BITS) - 1)
 
#define PAGE_ORDER_4K   0
 
#define PAGE_ORDER_2M   9
 
#define PAGE_ORDER_4M   10
 
#define PAGE_ORDER_1G   18
 
#define _PAGE_PRESENT   0x0001
 
#define _PAGE_RW   0x0002
 
#define _PAGE_USER   0x0004
 
#define _PAGE_PWT   0x0008
 
#define _PAGE_PCD   0x0010
 
#define _PAGE_ACCESSED   0x0020
 
#define _PAGE_DIRTY   0x0040
 
#define _PAGE_AD   (_PAGE_ACCESSED | _PAGE_DIRTY)
 
#define _PAGE_PSE   0x0080
 
#define _PAGE_PAT   0x0080
 
#define _PAGE_GLOBAL   0x0100
 
#define _PAGE_AVAIL   0x0e00
 
#define _PAGE_PSE_PAT   0x1000
 
#define _PAGE_NX   (_AC(1, ULL) << 63)
 
#define _PAGE_P   _PAGE_PRESENT
 
#define _PAGE_U   _PAGE_USER
 
#define _PAGE_A   _PAGE_ACCESSED
 
#define _PAGE_D   _PAGE_DIRTY
 
#define PTE_SIZE   PAE_PTE_SIZE
 
#define PTE_ORDER   PAE_PTE_ORDER
 
#define PT_ORDER   PAE_PT_ORDER
 
#define L1_PT_SHIFT   PAE_L1_PT_SHIFT
 
#define L2_PT_SHIFT   PAE_L2_PT_SHIFT
 
#define L1_PT_ENTRIES   PAE_L1_PT_ENTRIES
 
#define L2_PT_ENTRIES   PAE_L2_PT_ENTRIES
 
#define PRIpaddr   "016"PRIx64
 
#define PRIpte   "08lx"
 

Typedefs

typedef uint64_t paddr_t
 
typedef unsigned long intpte_t
 

Functions

unsigned int l1_table_offset (unsigned long linear)
 
unsigned int l2_table_offset (unsigned long linear)
 
unsigned int l3_table_offset (unsigned long linear)
 
unsigned int l4_table_offset (unsigned long linear)
 

Macro Definition Documentation

◆ PAGE_SHIFT

#define PAGE_SHIFT   12

Definition at line 10 of file page.h.

◆ PAGE_SIZE

#define PAGE_SIZE   (_AC(1, L) << PAGE_SHIFT)

Definition at line 11 of file page.h.

◆ PAGE_MASK

#define PAGE_MASK   (~(PAGE_SIZE - 1))

Definition at line 12 of file page.h.

◆ PADDR_BITS

#define PADDR_BITS   52

Definition at line 14 of file page.h.

◆ PADDR_MASK

#define PADDR_MASK   ((_AC(1, ULL) << PADDR_BITS) - 1)

Definition at line 15 of file page.h.

◆ PAGE_ORDER_4K

#define PAGE_ORDER_4K   0

Definition at line 20 of file page.h.

◆ PAGE_ORDER_2M

#define PAGE_ORDER_2M   9

Definition at line 21 of file page.h.

◆ PAGE_ORDER_4M

#define PAGE_ORDER_4M   10

Definition at line 22 of file page.h.

◆ PAGE_ORDER_1G

#define PAGE_ORDER_1G   18

Definition at line 23 of file page.h.

◆ _PAGE_PRESENT

#define _PAGE_PRESENT   0x0001

Definition at line 25 of file page.h.

◆ _PAGE_RW

#define _PAGE_RW   0x0002

Definition at line 26 of file page.h.

◆ _PAGE_USER

#define _PAGE_USER   0x0004

Definition at line 27 of file page.h.

◆ _PAGE_PWT

#define _PAGE_PWT   0x0008

Definition at line 28 of file page.h.

◆ _PAGE_PCD

#define _PAGE_PCD   0x0010

Definition at line 29 of file page.h.

◆ _PAGE_ACCESSED

#define _PAGE_ACCESSED   0x0020

Definition at line 30 of file page.h.

◆ _PAGE_DIRTY

#define _PAGE_DIRTY   0x0040

Definition at line 31 of file page.h.

◆ _PAGE_AD

#define _PAGE_AD   (_PAGE_ACCESSED | _PAGE_DIRTY)

Definition at line 32 of file page.h.

◆ _PAGE_PSE

#define _PAGE_PSE   0x0080

Definition at line 33 of file page.h.

◆ _PAGE_PAT

#define _PAGE_PAT   0x0080

Definition at line 34 of file page.h.

◆ _PAGE_GLOBAL

#define _PAGE_GLOBAL   0x0100

Definition at line 35 of file page.h.

◆ _PAGE_AVAIL

#define _PAGE_AVAIL   0x0e00

Definition at line 36 of file page.h.

◆ _PAGE_PSE_PAT

#define _PAGE_PSE_PAT   0x1000

Definition at line 37 of file page.h.

◆ _PAGE_NX

#define _PAGE_NX   (_AC(1, ULL) << 63)

Definition at line 38 of file page.h.

◆ _PAGE_P

#define _PAGE_P   _PAGE_PRESENT

Definition at line 41 of file page.h.

◆ _PAGE_U

#define _PAGE_U   _PAGE_USER

Definition at line 42 of file page.h.

◆ _PAGE_A

#define _PAGE_A   _PAGE_ACCESSED

Definition at line 43 of file page.h.

◆ _PAGE_D

#define _PAGE_D   _PAGE_DIRTY

Definition at line 44 of file page.h.

◆ PTE_SIZE

#define PTE_SIZE   PAE_PTE_SIZE

Definition at line 61 of file page.h.

◆ PTE_ORDER

#define PTE_ORDER   PAE_PTE_ORDER

Definition at line 62 of file page.h.

◆ PT_ORDER

#define PT_ORDER   PAE_PT_ORDER

Definition at line 64 of file page.h.

◆ L1_PT_SHIFT

#define L1_PT_SHIFT   PAE_L1_PT_SHIFT

Definition at line 66 of file page.h.

◆ L2_PT_SHIFT

#define L2_PT_SHIFT   PAE_L2_PT_SHIFT

Definition at line 67 of file page.h.

◆ L1_PT_ENTRIES

#define L1_PT_ENTRIES   PAE_L1_PT_ENTRIES

Definition at line 69 of file page.h.

◆ L2_PT_ENTRIES

#define L2_PT_ENTRIES   PAE_L2_PT_ENTRIES

Definition at line 70 of file page.h.

◆ PRIpaddr

#define PRIpaddr   "016"PRIx64

Definition at line 97 of file page.h.

◆ PRIpte

#define PRIpte   "08lx"

Definition at line 153 of file page.h.

Typedef Documentation

◆ paddr_t

typedef uint64_t paddr_t

Definition at line 96 of file page.h.

◆ intpte_t

typedef unsigned long intpte_t

Definition at line 152 of file page.h.

Function Documentation

◆ l1_table_offset()

unsigned int l1_table_offset ( unsigned long  linear)
+ Here is the caller graph for this function:

◆ l2_table_offset()

unsigned int l2_table_offset ( unsigned long  linear)
+ Here is the caller graph for this function:

◆ l3_table_offset()

unsigned int l3_table_offset ( unsigned long  linear)
+ Here is the caller graph for this function:

◆ l4_table_offset()

unsigned int l4_table_offset ( unsigned long  linear)
+ Here is the caller graph for this function: