if (ca->ca_naddrs >= sizeof(ca->ca_addrs)/sizeof(ca->ca_addrs[0])) { printf("sti: address list overflow\n"); return (0); }  ca->ca_addrs[ca->ca_naddrs].addr = rom; ca->ca_addrs[ca->ca_naddrs].size = round_page(romend); ca->ca_naddrs++;
sti_sgc_probe(parent, match, aux)	struct device *parent;	void *match, *aux;{	struct cfdata *cf = match;	struct confargs *ca = aux;	bus_space_handle_t romh;	paddr_t rom;	u_int32_t id;	u_char devtype;	int rv = 0, romunmapped = 0;	if (ca->ca_type.iodc_type != HPPA_TYPE_FIO)		return (0);	/* these can only be graphics anyway */	if (ca->ca_type.iodc_sv_model == HPPA_FIO_GSGC)		return (1);	/* these need futher checking for the graphics id */	if (ca->ca_type.iodc_sv_model != HPPA_FIO_SGC)		return 0;	rom = sti_sgc_getrom(cf->cf_unit, ca);#ifdef STIDEBUG	printf ("sti: hpa=%x, rom=%x\n", ca->ca_hpa, rom);#endif	/* if it does not map, probably part of the lasi space */	if ((rv = bus_space_map(ca->ca_iot, rom, STI_ROMSIZE, 0, &romh))) {#ifdef STIDEBUG		printf ("sti: cannot map rom space (%d)\n", rv);#endif		if ((rom & HPPA_IOBEGIN) == HPPA_IOBEGIN) {			romh = rom;			romunmapped++;		} else {			/* in this case nobody has no freaking idea */			return 0;		}	}#ifdef STIDEBUG	printf("sti: romh=%x\n", romh);#endif	devtype = bus_space_read_1(ca->ca_iot, romh, 3);#ifdef STIDEBUG	printf("sti: devtype=%d\n", devtype);#endif	rv = 1;	switch (devtype) {	case STI_DEVTYPE4:		id = bus_space_read_4(ca->ca_iot, romh, 0x8);		break;	case STI_DEVTYPE1:		id = (bus_space_read_1(ca->ca_iot, romh, 0x10 +  3) << 24) |		     (bus_space_read_1(ca->ca_iot, romh, 0x10 +  7) << 16) |		     (bus_space_read_1(ca->ca_iot, romh, 0x10 + 11) <<  8) |		     (bus_space_read_1(ca->ca_iot, romh, 0x10 + 15));		break;	default:#ifdef STIDEBUG		printf("sti: unknown type (%x)\n", devtype);#endif		rv = 0;	}	if (rv &&	    ca->ca_type.iodc_sv_model == HPPA_FIO_SGC && id == STI_ID_FDDI) {#ifdef STIDEBUG		printf("sti: not a graphics device\n");#endif		rv = 0;	}	if (!romunmapped)		bus_space_unmap(ca->ca_iot, romh, STI_ROMSIZE);	return (rv);}