hardware near prot from DOS to LINUX

hardware near prot from DOS to LINUX

Post by Peter Bauma » Thu, 04 Jan 1996 04:00:00

Hi folks!

I have a problem porting some code from DOS to linux. The code is from a
library to control an imaging technology frame grabber on the PCI-bus. The
following code fragment is an example for stuff from the library. There is
a lot of this in there, but everything is similar to the fragment. The code is
supposed to detect if the PCI-bus is present and results in a segmentation
fault when issuing "int 1a". I found the kernel code pci.c, but I don't
understand it. Could some kind soul please give me a hint, or give me a pointer


Thanks a lot!

ciao, Peter

        unsigned short hwmech,il,lpn;
        int      ret_status = 1;
        unsigned int    pci_signature;

        unsigned char pci_fun_id = PCI_FUNCTION_ID;
        unsigned char pci_bios_pres = PCI_BIOS_PRESENT;

        __asm__ (
                 "mov %%ah, %4\n\t"
                 "mov %%al, %5\n\t"
                 "int $0x1a\n\t"
                 "jc bios_not_present\n\t"
                 "mov %0, %%edx\n\t"
                 "mov %1, %%ax\n\t"
                 "mov %2, %%bx\n\t"
                 "mov %3, %%cx\n\t"
                 : "=d" (pci_signature), "=a" (hwmech), "=b" (il),"=c" (lpn)
                 : "a" (pci_fun_id), "a" (pci_bios_pres)
                 : "ah", "al"

DDD   L    RRR   |  Peter Baumann
D  D  L    R  R  |  SM-SK-MEP, DLR, Bunsenstr. 10, D-37073 Goettingen, FRG
D  D  L    RRR   |  Tel. (0551) 709-2474/73 FAX: (0551) 709-2830


1. SCSI near-crash - is this hardware or software?

Hmm...I had something very much like this.  It turned out to be that my
mach64 video card and BT946c were conflicting, and there was really no
way to resolve the conflict.  (I now have a #9GXE64 Pro.)  

I'd be interested to know if you have an ATI card, and otherwise, you
might want a new firmware revision for the Buslogic.


Excerpts from netnews.comp.os.linux.misc: 31-Jul-95 SCSI near-crash - is

rec_len=14130, name_le
rec_len=14130, name_le

2. Internet service provider

3. SUMMARY: hardware near programming

4. Printer drivers for Linux? Which printer to buy?

5. HELP: Connectivity between DOS/DOS and DOS/Linux

6. Had trouble with SONY?

7. Need advice on new Linux/*BSD-compatible hardware (and Linux Hardware Database is gone)

8. http://pobox.com/~jjjsmith

9. Hardware Configuration for NT/linux/Windows/DOS

10. Anyone done business with "Linux Hardware Systems"?

11. Maple V proted to Linux!

12. Can Linux detect Hardware after bootup is DONE???

13. DOS to Linux Upgrade: What hardware do I need?