;pvscsii.inf
;This file contains the information required to load the driver for the VMware PVSCSI Controller
; Copyright (C) 2001 - 2019, VMware, Inc.

[version]
Signature="$Windows NT$"
Class=SCSIAdapter
ClassGuid={4D36E97B-E325-11CE-BFC1-08002BE10318}
Provider=%VMWARE%
PnpLockdown=1
; real date 08/02/2019
DriverVer=08/02/2018,1.3.15.0

[ControlFlags]
ExcludeFromSelect = *

[SourceDisksNames]
1 = %DSKID1%,pvscsii.sys,,

[SourceDisksFiles]
pvscsii.sys = 1,,

[Manufacturer]
%VMWARE%=pvscsi,NTx86,NTamd64

; ##################################################

[pvscsi.NTx86]
%DEVICE%=DDInstall, PCI\VEN_15AD&DEV_07C0

[pvscsi.NTamd64]
%DEVICE%=DDInstall, PCI\VEN_15AD&DEV_07C0


; ##################################################


[DDInstall.NT]
CopyFiles=pvscsi.CopyFiles


; ##################################################

[DDInstall.NT.HW]
AddReg=enableMSI.reg
Include=machine.inf
Needs=PciIoSpaceNotRequired.HW


; ##################################################

[pvscsi.CopyFiles]
pvscsii.sys,,,2


; ##################################################

[DDInstall.NT.Services]
AddService=pvscsi,2,Service_Install,EventLog_Install


; ##################################################

[DestinationDirs]
pvscsi.CopyFiles = 12
DefaultDestDir=12

; ##################################################

[Service_Install]
DisplayName=%pvscsi.DiskName%
ServiceType=1     ; %SERVICE_KERNEL_DRIVER%
StartType=0       ; %SERVICE_BOOT_START%
ErrorControl=1    ; %SERVICE_ERROR_NORMAL%
ServiceBinary=%12%\pvscsii.sys
LoadOrderGroup=SCSI Miniport

; We need to force the use of \Driver\pvscsi32 as the driver object name,
; otherwise the crash dump driver loader functions cannot find the driver.
; StartName entry defined in the INF format is supposed to facilitate that,
; but at least on win2k3sp2-32 and win2k8-datacenter-32 the driver installer
; interpretes StartName as the name of the account to start the service under,
; which is an incorrect interpretation for SERVICE_KERNEL_DRIVER type. As a
; work around ObjectName registry entry is added directly using brute-force.

AddReg=busTypeSAS,pnpsafe_pci_addreg,vmware_installers_addreg
DelReg=driverObjectName.del

; ##################################################

[busTypeSAS]
HKR, "Parameters", "BusType", 0x00010001, 0x0000000A     ; BusTypeSAS

[enableMSI.reg]
HKR, Interrupt Management,, %FLG_ADDREG_KEYONLY%
HKR, Interrupt Management\MessageSignaledInterruptProperties,, %FLG_ADDREG_KEYONLY%
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, \
     %FLG_ADDREG_TYPE_DWORD%, 1
HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, \
     %FLG_ADDREG_TYPE_DWORD%, 1

[pnpsafe_pci_addreg]
HKR, "Parameters\PnpInterface", "5", 0x00010001, 0x00000001

[vmware_installers_addreg]
HKR,, %pvscsi.installers.value.name%, 0x00010002, %pvscsi.installers.value.windows%
;; FLG_ADDREG_NOCLOBBER | FLG_ADDREG_TYPE_MULTI_SZ

[driverObjectName.del]
HKR, , "ObjectName"

[EventLog_Install]
AddReg = EventLog_AddReg

[EventLog_AddReg]
HKR,,EventMessageFile,%FLG_ADDREG_TYPE_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll"
HKR,,TypesSupported,%FLG_ADDREG_TYPE_DWORD%,7

[strings]
pvscsi.installers.value.name="vwdk.installers"
pvscsi.installers.value.windows="Windows"
pvscsi.DiskName="pvscsi Storage Controller Driver"
VMWARE="VMware, Inc."
DEVICE="VMware PVSCSI Controller"
DSKID1="VMware PVSCSI Controller Installation Disk 1"
FLG_ADDREG_KEYONLY = 0x00000010
FLG_ADDREG_TYPE_DWORD = 0x00010001
FLG_ADDREG_TYPE_EXPAND_SZ = 0x00020000
FLG_DELREG_MULTI_SZ_DELSTRING = 0x00018002
