public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdlab.org>
To: Bart Vandewoestyne <Bart.Vandewoestyne@pandora.be>
Cc: linux-kernel@vger.kernel.org
Subject: Re: DOS2linux
Date: Mon, 27 Aug 2001 12:59:42 -0700	[thread overview]
Message-ID: <3B8AA6AE.975DD35F@osdlab.org> (raw)
In-Reply-To: <3B8AA1EC.9ECD94BD@pandora.be>

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; inregs.h.al=0x1; inregs.h.cl=DiSC_Id.slot>>12;
> inregs.h.ch=0;
>   sregs.ds=FP_SEG(s); inregs.x.si=FP_OFF(s);
>   int86x(0x15, &inregs, &outregs, &sregs);
>   valid=outregs.h.ah;
>   if(!valid) { DiSC_Id.it=buff[itconf]; DiSC_Id.dma=buff[dmachd]; }
>   return(valid);
> }
> 
> (full DOS-code is at http://mc303.ulyssis.org/heim/downloads/DISCDRV.C
> )
> 
> Doing some research learned me that this piece of code does the
> following things (according to http://www.ctyme.com/intr/rb-1641.htm
> ):
> 
> 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 DiSC_Id.it (it level) and DiSC_Id.dma (dma level)
> 
> So here's my question:
> 
> On http://www.ctyme.com/intr/rb-1641.htm 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."

and

"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) http://www.xml.com/ldd/chapter/book/ch15.html
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 DiSC_Id.it 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?

~Randy

  reply	other threads:[~2001-08-27 20:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-27 19:39 DOS2linux Bart Vandewoestyne
2001-08-27 19:59 ` Randy.Dunlap [this message]
2001-08-27 20:06 ` DOS2linux Alan Cox
2001-08-27 20:19   ` DOS2linux Bart Vandewoestyne
2001-08-27 20:28     ` DOS2linux Alan Cox
2001-08-27 23:39     ` DOS2linux Camiel Vanderhoeven
2001-08-28  6:54       ` DOS2linux Bart Vandewoestyne
2001-08-28 14:45         ` DOS2linux Camiel Vanderhoeven
2001-08-28 15:03           ` DOS2linux Bart Vandewoestyne
2001-08-28 15:30             ` DOS2linux Brian Gerst
2001-08-27 22:23   ` DOS2linux Dr. Kelsey Hudson
  -- strict thread matches above, loose matches on Subject: below --
2001-08-28 15:10 DOS2linux Camiel Vanderhoeven
2001-08-28 15:27 ` DOS2linux Camiel Vanderhoeven
2001-09-04  9:02 Dos2Linux Bart Vandewoestyne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B8AA6AE.975DD35F@osdlab.org \
    --to=rddunlap@osdlab.org \
    --cc=Bart.Vandewoestyne@pandora.be \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox