From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 19:19:43 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7439616A41F for ; Mon, 8 Aug 2005 19:19:43 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id A53B243D45 for ; Mon, 8 Aug 2005 19:19:42 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 28232 invoked from network); 8 Aug 2005 21:19:39 +0200 Received: from p508fedfe.dip.t-dialin.net (HELO localhost.skatecity) (80.143.237.254) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 8 Aug 2005 21:19:39 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j78JJAqS091702 for ; Mon, 8 Aug 2005 21:19:10 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j78JJAA5091701 for freebsd-hackers@freebsd.org; Mon, 8 Aug 2005 21:19:10 +0200 (CEST) (envelope-from arundel) From: alexander Date: Mon, 8 Aug 2005 21:19:10 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050808191910.GA91484@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: Using sysarch specific syscalls in assembly? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2005 19:19:43 -0000 Hi there. I wrote a program that needs to access I/O ports with the in/out machinecodes. To gain priviliges to do so I have opened /dev/io. Now somebody told me that I'd rather use i386_set_ioperm which will be much saver, because of the port range limitation. Plus it will make the program more portable because Linux does not have a /dev/io device node. i386_set_ioperm(2) states that this procedure is a system call. So it should be easily accessable through assembly language and it's specific syscall id. Unfortunately I wasn't able to find the syscall id in any of the syscalls.master files that are part of the source tree. states that this is a sysarch specific syscall for i386 (hence the i386_*). The following definitions are being made: #define I386_GET_IOPERM 3 #define I386_SET_IOPERM 4 These syscall numbers however are already taken by read(2) and write(2). So how can I make use of these i386 specific syscalls? Is it even possible? Thx in advance.