Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!spool.mu.edu!mips!darwin.sura.net!Sirius.dfn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!etec.uni-karlsruhe.de!walter
From: walter@etec.uni-karlsruhe.de (Reiner Walter)
Newsgroups: comp.unix.bsd
Subject: How to port some functions to BSDI386
Keywords: driver
Message-ID: <1992Jul11.122433.9274@rz.uni-karlsruhe.de>
Date: 11 Jul 92 12:24:33 GMT
Article-I.D.: rz.1992Jul11.122433.9274
Sender: usenet@rz.uni-karlsruhe.de (USENET News System)
Organization: Institut fuer Nachrichtensysteme, Uni Karlsruhe
Lines: 57
I have to port a device driver from INTERACTIVE to BSDI386.
There are some functions where I don't know how to port them.
1) the driver from INTERACTIVE uses the kernel functions
inb(addr),outb(addr,data) - read/write 8 bit data from/to device
inw(addr),outw(addr,data) - read/write 16 bit data from/to device
BSDI386 knows only inb and outb but not inw,outw or in,out
But it must be possible to read/write 16 bit data from/to a device.
Which function can I use to port inw and outw.
2) In the driver's read routine there is:
driverread(dev,uio,flag)
dev_t dev;
struct uio *uio;
int flag;
{
...
...
timeout(func,arg,time); /* calls function func after time clock impulses
with the argument arg */
if(...)
{
untimeout(func,arg); /* cancels the timeout() function */
longjmp(u.u_qsav,1); /* How can I port this function */
}
...
...
}
u_qsav is a member from the user structure 'u.'
BSDI uses the 'uio' structure. But I could not find a equivalent in the uio
structure for u.u_qsav.
So, how can I port longjmp(u.u_qsav,1).
3) The driver uses some macros to calculate the physical and virtual pages
like svtop,kvtophys,svtopde,ptosv ... which are defined in
/usr/include/sys/immu.h from INTERACTIVE.
The driver uses also a command 'vtop' .( it probably calculates virtual
to physical pages)
I could not find a macro vtop, so I think it must be a kernel function from
INTERACTIVE.
Can anybody describe this function and how can I port this function.
The function is unknown for BSDI386.
So that's all.
I havn't yet a mail access. Please followup your answers in this group.
Thank You.