Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Apr 1994 01:31:34 +0200 (MET DST)
From:      jan@todonix.ping.de (Jan Wedekind)
To:        bugs@FreeBSD.org
Subject:   Cyclades driver bug report
Message-ID:  <m0ppmUx-000GnLC@todonix.ping.de>

next in thread | raw e-mail | index | archive | help
Hello,

we bought and installed 2 Cyclades Cyclom 8Yo cards,
using FreeBSD-2.0 SNAP 950322.

we found the following problems:

a) the driver only works for one installed card because
   of global variables for the IO-Memory and the internal structure
   (is there anybody else working on a further version ?)

b) the driver itself (or some other parts of the kernel)
   are buggy because of the following reason:

configuration: (with options for KTRACE, DDB and DIAGNOSTIC)

device	cy0 at isa? tty iomem 0xd4000 iosiz 0x2000 vector cyintr
(so the cyclom_base has been set to 0xf00d4000)

the kernel found the card, but when trying to use it, to configure
a modem with kermit, we got a kernel trap, reason 'page not found':

virtaddr	0x4
reason / type	supervisor read, page not present
at:		0x8:f01a8dd9
		base 0, limit 0xffff, type 0x1b
		DPL 0, ...

type 12 trap at
_cytimeout+0x2d
	movl	0x4(%ecx), (%esi)

some of the 'show reg' output:

cs		mmclose+0x4
ds		isadmarangecheck+0x50
cax		cy_tty+0x78

we testet in two computer's, a PCI 486DX4-100 with an ASUS SP3G board,
and a 486DX2-66 with VL-Bus architecture. Both showed the same
results.

Any suggestions ?

Thanks,

Jan

PS: the error occurs at the following code (see /sys/i386/isa/cy.c)

/* upper level character processing routine */
void
cytimeout(void *ptr)
{
	int	unit;

	timeout_scheduled = 0;

#ifdef CyDebug
	cy_timeouts++;
#endif

	/* check each port in turn */
	for (unit = 0; unit < NCY*PORTS_PER_CYCLOM; unit++) {
		struct	cy *ip = info[unit];
#ifndef TxBuffer
		struct	tty *tp = ip->tty;
#endif

**** 
i guess here the trap occurs (see assembler input below) 
this would would mean, that the info struct hasn't been initialized! 
***
		/* ignore anything that is not open */
		if (!ip->tty)
			continue;

		/*
		 * any received chars to handle? (doesn't matter if intr routine
		 * kicks in while we're testing this)
		 */
		if (ip->rx_buf->free != CY_RX_BUF_SIZE)
			service_upper_rx(unit);
	[continued]

the assembler input:

.globl _cytimeout
	.type	 _cytimeout,@function
_cytimeout:
	pushl %ebp
	movl %esp,%ebp
	subl $24,%esp
	pushl %edi
	pushl %esi
	pushl %ebx
	movb $0,_timeout_scheduled
	incl _cy_timeouts
	movl $0,-8(%ebp)
	.align 2,0x90
L157:
	movl -8(%ebp),%ecx
	movl _info(,%ecx,4),%ecx
	movl %ecx,-12(%ebp)
-->	movl 4(%ecx),%esi	<-- here the page not present trap occurs
	testl %esi,%esi
	je L156
	movl 48(%ecx),%eax
	cmpl $256,4(%eax)
	je L159
	movl %esi,-16(%ebp)
	movl %eax,-20(%ebp)
#APP
	cli
#NO_APP
	movl 8(%eax),%eax
	movl %eax,48(%ecx)
#APP
	sti
#NO_APP

-- 
PING e.V.		Jan Wedekind (Kassenwart)	jan@ping.de
Emil-Figge-Str. 85	Lindemannstr. 12		kasse@ping.de
44227 Dortmund		44137 Dortmund			vorstand@ping.de
Tel.: noch nicht bek.	Tel.: +49 (231) 13 44 04	info@ping.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0ppmUx-000GnLC>