Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Dec 1998 21:11:25 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, mike@smith.net.au
Cc:        andyf@speednet.com.au, freebsd-current@FreeBSD.ORG, geoffb@demon.net, johan@granlund.nu, ortmann@sparc.isl.net
Subject:   Re: sio breakage
Message-ID:  <199812021011.VAA30107@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>However:
>
>dingo:/tmp>man 4 io
...
>     internal code). Any process that holds a file descriptor on /dev/io open
>     will get its IOPL bits in the flag register set, thus allowing it to per-
>     form direct I/O operations.  This can be useful in order to write user-

>There is no reference to manipulating interrupt state here.

Well, this is not the place to document all features of IOPL.  IOPL is
documented in Intel manuals.  From the 486 manual: "The CLI instruction
clears the IF flag if the current privilege level is at least as
privileged as IOPL.  [Otherwise it generates a general protection
exception]".

>I'm still somewhat at a loss as to how it's meant to be possible for the
>page fault you posit to be handled in the case where PSL_I is cleared in
>all cases (eg. disk drivers with no interrupt timeout handlers).

It's not meant to be possible, but it sometimes sort of works.   idle()
and cpu_switch() and perhaps other places enable interrupts unconditionally.
This defeats the point of the "cli" but allows i/o to be done for the
page fault.  Anyway, most page faults can be handled without doing i/o.

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812021011.VAA30107>