CPAGETCBSKIP	EQU	8        
CPAGETSDSKIP	EQU	4        
PGMAXLOOKAHEAD	EQU	50       

_ppte_s	STRUC
	_ppte_s_fs	DD  ?
_ppte_s	ENDS

pu_present	EQU	01h
pu_ring3write	EQU	02h
pu_ring3access	EQU	04h
pu_writethrough	EQU	08h
pu_cachedisable	EQU	010h
pu_accessed	EQU	020h
pu_dirty	EQU	040h
pu_res	EQU	0180h
pu_uvirt	EQU	0200h
pu_resident	EQU	0400h
pu_reserved	EQU	0800h
pu_frame	EQU	0fffff000h

_lpte_s	STRUC
lpu_long	DD	?
_lpte_s	ENDS

?UnionSize = 0
if size _ppte_s gt ?UnionSize
	?UnionSize = size _ppte_s
endif
ppte_s	equ	(byte ptr 0)

if size _lpte_s gt ?UnionSize
	?UnionSize = size _lpte_s
endif
lpte_s	equ	(byte ptr 0)


_pte_u	STRUC
	DB	?UnionSize dup(?)
_pte_u	ENDS



pte_s	STRUC
pte_u	DB	SIZE _pte_u DUP (?)
pte_s	ENDS

pt_present	EQU	pte_u.ppte_s.pu_present
pt_ring3write	EQU	pte_u.ppte_s.pu_ring3write
pt_ring3access	EQU	pte_u.ppte_s.pu_ring3access
pt_writethrough	EQU	pte_u.ppte_s.pu_writethrough
pt_cachedisable	EQU	pte_u.ppte_s.pu_cachedisable
pt_accessed	EQU	pte_u.ppte_s.pu_accessed
pt_dirty	EQU	pte_u.ppte_s.pu_dirty
pt_res	EQU	pte_u.ppte_s.pu_res
pt_uvirt	EQU	pte_u.ppte_s.pu_uvirt
pt_resident	EQU	pte_u.ppte_s.pu_resident
pt_frame	EQU	pte_u.ppte_s.pu_frame
pt_npguard	EQU	pt_dirty                  
pt_npswapid	EQU	pt_frame                  
pt_npblockno	EQU	pt_frame                  
pt_long	EQU	pte_u.lpte_s.lpu_long     
PT_PRESENT	EQU	00000001H 
PT_RING3WRITE	EQU	00000002H 
PT_RING3ACCESS	EQU	00000004H 
PT_WRITETHROUGH	EQU	00000008H 
PT_CACHEDISABLE	EQU	00000010H 
PT_ACCESSED	EQU	00000020H 
PT_DIRTY	EQU	00000040H 
PT_RES	EQU	00000180H   
PT_UVIRT	EQU	00000200H 
PT_RESIDENT	EQU	00000400H 
PT_STATE	EQU	00000e00H   
PT_FRAME	EQU	0fffff000H   
PT_NPGUARD	EQU	PT_DIRTY
PT_FRAMESHIFT	EQU	12               
PT_FRAMEINCR	EQU	(1   SHL  PT_FRAMESHIFT)

_avp_s	STRUC
	_avp_s_fs	DD  ?
avp_obpg	DW	?
avp_hob	DW	?
avp_refcount	DW	?
_avp_s	ENDS

avp_busy	EQU	01h
avp_wanted	EQU	02h
avp_cache	EQU	04h
avp_pfidle	EQU	08h
avp_pf	EQU	010h
avp_df	EQU	020h
avp_dirty	EQU	040h
avp_shdirty	EQU	080h
avp_sow	EQU	0100h
avp_res	EQU	0200h
avp_resident	EQU	0400h
avp_discardable	EQU	0800h
avp_frame	EQU	0fffff000h

_nvp_s	STRUC
	_nvp_s_fs	DD  ?
nvp_pad2	DD	?
nvp_pad3	DW	?
_nvp_s	ENDS

nvp_flags	EQU	0fffh
nvp_pad1	EQU	0fffff000h

_fvp_s	STRUC
fvp_flink	DD	?
fvp_blink	DD	?
fvp_pad	DW	?
_fvp_s	ENDS

?UnionSize = 0
if size _avp_s gt ?UnionSize
	?UnionSize = size _avp_s
endif
avp_s	equ	(byte ptr 0)

if size _nvp_s gt ?UnionSize
	?UnionSize = size _nvp_s
endif
nvp_s	equ	(byte ptr 0)

if size _fvp_s gt ?UnionSize
	?UnionSize = size _fvp_s
endif
fvp_s	equ	(byte ptr 0)


_vp_u	STRUC
	DB	?UnionSize dup(?)
_vp_u	ENDS


ifdef  PGSTRICT

vp_s	STRUC
vp_u	DB	SIZE _vp_u DUP (?)
vp_semowner	DW	?
vp_s	ENDS

else

vp_s	STRUC
vp_u	DB	SIZE _vp_u DUP (?)
vp_s	ENDS

endif
vp_frame	EQU	vp_u.avp_s.avp_frame
vp_block	EQU	vp_frame
vp_obpg	EQU	vp_u.avp_s.avp_obpg
vp_hob	EQU	vp_u.avp_s.avp_hob
vp_refcount	EQU	vp_u.avp_s.avp_refcount
vp_flink	EQU	vp_u.fvp_s.fvp_flink
vp_blink	EQU	vp_u.fvp_s.fvp_blink
vp_flags	EQU	vp_u.nvp_s.nvp_flags
vp_discardable	EQU	vp_u.avp_s.avp_discardable
vp_sow	EQU	vp_u.avp_s.avp_sow
vp_resident	EQU	vp_u.avp_s.avp_resident
vp_cache	EQU	vp_u.avp_s.avp_cache
vp_busy	EQU	vp_u.avp_s.avp_busy
vp_wanted	EQU	vp_u.avp_s.avp_wanted
vp_dirty	EQU	vp_u.avp_s.avp_dirty
vp_shdirty	EQU	vp_u.avp_s.avp_shdirty
vp_pfidle	EQU	vp_u.avp_s.avp_pfidle
vp_pf	EQU	vp_u.avp_s.avp_pf
vp_df	EQU	vp_u.avp_s.avp_df
VP_BUSY	EQU	001H            
VP_WANTED	EQU	002H            
VP_CACHE	EQU	004H            
VP_PFIDLE	EQU	008H            
VP_PF	EQU	010H            
VP_DF	EQU	020H            
VP_DIRTY	EQU	040H            
VP_SHDIRTY	EQU	080H            
VP_SOW	EQU	100H            
VP_PRIVATIZED	EQU	200H            
VP_RESIDENT	EQU	400H            
VP_DISCARDABLE	EQU	800H            
VPB_DFBROKEN	EQU	2                
VPB_ZEROFILL	EQU	1                
VPB_AOD	EQU	0                
PG_COMMITSHIFT	EQU	10               

list_s	STRUC
li_headppf	DD	?
li_headframe	DB	SIZE frame_t DUP (?)
li_count	DD	?
li_flags	DW	?
list_s	ENDS

LI_BLOCKED	EQU	0001H           

physboundary_s	STRUC
pb_frame	DB	SIZE frame_t DUP (?)
pb_ppf	DD	?
pb_ppr	DD	?
physboundary_s	ENDS


pagerange_s	STRUC
pr_lastframe	DB	SIZE frame_t DUP (?)
pr_firstframe	DB	SIZE frame_t DUP (?)
pagerange_s	ENDS


physarena_s	STRUC
pai_pprt	DD	?
pai_nranges	DD	?
pai_1M	DB	SIZE physboundary_s DUP (?)
pai_16M	DB	SIZE physboundary_s DUP (?)
pai_end	DB	SIZE physboundary_s DUP (?)
physarena_s	ENDS


pgmappte_s	STRUC
mp_framedes	DB	SIZE frame_t DUP (?)
mp_framesrc	DB	SIZE frame_t DUP (?)
mp_ppfdes	DD	?
mp_ppfsrc	DD	?
mp_pvp	DD	?
mp_kill	DD	?
mp_page	DB	SIZE page_t DUP (?)
mp_pptda	DD	?
pgmappte_s	ENDS


agerate_s	STRUC
ar_minidle	DD	?
ar_maxidle	DD	?
ar_sleepms	DD	?
ar_prtyclass	DW	?
ar_prtydelta	DW	?
ar_ntables	DW	?
agerate_s	ENDS

NRATES	EQU	5                        
AA_LINEAR	EQU	00000001H       
AA_PHYSICAL	EQU	00000002H       
AA_SPECIFIC	EQU	00000004H       
PADPAGES	EQU	10               
NPTEPPT	EQU	(PAGESIZE / SIZE          pte_s ) 
VDMALIASSIG	EQU	0b5b5H           
PAGEDIRMASK	EQU	0ffc00000H       
PAGETABLEMASK	EQU	003ff000H       
PAGEDIRSHIFT	EQU	22               
PAGEDIRSIZE	EQU	(1   SHL  PAGEDIRSHIFT)     
PER_PROTECT	EQU	00000001H       
PER_WRITE	EQU	00000002H       
PER_USER	EQU	00000004H       
PER_RESERVED	EQU	0fffffff8H       

pgdata_s	STRUC
pd_ppte	DD	?
pd_ppde	DD	?
pd_pcalloc	DD	?
pd_pcpresent	DD	?
pd_pcresident	DD	?
pd_base	DD	?
pd_pvdmalias	DD	?
pd_maxpde	DW	?
pd_cpdelow	DW	?
pd_cpdehigh	DW	?
pd_ptcontext	DW	?
pd_flags	DW	?
pgdata_s	ENDS

PD_AGINGNEEDED	EQU	1                

pgpc_s	STRUC
pp_calloc	DW	MAXCR_PDE DUP (?)
pp_cpresent	DW	MAXCR_PDE DUP (?)
pp_cresident	DW	MAXCR_PDE DUP (?)
pgpc_s	ENDS


pginfo_s	STRUC
pi_page	DB	SIZE page_t DUP (?)
pi_pptda	DD	?
pi_ppte	DD	?
pi_pte	DB	SIZE pte_s DUP (?)
pi_ppd	DD	?
pi_pvp	DD	?
pi_ppf	DD	?
pi_flags	DD	?
pi_pdi	DD	?
pi_data1	DD	?
pi_data2	DD	?
pi_data3	DD	?
pginfo_s	ENDS


_PerfMap	STRUC
len	DW	?
L1	DD	?
L2	DD	?
S1	DD	?
S2	DD	?
C1	DD	?
C2	DD	?
N1	DD	?
N2	DD	?
R	DD	8 DUP (?)
_PerfMap	ENDS

