Date: Mon, 27 Dec 2004 09:24:28 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: alsbergt@cs.huji.ac.il Cc: freebsd-hackers@freebsd.org Subject: Re: i386_set_ioperm on FreeBSD 5.3 Message-ID: <20041227.092428.38703876.imp@bsdimp.com> In-Reply-To: <20041227075616.GA9502@cs.huji.ac.il> References: <20041227075616.GA9502@cs.huji.ac.il>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20041227075616.GA9502@cs.huji.ac.il> Tom Alsberg <alsbergt@cs.huji.ac.il> writes: : 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, We had problems with multiple people opening /dev/io and threads in 4.x. It was a timing related thing. Maybe you're seeing a different timing thing in your program? Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041227.092428.38703876.imp>