From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 11 12:01:09 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 7DC4316A41F for ; Thu, 11 Aug 2005 12:01:09 +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 0438343D45 for ; Thu, 11 Aug 2005 12:01:06 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 25495 invoked from network); 11 Aug 2005 14:01:03 +0200 Received: from p508fff88.dip.t-dialin.net (HELO localhost.skatecity) (80.143.255.136) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 11 Aug 2005 14:01:03 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j7BC18FO020690 for ; Thu, 11 Aug 2005 14:01:08 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j7BC18rL020689 for freebsd-hackers@freebsd.org; Thu, 11 Aug 2005 14:01:08 +0200 (CEST) (envelope-from arundel) From: alexander Date: Thu, 11 Aug 2005 14:01:08 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050811120108.GA20415@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20050809133109.GA15300@skatecity> <20050809192530.GA19230@skatecity> <20050810130928.GA2027@skatecity> <200508102019.15147.Danovitsch@Vitsch.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508102019.15147.Danovitsch@Vitsch.net> Subject: Re: 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: Thu, 11 Aug 2005 12:01:09 -0000 On Wed Aug 10 05, Daan Vreeken [PA4DAN] wrote: > > I can confirm that. I have tested the program on 5.4-RELEASE here. Testing > your program (I called it "p") 10 times gives the following output : > > root@Racebeest# for a in 0 1 2 3 4 5 6 7 8 9;do echo "starting p"; ./p ;done > starting p > starting p > starting p > Bus error (core dumped) > starting p > Bus error (core dumped) > starting p > starting p > starting p > Bus error (core dumped) > starting p > Bus error (core dumped) > starting p > starting p > root@Racebeest# > > However, opening /dev/io to gain IO privileges instead of using sysarch always > works. I tested that with the following program : > > #include > > static inline void outb (unsigned short int port, unsigned char val) { > __asm__ volatile ("outb %0,%1\n"::"a" (val), "d" (port) ); > } > > int main (void) { > > if (open("/dev/io", O_RDONLY) == -1) { > printf("EEK!\n"); > exit(1); > } > > outb(0x378, 0xff); > } > > --- EOF --- > > grtz, > Daan Hmm...very odd. Should I file a bug report about this problem?