View Single Post
Old 18 February 2014, 18:30   #36
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,481
Aha.

In NetBSD 1.0, sys/arch/amiga/dev/zthreebus.c has this in the zthreeattach() function:
Code:
/*
 * check that its from zorro III space
 * (board type = Zorro III and not memory)
 */
if ((cdp->rom.type & 0xe0) != 0x80)
	continue;
za.va = (void *)(iszthreepa(za.pa) ?
    zthreemap(za.pa, za.size) : 0);
iszthreepa is defined in sys/arch/amiga/dev/zthreebusvar.h:
Code:
#define ZTHREEBASE	(0x40000000)
#define ZTHREETOP	((u_long)0x80000000)
...
#define iszthreepa(pa) ((u_int)(pa) >= ZTHREEBASE && (u_int)(pa) <= ZTHREETOP)
Comparing with the NetBSD 1.1 source, while iszthreepa is still defined it isn't used. Code corresponding to the NetBSD 1.0 zthreeattach() is now zbusattach() in zbus.c:
Code:
/*
 * check if it's a Zorro II or III board and not linked into
 * MemList (i.e. not a memory board)
 */
if ((cdp->rom.type & 0xe0) != 0xc0 &&
    (cdp->rom.type & 0xe0) != 0x80)
	continue;	/* er_Type != Zorro I/O */

za.pa = cdp->addr;
za.size = cdp->size;
if (amiga_realconfig && pcp < epcp && pcp->vaddr)
	za.va = pcp->vaddr;
else {
	za.va = (void *) (isztwopa(za.pa) ? ztwomap(za.pa) :
	    zbusmap(za.pa, za.size));
mark_k is offline  
 
Page generated in 0.04728 seconds with 9 queries