require '_h2ph_pre.ph';

unless(defined(&_MAC68K_PTE_H_)) {
    eval 'sub _MAC68K_PTE_H_ () {1;}' unless defined(&_MAC68K_PTE_H_);
    eval 'sub PT_ENTRY_NULL () {( 0);}' unless defined(&PT_ENTRY_NULL);
    eval 'sub ST_ENTRY_NULL () {( 0);}' unless defined(&ST_ENTRY_NULL);
    eval 'sub SG_V () {0x00000002;}' unless defined(&SG_V);
    eval 'sub SG_NV () {0x00000000;}' unless defined(&SG_NV);
    eval 'sub SG_PROT () {0x00000004;}' unless defined(&SG_PROT);
    eval 'sub SG_RO () {0x00000004;}' unless defined(&SG_RO);
    eval 'sub SG_RW () {0x00000000;}' unless defined(&SG_RW);
    eval 'sub SG_U () {0x00000008;}' unless defined(&SG_U);
    eval 'sub SG_FRAME () {0xfffff000;}' unless defined(&SG_FRAME);
    eval 'sub SG_IMASK () {0xffc00000;}' unless defined(&SG_IMASK);
    eval 'sub SG_ISHIFT () {22;}' unless defined(&SG_ISHIFT);
    eval 'sub SG_PMASK () {0x003ff000;}' unless defined(&SG_PMASK);
    eval 'sub SG_PSHIFT () {12;}' unless defined(&SG_PSHIFT);
    eval 'sub SG4_MASK1 () {0xfe000000;}' unless defined(&SG4_MASK1);
    eval 'sub SG4_SHIFT1 () {25;}' unless defined(&SG4_SHIFT1);
    eval 'sub SG4_MASK2 () {0x01fc0000;}' unless defined(&SG4_MASK2);
    eval 'sub SG4_SHIFT2 () {18;}' unless defined(&SG4_SHIFT2);
    eval 'sub SG4_MASK3 () {0x0003f000;}' unless defined(&SG4_MASK3);
    eval 'sub SG4_SHIFT3 () {12;}' unless defined(&SG4_SHIFT3);
    eval 'sub SG4_ADDR1 () {0xfffffe00;}' unless defined(&SG4_ADDR1);
    eval 'sub SG4_ADDR2 () {0xffffff00;}' unless defined(&SG4_ADDR2);
    eval 'sub SG4_LEV1SIZE () {128;}' unless defined(&SG4_LEV1SIZE);
    eval 'sub SG4_LEV2SIZE () {128;}' unless defined(&SG4_LEV2SIZE);
    eval 'sub SG4_LEV3SIZE () {64;}' unless defined(&SG4_LEV3SIZE);
    eval 'sub PG_V () {0x00000001;}' unless defined(&PG_V);
    eval 'sub PG_NV () {0x00000000;}' unless defined(&PG_NV);
    eval 'sub PG_PROT () {0x00000004;}' unless defined(&PG_PROT);
    eval 'sub PG_U () {0x00000008;}' unless defined(&PG_U);
    eval 'sub PG_M () {0x00000010;}' unless defined(&PG_M);
    eval 'sub PG_W () {0x00000100;}' unless defined(&PG_W);
    eval 'sub PG_RO () {0x00000004;}' unless defined(&PG_RO);
    eval 'sub PG_RW () {0x00000000;}' unless defined(&PG_RW);
    eval 'sub PG_FRAME () {0xfffff000;}' unless defined(&PG_FRAME);
    eval 'sub PG_CI () {0x00000040;}' unless defined(&PG_CI);
    eval 'sub PG_SHIFT () {12;}' unless defined(&PG_SHIFT);
    eval 'sub PG_PFNUM {
        local($x) = @_;
	    eval q(((($x) &  &PG_FRAME) >>  &PG_SHIFT));
    }' unless defined(&PG_PFNUM);
    eval 'sub PG_CMASK () {0x00000060;}' unless defined(&PG_CMASK);
    eval 'sub PG_CWT () {0x00000000;}' unless defined(&PG_CWT);
    eval 'sub PG_CCB () {0x00000020;}' unless defined(&PG_CCB);
    eval 'sub PG_CIS () {0x00000040;}' unless defined(&PG_CIS);
    eval 'sub PG_CIN () {0x00000060;}' unless defined(&PG_CIN);
    eval 'sub PG_SO () {0x00000080;}' unless defined(&PG_SO);
    eval 'sub MAC_STSIZE () {( &MAXUL2SIZE* &SG4_LEV2SIZE*$sizeof{ &st_entry_t});}' unless defined(&MAC_STSIZE);
    eval 'sub MAC_MAX_PTSIZE () {0x400000;}' unless defined(&MAC_MAX_PTSIZE);
    eval 'sub MAC_MAX_KPTSIZE () {0x100000;}' unless defined(&MAC_MAX_KPTSIZE);
    eval 'sub MAC_PTBASE () {0x10000000;}' unless defined(&MAC_PTBASE);
    eval 'sub MAC_PTMAXSIZE () {0x70000000;}' unless defined(&MAC_PTMAXSIZE);
    eval 'sub kvtopte {
        local($va) = @_;
	    eval q(( $Sysmap[(($va) -  &VM_MIN_KERNEL_ADDRESS) >>  &PGSHIFT]));
    }' unless defined(&kvtopte);
    eval 'sub ptetokv {
        local($pt) = @_;
	    eval q((((($pt) -  &Sysmap) <<  &PGSHIFT) +  &VM_MIN_KERNEL_ADDRESS));
    }' unless defined(&ptetokv);
    eval 'sub kvtophys {
        local($va) = @_;
	    eval q((( ($kvtopte->{pg_pfnum}) <<  &PGSHIFT) | (($va) &  &PGOFSET)));
    }' unless defined(&kvtophys);
}
1;
