From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,ec6f234dee20fe10,start X-Google-Attributes: gid1164f8,public From: jacky@compose-sys.com (Jacky Kwok) Subject: PCI card Problem in DEC ALPHA NT Platform Date: 1996/06/27 Message-ID: <4qtcgu$2sl@news.hk.linkage.net>#1/1 X-Deja-AN: 162325159 organization: LinkAGE Online Limited newsgroups: comp.sys.dec For some problem, our self design PCI is incompatable with some Intel mother board and DEC ALPHA mother board. The problem may be the card incompatable with some Intel PCI bios and DEC ALPHA Firmware. Bofore solve this problem, we try to bypass the problem through software. The PCI card has a hardware option to disable the PCI configuration space, then the system bios and firmware will ignore the PCI card. Then, enable the PCI configuration space using software. Our program code success to work in windows 3.1 in a DLL, windows 95 in a Vxd driver and windows NT (Intel platform) in a kernal mode hardware driver. In Intel CPU, the physical PCI configuration space can be mapped into the low CPU I/O space. Hence, my driver can access the PCI configuration space and enable the PCI card by inp and outp Intel code. However, the code do not work in windows NT (DEC ALPHA platform). After study some document of DEC ALPHA CPU, I try to direct access the physical address of PCI configuration space in ALPHA CPU. The method is work for my card. The driver can find my PCI card. However, there is a problem when access an empty PCI slot, the system crash. following is my program code in the NT kernal driver : PHYSICAL_ADDRESS PCIAddr; PCIAddr.HighPart = 1; PCIAddr.LowPart = 0xe00c0000; //the physical address of PCI //slot 2, // in ALPHA XL 266 // map physical address in virtual address space ULONG PortBase = (ULONG)MmMapIoSpace(PCIAddr,256,FALSE); //-> enable my PCI card ULONG* PCIEnable = (ULONG*)PortBase; PCIEnable += (1<<5)*32; // write offset 0x80 = 0 *((ULONG*)(((ULONG)PCIEnable)|0x18)) = 0; //<- ULONG ID; ULONG* Base = (ULONG*)PortBase; ID = *((ULONG*)Base); //get the Vender ID and Device ID if PCI clip, //crash at this line if empty slot. The above code work for my PCI card. Also no problem if the card is not my PCI card. However, the system crash if the slot is a empty slot. I have try to use NT structure exception handling to try to trap the exception but it don not work. Dose anyone know how to fix the problem? Or is there other safes method to access PCI slot? Jacky Kwok Compose System Ltd http://www.compose-sys.com