require '_h2ph_pre.ph';

unless(defined(&_MACHINE_VMPARAM_H_)) {
    eval 'sub _MACHINE_VMPARAM_H_ () {1;}' unless defined(&_MACHINE_VMPARAM_H_);
    require 'machine/pte.ph';
    eval 'sub USRTEXT () {0x2000;}' unless defined(&USRTEXT);
    eval 'sub USRSTACK () {0x0e000000;}' unless defined(&USRSTACK);
    eval 'sub LOWPAGES () { &btoc( &USRTEXT);}' unless defined(&LOWPAGES);
    eval 'sub KUSER_AREA () {(- &UPAGES* &NBPG);}' unless defined(&KUSER_AREA);
    unless(defined(&MAXTSIZ)) {
	eval 'sub MAXTSIZ () {(6*1024*1024);}' unless defined(&MAXTSIZ);
    }
    unless(defined(&DFLDSIZ)) {
	eval 'sub DFLDSIZ () {(32*1024*1024);}' unless defined(&DFLDSIZ);
    }
    unless(defined(&MAXDSIZ)) {
	eval 'sub MAXDSIZ () {(128*1024*1024);}' unless defined(&MAXDSIZ);
    }
    unless(defined(&DFLSSIZ)) {
	eval 'sub DFLSSIZ () {(2*1024*1024);}' unless defined(&DFLSSIZ);
    }
    unless(defined(&MAXSSIZ)) {
	eval 'sub MAXSSIZ () {(32*1024*1024);}' unless defined(&MAXSSIZ);
    }
    eval 'sub DMMIN () {32;}' unless defined(&DMMIN);
    eval 'sub DMMAX () { &NBPG;}' unless defined(&DMMAX);
    eval 'sub SYSPTSIZE () {(2*  &NPTEPG);}' unless defined(&SYSPTSIZE);
    eval 'sub USRPTSIZE () {(1*  &NPTEPG);}' unless defined(&USRPTSIZE);
    unless(defined(&USRIOSIZE)) {
	eval 'sub USRIOSIZE () {(1*  &NPTEPG);}' unless defined(&USRIOSIZE);
    }
    unless(defined(&SHMMAXPGS)) {
	eval 'sub SHMMAXPGS () {(1*  &NPTEPG);}' unless defined(&SHMMAXPGS);
    }
    eval 'sub MAXSLP () {20;}' unless defined(&MAXSLP);
    eval 'sub SAFERSS () {4;}' unless defined(&SAFERSS);
    eval 'sub VM_MIN_ADDRESS () {(0);}' unless defined(&VM_MIN_ADDRESS);
    eval 'sub VM_MAXUSER_ADDRESS () {(( &USRSTACK));}' unless defined(&VM_MAXUSER_ADDRESS);
    eval 'sub VM_MAX_ADDRESS () {((0-( &UPAGES* &NBPG)));}' unless defined(&VM_MAX_ADDRESS);
    eval 'sub VM_MIN_KERNEL_ADDRESS () {(0);}' unless defined(&VM_MIN_KERNEL_ADDRESS);
    eval 'sub VM_MAX_KERNEL_ADDRESS () {((0- &NBPG));}' unless defined(&VM_MAX_KERNEL_ADDRESS);
    eval 'sub VM_MBUF_SIZE () {( &NMBCLUSTERS* &MCLBYTES);}' unless defined(&VM_MBUF_SIZE);
    eval 'sub VM_KMEM_SIZE () {( &NKMEMCLUSTERS* &CLBYTES);}' unless defined(&VM_KMEM_SIZE);
    eval 'sub VM_PHYS_SIZE () {( &USRIOSIZE* &CLBYTES);}' unless defined(&VM_PHYS_SIZE);
    eval 'sub MACHINE_NEW_NONCONTIG () {1;}' unless defined(&MACHINE_NEW_NONCONTIG);
    eval 'sub VM_PHYSSEG_MAX () {(16);}' unless defined(&VM_PHYSSEG_MAX);
    eval 'sub VM_PHYSSEG_STRAT () { &VM_PSTRAT_RANDOM;}' unless defined(&VM_PHYSSEG_STRAT);
    eval 'sub VM_PHYSSEG_NOADD () {1;}' unless defined(&VM_PHYSSEG_NOADD);
    eval 'sub VM_NFREELIST () {2;}' unless defined(&VM_NFREELIST);
    eval 'sub VM_FREELIST_DEFAULT () {0;}' unless defined(&VM_FREELIST_DEFAULT);
    eval 'sub VM_FREELIST_ZORROII () {1;}' unless defined(&VM_FREELIST_ZORROII);
    eval 'sub VM_KERNEL_PT_PAGES () {(8);}' unless defined(&VM_KERNEL_PT_PAGES);
    unless(defined(&MAX_KMAP)) {
	eval 'sub MAX_KMAP () {10;}' unless defined(&MAX_KMAP);
    }
    unless(defined(&MAX_KMAPENT)) {
	eval 'sub MAX_KMAPENT () {500;}' unless defined(&MAX_KMAPENT);
    }
}
1;
