SMBIOS data in WDM driver.

Hi All,
I need to read the SMBIOS data using WMI in kernel mode driver. I was able to do this correctly. when I look at the buffer I see that the data does exist in the buffer. What I am not able to figure out is that how should I interpret the data in the buffer.

I interpret the “Outbuffer” from IoWMIQueryAllData API as WNODE_ALL_DATA. There is only one instance and the linked field is 0. So I use the “DataBlockOffset” field and go to the actual location where the data exists. At this location I expect it to be BIOS Information (Type 0) data but the first two bytes are 0h (this is correct) and 02h (this should be atleast 12h).

What am I missing here??
Can someone please help.
Thanks,
– Ajitabh.

> I need to read the SMBIOS data using WMI in kernel mode driver.

Actually, as long as you are in the KM, the only thing you really need is SMBIOS Specification (which seems to be pretty straightforward and really easy to understand) and MmMapIoSpace()/MmUnmapIoSpace() to map and unmap the target physical memory into the virtual one on per-page basis - there is no need for WMI here whatsoever…

Anton Bassov

Post your code. What data do you get if you in query in UM with a higher level constrcut like vbscript?

d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: Ajitabh Saxena
Sent: Thursday, September 03, 2009 6:38 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] SMBIOS data in WDM driver.

Hi All,
I need to read the SMBIOS data using WMI in kernel mode driver. I was able to do this correctly. when I look at the buffer I see that the data does exist in the buffer. What I am not able to figure out is that how should I interpret the data in the buffer.

I interpret the “Outbuffer” from IoWMIQueryAllData API as WNODE_ALL_DATA. There is only one instance and the linked field is 0. So I use the “DataBlockOffset” field and go to the actual location where the data exists. At this location I expect it to be BIOS Information (Type 0) data but the first two bytes are 0h (this is correct) and 02h (this should be atleast 12h).

What am I missing here??
Can someone please help.
Thanks,
– Ajitabh.


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

isn’t MmMapIOSpace working? Why do you need WMI?

On Fri, Sep 4, 2009 at 7:07 AM, Ajitabh Saxena wrote:

> Hi All,
> I need to read the SMBIOS data using WMI in kernel mode driver. I
> was able to do this correctly. when I look at the buffer I see that the data
> does exist in the buffer. What I am not able to figure out is that how
> should I interpret the data in the buffer.
>
> I interpret the “Outbuffer” from IoWMIQueryAllData API as WNODE_ALL_DATA.
> There is only one instance and the linked field is 0. So I use the
> “DataBlockOffset” field and go to the actual location where the data exists.
> At this location I expect it to be BIOS Information (Type 0) data but the
> first two bytes are 0h (this is correct) and 02h (this should be atleast
> 12h).
>
> What am I missing here??
> Can someone please help.
> Thanks,
> – Ajitabh.
>
>
>
>
>
> —
> 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
>



- amitr0

Its working but I still need access to this information to know which machine my driver is running one. We do not want our hardware to work on ALL machines. Particular manufacturers should be disabled.
– Ajitabh.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of amitr0
Sent: Thursday, September 03, 2009 10:11 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] SMBIOS data in WDM driver.

isn’t MmMapIOSpace working? Why do you need WMI?

On Fri, Sep 4, 2009 at 7:07 AM, Ajitabh Saxena > wrote:
Hi All,
I need to read the SMBIOS data using WMI in kernel mode driver. I was able to do this correctly. when I look at the buffer I see that the data does exist in the buffer. What I am not able to figure out is that how should I interpret the data in the buffer.

I interpret the “Outbuffer” from IoWMIQueryAllData API as WNODE_ALL_DATA. There is only one instance and the linked field is 0. So I use the “DataBlockOffset” field and go to the actual location where the data exists. At this location I expect it to be BIOS Information (Type 0) data but the first two bytes are 0h (this is correct) and 02h (this should be atleast 12h).

What am I missing here??
Can someone please help.
Thanks,
– Ajitabh.


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



- amitr0
— 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 understand this but my driver still needs to know what machine it is running on.
We enable/disable certain features depending on different smbios parameters.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Thursday, September 03, 2009 7:27 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] SMBIOS data in WDM driver.

I need to read the SMBIOS data using WMI in kernel mode driver.

Actually, as long as you are in the KM, the only thing you really need is SMBIOS Specification (which seems to be pretty straightforward and really easy to understand) and MmMapIoSpace()/MmUnmapIoSpace() to map and unmap the target physical memory into the virtual one on per-page basis - there is no need for WMI here whatsoever…

Anton Bassov


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

Ajitabh Saxena wrote:

Its working but I still need access to this information to know which
machine my driver is running one. We do not want our hardware to work
on ALL machines. Particular manufacturers should be disabled.

Good God. Again, I am aghast and astounded by the number of people in
the world whose primary job is to PREVENT the normal operation of my
computer.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

> Again, I am aghast and astounded by the number of people in the world whose primary job is

to PREVENT the normal operation of my computer.

WEll, as long as the OP speaks about his piece of hardware, he has the full right do enable/disable certain features of his controller the way he wishes and make his decisions upon the criteria he chooses - to be honest, I don’t see any particular problem with it. …

Anton Bassov

I understand this but why do you need to use WMI?

Ajitabh Saxena wrote:

I understand this but my driver still needs to know what machine it is running on.
We enable/disable certain features depending on different smbios parameters.

-----Original Message-----
From: xxxxx@hotmail.com

> I need to read the SMBIOS data using WMI in kernel mode driver.

Actually, as long as you are in the KM, the only thing you really
need is SMBIOS Specification (which seems to be pretty straightforward
and really easy to understand) and MmMapIoSpace()/MmUnmapIoSpace()
to map and unmap the target physical memory into the virtual one on
per-page basis - there is no need for WMI here whatsoever…

Anton Bassov