Equivalent of GetSystemFirmwareTable in kernel mode

Hi,

I am able to use EnumSystemFirmwareTables/GetSystemFirmwareTable to read the FW Tables from user-side.

However If I want to read the same information from the kernel mode driver, what is the equivalent DDI?

Thanks in advance

For what purpose?

d

debt from my phone


From: xxxxx@gmail.com
Sent: 3/15/2012 7:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Equivalent of GetSystemFirmwareTable in kernel mode

Hi,

I am able to use EnumSystemFirmwareTables/GetSystemFirmwareTable to read the FW Tables from user-side.

However If I want to read the same information from the kernel mode driver, what is the equivalent DDI?

Thanks in advance


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

Hi Doron,

This is to allow the UEFI FW to pass custom information in a custom ACPI Table to be consumed by a kernel mode driver.

Regards,
Thiru

What data are you consuming in the driver?

d

debt from my phone


From: xxxxx@gmail.com
Sent: 3/15/2012 7:35 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Equivalent of GetSystemFirmwareTable in kernel mode

Hi Doron,

This is to allow the UEFI FW to pass custom information in a custom ACPI Table to be consumed by a kernel mode driver.

Regards,
Thiru


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

The data is related to device calibration and configuration, which cannot be done through the DSDT.

I am looking for an equivalent mechanism of what is already available in the user-mode.

Regards,
Thiru

If it is exposed via acpi, can you expose it on your acpi enumerated device and send IOCTL_ACPI_XXX down the stack to retrieve the data?

d

debt from my phone


From: xxxxx@gmail.com
Sent: 3/15/2012 7:45 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Equivalent of GetSystemFirmwareTable in kernel mode

The data is related to device calibration and configuration, which cannot be done through the DSDT.

I am looking for an equivalent mechanism of what is already available in the user-mode.

Regards,
Thiru


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

Hi Doron,

Thanks for your reply.

Exposing the configuration and calibration data through ACPI Device namespace (i.e. through DSDT/SSDT) is not an option as the data is produced by the tool running in UEFI FW, where as DSDT/SSDT had to be compiled through ACPI Compiler offline.

I am able to expose this data through a custom ACPI Table and access it through the user-side APIs viz. EnumSystemFirmwareTables/GetSystemFirmwareTable.
The trouble is to find the kernel side equivalent APIs.

Regards,
Thiru

On 3/15/2012 10:13 PM, xxxxx@gmail.com wrote:

Hi,

I am able to use EnumSystemFirmwareTables/GetSystemFirmwareTable to read the FW Tables from user-side.

However If I want to read the same information from the kernel mode driver, what is the equivalent DDI?

Thanks in advance

See if this helps.

typedef enum _SYSTEM_INFORMATION_CLASS {
[…]
SystemFirmwareInformation = 0x4c, // W2k3SP1 and later
[…]
} SYSTEM_INFORMATION_CLASS;

// Used with SystemFirmwareInformation information class
// SystemInfoBufferSize = sizeof(SYSTEM_FIRMWARE_INFORMATION) - 1 +
FirmwareTableSize
// Table data is returned at the end of the SYSTEM_FIRMWARE_INFORMATION.
typedef struct _SYSTEM_FIRMWARE_INFORMATION {
ULONG FirmwareTableProviderSignature;
ULONG Unknown;
ULONG FirmwareTableID;
ULONG FirmwareTableSize;
UCHAR Data[1];
} SYSTEM_FIRMWARE_INFORMATION, *PSYSTEM_FIRMWARE_INFORMATION;

Hi George,

Thanks a lot for your reply.

It seems like I do not find SystemFirmwareInformation and SYSTEM_FIRMWARE_INFORMATION declarations in the WDK.

Since you provide these already, I could call the NtQuerySystemInformation and get back the result of what user side API EnumSystemFirmwareTables returns.

But I could not get the GetSystemFirmwareTable equivalent information. Any ideas?

Regards,
Thiru

On 3/16/2012 2:08 PM, xxxxx@gmail.com wrote:

Hi George,

Thanks a lot for your reply.

It seems like I do not find SystemFirmwareInformation and SYSTEM_FIRMWARE_INFORMATION declarations in the WDK.

Since you provide these already, I could call the NtQuerySystemInformation and get back the result of what user side API EnumSystemFirmwareTables returns.

But I could not get the GetSystemFirmwareTable equivalent information. Any ideas?

Regards,
Thiru

Thiru,

Why not set a couple of breakpoints and figure it out for yourself?

kd> x nt!*FirmwareTable*
fffff80002ad1b70 nt!ExpGetSystemFirmwareTableInformation = <no type>information&gt;<br>fffff8000283c9b0 nt!ExpFirmwareTableProviderListHead = information>
fffff80002ad6f40 nt!ExpRegisterFirmwareTableInformationHandler = <no>type information&gt;<br>fffff8000283c940 nt!ExpFirmwareTableResource =
fffff8000280d440 nt!WmipFirmwareTableArray = <no type information><br>fffff8000276d6e0 nt!WmipFirmwareTableHandler =

Set a breakpoint at nt!ExpGetSystemFirmwareTableInformation, then call
GetSystemFirmwareTable and look at the call stack when the breakpoint is
hit.

You may be able to access the same information using WMI.

> But I could not get the GetSystemFirmwareTable equivalent information. <

Why can’t you?

Regards,

gmg.