sys/sparc/dev/zs.c
/*
 * Set up for kgdb; called at boot time before configuration.
 * KGDB interrupts will be enabled later when zs0 is configured.
 */
Set up for kgdb; called at boot time before configuration.
KGDB interrupts will be enabled later when zs0 is configured.
Set up for kgdb ; called at boot time before configuration . KGDB interrupts will be enabled later when zs0 is configured .
void
zs_kgdb_init()
{
	volatile struct zsdevice *addr;
	volatile struct zschan *zc;
	int unit, zs;
	if (major(kgdb_dev) != ZSMAJOR)
		return;
	unit = minor(kgdb_dev);
	if ((unsigned)unit >= ZS_KBD) {
		printf("zs_kgdb_init: bad minor dev %d\n", unit);
		return;
	}
	zs = unit >> 1;
	if ((addr = zsaddr[zs]) == NULL)
		addr = zsaddr[zs] = findzs(zs);
	unit &= 1;
	zc = unit == 0 ? &addr->zs_chan[CHAN_A] : &addr->zs_chan[CHAN_B];
	zs_kgdb_savedspeed = zs_getspeed(zc);
	printf("zs_kgdb_init: attaching zs%d%c at %d baud\n",
	    zs, unit + 'a', kgdb_rate);
	zs_reset(zc, 1, kgdb_rate);
	kgdb_attach(zs_kgdb_getc, zs_kgdb_putc, (void *)zc);
}
void zs_kgdb_init ( ) { volatile struct zsdevice * addr ; volatile struct zschan * zc ; int unit , zs ; if ( major ( kgdb_dev ) != ZSMAJOR ) return ; unit = minor ( kgdb_dev ) ; if ( ( unsigned ) unit >= ZS_KBD ) { printf ( " \n " , unit ) ; return ; } zs = unit >> 1 ; if ( ( addr = zsaddr [ zs ] ) == NULL ) addr = zsaddr [ zs ] = findzs ( zs ) ; unit &= 1 ; zc = unit == 0 ? & addr -> zs_chan [ CHAN_A ] : & addr -> zs_chan [ CHAN_B ] ; zs_kgdb_savedspeed = zs_getspeed ( zc ) ; printf ( " \n " , zs , unit + ' ' , kgdb_rate ) ; zs_reset ( zc , 1 , kgdb_rate ) ; kgdb_attach ( zs_kgdb_getc , zs_kgdb_putc , ( void * ) zc ) ; }
Set up for kgdb; called at boot time before configuration.
Set up for kgdb ; called at boot time before configuration .
/*
	 * Unit must be 0 or 1 (zs0).
	 */