From owner-freebsd-questions Wed May 31 11:37:58 2000 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id D460E37BECB for ; Wed, 31 May 2000 11:37:54 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.12 #1) id 12xDFE-0002p5-00; Wed, 31 May 2000 19:29:32 +0100 Received: (from ben) by strontium.scientia.demon.co.uk (Exim 3.12 #7) id 12xDFE-000L9J-00; Wed, 31 May 2000 19:29:32 +0100 Date: Wed, 31 May 2000 19:29:31 +0100 From: Ben Smithurst To: Mac Cc: freebsd-questions@freebsd.org Subject: Re: Writing a value to an IO (mem mapped) port Message-ID: <20000531192931.Q99925@strontium.scientia.demon.co.uk> References: <200005311747.SAA19114@ngo.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200005311747.SAA19114@ngo.org.uk> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mac wrote: > However under FreeBSD, although the function seems to exist to do this > in /usr/include/machine/cpufunc.h, I get Bus Errors every time I try. > > fred.c looks like this:- > > #include > #include > > main() > { > outb(0x181,0) > } > > And compiles OKay. "man i386_set_ioperm" might help you. I'm guessing you'll want to call i386_set_ioperm(0x181, 1, 1); before the call to outb(), but as I've never used this function I can't be sure exactly. -- Ben Smithurst / ben@scientia.demon.co.uk / PGP: 0x99392F7D To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message