require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_VMPARAM_H_)) {
    eval 'sub _VMPARAM_H_ () {1;}' unless defined(&_VMPARAM_H_);
    eval 'sub USRSTACK () { &VM_MAXUSER_ADDRESS;}' unless defined(&USRSTACK);
    eval 'sub MAXTSIZ () {(( &paddr_t)64*1024*1024);}' unless defined(&MAXTSIZ);
    unless(defined(&DFLDSIZ)) {
	eval 'sub DFLDSIZ () {(( &paddr_t)128*1024*1024);}' unless defined(&DFLDSIZ);
    }
    unless(defined(&MAXDSIZ)) {
	eval 'sub MAXDSIZ () {(( &paddr_t)8*1024*1024*1024);}' unless defined(&MAXDSIZ);
    }
    unless(defined(&DFLSSIZ)) {
	eval 'sub DFLSSIZ () {(( &paddr_t)2*1024*1024);}' unless defined(&DFLSSIZ);
    }
    unless(defined(&MAXSSIZ)) {
	eval 'sub MAXSSIZ () {(( &paddr_t)32*1024*1024);}' unless defined(&MAXSSIZ);
    }
    eval 'sub STACKGAP_RANDOM () {256*1024;}' unless defined(&STACKGAP_RANDOM);
    unless(defined(&SHMMAXPGS)) {
	eval 'sub SHMMAXPGS () {8192;}' unless defined(&SHMMAXPGS);
    }
    eval 'sub USRIOSIZE () {300;}' unless defined(&USRIOSIZE);
    eval 'sub VM_MIN_ADDRESS () { &PAGE_SIZE;}' unless defined(&VM_MIN_ADDRESS);
    eval 'sub VM_MAXUSER_ADDRESS () {0x7f7fffffc000;}' unless defined(&VM_MAXUSER_ADDRESS);
    eval 'sub VM_MAX_ADDRESS () {0x7fbfdfeff000;}' unless defined(&VM_MAX_ADDRESS);
    eval 'sub VM_MIN_KERNEL_ADDRESS () {0xffff800000000000;}' unless defined(&VM_MIN_KERNEL_ADDRESS);
    eval 'sub VM_MAX_KERNEL_ADDRESS () {0xffff800100000000;}' unless defined(&VM_MAX_KERNEL_ADDRESS);
    eval 'sub VM_MAXUSER_ADDRESS32 () {0xffffc000;}' unless defined(&VM_MAXUSER_ADDRESS32);
    eval 'sub VM_PIE_MIN_ADDR () { &VM_MIN_ADDRESS;}' unless defined(&VM_PIE_MIN_ADDR);
    eval 'sub VM_PIE_MAX_ADDR () {0x200000000000;}' unless defined(&VM_PIE_MAX_ADDR);
    eval 'sub VM_PHYS_SIZE () {( &USRIOSIZE* &PAGE_SIZE);}' unless defined(&VM_PHYS_SIZE);
    eval 'sub VM_PHYSSEG_MAX () {16;}' unless defined(&VM_PHYSSEG_MAX);
    eval 'sub VM_PHYSSEG_STRAT () { &VM_PSTRAT_BIGFIRST;}' unless defined(&VM_PHYSSEG_STRAT);
    eval 'sub VM_PHYSSEG_NOADD () {1;}' unless defined(&VM_PHYSSEG_NOADD);
    eval 'sub VM_NFREELIST () {3;}' unless defined(&VM_NFREELIST);
    eval 'sub VM_FREELIST_DEFAULT () {0;}' unless defined(&VM_FREELIST_DEFAULT);
    eval 'sub VM_FREELIST_LOW () {1;}' unless defined(&VM_FREELIST_LOW);
    eval 'sub VM_FREELIST_HIGH () {2;}' unless defined(&VM_FREELIST_HIGH);
    eval 'sub __HAVE_VM_PAGE_MD () {1;}' unless defined(&__HAVE_VM_PAGE_MD);
    eval 'sub VM_MDPAGE_INIT {
        my($pg) = @_;
	    eval q( &do { ($pg)-> ($mdpage->{pv_list}) =  &NULL; }  &while (0));
    }' unless defined(&VM_MDPAGE_INIT);
}
1;
