From owner-freebsd-hackers Tue Feb 24 14:06:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA20350 for freebsd-hackers-outgoing; Tue, 24 Feb 1998 14:06:13 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from Gateway1 (gateway1.dextracode.com [200.34.122.34]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id OAA20257 for ; Tue, 24 Feb 1998 14:06:02 -0800 (PST) (envelope-from jcvp@dextracode.com) Received: from dextracode.com by Gateway1 (SMI-8.6/SMI-SVR4) id QAA17678; Tue, 24 Feb 1998 16:03:59 -0600 Message-ID: <34F344C2.6A0EDF21@dextracode.com> Date: Tue, 24 Feb 1998 16:08:02 -0600 From: "J. C. Vazquez" Organization: Dextra Code X-Mailer: Mozilla 4.04 [en] (Win95; I) MIME-Version: 1.0 To: hackers@FreeBSD.ORG Subject: Re: A "bus error" while doing outb()/inb() References: <34EDFC45.E2DC6C33@dextracode.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG J. C. Vazquez wrote: > Hi there! > > I'm getting a "buss error" (signal SIGBUS) doing I/O with inb() and > outb() to any > port. This is running under FreeBSD 3.0-CURRENT, logged on as root. > Before this, I > do open("/dev/io",RW) and check any return error. gdb says that the > signal was > received in outbv()/inbv(). The following is an example: > > ¦#include > ... > outb(0x70, 0x0); > x1=inb(0x71); > outb(0x70, 0x02); /* <-------- a "buss error" here, core nicely > dumped */ > ... > > Does anybody have an idea what's going on? Any help/comments will be > highly > appreciated. Thank you all. > > -jcvp- > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message Got it! I was closing the file descriptor used to open("/dev/io", RW). Removed that close, everything works fine now. :) -- +--------------------------------------+ + http://www.dextracode.com/-jcvp/ + jcvp@dextracode.com + jcvp@altavista.net +--------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message