i386_set_ioperm on FreeBSD 5.3
M. Warner Losh
imp at bsdimp.com
Mon Dec 27 08:27:57 PST 2004
In message: <20041227075616.GA9502 at cs.huji.ac.il>
Tom Alsberg <alsbergt at 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
More information about the freebsd-hackers
mailing list