From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 27 07:56:41 2004 Return-Path: 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 4B53716A4CE for ; Mon, 27 Dec 2004 07:56:41 +0000 (GMT) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E822543D46 for ; Mon, 27 Dec 2004 07:56:40 +0000 (GMT) (envelope-from alsbergt@cs.huji.ac.il) Received: from ludo.cs.huji.ac.il ([132.65.80.122]) by cs1.cs.huji.ac.il with esmtp id 1Cipjl-0005Zn-21; Mon, 27 Dec 2004 09:56:17 +0200 Received: from alsbergt by ludo.cs.huji.ac.il with local (Exim 4.34 (FreeBSD)) id 1Cipjl-0002U0-0w; Mon, 27 Dec 2004 09:56:17 +0200 Date: Mon, 27 Dec 2004 09:56:16 +0200 From: Tom Alsberg To: FreeBSD Hackers List Message-ID: <20041227075616.GA9502@cs.huji.ac.il> Mail-Followup-To: Tom Alsberg , FreeBSD Hackers List Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Face: "5"j@Y1Peoz1; ftTv>\|['ox-csmV+:_RDNdi/2lSe2x?0:HVAeVW~ajwQ7RfDlcb^18eJ; t,O,s5-aNdU/DJ2E8h1s,..4}N9$27u`pWmH|; s!zlqqVwr9R^_ji=1\3}Z6gQBYyQ]{gd5-V8s^fYf{$V2*_&S>eA|SH@Y\hOVUjd[5eah{EO@gCr.ydSpJHJIU[QsH~bC?$C@O:SzF=CaUxp80-iknM(]q(W List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Dec 2004 07:56:41 -0000 Hi there. I'm trying to use some code I wrote quite a while ago using Doug White's FreeBSD IPMI code (kcs.c, send-kcs-command.c, etc.). It still works as it did back then on FreeBSD 4.10. On FreeBSD 5.3 it does not. Problem seems to be, that i386_set_ioperm isn't doing what it should. The program gets SIGBUS when doing outb, while it shouldn't. I looked in /usr/src/sys/i386/i386/sys_machdep.c, not many changes from 4.10 - all except one are additions that would return an error in case of failure. One seems to be quite modest (struct change): - if (p->p_addr->u_pcb.pcb_ext == 0) - if ((error = i386_extend_pcb(p)) != 0) + if (td->td_pcb->pcb_ext == 0) + if ((error = i386_extend_pcb(td)) != 0) Yet, clearly something fails on FreeBSD 5.3. I can confirm that this is indeed the problem with a few-line program that will i386_set_ioperm and then try to do outb. Any idea if i386_set_ioperm broke somehow in 5.3? Haven't checked much, but it seems that the data it is changing is not being used after all. Thanks, any help appreciated, -- Tom -- Tom Alsberg - hacker (being the best description fitting this space) Web page: http://www.cs.huji.ac.il/~alsbergt/ DISCLAIMER: The above message does not even necessarily represent what my fingers have typed on the keyboard, save anything further.