[nvmewin] good spot to write to registry?

Freyensee, James P james.p.freyensee at intel.com
Wed May 16 09:14:23 PDT 2012


Maybe.  Really what I want is the ability for me or a validation person to be able to quickly see values of interesting variables.  Writing a value to the registry that won't change after initialization is one way, plus I have old C# code laying around that searches the registry  that may make it possible to code up some automation into checking a couple values we care about.  I am going to set a compile flag so this won't be on all the time.

I would have to look into StorPortLogSystemEvent() to understand it better if this could be an easier solution of writing out a value and being able to quickly see certain values.

-----Original Message-----
From: Picard, Tom S 
Sent: Wednesday, May 16, 2012 7:45 AM
To: Robles, Raymond C; Freyensee, James P; nvmewin at lists.openfabrics.org
Subject: RE: [nvmewin] good spot to write to registry?

James, 

Could StorPortLogSystemEvent() accomplish what you want, better than writes to registry ?
Unless you specifically want the data in registry as opposed to system log  . .  .

Tom

-----Original Message-----
From: nvmewin-bounces at lists.openfabrics.org [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Robles, Raymond C
Sent: Tuesday, May 15, 2012 9:03 PM
To: Freyensee, James P; nvmewin at lists.openfabrics.org
Subject: Re: [nvmewin] good spot to write to registry?

StorPortRegistryWrite must be called at PASSIVE IRQL. HwStorInitialize is called at DIRQL, which is why you are seeing a failure. HwStorFindAdapter is called at PASSIVE IRQL which is why we placed the registry access there. If you need to do additional registry reads/writes after HwStorFindAdapter you could put the call inside NVMePassiveInitialize since its called at PASSIVE IRQL.

Thanks,
Ray

On May 15, 2012, at 6:49 PM, "Freyensee, James P" <james.p.freyensee at intel.com<mailto:james.p.freyensee at intel.com>> wrote:

Is there a good spot in the NVMe driver to write to the registry via NVMeWriteRegistry() when all the initialization and internal variables are set?

It seems like all initialization can end in NVMeInitialize() at the code:

    if (pAE->ntldrDump == FALSE) {
        /* Enumerate granted MSI/MSI-X messages if there is any */
        if (NVMeEnumMsiMessages(pAE) == FALSE) {
            NVMeFreeBuffers(pAE);
            return (FALSE);
        }

        /* Call StorPortPassiveInitialization to enable passive init */
        StorPortEnablePassiveInitialization(pAE, NVMePassiveInitialize);
              return (TRUE);

and all the internal variables and tables are set in the driver at this point.  However, if you wanted to write a value out to the registry before the return(), it will fail here in NVMeInitialize().

BUT, NVMeWriteRegistry() will succeed if called within NVMeFindAdapter().  However, not all the important, internal variables are set yet in this function.  For example, pAE->ResMapTbl.NumMsiMsgGranted is not set by the system at this point, which is something I care about.

NVMeWriteRegistry() is using StorPortWriteRegistry(), and it seems to be finicky when you can actually successfully use it.  Unfortunately it only returns TRUE or FALSE and gives no further info what really failed and why, so I am not sure what is going on.

Maybe someone might know?  Thanks!
_______________________________________________
nvmewin mailing list
nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/nvmewin
_______________________________________________
nvmewin mailing list
nvmewin at lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/nvmewin



More information about the nvmewin mailing list