Date: Mon, 27 Dec 2004 09:56:16 +0200 From: Tom Alsberg <alsbergt@cs.huji.ac.il> To: FreeBSD Hackers List <freebsd-hackers@freebsd.org> Subject: i386_set_ioperm on FreeBSD 5.3 Message-ID: <20041227075616.GA9502@cs.huji.ac.il>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041227075616.GA9502>