require '_h2ph_pre.ph';

unless(defined(&_UVM_UVM_EXTERN_H_)) {
    eval 'sub _UVM_UVM_EXTERN_H_ () {1;}' unless defined(&_UVM_UVM_EXTERN_H_);
    eval 'sub UVM_PROT_MASK () {0x07;}' unless defined(&UVM_PROT_MASK);
    eval 'sub UVM_PROT_NONE () {0x00;}' unless defined(&UVM_PROT_NONE);
    eval 'sub UVM_PROT_ALL () {0x07;}' unless defined(&UVM_PROT_ALL);
    eval 'sub UVM_PROT_READ () {0x01;}' unless defined(&UVM_PROT_READ);
    eval 'sub UVM_PROT_WRITE () {0x02;}' unless defined(&UVM_PROT_WRITE);
    eval 'sub UVM_PROT_EXEC () {0x04;}' unless defined(&UVM_PROT_EXEC);
    eval 'sub UVM_PROT_R () {0x01;}' unless defined(&UVM_PROT_R);
    eval 'sub UVM_PROT_W () {0x02;}' unless defined(&UVM_PROT_W);
    eval 'sub UVM_PROT_RW () {0x03;}' unless defined(&UVM_PROT_RW);
    eval 'sub UVM_PROT_X () {0x04;}' unless defined(&UVM_PROT_X);
    eval 'sub UVM_PROT_RX () {0x05;}' unless defined(&UVM_PROT_RX);
    eval 'sub UVM_PROT_WX () {0x06;}' unless defined(&UVM_PROT_WX);
    eval 'sub UVM_PROT_RWX () {0x07;}' unless defined(&UVM_PROT_RWX);
    eval 'sub UVM_INH_MASK () {0x30;}' unless defined(&UVM_INH_MASK);
    eval 'sub UVM_INH_SHARE () {0x00;}' unless defined(&UVM_INH_SHARE);
    eval 'sub UVM_INH_COPY () {0x10;}' unless defined(&UVM_INH_COPY);
    eval 'sub UVM_INH_NONE () {0x20;}' unless defined(&UVM_INH_NONE);
    eval 'sub UVM_INH_DONATE () {0x30;}' unless defined(&UVM_INH_DONATE);
    eval 'sub VM_PROT_NONE () {( 0x00);}' unless defined(&VM_PROT_NONE);
    eval 'sub VM_PROT_READ () {( 0x01);}' unless defined(&VM_PROT_READ);
    eval 'sub VM_PROT_WRITE () {( 0x02);}' unless defined(&VM_PROT_WRITE);
    eval 'sub VM_PROT_EXECUTE () {( 0x04);}' unless defined(&VM_PROT_EXECUTE);
    eval 'sub VM_PROT_DEFAULT () {( &VM_PROT_READ| &VM_PROT_WRITE| &VM_PROT_EXECUTE);}' unless defined(&VM_PROT_DEFAULT);
    eval 'sub VM_PROT_ALL () {( &VM_PROT_READ| &VM_PROT_WRITE| &VM_PROT_EXECUTE);}' unless defined(&VM_PROT_ALL);
    eval 'sub VM_INHERIT_SHARE () {(0);}' unless defined(&VM_INHERIT_SHARE);
    eval 'sub VM_INHERIT_COPY () {(1);}' unless defined(&VM_INHERIT_COPY);
    eval 'sub VM_INHERIT_NONE () {(2);}' unless defined(&VM_INHERIT_NONE);
    eval 'sub VM_INHERIT_DONATE_COPY () {(3);}' unless defined(&VM_INHERIT_DONATE_COPY);
    eval 'sub VM_INHERIT_DEFAULT () { &VM_INHERIT_COPY;}' unless defined(&VM_INHERIT_DEFAULT);
    eval 'sub UVM_ADV_NORMAL () {0x0;}' unless defined(&UVM_ADV_NORMAL);
    eval 'sub UVM_ADV_RANDOM () {0x1;}' unless defined(&UVM_ADV_RANDOM);
    eval 'sub UVM_ADV_SEQUENTIAL () {0x2;}' unless defined(&UVM_ADV_SEQUENTIAL);
    eval 'sub UVM_ADV_MASK () {0x7;}' unless defined(&UVM_ADV_MASK);
    eval 'sub UVM_FLAG_FIXED () {0x010000;}' unless defined(&UVM_FLAG_FIXED);
    eval 'sub UVM_FLAG_OVERLAY () {0x020000;}' unless defined(&UVM_FLAG_OVERLAY);
    eval 'sub UVM_FLAG_NOMERGE () {0x040000;}' unless defined(&UVM_FLAG_NOMERGE);
    eval 'sub UVM_FLAG_COPYONW () {0x080000;}' unless defined(&UVM_FLAG_COPYONW);
    eval 'sub UVM_FLAG_AMAPPAD () {0x100000;}' unless defined(&UVM_FLAG_AMAPPAD);
    eval 'sub UVM_FLAG_TRYLOCK () {0x200000;}' unless defined(&UVM_FLAG_TRYLOCK);
    eval 'sub UVM_PROTECTION {
        local($X) = @_;
	    eval q((($X) &  &UVM_PROT_MASK));
    }' unless defined(&UVM_PROTECTION);
    eval 'sub UVM_INHERIT {
        local($X) = @_;
	    eval q(((($X) &  &UVM_INH_MASK) >> 4));
    }' unless defined(&UVM_INHERIT);
    eval 'sub UVM_MAXPROTECTION {
        local($X) = @_;
	    eval q(((($X) >> 8) &  &UVM_PROT_MASK));
    }' unless defined(&UVM_MAXPROTECTION);
    eval 'sub UVM_ADVICE {
        local($X) = @_;
	    eval q(((($X) >> 12) &  &UVM_ADV_MASK));
    }' unless defined(&UVM_ADVICE);
    eval 'sub UVM_MAPFLAG {
        local($PROT,$MAXPROT,$INH,$ADVICE,$FLAGS) = @_;
	    eval q((($MAXPROT << 8)|($PROT)|($INH)|(($ADVICE) << 12)|($FLAGS)));
    }' unless defined(&UVM_MAPFLAG);
    eval 'sub UVM_UNKNOWN_OFFSET () {(( &voff_t) -1);}' unless defined(&UVM_UNKNOWN_OFFSET);
    eval 'sub UVM_KMF_NOWAIT () {0x1;}' unless defined(&UVM_KMF_NOWAIT);
    eval 'sub UVM_KMF_VALLOC () {0x2;}' unless defined(&UVM_KMF_VALLOC);
    eval 'sub UVM_KMF_TRYLOCK () { &UVM_FLAG_TRYLOCK;}' unless defined(&UVM_KMF_TRYLOCK);
    eval 'sub UVM_PGA_STRAT_NORMAL () {0;}' unless defined(&UVM_PGA_STRAT_NORMAL);
    eval 'sub UVM_PGA_STRAT_ONLY () {1;}' unless defined(&UVM_PGA_STRAT_ONLY);
    eval 'sub UVM_PGA_STRAT_FALLBACK () {2;}' unless defined(&UVM_PGA_STRAT_FALLBACK);
    eval 'sub UVM_PGA_USERESERVE () {0x0001;}' unless defined(&UVM_PGA_USERESERVE);
    eval 'sub UVM_PGA_ZERO () {0x0002;}' unless defined(&UVM_PGA_ZERO);
    eval 'sub UVM_LK_ENTER () {0x00000001;}' unless defined(&UVM_LK_ENTER);
    eval 'sub UVM_LK_EXIT () {0x00000002;}' unless defined(&UVM_LK_EXIT);
    if(defined(&_KERNEL)) {
	eval 'sub uvm_km_zalloc {
	    local($MAP,$SIZE) = @_;
    	    eval q( &uvm_km_alloc1($MAP,$SIZE, &TRUE));
	}' unless defined(&uvm_km_zalloc);
	eval 'sub uvm_km_alloc {
	    local($MAP,$SIZE) = @_;
    	    eval q( &uvm_km_alloc1($MAP,$SIZE, &FALSE));
	}' unless defined(&uvm_km_alloc);
    }
    if(defined(&_KERNEL)) {
	if(defined( &KGDB)) {
	}
	eval 'sub uvm_km_alloc_poolpage {
	    local($waitok) = @_;
    	    eval q( &uvm_km_alloc_poolpage1( &kmem_map,  ($uvmexp->{kmem_object}), ($waitok)));
	}' unless defined(&uvm_km_alloc_poolpage);
	eval 'sub uvm_km_free_poolpage {
	    local($addr) = @_;
    	    eval q( &uvm_km_free_poolpage1( &kmem_map, ($addr)));
	}' unless defined(&uvm_km_free_poolpage);
	eval 'sub uvm_pagealloc {
	    local($obj, $off, $anon, $flags) = @_;
    	    eval q( &uvm_pagealloc_strat(($obj), ($off), ($anon), ($flags),  &UVM_PGA_STRAT_NORMAL, 0));
	}' unless defined(&uvm_pagealloc);
	unless(defined(&cpu_swapin)) {
	}
	unless(defined(&cpu_swapout)) {
	}
    }
}
1;
