I am searching for a description of the basic data blocks that are returned by a storport driver when it does not create its own MOF. I assume there is a list of guid somewhere along with a corresponding description of the data required for each block.
I found the header files hbaapi.h and hbapiwmi.h which describe a lot of the data structures available for an FC or SAS implementation of WMI. Unfortunately I can’t find any documentation explaining the relationship between these data blocks and the WMI requests that will be received by the storport driver. I think I figured some of them out from some fragments of sample code Microsoft distributed quite some time ago.
I tried searching MSDN and the DDK for additional documentation but I can’t seem to find anything that is helpful.
Well it looks like Microsoft removed the reference documentation from
MSDN. I have no idea why. I’ve used the C binding and the WMI
binding before for many useful tasks. Their MPIO implementation had a
big hole in it; no understanding of nor visibility to the transport.
That makes it difficult to tell when the transport is not healthy, for
example. So I’ve used the HBA API to provide an MPIO DSM with
knowledge of transport events.
My guess is that the SNIA is pushed them to remove it since it is, I
believe, officially obsoleted by the SMI-S standard. Of course,
Microsoft doesn’t have any SMI-S support at the moment.
The funny thing is you are still required to pass the HBA API test as
part of the WLK tests.
I suggest you bypass the WMI version and use the C binding. Google
HBA API and you’ll find lots of hits. It is officially part of SNIA
now.
http://www.snia.org/tech_activities/hba_api/
There is also a handy tool, little known, from Microsoft called fcinfo
http://www.microsoft.com/downloads/details.aspx?familyid=73D7B879-55B2-4629-8734-B0698096D3B1&displaylang=en
It will install the WMI classes into the repository on your machine
which makes things a little easier. And it’s commands offer some
insight into what to expect back from the calls. The calls VERY
CLOSELY mimic the HBA API so review the SNIA docs and the sourceforge
project for more information.
Hope that helps,
Robert.
On Wed, Jun 9, 2010 at 12:30 PM, wrote:
> I am searching for a description of the basic data blocks that are returned by a storport driver when it does not create its own MOF. I assume there is a list of guid somewhere along with a corresponding description of the data required for each block.
>
> I found the header files hbaapi.h and hbapiwmi.h which describe a lot of the data structures available for an FC or SAS implementation of WMI. Unfortunately I can’t find any documentation explaining the relationship between these data blocks and the WMI requests that will be received by the storport driver. I think I figured some of them out from some fragments of sample code Microsoft distributed quite some time ago.
>
> I tried searching MSDN and the DDK for additional documentation but I can’t seem to find anything that is helpful.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
–
Robert Randall | xxxxx@gmail.com
Thanks for the SNIA pointer. I think that covers the FC requirements for HBA API.
It will probably be helpful if I provide some more explicit information.
My interest is more focused on the SAS implications for HBA API. That seems to be covered by the SM-HBA specification. It is mentioned in the Windows header file hbapiwmi.h. I will be using #define MS_SM_HBA_API (also included in hbaapi.h) and trying to use the following structures: SMHBA_ADAPTERATTRIBUTES, SMHBA_PORTATTRIBUTES, SMHBA_SAS_PORT.
I am trying to understand how those structures are associated with what I assume are standard inquires based on HBA API. I found some sample code for an FC driver and that is closer to what I think I need than the iSCSI WMI sample in the DDK. That sample code is missing the function that maps the WMI guidIndex to some driver data structures. I am guessing that I simply need to know which data structures are returned for each guidIndex.
Some of the data structure names make that mapping transparent but I am not sure I know which structures to use for the other cases. It is also possible that I am off on the wrong track.
Sorry for that, you’re after SAS and looking at
http://hub.opensolaris.org/bin/view/Project+sm-hba/
or similar. A copy of the spec is there. I’ve not heard anything
from Microsoft on when/if they expect to support it through WMI or not
(like the FC HBA API). Regardless, each SAS vendor can choose to
support it and supply a binding for it (header file and library to
link to). Are you trying to build support for a SAS HBA or talk to an
existing one?
Here is the spec:
http://hub.opensolaris.org/bin/download/Project+sm-hba/files/BSRINCITS428.smhba.pdf
-Robert.
On Wed, Jun 9, 2010 at 2:29 PM, wrote:
> Thanks for the SNIA pointer. I think that covers the FC requirements for HBA API.
>
> It will probably be helpful if I provide some more explicit information.
>
> My interest is more focused on the SAS implications for HBA API. That seems to be covered by the SM-HBA specification. It is mentioned in the Windows header file hbapiwmi.h. I will be using #define MS_SM_HBA_API (also included in hbaapi.h) and trying to use the following structures: SMHBA_ADAPTERATTRIBUTES, SMHBA_PORTATTRIBUTES, SMHBA_SAS_PORT.
>
> I am trying to understand how those structures are associated with what I assume are standard inquires based on HBA API. I found some sample code for an FC driver and that is closer to what I think I need than the iSCSI WMI sample in the DDK. That sample code is missing the function that maps the WMI guidIndex to some driver data structures. I am guessing that I simply need to know which data structures are returned for each guidIndex.
>
> Some of the data structure ?names make that mapping transparent but I am not sure I know which structures to use for the other cases. It is also possible that I am off on the wrong track.
>
>
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
–
Robert Randall | xxxxx@gmail.com
I am trying to build support for a SAS adapter.
That’s a little out of date. SNIA invented the HBA API but it was handed
over to ANSI over 10 years ago. There have been about 4 generations of
ANSI Standard versions since then, and it’s still being enhanced. It’s
certainly not obsoleted by SMI-S. The latest version is SM-HBA (which
includes SAS support) and SM-HBA2 is in development getting close to
publication. The projects are on t11.org, the official specifications
can be purchased at all good ANSI standard shops.
Surprised to hear MS have removed the SM-HBA WMI stuff from MSDN, I was
looking at it a few weeks ago. Ah, it looks like they haven’t removed
it, see http://msdn.microsoft.com/en-us/library/ff557239(VS.85).aspx
(WDK > Device and Driver Technologies > Storage Devices > Reference >
Storage WMI Classes > HBA WMI Classes).
Regards,
jjf
Robert Randall wrote:
Well it looks like Microsoft removed the reference documentation from
MSDN. I have no idea why. I’ve used the C binding and the WMI
binding before for many useful tasks. Their MPIO implementation had a
big hole in it; no understanding of nor visibility to the transport.
That makes it difficult to tell when the transport is not healthy, for
example. So I’ve used the HBA API to provide an MPIO DSM with
knowledge of transport events.
My guess is that the SNIA is pushed them to remove it since it is, I
believe, officially obsoleted by the SMI-S standard. Of course,
Microsoft doesn’t have any SMI-S support at the moment.
The funny thing is you are still required to pass the HBA API test as
part of the WLK tests.
I suggest you bypass the WMI version and use the C binding. Google
HBA API and you’ll find lots of hits. It is officially part of SNIA
now.
http://www.snia.org/tech_activities/hba_api/
There is also a handy tool, little known, from Microsoft called fcinfo
http://www.microsoft.com/downloads/details.aspx?familyid=73D7B879-55B2-4629-8734-B0698096D3B1&displaylang=en
It will install the WMI classes into the repository on your machine
which makes things a little easier. And it’s commands offer some
insight into what to expect back from the calls. The calls VERY
CLOSELY mimic the HBA API so review the SNIA docs and the sourceforge
project for more information.
Hope that helps,
Robert.
On Wed, Jun 9, 2010 at 12:30 PM, wrote:
>> I am searching for a description of the basic data blocks that are returned by a storport driver when it does not create its own MOF. I assume there is a list of guid somewhere along with a corresponding description of the data required for each block.
>>
>> I found the header files hbaapi.h and hbapiwmi.h which describe a lot of the data structures available for an FC or SAS implementation of WMI. Unfortunately I can’t find any documentation explaining the relationship between these data blocks and the WMI requests that will be received by the storport driver. I think I figured some of them out from some fragments of sample code Microsoft distributed quite some time ago.
>>
>> I tried searching MSDN and the DDK for additional documentation but I can’t seem to find anything that is helpful.
SAS support was added to the API in the SM-HBA Standard (Storage
Management HBA API) around 2006. Microsoft added it to their WMI classes
and to the hbaapi.dll user-mode library in Windows Server 2008 R2.
I find the MSDN documentation obscure to say the least, but that may be
because I’ve never fully got my head around WMI. I think between it and
the samples it’s possible to work out what’s needed in a driver, though
I’ve not done so myself.
Regards,
jjf
Robert Randall wrote:
Sorry for that, you’re after SAS and looking at
http://hub.opensolaris.org/bin/view/Project+sm-hba/
or similar. A copy of the spec is there. I’ve not heard anything
from Microsoft on when/if they expect to support it through WMI or not
(like the FC HBA API). Regardless, each SAS vendor can choose to
support it and supply a binding for it (header file and library to
link to). Are you trying to build support for a SAS HBA or talk to an
existing one?
Here is the spec:
http://hub.opensolaris.org/bin/download/Project+sm-hba/files/BSRINCITS428.smhba.pdf
-Robert.
On Wed, Jun 9, 2010 at 2:29 PM, wrote:
>> Thanks for the SNIA pointer. I think that covers the FC requirements for HBA API.
>>
>> It will probably be helpful if I provide some more explicit information.
>>
>> My interest is more focused on the SAS implications for HBA API. That seems to be covered by the SM-HBA specification. It is mentioned in the Windows header file hbapiwmi.h. I will be using #define MS_SM_HBA_API (also included in hbaapi.h) and trying to use the following structures: SMHBA_ADAPTERATTRIBUTES, SMHBA_PORTATTRIBUTES, SMHBA_SAS_PORT.
>>
>> I am trying to understand how those structures are associated with what I assume are standard inquires based on HBA API. I found some sample code for an FC driver and that is closer to what I think I need than the iSCSI WMI sample in the DDK. That sample code is missing the function that maps the WMI guidIndex to some driver data structures. I am guessing that I simply need to know which data structures are returned for each guidIndex.
>>
>> Some of the data structure names make that mapping transparent but I am not sure I know which structures to use for the other cases. It is also possible that I am off on the wrong track.
I guess I should stop using Bing ;->
Thanks for correcting me.
On Wed, Jun 9, 2010 at 10:28 PM, J. J. Farrell wrote:
> SAS support was added to the API in the SM-HBA Standard (Storage Management
> HBA API) around 2006. Microsoft added it to their WMI classes and to the
> hbaapi.dll user-mode library in Windows Server 2008 R2.
>
> I find the MSDN documentation obscure to say the least, but that may be
> because I’ve never fully got my head around WMI. I think between it and the
> samples it’s possible to work out what’s needed in a driver, though I’ve not
> done so myself.
>
> Regards,
> ? ? ? ? ? ? ? ?jjf
>
>
> Robert Randall wrote:
>>
>> Sorry for that, you’re after SAS and looking at
>> http://hub.opensolaris.org/bin/view/Project+sm-hba/
>> ?or similar. ?A copy of the spec is there. ?I’ve not heard anything
>> from Microsoft on when/if they expect to support it through WMI or not
>> (like the FC HBA API). ?Regardless, each SAS vendor can choose to
>> support it and supply a binding for it (header file and library to
>> link to). ?Are you trying to build support for a SAS HBA or talk to an
>> existing one?
>>
>> Here is the spec:
>>
>>
>> http://hub.opensolaris.org/bin/download/Project+sm-hba/files/BSRINCITS428.smhba.pdf
>>
>> -Robert.
>>
>>
>> On Wed, Jun 9, 2010 at 2:29 PM, ? wrote:
>>>
>>> Thanks for the SNIA pointer. I think that covers the FC requirements for
>>> HBA API.
>>>
>>> It will probably be helpful if I provide some more explicit information.
>>>
>>> My interest is more focused on the SAS implications for HBA API. That
>>> seems to be covered by the SM-HBA specification. It is mentioned in the
>>> Windows header file hbapiwmi.h. I will be using #define MS_SM_HBA_API (also
>>> included in hbaapi.h) and trying to use the following structures:
>>> SMHBA_ADAPTERATTRIBUTES, SMHBA_PORTATTRIBUTES, SMHBA_SAS_PORT.
>>>
>>> I am trying to understand how those structures are associated with what I
>>> assume are standard inquires based on HBA API. I found some sample code for
>>> an FC driver and that is closer to what I think I need than the iSCSI WMI
>>> sample in the DDK. That sample code is missing the function that maps the
>>> WMI guidIndex to some driver data structures. I am guessing that I simply
>>> need to know which data structures are returned for each guidIndex.
>>>
>>> Some of the data structure ?names make that mapping transparent but I am
>>> not sure I know which structures to use for the other cases. It is also
>>> possible that I am off on the wrong track.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Robert Randall | xxxxx@gmail.com
John,
If you have the MS_SM classes in your repository you may be able to
generate the MOF file (or export it) using a WMI tool of some sort. I
seem to recall doing this a long time ago but I don’t recall what tool
I used. For all I know it is built into VS by now…
That might help,
Robert.
On Thu, Jun 10, 2010 at 1:31 PM, Robert Randall
wrote:
> I guess I should stop using Bing ;->
>
> Thanks for correcting me.
>
> On Wed, Jun 9, 2010 at 10:28 PM, J. J. Farrell wrote:
>> SAS support was added to the API in the SM-HBA Standard (Storage Management
>> HBA API) around 2006. Microsoft added it to their WMI classes and to the
>> hbaapi.dll user-mode library in Windows Server 2008 R2.
>>
>> I find the MSDN documentation obscure to say the least, but that may be
>> because I’ve never fully got my head around WMI. I think between it and the
>> samples it’s possible to work out what’s needed in a driver, though I’ve not
>> done so myself.
>>
>> Regards,
>> ? ? ? ? ? ? ? ?jjf
>>
>>
>> Robert Randall wrote:
>>>
>>> Sorry for that, you’re after SAS and looking at
>>> http://hub.opensolaris.org/bin/view/Project+sm-hba/
>>> ?or similar. ?A copy of the spec is there. ?I’ve not heard anything
>>> from Microsoft on when/if they expect to support it through WMI or not
>>> (like the FC HBA API). ?Regardless, each SAS vendor can choose to
>>> support it and supply a binding for it (header file and library to
>>> link to). ?Are you trying to build support for a SAS HBA or talk to an
>>> existing one?
>>>
>>> Here is the spec:
>>>
>>>
>>> http://hub.opensolaris.org/bin/download/Project+sm-hba/files/BSRINCITS428.smhba.pdf
>>>
>>> -Robert.
>>>
>>>
>>> On Wed, Jun 9, 2010 at 2:29 PM, ? wrote:
>>>>
>>>> Thanks for the SNIA pointer. I think that covers the FC requirements for
>>>> HBA API.
>>>>
>>>> It will probably be helpful if I provide some more explicit information.
>>>>
>>>> My interest is more focused on the SAS implications for HBA API. That
>>>> seems to be covered by the SM-HBA specification. It is mentioned in the
>>>> Windows header file hbapiwmi.h. I will be using #define MS_SM_HBA_API (also
>>>> included in hbaapi.h) and trying to use the following structures:
>>>> SMHBA_ADAPTERATTRIBUTES, SMHBA_PORTATTRIBUTES, SMHBA_SAS_PORT.
>>>>
>>>> I am trying to understand how those structures are associated with what I
>>>> assume are standard inquires based on HBA API. I found some sample code for
>>>> an FC driver and that is closer to what I think I need than the iSCSI WMI
>>>> sample in the DDK. That sample code is missing the function that maps the
>>>> WMI guidIndex to some driver data structures. I am guessing that I simply
>>>> need to know which data structures are returned for each guidIndex.
>>>>
>>>> Some of the data structure ?names make that mapping transparent but I am
>>>> not sure I know which structures to use for the other cases. It is also
>>>> possible that I am off on the wrong track.
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>
>
>
> –
> Robert Randall | xxxxx@gmail.com
>
–
Robert Randall | xxxxx@gmail.com
That’s probably a good idea ;). I tried Bing for a while some time ago,
but found Google was giving much better results even for MS sites.
Perhaps it’s improved since then …
Robert Randall wrote:
I guess I should stop using Bing ;->
Thanks for correcting me.
On Wed, Jun 9, 2010 at 10:28 PM, J. J. Farrell wrote:
>> SAS support was added to the API in the SM-HBA Standard (Storage Management
>> HBA API) around 2006. Microsoft added it to their WMI classes and to the
>> hbaapi.dll user-mode library in Windows Server 2008 R2.
>>
>> I find the MSDN documentation obscure to say the least, but that may be
>> because I’ve never fully got my head around WMI. I think between it and the
>> samples it’s possible to work out what’s needed in a driver, though I’ve not
>> done so myself.
>>
>> Regards,
>> jjf
>>
>>
>> Robert Randall wrote:
>>> Sorry for that, you’re after SAS and looking at
>>> http://hub.opensolaris.org/bin/view/Project+sm-hba/
>>> or similar. A copy of the spec is there. I’ve not heard anything
>>> from Microsoft on when/if they expect to support it through WMI or not
>>> (like the FC HBA API). Regardless, each SAS vendor can choose to
>>> support it and supply a binding for it (header file and library to
>>> link to). Are you trying to build support for a SAS HBA or talk to an
>>> existing one?
>>>
>>> Here is the spec:
>>>
>>>
>>> http://hub.opensolaris.org/bin/download/Project+sm-hba/files/BSRINCITS428.smhba.pdf
>>>
>>> -Robert.
>>>
>>>
>>> On Wed, Jun 9, 2010 at 2:29 PM, wrote:
>>>> Thanks for the SNIA pointer. I think that covers the FC requirements for
>>>> HBA API.
>>>>
>>>> It will probably be helpful if I provide some more explicit information.
>>>>
>>>> My interest is more focused on the SAS implications for HBA API. That
>>>> seems to be covered by the SM-HBA specification. It is mentioned in the
>>>> Windows header file hbapiwmi.h. I will be using #define MS_SM_HBA_API (also
>>>> included in hbaapi.h) and trying to use the following structures:
>>>> SMHBA_ADAPTERATTRIBUTES, SMHBA_PORTATTRIBUTES, SMHBA_SAS_PORT.
>>>>
>>>> I am trying to understand how those structures are associated with what I
>>>> assume are standard inquires based on HBA API. I found some sample code for
>>>> an FC driver and that is closer to what I think I need than the iSCSI WMI
>>>> sample in the DDK. That sample code is missing the function that maps the
>>>> WMI guidIndex to some driver data structures. I am guessing that I simply
>>>> need to know which data structures are returned for each guidIndex.
>>>>
>>>> Some of the data structure names make that mapping transparent but I am
>>>> not sure I know which structures to use for the other cases. It is also
>>>> possible that I am off on the wrong track.
I think we are getting closer to the information I need.
I am assuming that I don’t need to create an MOF if I merely want to implement what is required by SM-HBA. But after reading the Microsoft documentation I am still unsure about all the minute details.
I know I need to create a SCSIWMILIB_CONTEXT list this:
typedef struct _SCSIWMILIB_CONTEXT {
ULONG GuidCount;
PSCSIWMIGUIDREGINFO GuidList;
PSCSIWMI_QUERY_REGINFO QueryWmiRegInfo;
PSCSIWMI_QUERY_DATABLOCK QueryWmiDataBlock;
PSCSIWMI_SET_DATABLOCK SetWmiDataBlock;
PSCSIWMI_SET_DATAITEM SetWmiDataItem;
PSCSIWMI_EXECUTE_METHOD ExecuteWmiMethod;
PSCSIWMI_FUNCTION_CONTROL WmiFunctionControl;
} SCSI_WMILIB_CONTEXT, *PSCSI_WMILIB_CONTEXT;
The main thing I don’t understand at this point is the GuidList in that structure. I expect it to describe all of the various classes defined by SM_HBA and implemented by Microsoft in hbaapi.h. But they must be arranged in a particular order so that each miniport returns the same datablock (class?) for a particular index. So I keep expecting to find some enumerated list of indices that is shared by all miniport drivers. I saw some hints of that in the sample code I found, but it was not very clear how the values in that list was selected.
Or am I even more confused that I think I am?
I did a Google search on “microsoft hba wmi” and the first two entries
looked pretty relevant…
http://www.google.com/url?sa=t&source=web&ct=res&cd=1&ved=0CBIQFjAA&url=http
%3A%2F%2Fdownload.microsoft.com%2Fdownload%2Ff%2F0%2F5%2Ff05a42ce-575b-4c60-
82d6-208d3754b2d6%2FWMI_SCSIPort-StorPort.ppt&rct=j&q=microsoft+hba+wmi+&ei=
7UgRTL6eCoiwNtDc7ZsD&usg=AFQjCNGiAWUtm0sM236K61Z7EB0M27y7mA
http://msdn.microsoft.com/en-us/library/ff557239(VS.85).aspx
Jan
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-414318-
xxxxx@lists.osr.com] On Behalf Of xxxxx@pmc-sierra.com
Sent: Thursday, June 10, 2010 1:09 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Where is HBAAPI for WMI documented?
I think we are getting closer to the information I need.
I am assuming that I don’t need to create an MOF if I merely want to
implement what is required by SM-HBA. But after reading the Microsoft
documentation I am still unsure about all the minute details.
I know I need to create a SCSIWMILIB_CONTEXT list this:
typedef struct _SCSIWMILIB_CONTEXT {
ULONG GuidCount;
PSCSIWMIGUIDREGINFO GuidList;
PSCSIWMI_QUERY_REGINFO QueryWmiRegInfo;
PSCSIWMI_QUERY_DATABLOCK QueryWmiDataBlock;
PSCSIWMI_SET_DATABLOCK SetWmiDataBlock;
PSCSIWMI_SET_DATAITEM SetWmiDataItem;
PSCSIWMI_EXECUTE_METHOD ExecuteWmiMethod;
PSCSIWMI_FUNCTION_CONTROL WmiFunctionControl; }
SCSI_WMILIB_CONTEXT, *PSCSI_WMILIB_CONTEXT;
The main thing I don’t understand at this point is the GuidList in that
structure. I expect it to describe all of the various classes defined by
SM_HBA
and implemented by Microsoft in hbaapi.h. But they must be arranged in a
particular order so that each miniport returns the same datablock (class?)
for
a particular index. So I keep expecting to find some enumerated list of
indices that is shared by all miniport drivers. I saw some hints of that
in the
sample code I found, but it was not very clear how the values in that list
was
selected.
Or am I even more confused that I think I am?
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
> I did a Google search on “microsoft hba wmi” and the
first two entries looked pretty relevant…
It’s obvious to someone who had done WMI in any context, i.e. WDM or ndis miniport. For others, it may seem like trying to fill in Form 1040 by reading the tax code.
Calvin
The first one looks like a good write up of how to add your own
interfaces from scratch, but sadly just describes supporting the
Microsoft-defined HBA API ones as an “advanced topic”.
There’s probably enough information around to stitch it all together if
you can get it all lined up correctly. I suspect Calvin’s hit it on the
head - obvious if you know what you’re doing, bewildering to the masses.
Have you seen this one John?
http://msdn.microsoft.com/en-us/library/ff556028(VS.85).aspx - perhaps
something in there.
It’s odd that there’s no clear write-up or example of how to support
these classes, as I understood that all FC and SAS drivers were supposed
to do so.
Jan Bottorff wrote:
I did a Google search on “microsoft hba wmi” and the first two entries
looked pretty relevant…
http://www.google.com/url?sa=t&source=web&ct=res&cd=1&ved=0CBIQFjAA&url=http
%3A%2F%2Fdownload.microsoft.com%2Fdownload%2Ff%2F0%2F5%2Ff05a42ce-575b-4c60-
82d6-208d3754b2d6%2FWMI_SCSIPort-StorPort.ppt&rct=j&q=microsoft+hba+wmi+&ei=
7UgRTL6eCoiwNtDc7ZsD&usg=AFQjCNGiAWUtm0sM236K61Z7EB0M27y7mA
http://msdn.microsoft.com/en-us/library/ff557239(VS.85).aspx
Jan
> -----Original Message-----
> From: xxxxx@pmc-sierra.com
> Sent: Thursday, June 10, 2010 1:09 PM
>
> I think we are getting closer to the information I need.
>
> I am assuming that I don’t need to create an MOF if I merely want to
> implement what is required by SM-HBA. But after reading the Microsoft
> documentation I am still unsure about all the minute details.
>
> I know I need to create a SCSIWMILIB_CONTEXT list this:
>
> typedef struct _SCSIWMILIB_CONTEXT {
> ULONG GuidCount;
> PSCSIWMIGUIDREGINFO GuidList;
> PSCSIWMI_QUERY_REGINFO QueryWmiRegInfo;
> PSCSIWMI_QUERY_DATABLOCK QueryWmiDataBlock;
> PSCSIWMI_SET_DATABLOCK SetWmiDataBlock;
> PSCSIWMI_SET_DATAITEM SetWmiDataItem;
> PSCSIWMI_EXECUTE_METHOD ExecuteWmiMethod;
> PSCSIWMI_FUNCTION_CONTROL WmiFunctionControl; }
> SCSI_WMILIB_CONTEXT, *PSCSI_WMILIB_CONTEXT;
>
> The main thing I don’t understand at this point is the GuidList in that
> structure. I expect it to describe all of the various classes defined by
> SM_HBA
> and implemented by Microsoft in hbaapi.h. But they must be arranged in a
> particular order so that each miniport returns the same datablock (class?)
> for
> a particular index. So I keep expecting to find some enumerated list of
> indices that is shared by all miniport drivers. I saw some hints of that
> in the
> sample code I found, but it was not very clear how the values in that list
> was selected.
>
> Or am I even more confused that I think I am?
I think I finally see the answer. The GUID is embedded in the class definitions found in hbapiwmi.h.
These are used to identify the class being used and allow classes to be processed in any order.
I think you get an index as a parameter of the WMI library callbacks that
tells which of the GUID’s applies. You need to have the case statement (or
whatever) values match the correct record type with the index of the GUID in
the registration structure. This is what binds the GUD for a record type
with the code than processes that record type. The first link in my previous
message with the PowerPoint presentation has a section where it’s defining
an enum of the record type as integer indexes, and says keep them in
matching order with the GUID’s.
Jan
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-414330-
xxxxx@lists.osr.com] On Behalf Of xxxxx@pmc-sierra.com
Sent: Thursday, June 10, 2010 3:49 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Where is HBAAPI for WMI documented?
I think I finally see the answer. The GUID is embedded in the class
definitions
found in hbapiwmi.h.
These are used to identify the class being used and allow classes to be
processed in any order.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer