Xen Test Framework
Macros | Typedefs | Functions
page-pse.h File Reference

Definitions and helpers for PSE pagetable handling. More...

#include <xtf/types.h>
#include <arch/page.h>
+ Include dependency graph for page-pse.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PSE_PTE_SIZE   4
 PSE pagetable entries are 32 bits wide. More...
 
#define PSE_PTE_ORDER   2
 PSE pagetable entries are 32 bits wide. More...
 
#define PSE_PT_ORDER   10
 PAE pagetables encode 10 bits of index. More...
 
#define PSE_L1_PT_SHIFT   12
 
#define PSE_L2_PT_SHIFT   22
 
#define PSE_PRIpte   "08"PRIx32
 
#define PSE_L1_PT_ENTRIES   (PAGE_SIZE / PSE_PTE_SIZE)
 All PSE pagetables contain 1024 entries. More...
 
#define PSE_L2_PT_ENTRIES   (PAGE_SIZE / PSE_PTE_SIZE)
 

Typedefs

typedef uint32_t pse_intpte_t
 Integer representation of a PTE. More...
 

Functions

static unsigned int pse_l1_table_offset (unsigned long linear)
 
static unsigned int pse_l2_table_offset (unsigned long linear)
 
static uint32_t fold_pse36 (uint64_t val)
 
static uint64_t unfold_pse36 (uint32_t val)
 

Detailed Description

Definitions and helpers for PSE pagetable handling.

Definition in file page-pse.h.

Macro Definition Documentation

◆ PSE_PTE_SIZE

#define PSE_PTE_SIZE   4

PSE pagetable entries are 32 bits wide.

Definition at line 14 of file page-pse.h.

◆ PSE_PTE_ORDER

#define PSE_PTE_ORDER   2

PSE pagetable entries are 32 bits wide.

Definition at line 16 of file page-pse.h.

◆ PSE_PT_ORDER

#define PSE_PT_ORDER   10

PAE pagetables encode 10 bits of index.

Definition at line 19 of file page-pse.h.

◆ PSE_L1_PT_ENTRIES

#define PSE_L1_PT_ENTRIES   (PAGE_SIZE / PSE_PTE_SIZE)

All PSE pagetables contain 1024 entries.

Definition at line 23 of file page-pse.h.

◆ PSE_L2_PT_ENTRIES

#define PSE_L2_PT_ENTRIES   (PAGE_SIZE / PSE_PTE_SIZE)

Definition at line 24 of file page-pse.h.

◆ PSE_L1_PT_SHIFT

#define PSE_L1_PT_SHIFT   12

Definition at line 27 of file page-pse.h.

◆ PSE_L2_PT_SHIFT

#define PSE_L2_PT_SHIFT   22

Definition at line 28 of file page-pse.h.

◆ PSE_PRIpte

#define PSE_PRIpte   "08"PRIx32

Definition at line 34 of file page-pse.h.

Typedef Documentation

◆ pse_intpte_t

Integer representation of a PTE.

Definition at line 33 of file page-pse.h.

Function Documentation

◆ pse_l1_table_offset()

static unsigned int pse_l1_table_offset ( unsigned long  linear)
inlinestatic

Definition at line 36 of file page-pse.h.

◆ pse_l2_table_offset()

static unsigned int pse_l2_table_offset ( unsigned long  linear)
inlinestatic

Definition at line 40 of file page-pse.h.

◆ fold_pse36()

static uint32_t fold_pse36 ( uint64_t  val)
inlinestatic

Definition at line 45 of file page-pse.h.

◆ unfold_pse36()

static uint64_t unfold_pse36 ( uint32_t  val)
inlinestatic

Definition at line 50 of file page-pse.h.