SCO OpenServer
flushtlb(D3oddi)
flushtlb --
flush the translation lookaside buffer
Synopsis
void flushtlb();
Description
flushtbl( )
is used to flush the Translation Lookahead Buffer (TLA)
for older hardware.
Arguments
None.
Return values
None.
Usage
The
flushtlb( )
function is supplied for users of very early
versions of 16 and 25 MHz 386 systems
using Micro Channel cards,
where, when accessing an I/O port above 0x1000,
a driver must flush the translate lookaside buffer
(TLB).
A call to
flushtlb( )
prevents corruption of the I/O address.
Note that the call to
flushtlb( )
must be protected
by a call to
spl7(D3oddi)
to prevent interrupts from occurring while flushtlb is
operating.
Context and synchronization
context
Hardware applicability
Very early versions of 16 and 25 MHz 386 systems
using Micro Channel cards.
Version applicability
Blockable
oddi:
1
Differences between versions
This function is not required for any current hardware.
Current drivers can just delete calls to this function.
SVR5 DDI compatibility
This function is not supported for DDI drivers.
It is not required for current hardware
and so can just be deleted when porting drivers to DDI.
References
inb(D3oddi),
spl(D3oddi),
spl7(D3oddi)
Examples
The following example is for a driver routine that gets a byte from
an I/O port and checks the address before beginning
processing. A driver should also have a similar routine for writing
data to an I/O port.
int
getbyte(port)
{
int x, ret;
/*
* If port address is less than hex 1000,
* get byte and return.
*/
if (port < 0x1000)
return(inb(port));
/* else, */
x = spl7(); /* block all interrupts */
flushtlb(); /* flush TLB */
ret = inb(port); /* get byte from port */
splx(x); /* reset previous spl */
return(ret); /* return byte to caller */
}
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005