PCI Configuration Space access

Hi,
I am trying to enable a PCMCIA controller which should be done by the BIOS is isnt! ( In NT4 ) . I am prevented from accessing the CMD register during driver_entry although I can still access the other register in the config space. Does the kernel prevent me from accessing the command register on a PCI device during driver entry? I am only creating this driver to modifiy the config space at boot time. The driver is never used for anything else. I normally do all the work in the driver entry is this not the case for PCI control registers?

"
KPciConfiguration m_TI1520(PCI_VENDOR_ID, PCI_DEVICE_ID);

// The following macro simply allows compilation at Warning Level 4
// If you reference this parameter in the function simply remove the macro.
UNREFERENCED_PARAMETER(RegistryPath);

if ( m_TI1520.IsValid() )
{
t << “In DriverEntry TI1520 Found!\n”;

t << " Read Command Register " << m_TI1520.ReadCommandRegister () << “\n”;

m_TI1520.WriteCommandRegister ( 0x7 );

t << " Read Command Register After " << m_TI1520.ReadCommandRegister
()
<< “\n”;

"

thanks for the help in adavance

Patrick Shaw

i think, your code should work
is m_TI1520 Ok?

“Patrick Shaw” wrote in message news:xxxxx@ntdev…
>
> Hi,
> I am trying to enable a PCMCIA controller which should be done by the
BIOS is isnt! ( In NT4 ) . I am prevented from accessing the CMD register
during driver_entry although I can still access the other register in the
config space. Does the kernel prevent me from accessing the command register
on a PCI device during driver entry? I am only creating this driver to
modifiy the config space at boot time. The driver is never used for anything
else. I normally do all the work in the driver entry is this not the case
for PCI control registers?
>
> "
> KPciConfiguration m_TI1520(PCI_VENDOR_ID, PCI_DEVICE_ID);
>
> // The following macro simply allows compilation at Warning Level 4
> // If you reference this parameter in the function simply remove the
macro.
> UNREFERENCED_PARAMETER(RegistryPath);
>
> if ( m_TI1520.IsValid() )
> {
> t << “In DriverEntry TI1520 Found!\n”;
>
> t << " Read Command Register " << m_TI1520.ReadCommandRegister () << “\n”;
>
> m_TI1520.WriteCommandRegister ( 0x7 );
>
> t << " Read Command Register After " << m_TI1520.ReadCommandRegister
> ()
> << “\n”;
>
> "
>
>
> thanks for the help in adavance
>
> Patrick Shaw
>
>