Subject: kern/6565: PCI NCR driver cannot work i/o mapped
To: None <gnats-bugs@gnats.netbsd.org>
From: Jason R Thorpe <thorpej@nas.nasa.gov>
List: netbsd-bugs
Date: 12/11/1998 13:43:52
>Number:         6565
>Category:       kern
>Synopsis:       PCI NCR driver cannot work i/o mapped
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 11 13:50:01 1998
>Last-Modified:
>Originator:     Jason R Thorpe
>Organization:
Numerical Aerospace Simulation Facility - NASA Ames
>Release:        NetBSD 1.3I, Fri Dec 11 13:34:32 PST 1998
>Environment:
	
Any.

>Description:
	The PCI NCR driver's script directly modifies the chip's
	registers.  It does this by using the chip's DMA facility
	and a "register" relocation in the script's linker.

	The NCR chip cannot perform access to i/o space, and thus
	cannot modify the chip's registers properly.  This causes
	the driver to fail.  In addition, when it attempts to
	write to the registers, it is using i/o space addresses,
	and thus scribbing over random parts of memory.

	This is fragile in other ways.  It relies on the PCI devices
	being mapped in such a way that access to a non-translated
	PCI address by a PCI device will work.  This may not be guaranteed
	on all architectures.

>How-To-Repeat:
	Install an NCR controller in a system which only has i/o
	mapped space available on the PCI bus, or force the NCR
	driver to use i/o space by using the NCR_IOMAPPED option.
	Watch the driver fail miserably.

>Fix:
	None supplied.
>Audit-Trail:
>Unformatted: