[nvmewin] Static Driver Verification

Judy Brock-SSI judy.brock at ssi.samsung.com
Sun Mar 16 07:42:32 PDT 2014



  >> To work around this, I went into sdv_storport.h (WindowsKits/8.1/Tools/sdv/osmodel/storport). I made the

  >> StorPortReadRegisterUlong64 prototype there match the prototype in storport.h.

  >> I've reported this to Microsoft and they are working on a permanent fix.



We hit this some time back too.



Rather than modify an MS header file we commented out the usage of the StorPortReadRegisterUlong64 (as highlighted below) since SDV needs to be error free for reasons mentioned below. I think we should consider changing the driver to do the same to avoid the problem.



#if 0

//#if (NTDDI_VERSION > NTDDI_WIN7) && defined(_WIN64)

    CAP.AsUlonglong = StorPortReadRegisterUlong64(pAE,

        (PULONG64)(&pAE->pCtrlRegister->CAP));

#else

    CAP.HighPart = StorPortReadRegisterUlong(pAE,

        (PULONG)(&pAE->pCtrlRegister->CAP.HighPart));

    CAP.LowPart = StorPortReadRegisterUlong(pAE,

        (PULONG)(&pAE->pCtrlRegister->CAP.LowPart));

#endif



Thanks,

Judy



-----Original Message-----
From: nvmewin-bounces at lists.openfabrics.org [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Thomas.Freeman at hgst.com
Sent: Tuesday, February 04, 2014 6:54 AM
To: Speer, Kenny
Cc: nvmewin at lists.openfabrics.org
Subject: Re: [nvmewin] Static Driver Verification



I'm working with code from revision_1.2.

Tom Freeman

SSD Device Drivers/Firmware

HGST, a Western Digital company

Thomas.Freeman at HGST.com<mailto:Thomas.Freeman at HGST.com>

507-322-2311/232311









             "Speer, Kenny"

             <Kenny.Speer at neta

             pp.com>                                                    To

                                       "Thomas.Freeman at hgst.com<mailto:Thomas.Freeman at hgst.com>"

             02/03/2014 06:15          <Thomas.Freeman at hgst.com<mailto:Thomas.Freeman at hgst.com>>

             PM                                                         cc

                                       "nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>"

                                       <nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>>

                                                                   Subject

                                       RE: [nvmewin] Static Driver

                                       Verification





















I did briefly but ran into other issues.  Which branch are you building from?



-----Original Message-----

From: Thomas.Freeman at hgst.com<mailto:Thomas.Freeman at hgst.com> [mailto:Thomas.Freeman at hgst.com]

Sent: Monday, February 3, 2014 4:12 PM

To: Speer, Kenny

Cc: nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>

Subject: RE: [nvmewin] Static Driver Verification



Kenny.... Not sure if you've tried to run this yet.... I ran into a problem running the SDV in a Windows 8/x64 config.

I get a message saying that there aren't enough parms being passed into StorPortReadRegisterUlong64.

To work around this, I went into sdv_storport.h (WindowsKits/8.1/Tools/sdv/osmodel/storport). I made the

StorPortReadRegisterUlong64 prototype there match the prototype in storport.h.

I've reported this to Microsoft and they are working on a permanent fix.



Tom Freeman

SSD Device Drivers/Firmware

HGST, a Western Digital company

Thomas.Freeman at HGST.com<mailto:Thomas.Freeman at HGST.com>

507-322-2311/232311









             "Speer, Kenny"

             <Kenny.Speer at neta

             pp.com>                                                    To

                                       "Thomas.Freeman at hgst.com<mailto:Thomas.Freeman at hgst.com>"

             02/01/2014 05:37          <Thomas.Freeman at hgst.com<mailto:Thomas.Freeman at hgst.com>>,

             PM                        "nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>"

                                       <nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>>

                                                                        cc



                                                                   Subject

                                       RE: [nvmewin] Static Driver

                                       Verification





















Yes and IMHO, those need to be fixed and the tools should run error/warning free.  The majority of the warnings are due to annotations which exist in the definitions of the functions but not in their declarations.



It's good practice, again, IMO, to annotate and to do it in both. See

http://msdn.microsoft.com/en-us/library/windows/desktop/aa383701

(v=vs.85).aspx for more info on SAL annotations.



Haven't run SDV yet, I'll do that now, not sure how long it takes on this solution but on my other projects it takes 8 hours on a 4 core i7 with 32G mem.



~kenny



-----Original Message-----

From: nvmewin-bounces at lists.openfabrics.org<mailto:nvmewin-bounces at lists.openfabrics.org>

[mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Thomas.Freeman at hgst.com<mailto:Thomas.Freeman at hgst.com>

Sent: Saturday, February 1, 2014 2:02 PM

To: nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>

Subject: [nvmewin] Static Driver Verification







I'm new to HCK testing, but I understand part of the testing requires a Driver Verification Log (which contains the results from Code Analysis and Static Driver Verifier). This is required for the Static Tools Logo test (under the Device.Fundamentals category).

When I run those tools, I'm getting a large number of errors. The code analysis shows over 50 warnings and the Static Driver Verifier fails because the Callback roletypes (sp_DRIVER_INITIALIZE, HW_INITIALIZE, etc) are not defined. Fixing the roletypes allows a new set of errors to appear.

I'm running with VS 2013 and WDK 8.1.

Am I missing something? Has anyone else run these tools against the code?





Tom Freeman

SSD Device Drivers/Firmware

HGST, a Western Digital company

Thomas.Freeman at HGST.com<mailto:Thomas.Freeman at HGST.com>

507-322-2311/232311



_______________________________________________

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<mailto:nvmewin at lists.openfabrics.org>

http://lists.openfabrics.org/cgi-bin/mailman/listinfo/nvmewin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20140316/f1130c65/attachment.html>


More information about the nvmewin mailing list