[nvmewin] Exposing read-only values in registry for validation...

Freyensee, James P james.p.freyensee at intel.com
Mon May 7 13:56:21 PDT 2012


I want to expose the values of 'NumMsiMsgGranted' and 'NumMsiMsgGranted'in the NVMe driver in the registry as read-only for validation purposes (by eyeball or by code I have which can go get any registry key asked).

I thought just using ZwCreateKey() or RtlWriteRegistryValue() could serve my purpose.  However, I see that registry entries like 'Device Entries' are defined in nvme.inf and then accessed by the NVMeFetchRegistry() method.  Since I assumed 'NumMsiMsgGranted' and 'NumMsiMsgGranted' would be set upon driver load, I thought NVMeFetchRegistry() could write the values to new registry entries via:

              memcpy((PVOID)pBuf, (PVOID)(&pAE->ResMapTbl.NumMsiMsgGranted),
               sizeof(ULONG));
              NVMeWriteRegistry(pAE, NUMMSIMSGGRANTED,
                                             Type, pBuf,
                                             Len);

With those registry entries defined in the .inf file so they are already created:

HKR, Parameters\Device, NumMsiMsgGranted, %REG_DWORD%,  0x00000000 ;  Number of MSI messages granted in system. RO entry.
HKR, Parameters\Device, NumActiveCores, %REG_DWORD%, 0x00000000 ; Number of active cores in system. This would be a RO entry.

However, it does not seem to be the case as I still see 0's.

Is there a recommended way of creating registry values to expose NVMe variables for state-validating purposes?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20120507/3784e2e4/attachment.html>


More information about the nvmewin mailing list