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

Freyensee, James P james.p.freyensee at intel.com
Tue May 8 12:37:37 PDT 2012


Since I discovered that the .inf file overrides the initial values I saw being set in NVMeFindAdapter(), I was just trying "to-go-with-the-flow" and use the .inf file since it appeared that was the preferred method of creating registry keys.  Then I'd call NVMeWriteRegistry() to update the registry entries I created to see the values I want to see.

I believe I did verify I'm passing a non-zero value.  I made a change to the driver to see if I figured this out, but I have been unable to verify if this worked because my test system's hard drive crashed-and-burned and haven't been able to fix it yet :(.


From: Luse, Paul E
Sent: Tuesday, May 08, 2012 12:33 PM
To: Freyensee, James P; nvmewin at lists.openfabrics.org
Subject: RE: Exposing read-only values in registry for validation...

Jay-

Sorry, read this too quickly.  The comments on the non-storport API still applies, but I didn't realize you were using the inf to create the keys and NVMeWriteRegistry()to write to the reg.  Did you verify that are passing in a non-zero value into that function as we don't have other callers to it.

Thx
Paul

From: Luse, Paul E
Sent: Tuesday, May 08, 2012 12:15 PM
To: Freyensee, James P; nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>
Subject: RE: Exposing read-only values in registry for validation...

Jay,

A storport minipoprt has a limit set of API that are 'legal' you are proposing calls that we can't use so I wouldn't even try to investigate you're implemented.  Instead look at http://msdn.microsoft.com/en-us/library/windows/hardware/ff567492%28v=vs.85%29.aspx and see if works for you.

Thx
Paul

From: nvmewin-bounces at lists.openfabrics.org<mailto:nvmewin-bounces at lists.openfabrics.org> [mailto:nvmewin-bounces at lists.openfabrics.org]<mailto:[mailto:nvmewin-bounces at lists.openfabrics.org]> On Behalf Of Freyensee, James P
Sent: Monday, May 07, 2012 1:56 PM
To: nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>
Subject: [nvmewin] Exposing read-only values in registry for validation...

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/20120508/a2d9a3bd/attachment.html>


More information about the nvmewin mailing list