Home | History | Annotate | Line # | Download | only in dev
zbus.c revision 1.44.8.1
      1  1.44.8.1   nathanw /*	$NetBSD: zbus.c,v 1.44.8.1 2002/02/28 04:07:03 nathanw Exp $ */
      2       1.1    chopps 
      3       1.1    chopps /*
      4       1.1    chopps  * Copyright (c) 1994 Christian E. Hopps
      5       1.1    chopps  * All rights reserved.
      6       1.1    chopps  *
      7       1.1    chopps  * Redistribution and use in source and binary forms, with or without
      8       1.1    chopps  * modification, are permitted provided that the following conditions
      9       1.1    chopps  * are met:
     10       1.1    chopps  * 1. Redistributions of source code must retain the above copyright
     11       1.1    chopps  *    notice, this list of conditions and the following disclaimer.
     12       1.1    chopps  * 2. Redistributions in binary form must reproduce the above copyright
     13       1.1    chopps  *    notice, this list of conditions and the following disclaimer in the
     14       1.1    chopps  *    documentation and/or other materials provided with the distribution.
     15       1.1    chopps  * 3. All advertising materials mentioning features or use of this software
     16       1.1    chopps  *    must display the following acknowledgement:
     17       1.1    chopps  *      This product includes software developed by Christian E. Hopps.
     18       1.1    chopps  * 4. The name of the author may not be used to endorse or promote products
     19       1.1    chopps  *    derived from this software without specific prior written permission
     20       1.1    chopps  *
     21       1.1    chopps  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     22       1.1    chopps  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     23       1.1    chopps  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     24       1.1    chopps  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     25       1.1    chopps  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     26       1.1    chopps  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     27       1.1    chopps  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     28       1.1    chopps  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     29       1.1    chopps  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     30       1.1    chopps  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31       1.1    chopps  */
     32  1.44.8.1   nathanw 
     33  1.44.8.1   nathanw #include <sys/cdefs.h>
     34  1.44.8.1   nathanw __KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.44.8.1 2002/02/28 04:07:03 nathanw Exp $");
     35  1.44.8.1   nathanw 
     36       1.1    chopps #include <sys/param.h>
     37       1.1    chopps #include <sys/device.h>
     38      1.14     veego #include <sys/systm.h>
     39       1.1    chopps #include <machine/cpu.h>
     40       1.1    chopps #include <machine/pte.h>
     41       1.1    chopps #include <amiga/amiga/cfdev.h>
     42       1.1    chopps #include <amiga/amiga/device.h>
     43       1.1    chopps #include <amiga/dev/zbusvar.h>
     44       1.1    chopps 
     45       1.1    chopps struct aconfdata {
     46       1.1    chopps 	char *name;
     47       1.1    chopps 	int manid;
     48       1.1    chopps 	int prodid;
     49       1.1    chopps };
     50       1.1    chopps 
     51       1.1    chopps struct preconfdata {
     52       1.1    chopps 	int manid;
     53       1.1    chopps 	int prodid;
     54       1.1    chopps 	caddr_t vaddr;
     55       1.1    chopps };
     56       1.1    chopps 
     57       1.1    chopps 
     58  1.44.8.1   nathanw /*
     59       1.1    chopps  * explain the names.. 0123456789 => zothfisven
     60       1.1    chopps  */
     61       1.1    chopps static struct aconfdata aconftab[] = {
     62       1.1    chopps 	/* Commodore Amiga */
     63       1.1    chopps 	{ "atzee",	513,	1 },
     64      1.21        is 	{ "atzsc",	514,	2 },
     65       1.1    chopps 	{ "atzsc",	514,	3 },
     66      1.13    chopps 	{ "bah",	514,	9 },	/* A2060 */
     67       1.1    chopps 	{ "ql",		514,	69 },
     68       1.1    chopps 	{ "ql",		514,	70 },
     69      1.27        is 	{ "atfsc",	514,	84 },
     70      1.27        is 	{ "le",		514,	112 },
     71       1.1    chopps 	/* Ameristar */
     72       1.1    chopps 	{ "le",		1053,	1 },
     73      1.13    chopps 	{ "bah",	1053,	9 },	/* A2060 */
     74       1.3    chopps 	{ "es",		1053,	10 },
     75      1.13    chopps 	/* University of Lowell */
     76       1.9    chopps 	{ "grful",	1030,	0 },
     77      1.23        is 	/* DMI */
     78      1.23        is 	{ "grfrs",	2129,	1 },	/* Resolver graphics board */
     79       1.1    chopps 	/* Macrosystems */
     80       1.1    chopps 	{ "grfrt",	18260,	6 },
     81       1.3    chopps 	{ "grfrh",	18260,	16},	/* Retina BLT Z3 */
     82      1.15        is 	{ "grfrh",	18260,	19},	/* Altais */
     83       1.1    chopps 	/* Greater valley products */
     84       1.1    chopps 	{ "gvpbus",	2017,	2 },
     85       1.1    chopps 	{ "gvpbus",	2017,	11 },
     86       1.1    chopps 	{ "giv",	2017,	32 },
     87       1.5    chopps 	{ "gio",	2017,	255 },
     88       1.1    chopps 	/* progressive perhiperals */
     89       1.1    chopps 	{ "zssc",	2026,	150 },
     90       1.1    chopps 	{ "ppia",	2026,	187 },
     91       1.1    chopps 	{ "ppta",	2026,	105 },
     92       1.1    chopps 	{ "ppha",	2026,	1 },
     93       1.1    chopps 	{ "mrsc",	2026,	0 },
     94       1.1    chopps 	/* CSA */
     95       1.1    chopps 	{ "mgnsc",	1058,	17 },
     96       1.1    chopps 	{ "otgsc",	1058,	21 },
     97       1.1    chopps 	/* Microbotics */
     98       1.1    chopps 	{ "vhzsc",	1010,	69 },
     99       1.1    chopps 	/* Supra */
    100       1.1    chopps 	{ "wstsc",	1056,	12 },
    101       1.6    chopps 	{ "wstsc",	1056,	13 },
    102       1.1    chopps 	/* IVS */
    103       1.6    chopps 	{ "itrmp",	2112,	48 },
    104       1.1    chopps 	{ "itrmp",	2112,	52 },
    105       1.1    chopps 	{ "ivasc",	2112,	242 },
    106       1.1    chopps 	{ "ivsc",	2112,	243 },
    107       1.1    chopps 	/* Hydra */
    108       1.1    chopps 	{ "ed",		2121,	1 },
    109       1.1    chopps 	/* ASDG */
    110      1.21        is 	{ "ed",		1023,	254 },
    111       1.7    chopps 	/* Village Tronic Ariadne */
    112      1.33     veego 	{ "le",		2167,	201},
    113      1.38     veego 	/* Village Tronic Ariadne II */
    114      1.38     veego 	{ "ne",		2167,	202},
    115       1.1    chopps 	/* bsc/Alf Data */
    116      1.20        is 	{ "Tandem", 2092,    6 },	/* Tandem AT disk controler */
    117       1.1    chopps 	{ "mfc",	2092,	16 },
    118       1.1    chopps 	{ "mfc",	2092,	17 },
    119       1.1    chopps 	{ "mfc",	2092,	18 },
    120       1.1    chopps 	/* Cirrus CL GD 5426 -> Picasso, Piccolo, EGS Spectrum */
    121      1.32     veego 	{ "grfcl",	2167,	11},	/* PicassoII mem */
    122      1.32     veego 	{ "grfcl",	2167,	12},	/* PicassoII regs */
    123      1.32     veego 	{ "grfcl",	2167,	21},	/* PicassoIV Z2 mem1 */
    124      1.32     veego 	{ "grfcl",	2167,	22},	/* PicassoIV Z2 mem2 */
    125      1.32     veego 	{ "grfcl",	2167,	23},	/* PicassoIV Z2 regs */
    126      1.32     veego 	{ "grfcl",	2167,	24},	/* PicassoIV Z3 */
    127       1.3    chopps 	{ "grfcl",	2193,	2},	/* Spectrum mem */
    128       1.3    chopps 	{ "grfcl",	2193,	1},	/* Spectrum regs */
    129       1.3    chopps 	{ "grfcl",	2195,	5},	/* Piccolo mem */
    130       1.3    chopps 	{ "grfcl",	2195,	6},	/* Piccolo regs */
    131      1.19     veego 	{ "grfcl",	2195,	10},	/* Piccolo SD64 mem */
    132      1.19     veego 	{ "grfcl",	2195,	11},	/* Piccolo SD64 regs */
    133       1.1    chopps 	/* MacroSystemsUS */
    134       1.1    chopps 	{ "wesc",	2203,	19},	/* Warp engine */
    135      1.10    chopps 	/* phase 5 digital products */
    136      1.10    chopps 	{ "flmem",	8512,	10},	/* FastlaneZ3 memory */
    137      1.10    chopps 	{ "flsc",	8512,	11},	/* FastlaneZ3 */
    138      1.30        is 	{ "cbsc",	8512,	12},	/* Cyberstorm Mk I SCSI */
    139      1.28        is 	{ "bzivsc",	8512,	17},	/* Blizzard IV SCSI */
    140      1.28        is 	{ "bztzsc", 	8512,	24},	/* Blizzard 2060 SCSI */
    141      1.30        is 	{ "cbiisc", 	8512,	25},	/* Cyberstorm Mk II SCSI */
    142      1.12    chopps 	{ "grfcv",	8512,	34},	/* CyberVison 64 */
    143      1.35     veego 	{ "grfcv3d",	8512,	67},	/* CyberVison 64/3D */
    144      1.39    mhitch 	{ "cbiiisc", 	8512,	100},	/* Cyberstorm Mk III SCSI */
    145       1.3    chopps 	/* Hacker Inc. */
    146      1.11    chopps 	{ "mlhsc",	2011,	1 },
    147      1.11    chopps 	/* Resource Management Force */
    148      1.17        is 	{ "qn",		2011,	2 },	/* QuickNet Ethernet */
    149      1.17        is 	/* ??? */
    150      1.19     veego 	{ "empsc",	2171,	21 },	/* Emplant SCSI */
    151      1.21        is 	{ "empsc",	2171,	32 },	/* Emplant SCSI */
    152      1.19     veego 	/* Tseng ET4000 boards */
    153      1.19     veego 	{ "grfet",	2117,	3 },	/* Merlin mem */
    154      1.20        is 	{ "grfet",	2117,	4 },	/* Merlin regs */
    155      1.32     veego 	{ "grfet",	2167,	1 },	/* Domino mem */
    156      1.32     veego 	{ "grfet",	2167,	2 },	/* Domino regs */
    157      1.32     veego 	{ "grfet",	2167,	3 },	/* Domino regs (proto 16M) */
    158      1.32     veego 	{ "grfet",	2181,	0 },	/* oMniBus */
    159      1.20        is 	/* Advanced Systems */
    160      1.27        is 	{ "nxsc",	2102,	1 },	/* Nexus SCSI board */
    161      1.21        is 	/* Masoboshi */
    162      1.31        is 	{ "mcsc",	8535,	4 },	/* Masoboshi Mastercard 702 */
    163      1.31        is 	/* Apollo */
    164      1.34        is 	{ "apssc",	8738,	35 },	/* Apollo '060 scsi */
    165      1.34        is 	/* KATO development */
    166      1.34        is 	{ "aumld",	2145,	128 },	/* Melody MPEG layer 2 audio board */
    167      1.43        is 	/* Individual Computers Jens Schoenfeld */
    168      1.42        is 	{ "buddha",	4626,	0 },
    169      1.42        is 	{ "X-serve",	4626,	23 },	/* X-serve Ethernet */
    170      1.34        is 	/* VMC Harald Frank */
    171      1.34        is 	{ "blst",	5001,	1},	/* ISDN Blaster */
    172      1.34        is 	{ "hyper4",	5001,	2},	/* Hypercom4-Zbus */
    173      1.42        is 	{ "hyper3Z",	5001,	3},	/* Hypercom3-Zbus */
    174      1.42        is 	{ "hyper4+",	5001,	6},	/* Hypercom4+ */
    175      1.42        is 	{ "hyper3+",	5001,	7}	/* Hypercom3+ */
    176       1.1    chopps };
    177       1.1    chopps static int naconfent = sizeof(aconftab) / sizeof(struct aconfdata);
    178       1.1    chopps 
    179       1.1    chopps /*
    180       1.1    chopps  * Anything listed in this table is subject to pre-configuration,
    181       1.1    chopps  * if autoconf.c:config_console() calls amiga_config_found() on
    182       1.1    chopps  * the Zorro III device.
    183       1.1    chopps  */
    184       1.1    chopps static struct preconfdata preconftab[] = {
    185      1.32     veego 	{18260, 6, 0 },	/* Retina Z2 */			/* grf1 */
    186      1.32     veego 	{18260, 16, 0}, /* Retina BLT Z3 */		/* grf2 */
    187      1.15        is 	{18260, 19, 0}, /* Altais */
    188      1.32     veego 	{2167,	11, 0},	/* PicassoII mem */		/* grf3 */
    189      1.32     veego 	{2167,	12, 0},	/* PicassoII regs */
    190      1.32     veego 	{2167,	21, 0},	/* PicassoIV Z2 mem1 */
    191      1.32     veego 	{2167,	22, 0},	/* PicassoIV Z2 mem2 */
    192      1.32     veego 	{2167,	23, 0},	/* PicassoIV Z2 regs */
    193      1.32     veego 	{2167,	24, 0},	/* PicassoIV Z3 */
    194       1.4    chopps 	{2193,	2, 0},	/* Spectrum mem */
    195       1.4    chopps 	{2193,	1, 0},	/* Spectrum regs */
    196       1.4    chopps 	{2195,	5, 0},	/* Piccolo mem */
    197       1.8    chopps 	{2195,	6, 0},	/* Piccolo regs */
    198      1.19     veego 	{2195,	10, 0},	/* Piccolo SD64 mem */
    199      1.19     veego 	{2195,	11, 0},	/* Piccolo SD64 regs */
    200      1.32     veego 	{1030,	0, 0},	/* Ulwl board */		/* grf4 */
    201      1.32     veego 	{8512,	34, 0},	/* Cybervison 64 */		/* grf5 */
    202      1.32     veego 	{2117,	3, 0},	/* Merlin mem */		/* grf6 */
    203      1.32     veego 	{2117,	4, 0},	/* Merlin regs */
    204      1.19     veego 	{2167,	1, 0},	/* Domino mem */
    205      1.19     veego 	{2167,	2, 0},	/* Domino regs */
    206      1.32     veego 	{2167,	3, 0},	/* Domino regs (proto 16M) */
    207      1.35     veego 	{2181,	0, 0},	/* oMniBus mem or regs */
    208      1.35     veego 	{8512,	67, 0}	/* Cybervison 64/3D */		/* grf7 */
    209       1.1    chopps };
    210       1.1    chopps static int npreconfent = sizeof(preconftab) / sizeof(struct preconfdata);
    211       1.1    chopps 
    212       1.1    chopps 
    213  1.44.8.1   nathanw void zbusattach(struct device *, struct device *, void *);
    214  1.44.8.1   nathanw int zbusprint(void *, const char *);
    215  1.44.8.1   nathanw int zbusmatch(struct device *, struct cfdata *, void *);
    216  1.44.8.1   nathanw caddr_t zbusmap(caddr_t, u_int);
    217  1.44.8.1   nathanw static char *aconflookup(int, int);
    218       1.1    chopps 
    219       1.1    chopps /*
    220       1.1    chopps  * given a manufacturer id and product id, find the name
    221       1.1    chopps  * that describes this board.
    222       1.1    chopps  */
    223       1.1    chopps static char *
    224  1.44.8.1   nathanw aconflookup(int mid, int pid)
    225       1.1    chopps {
    226       1.1    chopps 	struct aconfdata *adp, *eadp;
    227       1.1    chopps 
    228       1.1    chopps 	eadp = &aconftab[naconfent];
    229       1.1    chopps 	for (adp = aconftab; adp < eadp; adp++)
    230       1.1    chopps 		if (adp->manid == mid && adp->prodid == pid)
    231       1.1    chopps 			return(adp->name);
    232       1.1    chopps 	return("board");
    233       1.1    chopps }
    234       1.1    chopps 
    235  1.44.8.1   nathanw /*
    236  1.44.8.1   nathanw  * mainbus driver
    237       1.1    chopps  */
    238      1.16   thorpej 
    239      1.16   thorpej struct cfattach zbus_ca = {
    240      1.16   thorpej 	sizeof(struct device), zbusmatch, zbusattach
    241       1.1    chopps };
    242       1.1    chopps 
    243       1.1    chopps static struct cfdata *early_cfdata;
    244       1.1    chopps 
    245       1.1    chopps /*ARGSUSED*/
    246       1.1    chopps int
    247  1.44.8.1   nathanw zbusmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
    248       1.1    chopps {
    249      1.16   thorpej 
    250       1.1    chopps 	if (matchname(auxp, "zbus") == 0)
    251       1.1    chopps 		return(0);
    252       1.1    chopps 	if (amiga_realconfig == 0)
    253       1.1    chopps 		early_cfdata = cfp;
    254       1.1    chopps 	return(1);
    255       1.1    chopps }
    256       1.1    chopps 
    257       1.1    chopps /*
    258       1.1    chopps  * called to attach bus, we probe, i.e., scan configdev structs passed
    259       1.1    chopps  * in, for each found name call config_found() which will do this again
    260       1.1    chopps  * with that driver if matched else print a diag.
    261       1.1    chopps  */
    262       1.1    chopps void
    263  1.44.8.1   nathanw zbusattach(struct device *pdp, struct device *dp, void *auxp)
    264       1.1    chopps {
    265       1.1    chopps 	struct zbus_args za;
    266       1.1    chopps 	struct preconfdata *pcp, *epcp;
    267       1.1    chopps 	struct cfdev *cdp, *ecdp;
    268       1.1    chopps 
    269       1.1    chopps 	epcp = &preconftab[npreconfent];
    270       1.1    chopps 	ecdp = &cfdev[ncfdev];
    271       1.1    chopps 	if (amiga_realconfig) {
    272       1.1    chopps 		if (ZTWOMEMADDR)
    273      1.26  christos 			printf(": mem 0x%08lx-0x%08lx",
    274       1.1    chopps 			    ZTWOMEMADDR, ZTWOMEMADDR + NBPG * NZTWOMEMPG - 1);
    275       1.1    chopps 		if (ZBUSAVAIL)
    276      1.26  christos 			printf (": i/o size 0x%08x", ZBUSAVAIL);
    277      1.26  christos 		printf("\n");
    278       1.1    chopps 	}
    279       1.1    chopps 	for (cdp = cfdev; cdp < ecdp; cdp++) {
    280       1.1    chopps 		for (pcp = preconftab; pcp < epcp; pcp++) {
    281  1.44.8.1   nathanw 			if (pcp->manid == cdp->rom.manid &&
    282       1.1    chopps 			    pcp->prodid == cdp->rom.prodid)
    283       1.1    chopps 				break;
    284       1.1    chopps 		}
    285       1.1    chopps 		if (amiga_realconfig == 0 && pcp >= epcp)
    286       1.1    chopps 			continue;
    287       1.1    chopps 
    288       1.1    chopps 		/*
    289       1.1    chopps 		 * check if it's a Zorro II or III board and not linked into
    290       1.1    chopps 		 * MemList (i.e. not a memory board)
    291       1.1    chopps 		 */
    292       1.1    chopps 		if ((cdp->rom.type & 0xe0) != 0xc0 &&
    293       1.1    chopps 		    (cdp->rom.type & 0xe0) != 0x80)
    294       1.1    chopps 			continue;	/* er_Type != Zorro I/O */
    295       1.1    chopps 
    296       1.1    chopps 		za.pa = cdp->addr;
    297       1.1    chopps 		za.size = cdp->size;
    298       1.1    chopps 		if (amiga_realconfig && pcp < epcp && pcp->vaddr)
    299       1.1    chopps 			za.va = pcp->vaddr;
    300       1.1    chopps 		else {
    301  1.44.8.1   nathanw 			za.va = (void *) (isztwopa(za.pa) ? ztwomap(za.pa)
    302      1.18        is 			    : zbusmap(za.pa, za.size));
    303      1.18        is /*                     		??????? */
    304       1.1    chopps 			/*
    305  1.44.8.1   nathanw 			 * save value if early console init
    306       1.1    chopps 			 */
    307       1.1    chopps 			if (amiga_realconfig == 0)
    308       1.1    chopps 				pcp->vaddr = za.va;
    309       1.1    chopps 		}
    310       1.1    chopps 		za.manid = cdp->rom.manid;
    311       1.1    chopps 		za.prodid = cdp->rom.prodid;
    312       1.1    chopps 		za.serno = cdp->rom.serno;
    313       1.1    chopps 		za.slot = (((u_long)za.pa >> 16) & 0xF) - 0x9;
    314       1.1    chopps 		amiga_config_found(early_cfdata, dp, &za, zbusprint);
    315       1.1    chopps 	}
    316       1.1    chopps }
    317       1.1    chopps 
    318       1.1    chopps /*
    319       1.1    chopps  * print configuration info.
    320       1.1    chopps  */
    321       1.1    chopps int
    322  1.44.8.1   nathanw zbusprint(void *auxp, const char *pnp)
    323       1.1    chopps {
    324       1.1    chopps 	struct zbus_args *zap;
    325       1.1    chopps 	int rv;
    326       1.1    chopps 
    327       1.1    chopps 	rv = UNCONF;
    328       1.1    chopps 	zap = auxp;
    329       1.1    chopps 
    330       1.1    chopps 	if (pnp) {
    331      1.26  christos 		printf("%s at %s:", aconflookup(zap->manid, zap->prodid),
    332       1.1    chopps 		    pnp);
    333       1.1    chopps 		if (zap->manid == -1)
    334       1.1    chopps 			rv = UNSUPP;
    335       1.1    chopps 	}
    336      1.40        is 	printf(" pa %8p man/pro %d/%d", zap->pa, zap->manid, zap->prodid);
    337       1.1    chopps 	return(rv);
    338       1.1    chopps }
    339       1.1    chopps 
    340       1.1    chopps /*
    341      1.17        is  * this function is used to map Zorro physical I/O addresses into kernel
    342      1.17        is  * virtual addresses. We don't keep track which address we map where, we don't
    343      1.17        is  * NEED to know this. We made sure in amiga_init.c (by scanning all available
    344      1.17        is  * Zorro devices) to have enough kva-space available, so there is no extra
    345      1.17        is  * range check done here.
    346       1.1    chopps  */
    347       1.1    chopps caddr_t
    348  1.44.8.1   nathanw zbusmap(caddr_t pa, u_int size)
    349       1.1    chopps {
    350      1.41        is 	static vaddr_t nextkva = 0;
    351      1.41        is 	vaddr_t kva;
    352       1.1    chopps 
    353       1.1    chopps 	if (nextkva == 0)
    354       1.1    chopps 		nextkva = ZBUSADDR;
    355       1.1    chopps 
    356       1.1    chopps 	if (nextkva > ZBUSADDR + ZBUSAVAIL)
    357       1.1    chopps 		return 0;
    358       1.1    chopps 
    359       1.1    chopps 	/* size better be an integral multiple of the page size... */
    360       1.1    chopps 	kva = nextkva;
    361       1.1    chopps 	nextkva += size;
    362       1.1    chopps 	if (nextkva > ZBUSADDR + ZBUSAVAIL)
    363       1.1    chopps 		panic("allocating too much Zorro I/O address space");
    364      1.44        is #if defined(__powerpc__)
    365      1.44        is /*
    366      1.44        is  * XXX we use direct constant mapping, so no need for:
    367      1.44        is  * physaccess((caddr_t)kva, (caddr_t)pa, size, PTE_RW|PTE_I);
    368      1.44        is  */
    369      1.44        is #elif defined(__m68k__)
    370       1.1    chopps 	physaccess((caddr_t)kva, (caddr_t)pa, size, PG_RW|PG_CI);
    371      1.44        is #else
    372      1.44        is ERROR no support for this target cpu yet.
    373      1.44        is #endif
    374       1.1    chopps 	return((caddr_t)kva);
    375       1.1    chopps }
    376