From owner-freebsd-multimedia@FreeBSD.ORG Sat May 19 16:38:45 2007 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3F1816A548 for ; Sat, 19 May 2007 16:38:45 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 5063613C4DA for ; Sat, 19 May 2007 16:38:45 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (rsenf1f9d0zi9rfk@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l4JGcimt002288; Sat, 19 May 2007 09:38:44 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l4JGchxb002286; Sat, 19 May 2007 09:38:43 -0700 (PDT) (envelope-from jmg) Date: Sat, 19 May 2007 09:38:43 -0700 From: John-Mark Gurney To: rmgls@wanadoo.fr Message-ID: <20070519163843.GE4602@funkthat.com> Mail-Followup-To: rmgls@wanadoo.fr, freebsd-multimedia@freebsd.org References: <20070519150125.5BEF4700008B@mwinf2313.orange.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070519150125.5BEF4700008B@mwinf2313.orange.fr> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-multimedia@freebsd.org Subject: Re: direct I/O access X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2007 16:38:45 -0000 rmgls@wanadoo.fr wrote this message on Sat, May 19, 2007 at 17:01 +0200: > i am trying to port my old assembler soft for Dos to FreeBSD. > i need to write and read directly to the midi and scsi device. > when i try something like this i receive a coredump on the outb line. > > SORRY, i am NOT nor a C nor a FreeBSD expert!!! > all i know is Assembly language! > > Can you enlight me please? Take a look at io(4)... FreeBSD restricts access to the hardware to ensure that the userland does not mess up the state that the kernel has established... In the Unix world, it is standard to write a kernel device driver that does the hardware access side of things, and then provide a device for the program use the hardware... This ensures that the hardware can be shared and conflicts do not arrise... Just make sure you don't load devices for the hardware that you plan to direectly access if you continue down that route... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."