From owner-freebsd-hardware Thu Feb 18 14: 3:39 1999 Delivered-To: freebsd-hardware@freebsd.org Received: from home.dragondata.com (home.dragondata.com [204.137.237.2]) by hub.freebsd.org (Postfix) with ESMTP id 29EBB11618 for ; Thu, 18 Feb 1999 14:03:35 -0800 (PST) (envelope-from toasty@home.dragondata.com) Received: (from toasty@localhost) by home.dragondata.com (8.9.2/8.9.2) id QAA07420; Thu, 18 Feb 1999 16:03:14 -0600 (CST) From: Kevin Day Message-Id: <199902182203.QAA07420@home.dragondata.com> Subject: Re: Accessing I/O ports In-Reply-To: <01BE5B8E.8CA28F60@Dialup24.sknet.sk> from Pavol Beko at "Feb 18, 1999 10:31:44 pm" To: beko@max.sknet.sk (Pavol Beko) Date: Thu, 18 Feb 1999 16:03:14 -0600 (CST) Cc: freebsd-hardware@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Hi, > I'm new in programing under FreeBSD. I tried to write a simple program which will > shut down my hard drive, but program ended up with signal 10 (SIGBUS). > Shuting down the first IDE hard drive is accomplished by sending to I/O port 0x1f7 > value 0x99 trough outb() (from /machine/cpufunc.h) function. The same situation is > when I try to access CMOS trough 0x70 and 0x71 I/O ports. There was no problem > with this under 'other' OS. > What went wrong? Is there some part of kernel (some syscall) which is responsible > for handling these low level operation? > (machine is 486, EIDE HDs, FreeBSD 2.2.8) > Thanks > > Pavol > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hardware" in the body of the message > Try opening /dev/io first, then see if you have better luck. Kevin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message