[lkml]   [2001]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: DOS2linux
Bart Vandewoestyne wrote:
> I have a routine from a DOS driver that looks like this:
> static int getslotinfo( void )
> {
> static char buff[320], *s=&buff[0]; int valid;
> inregs.h.ah=0xd8;;>>12;
> sregs.ds=FP_SEG(s);;
> int86x(0x15, &inregs, &outregs, &sregs);
> valid=outregs.h.ah;
> if(!valid) {[itconf]; DiSC_Id.dma=buff[dmachd]; }
> return(valid);
> }
> (full DOS-code is at
> )
> Doing some research learned me that this piece of code does the
> following things (according to
> ):
> 1) set AX register to 0xd800
^^^^^^ actually to 0xd801

> 2) set slot number to DiSC_Id.slot, (eg. 1 in my case -> base is
> 0x1000)
> 3) set function number to read
> 4) assign a 320-byte buffer for standard configuration data block
> 5) execute a software interrupt via the DOS specific int86x function,
> this puts configuration data into the 320-byte buffer.
> 6) check if we get a valid return
> 7) if we have a valid situation, assign values from the configuration
> block to (it level) and DiSC_Id.dma (dma level)
> So here's my question:
> On I can see that this is all
> about reading data from an EISA SYSTEM ROM. I can't imagine there
> doesn't exist some linux-API that allows me to do just the same.

I don't have any direct EISA experience on Linux, but the
Linux Device Drivers book (remember that one?) says:

"EISA devices are configured by software, but they don't need any
particular operating system
support. EISA drivers already exist in the Linux kernel for Ethernet
devices and SCSI controllers."


"As far as the driver is concerned, there is no special support for
EISA in the kernel, and the
programmer must deal with ISA extensions by himself. The driver uses
standard EISA I/O
operations to access the EISA registers. The drivers that are already
in the kernel can be used as
sample code."

See (and read)
and some drivers that already do this.

> What function calls and header files should I use in order to read
> this 'EISA SYSTEM ROM' and assign the correct values to and
> DiSC_Id.dma ?
> If there doesn't exist an API for this, what memory ranges should i
> probe in order to get these values?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:17    [W:0.091 / U:77.500 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site