"Generic USB Input Device Support" for keydisks?

S

Slobodan Brcin \(eMVP\)

Konstantin,
The Hardware IDs and Compatible IDs come from PnP enum subkeys of
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum] (REG_MULTI_SZ values).
Please correct if I am wrong.
Do you know how Compatible IDs get in to the registry? I don't think that XP
PnP sets this info. I think Compatible ID info are in INF files (maybe, not
always) but INF importer just does not parse it and sets all the PnP ID
resources to have IsCompatibleID flag set to FALSE.

This registry entries are virtual anyway. Those values are provided during
hardware enumeration by bus driver. Response on IRP_MN_QUERY_ID with
parameter BusQueryComptibleIDs.
In most cases value is read directly from hardware. But there are two
reasons why inf files usually do not contain this values.
Yes they are read from hardware like any Hardware Ids.
Only difference is when PnP tries to match driver to install them from inf
files.
Priority always goes to best match. There are criterions how best match is
determined, but it is sufficient so say that all Hardware Id matches come
first before Compatible Ids.
Supporting short Compatible Ids would require from driver manufacturer to
make driver that will support forward compatibility with all new hardware
for many years in future.
Also providing descriptive Hardware Ids enable driver manufacturers to
describe each adapter with special text and to populate registry with some
special hardware requirements.
However, if for example, you take a look into the MS default monitor
driver's INF you will see that its Compatible IDs is there (*PNP09FF).

I am not an expert in INF format so I may be wrong here.

You can use compatible ids for dummy drivers or for generic drivers that
will support all hardware in given class (with at least satisfactory
support).
If inf file with Hardware Id is found it will be always used instead of inf
file and driver with compatible id.
There is description in DDK how this works. (But we have no issues with this
since we don't want to force hardware manufacturers to change their inf
files, and that would be bad solution anyway).

What I want is to define some standard for us developers and possibly MS how
to detect drivers that can be configured trough one component and to create
one component to cover wide range of devices.

Maybe example of what I'm currently using will help you to understand what I
want.

Look at components beginning with "PCI standard *" or "Standard *" you will
notice that they all use compatible IDs and that some of them have critical
device set to TRUE.
Having components like these your image will allow you to generically
support all hardware types. Some of these components are just placeholders
to set some info in critical database and some offer driver functionality
trough files like pci.sys pciide.sys, atapi.sys, etc.
This will allow us to reach FBA PnP phase and as you have noticed if we just
copy new drivers and inf files they will override generic drivers (which btw
are used by Intel etc with only name modification from inf file same MS
binaries are used) that override some of this functionality.

Check component: PCI standard RAM Controller. This hardware resource does
not use any driver it just exist as hardware resource access point. Other
manufacturers just change name of this node trough inf file. They do this by
providing hardware Id that always have better match than compatible Id
provided by MS.

Bottom line is if we use few MS components to make system boot, everything
else will be handled by PnP.
So we need a way to create component from let us say Intel 845.inf, 865.inf
and 852.inf files.
Ok we can have 6-7 components but not 15-20 components. Also all that
components should know that they are using functionality (generic drivers
provided by MS and not third party)
and according to these knowledge CD could create component that will use
compatible ID that we see in component "PCI standard RAM Controller".

If we had these options then it could be possible for MS to improve TD so we
could sort components in central panel trough their meaning chipset drivers
of some type, or drivers generally, etc... (topic for another discussion)

Uhhh.... I hope that I explained more successfully what I want.

Regards,
Slobodan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Tell
Microsoft!
https://www.windowsembeddedeval.com/community/newsgroups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
K

KM

Slobodan,

I did not know so much details about the device IDs before this thread (only
excuse - I am an app guy, not a platform dev :) ).
Sorry for wasting your time.. Only plus - you seem to close to formulate
your idea as a suggestion to MS.
A couple of quick questions inline...
This registry entries are virtual anyway. Those values are provided during
hardware enumeration by bus driver. Response on IRP_MN_QUERY_ID with
parameter BusQueryComptibleIDs.

You are probably talking about how the PnP manager works.
What I meant is that TAP seems to do just the registry enumeration to fill
up an xml template (pmq result).
In most cases value is read directly from hardware. But there are two
reasons why inf files usually do not contain this values.
Yes they are read from hardware like any Hardware Ids.
Only difference is when PnP tries to match driver to install them from inf files.
Priority always goes to best match. There are criterions how best match is
determined, but it is sufficient so say that all Hardware Id matches come
first before Compatible Ids.

Yes, that is what it says in DDK docs.
What I want is to define some standard for us developers and possibly MS how
to detect drivers that can be configured trough one component and to
create one component to cover wide range of devices.
Maybe example of what I'm currently using will help you to understand what I want.

Look at components beginning with "PCI standard *" or "Standard *" you will
notice that they all use compatible IDs and that some of them have critical device set to TRUE.
Having components like these your image will allow you to generically
support all hardware types. Some of these components are just placeholders
to set some info in critical database and some offer driver functionality
trough files like pci.sys pciide.sys, atapi.sys, etc.
This will allow us to reach FBA PnP phase and as you have noticed if we just
copy new drivers and inf files they will override generic drivers (which btw
are used by Intel etc with only name modification from inf file same MS
binaries are used) that override some of this functionality.

Check component: PCI standard RAM Controller. This hardware resource does
not use any driver it just exist as hardware resource access point. Other
manufacturers just change name of this node trough inf file. They do this by
providing hardware Id that always have better match than compatible Id
provided by MS.
Bottom line is if we use few MS components to make system boot, everything else will be handled by PnP.
So we need a way to create component from let us say Intel 845.inf, 865.inf and 852.inf files.
Ok we can have 6-7 components but not 15-20 components. Also all that
components should know that they are using functionality (generic drivers
provided by MS and not third party) and according to these knowledge CD
could create component that will use
compatible ID that we see in component "PCI standard RAM Controller".

If we had these options then it could be possible for MS to improve TD so we could sort components in
central panel trough their meaning chipset drivers
of some type, or drivers generally, etc... (topic for another discussion)

Because a compatible-ID match is not as strong as a hardware-ID match, the
PnP Manager may prompt for confirmation from the user before processing the
INF file. Since you want just to have component(s) with compatible IDs only
(not hardware IDs) don't you afraid that FBA PnP may sometimes prompt for a
confirmation? It might not be the case at all if FBA PnP is a "silent"
version of the PnP Manager (I don't know the differences between FBA PnP and
regular XP PnP). Also, you have mentioned that most of "PCI standard *", for
example, components already have compatible IDs and FBA PnP proccess them
well.

Anyway, you seem to formuate the solution now: "we use few MS components to
make system boot, everything else will be handled by PnP."
Basically, new INF importer will have to analyze/match compatible IDs
instead of hardware IDs. It is possible to get hardware IDs from INF file
and then find all compatible IDs of XPe database components that hardware
IDs match hardware IDs from INF, isn't it?

But all this requires changing XPe Tools which only MS can do. Now I see
only manual creating components.

Regards,
Konstantin
 
S

Slobodan Brcin \(eMVP\)

Konstantin,
I did not know so much details about the device IDs before this thread (only
excuse - I am an app guy, not a platform dev :) ).
Sorry for wasting your time..

No trouble at all, I love some after midnight tech discussions they wake me
up :D

Only plus - you seem to close to formulate
your idea as a suggestion to MS.
A couple of quick questions inline...


You are probably talking about how the PnP manager works.
What I meant is that TAP seems to do just the registry enumeration to fill
up an xml template (pmq result).

Sorry yes I was talking about who generated them.
Use devcon hwids * and it will list all devices with all hardware and
compatible ids found. I think that is uses some of CM_xxx API functions for
the job. But it is irrelevant since they will probably read from registry.
inf come
first before Compatible Ids.

Yes, that is what it says in DDK docs.

create one component to cover wide range of devices. what
I want. this
provided by MS.
everything
else will be handled by PnP.
components should know that they are using functionality (generic drivers
could create component that will use so
we could sort components in discussion)

Because a compatible-ID match is not as strong as a hardware-ID match, the
PnP Manager may prompt for confirmation from the user before processing the
INF file. Since you want just to have component(s) with compatible IDs only
(not hardware IDs) don't you afraid that FBA PnP may sometimes prompt for a
confirmation? It might not be the case at all if FBA PnP is a "silent"
version of the PnP Manager (I don't know the differences between FBA PnP and
regular XP PnP). Also, you have mentioned that most of "PCI standard *", for
example, components already have compatible IDs and FBA PnP proccess them
well.

Well I have never seen FBA PnP to ask me anything ever (it swallows
signed/unsigned drivers etc).
Also I'm not suggesting that we or MS change inf files. They should remain
as they are today. So PnP will never see any difference.

But we are getting to what I want. TD and CD should work with one component
per whole compatible hardware group. And at the same time they should try to
minimize writing any info to registry, or in case of very few boot critical
devices they should mark them by using compatible id.
When XPe load reaches point of FBA PnP, PnP will handle all detection and
appropriate installations (this is the time when drivers/services are
installed and registry is truly modified with info contained in inf file for
specific hardware detected by PnP and not by TAP, or TD)
Anyway, you seem to formuate the solution now: "we use few MS components to
make system boot, everything else will be handled by PnP."
I'm using this solution for very long time. But currently it is undocumented
manual work that is based on my knowledge how things work. This is a luxury
that many people here do not have. Time or knowledge so this is why I would
like to see some tools that address these issues. I have solved my problems
but people are just afraid to experiment with componentization.
Basically, new INF importer will have to analyze/match compatible IDs
instead of hardware IDs. It is possible to get hardware IDs from INF file
and then find all compatible IDs of XPe database components that hardware
IDs match hardware IDs from INF, isn't it?

:)
This part it tricky since currently there is no way to associate hardware
IDs with compatible ID. (manually it is only way).
PMQ file contains info about hardware that you posses, but this is not
enough for componentizing whole sections of inf files.
MS could make database about relation between known manufacturers hardware
IDs and compatible IDs manually.
They could periodically update this DB. Or they could give us a tool to
create our association between all Hardware IDs that we get from inf file
and some compatible Id we choose from PMQ file.
But all this requires changing XPe Tools which only MS can do. Now I see
only manual creating components.

Yep, I agree on that. Beside info I already sent I'm going to give them link
to this thread they might find a better way to do this.

Regards,
Slobodan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Tell
Microsoft!
https://www.windowsembeddedeval.com/community/newsgroups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
K

KM

Slobodan,

What I was thinking looking at your idea is that most of the Compatible Ids
and Hardware Ids info is in the XPe database. The only problem is that they
did not seem to mark IsCompatibleID flags there :-( Who knows maybe MS has
already got the right DB of Compatible Ids and Hardware Ids matched.

Regarding devcon. I was actually using DevMgr (the Details tab page for each
component) that shows Compatible Ids and Hardware Ids perfectly. It even
shows the Matching Device Ids as a separate item. Basically, devcon and
DevMgr are the same (the same functionality).

I am glad that we finished the thread. I'm going to be out the whole next
week and will unlikely be able to respond.
Thanks a lot for the discussion! It was very informative to me :).

Regards,
Konstantin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top