This is 32 bit only since the HAL routines don’t exist at all on 64 bit
platforms (IIRC)
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Calvin (Hao)
Guan
Sent: Sunday, August 20, 2006 11:45 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Generic way to scan the pci
Yeah, a bus filter certainly will do although automatically attaching to
devices behind a p2p bridge needs some extra work (I personally called
it recursive attaching). The OP should be warned that a bus filter is
not just as easy as intercepting QDR/BusRelations; detaching from the
bus correctly in all possible cases needs some serious work. Also keep
in mind that bus filter is not signable.
There is other much easier way to get the PCI FDO legally w/o a bus
filter if a) bus topologic/relation is not a concern and b) no w2k
support, only xp and up.
I hesitate suggesting any of these methods any more in various NGs
because it defeats the msft’s purposes of deprecating the HAL functions
so why not just go with the good old easy meal. Nothing is easier than
just simply calling HalXxx. I figured there is nothing wrong with the
HalXxx functions themselves assuming programmer knows what they are
doing. If they manage to figure out how to do it in other ways, they
probably know what they are doing:).
There are business and engineering reasons to access arbitrary PCI
devices from within a pci device driver in some cases. It’s the host
bridge’s (or root complex) responsibility to trap port cfc/cf8 access
sequence (other mechanism for pcie extended config), convert them to PCI
cfg cycles and forward to the PCI target. The HAL functions are there to
initiate the request to the host bridge. It should work for all versions
of winnts if Microsoft didn’t screw it up and the platform is not
broken. On the other hand, a device driver under no circumstance should
manipulate the cfc/cf8 ports directly because you don’t have the
spinlock that synchronizes the access with other s/w entities.
Calvin Guan (DDK MVP)
Sr. Staff Engineer
NetXtreme NTX Miniport
Broadcom Corporation
Connecting Everything(r)
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-259634-
xxxxx@lists.osr.com] On Behalf Of Mark Roddy
Sent: Sunday, August 20, 2006 6:55 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Generic way to scan the pci
Yeah it is stuck in the HAL for now, however it remains not a good
idea to
use it. If you really need global information about pci bus
configuration
a
pci bus filter driver is probably a better way to go, although of
course
bus
filter drivers remain undocumented.
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Calvin
> (Hao) Guan
> Sent: Saturday, August 19, 2006 11:19 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Generic way to scan the pci
>
> This kind of questions come up once a while in NTDEV and the msft
NG.
> The OP can use the classic 3 level nested loop and
> HalGetBusDataByOffset to enumerate the entire PCI system.
>
> Microsoft made these function “deprecated” for good reasons
> but I doubt if they will (can) remove it from the HAL export table.
>
> Calvin Guan (DDK MVP)
> Sr. Staff Engineer
> NetXtreme NTX Miniport
> Broadcom Corporation
> Connecting Everything(r)
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com [mailto:bounce-259588-
> > xxxxx@lists.osr.com] On Behalf Of Don Burn
> > Sent: Saturday, August 19, 2006 7:28 AM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] Generic way to scan the pci
> >
> > Windows does the scanning and owns the ports that control
> the PCI bus.
> In
> > the past HalGetBusData could be used to walk the PCI
> devices, but that
> > function is deprecated. Take a look at Mark Roddy’s excellent
paper
> on
> > replacing HalGetBusData at http://www.hollistech.com/ under
> Resources.
> >
> >
> > –
> > Don Burn (MVP, Windows DDK)
> > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > http://www.windrvr.com
> >
> >
> >
> > “nayan kumar” wrote in message
> > > news:xxxxx@ntdev…
> > > > hi all,
> > > > i want to know what is the generic way of scanning the
bus
> > for
> > > > enumerating all the devices on the bus so that it doesnot limit
to
> > any
> > > bus
> > > > no either 1,2,or 3.
> > > >
> > > > Thanks
> > > > Nayan
> > > >
> > > >
_________________________________________________________________
> > > > Tried the new MSN Messenger? It’s cool! Download now.
> > > > http://messenger.msn.com/Download/Default.aspx?mkt=en-in
> > > >
> > > >
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online
> > at http://www.osronline.com/page.cfm?name=ListServer
> >
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer