From owner-freebsd-hackers Tue Nov 19 14:22:56 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA10983 for hackers-outgoing; Tue, 19 Nov 1996 14:22:56 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA10957 for ; Tue, 19 Nov 1996 14:22:39 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id XAA08158; Tue, 19 Nov 1996 23:21:31 +0100 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id XAA10497; Tue, 19 Nov 1996 23:21:30 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.2/8.6.9) id XAA10010; Tue, 19 Nov 1996 23:07:43 +0100 (MET) From: J Wunsch Message-Id: <199611192207.XAA10010@uriah.heep.sax.de> Subject: Re: Creating a device driv., Pb with outb, outw... To: freebsd-hackers@freebsd.org (FreeBSD hackers) Date: Tue, 19 Nov 1996 23:07:43 +0100 (MET) Cc: Emmanuel.Duros@sophia.inria.fr Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199611191827.TAA18620@chouette.inria.fr> from Emmanuel Duros at "Nov 19, 96 07:27:49 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Emmanuel Duros wrote: > #include > > void main(void){ > > outb( 0x300, 1 ); > } > > I always get a BUS ERROR. I also tried on the parallel port (0x378) > without success. > > Any comments on this, why does this happen ? Because user programs are normally not allowed to fiddle with the hardware directly; that's the kernel's domain. You can circumvent this restriction by keeping a descriptor on the /dev/io ``security hole'' open. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)