From owner-freebsd-questions Tue Mar 24 19:37:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA23447 for freebsd-questions-outgoing; Tue, 24 Mar 1998 19:37:44 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from sumatra.americantv.com (sumatra.americantv.com [207.170.17.37]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA23401 for ; Tue, 24 Mar 1998 19:37:12 -0800 (PST) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id VAA27180; Tue, 24 Mar 1998 21:37:05 -0600 (CST) Received: (from jlemon@localhost) by right.PCS (8.6.13/8.6.4) id VAA14722; Tue, 24 Mar 1998 21:36:34 -0600 Message-ID: <19980324213633.43955@right.PCS> Date: Tue, 24 Mar 1998 21:36:34 -0600 From: Jonathan Lemon To: Michael Searle Cc: freebsd-questions@FreeBSD.ORG Subject: Re: use of /dev/io References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61.1 In-Reply-To: ; from Michael Searle on Mar 03, 1998 at 11:22:20PM +0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mar 03, 1998 at 11:22:20PM +0000, Michael Searle wrote: > I'm having problems doing direct IO with /dev/io - AFAIK, you just open this > device to change the memory permissions to allow access to IO addresses. > But I just get a segv, although the open succeeds. (I think the IO addresses > may have been remapped, as this port address is from DOS and man mem says > this has been done for the ISA space.) This is my code: The IO address space is separate from the memory address space, and is accessed with the inb/outb instructions. In your code, you are attempting to read memory location 0x3da; you should use something like inb(x03da). (where inb is the appropriate asm insn.) -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message