* PCI card Problem in DEC ALPHA NT Platform
@ 1996-06-27 4:00 Jacky Kwok
0 siblings, 0 replies; only message in thread
From: Jacky Kwok @ 1996-06-27 4:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-06-27 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-06-27 4:00 PCI card Problem in DEC ALPHA NT Platform Jacky Kwok
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox