; Mellanox Technologies InfiniBand HCAs.
; Copyright 2008 Mellanox Technologies all Rights Reserved.

[Version]
Signature="$WINDOWS NT$"
Class=InfiniBandController
ClassGUID={58517E00-D3CF-40c9-A679-CEE5752F4491}
Provider=%MTL%
; must be synchronized with hca\drv.c
DriverVer=02/14/2010,2.1.0.5593
CatalogFile=mlx4_hca.cat


;*****************************************
; Destination directory section
;*****************************************

[DestinationDirs]
DefaultDestDir = %DIRID_DRIVERS%
MLX4HCA.UMCopyFiles = %DIRID_SYSTEM%
MLX4HCA.WOW64CopyFiles = %DIRID_SYSTEM_X86%
Wdf_CoInstaller_CopyFiles = %DIRID_SYSTEM%
Ibal.UMCopyFiles = %DIRID_SYSTEM%
Ibal.WOW64CopyFiles = %DIRID_SYSTEM_X86%
WinVerbs.CopySysFiles = %DIRID_DRIVERS%
WinVerbs.CopyDllFiles = %DIRID_SYSTEM%
WinMad.CopySysFiles = %DIRID_DRIVERS%
WinMad.CopyDllFiles = %DIRID_SYSTEM%


;*****************************************
; Class Install section
;*****************************************

[ClassInstall32]
AddReg=ClassAddReg

[ClassAddReg]
HKR,,,,"InfiniBand Channel Adapters"
HKR,,Icon,,-5
HKR,,SilentInstall,,1
HKR,,"UpperFilters",0x00010000,"ibbus"	; enable IBBUS/AL Filter driver loading.
HKR,,"UpperFilters",0x00010008,"WinVerbs" ; enable winverbs Filter driver load.
HKR,,"UpperFilters",0x00010008,"WinMad"


;*****************************************
; Device Install section
;*****************************************

[SourceDisksNames.x86]
1=%DiskId%,,,""

[SourceDisksNames.amd64]
1=%DiskId%,,,""

[SourceDisksNames.ia64]
1=%DiskId%,,,""

[SourceDisksFiles.x86]
mlx4_hca.sys = 1,,
mlx4u.dll = 1,,
mlx4ud.dll = 1,,
WdfCoInstaller01007.dll = 1,,
ibal.dll=1,,
ibald.dll=1,,
complib.dll=1,,
complibd.dll=1,,
ibbus.sys=1,,
winverbs.sys = 1,,
winverbs.dll = 1,,
winverbsd.dll = 1,,
winmad.sys = 1,,
winmad.dll = 1,,
winmadd.dll = 1,,

[SourceDisksFiles.amd64]
mlx4_hca.sys = 1,,
mlx4u.dll = 1,,
mlx4ud.dll = 1,,
mlx4u32.dll = 1,,
mlx4u32d.dll = 1,,
WdfCoInstaller01007.dll = 1,,
ibal.dll=1,,
ibald.dll=1,,
complib.dll=1,,
complibd.dll=1,,
cl32.dll=1,,
cl32d.dll=1,,
ibal32.dll=1,,
ibal32d.dll=1,,
ibbus.sys=1,,
winverbs.sys = 1,,
winverbs.dll = 1,,
winverbsd.dll = 1,,
winmad.sys = 1,,
winmad.dll = 1,,
winmadd.dll = 1,,

[SourceDisksFiles.ia64]
mlx4_hca.sys = 1,,
mlx4u.dll = 1,,
mlx4ud.dll = 1,,
mlx4u32.dll = 1,,
mlx4u32d.dll = 1,,
WdfCoInstaller01007.dll = 1,,
ibal.dll=1,,
ibald.dll=1,,
complib.dll=1,,
complibd.dll=1,,
cl32.dll=1,,
cl32d.dll=1,,
ibal32.dll=1,,
ibal32d.dll=1,,
ibbus.sys=1,,
winverbs.sys = 1,,
winverbs.dll = 1,,
winverbsd.dll = 1,,
winmad.sys = 1,,
winmad.dll = 1,,
winmadd.dll = 1,,


;*****************************************
; Mlx4HCA  Install Section
;*****************************************

[Manufacturer]
%MTL% = MLX4HCA.DeviceSection,ntx86,ntamd64,ntia64

[MLX4HCA.DeviceSection]
; empty since we don't support W9x/Me

[MLX4HCA.DeviceSection.ntx86]
%Mlx4_Hca.DeviceDesc%=MLX4HCA.DDInstall, MLX4\ConnectX_Hca

[MLX4HCA.DeviceSection.ntamd64]
%Mlx4_Hca.DeviceDesc%=MLX4HCA.DDInstall, MLX4\ConnectX_Hca

[MLX4HCA.DeviceSection.ntia64]
%Mlx4_Hca.DeviceDesc%=MLX4HCA.DDInstall, MLX4\ConnectX_Hca

[MLX4HCA.DDInstall.ntx86]
CopyFiles = MLX4HCA.CopyFiles
CopyFiles = MLX4HCA.UMCopyFiles
CopyFiles = Ibal.UMCopyFiles
CopyFiles = Ibbus.CopyFiles
CopyFiles = WinVerbs.CopySysFiles
CopyFiles = WinVerbs.CopyDllFiles
CopyFiles = WinMad.CopySysFiles
CopyFiles = WinMad.CopyDllFiles

[MLX4HCA.DDInstall.ntamd64]
CopyFiles = MLX4HCA.CopyFiles
CopyFiles = MLX4HCA.UMCopyFiles
CopyFiles = MLX4HCA.WOW64CopyFiles
CopyFiles = Ibal.UMCopyFiles
CopyFiles = Ibal.WOW64CopyFiles
CopyFiles = Ibbus.CopyFiles
CopyFiles = WinVerbs.CopySysFiles
CopyFiles = WinVerbs.CopyDllFiles
CopyFiles = WinMad.CopySysFiles
CopyFiles = WinMad.CopyDllFiles

[MLX4HCA.DDInstall.ntia64]
CopyFiles = MLX4HCA.CopyFiles
CopyFiles = MLX4HCA.UMCopyFiles
CopyFiles = MLX4HCA.WOW64CopyFiles
CopyFiles = Ibal.UMCopyFiles
CopyFiles = Ibal.WOW64CopyFiles
CopyFiles = Ibbus.CopyFiles
CopyFiles = WinVerbs.CopySysFiles
CopyFiles = WinVerbs.CopyDllFiles
CopyFiles = WinMad.CopySysFiles
CopyFiles = WinMad.CopyDllFiles


[MLX4HCA.DDInstall.ntx86.Services]
AddService = mlx4_hca,%SPSVCINST_ASSOCSERVICE%,MLX4HCA.ServiceInstall,MLX4HCA.EventLog
AddService = ibbus,,Ibbus.ServiceInstall,IBBUS.EventLog
AddService = WinVerbs,,WinVerbs.ServiceInstall
AddService = WinMad,,WinMad.ServiceInstall

[MLX4HCA.DDInstall.ntamd64.Services]
AddService = mlx4_hca,%SPSVCINST_ASSOCSERVICE%,MLX4HCA.ServiceInstall,MLX4HCA.EventLog
AddService = ibbus,,Ibbus.ServiceInstall,IBBUS.EventLog
AddService = WinVerbs,,WinVerbs.ServiceInstall
AddService = WinMad,,WinMad.ServiceInstall

[MLX4HCA.DDInstall.ntia64.Services]
AddService = mlx4_hca,%SPSVCINST_ASSOCSERVICE%,MLX4HCA.ServiceInstall,MLX4HCA.EventLog
AddService = ibbus,,Ibbus.ServiceInstall,IBBUS.EventLog
AddService = WinVerbs,,WinVerbs.ServiceInstall
AddService = WinMad,,WinMad.ServiceInstall


;*****************************************
; File Copy
;*****************************************

[MLX4HCA.CopyFiles]
mlx4_hca.sys

[MLX4HCA.UMCopyFiles]
mlx4u.dll,,,2
mlx4ud.dll,,,2

[MLX4HCA.WOW64CopyFiles]
mlx4u.dll,mlx4u32.dll,,2
mlx4ud.dll,mlx4u32d.dll,,2

[Ibal.UMCopyFiles]
ibal.dll,,,2
ibald.dll,,,2
complib.dll,,,2
complibd.dll,,,2

[Ibal.WOW64CopyFiles]
ibal.dll,ibal32.dll,,2
ibald.dll,ibal32d.dll,,2
complib.dll,cl32.dll,,2
complibd.dll,cl32d.dll,,2

[Ibbus.CopyFiles]
ibbus.sys

[WinVerbs.CopySysFiles]
winverbs.sys

[WinVerbs.CopyDllFiles]
winverbs.dll,,,2
winverbsd.dll,,,2

[WinMad.CopySysFiles]
winmad.sys

[WinMad.CopyDllFiles]
winmad.dll,,,2
winmadd.dll,,,2


;*****************************************
; MLX4HCA Service Install section
;*****************************************

[MLX4HCA.ServiceInstall]
DisplayName     = %MLX4HCA.ServiceDesc%
ServiceType     = %SERVICE_KERNEL_DRIVER%
StartType       = %SERVICE_BOOT_START%
ErrorControl    = %SERVICE_ERROR_NORMAL%
ServiceBinary   = %12%\mlx4_hca.sys
LoadOrderGroup  = extended base
AddReg          = MLX4HCA.ParamsReg

[MLX4HCA.EventLog]
AddReg = MLX4HCA.AddEventLogReg

[MLX4HCA.AddEventLogReg]
HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\mlx4_hca.sys"
HKR, , TypesSupported,   0x00010001, 7

[MLX4HCA.ParamsReg]
HKR,,DeviceCharacteristics,0x10001,0x0100         ; Use same security checks on relative opens
HKR,,Security,,"D:P(A;;GA;;;BA)(A;;GA;;;SY)"      ; Allow generic-all access to Built-in administrators and Local system 
HKR,"Parameters","DebugLevel",%REG_DWORD%,0x00000003
HKR,"Parameters","DebugFlags",%REG_DWORD%,0x0000ffff
HKLM,"System\CurrentControlSet\Control\WMI\GlobalLogger\F8C96A49-AE22-41e9-8025-D7E416884D89","Flags",%REG_DWORD%,0xffff
HKLM,"System\CurrentControlSet\Control\WMI\GlobalLogger\F8C96A49-AE22-41e9-8025-D7E416884D89","Level",%REG_DWORD%,0x3


;*****************************************
; IBBUS Service Install section
;*****************************************

[Ibbus.ServiceInstall]
DisplayName     = %Ibbus.ServiceDesc%
ServiceType     = %SERVICE_KERNEL_DRIVER%
StartType       = %SERVICE_BOOT_START%
ErrorControl    = %SERVICE_ERROR_NORMAL%
ServiceBinary   = %12%\ibbus.sys
LoadOrderGroup  = PnP Filter
AddReg          = Ibbus.ParamsReg
Dependencies	= mlx4_hca

[IBBUS.EventLog]
AddReg = IBBUS.AddEventLogReg

[IBBUS.AddEventLogReg]
HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\ibbus.sys"
HKR, , TypesSupported,   0x00010001, 7


[Ibbus.ParamsReg]
HKR,"Parameters","IbalDebugLevel",%REG_DWORD%,2
HKR,"Parameters","IbalDebugFlags",%REG_DWORD%,0x00ffffff
HKR,"Parameters","SmiPollInterval",%REG_DWORD_NO_CLOBBER%,20000
HKR,"Parameters","IocQueryTimeout",%REG_DWORD_NO_CLOBBER%,250
HKR,"Parameters","IocQueryRetries",%REG_DWORD_NO_CLOBBER%,4
HKR,"Parameters","IocPollInterval",%REG_DWORD_NO_CLOBBER%,30000
HKR,"Parameters","DebugFlags",%REG_DWORD%,0x80000000
HKR,"Parameters","ReportPortNIC",%REG_DWORD%,1

HKR,"Parameters","StaticChild",%REG_MULTI_SZ_NO_CLOBBER%,IPoIB
;use the following line to add your device
;HKR,"Parameters","StaticChild",%REG_MULTI_SZ_APPEND%,"XsigoBus"

HKR,"Parameters\IPoIB","DeviceId",%REG_SZ%,"IBA\IPoIB"
HKR,"Parameters\IPoIB","CompatibleId",%REG_MULTI_SZ%,"IBA\SID_1000066a00020000"
HKR,"Parameters\IPoIB","HardwareId",%REG_MULTI_SZ%,"IBA\IPoIB"
HKR,"Parameters\IPoIB","Description",%REG_SZ%,"OpenIB IPoIB Adapter"
HKR,"Parameters\IPoIB","PartitionKey",%REG_SZ%,"FFFF"

HKR,"Parameters\XsigoBus","DeviceId",%REG_SZ%,"IBA\XsigoBus"
HKR,"Parameters\XsigoBus","CompatibleId",%REG_MULTI_SZ%,"IBA\SID_0000000002139702"
HKR,"Parameters\XsigoBus","HardwareId",%REG_MULTI_SZ%,"IBA\XsigoBus"
HKR,"Parameters\XsigoBus","Description",%REG_SZ%,"Xsigo Virtual Bus"
HKR,"Parameters\XsigoBus","PartitionKey",%REG_SZ%,"FFFF"

;*****************************************
; WinVerbs Service Install section
;*****************************************

[WinVerbs.ServiceInstall]
DisplayName = %WinVerbs.ServiceDesc%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_BOOT_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\winverbs.sys
LoadOrderGroup = PNP Filter
Dependencies   = ibbus

;*****************************************
; WinMad Service Install section
;*****************************************

[WinMad.ServiceInstall]
DisplayName = %WinMad.ServiceDesc%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_BOOT_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\winmad.sys
LoadOrderGroup = PNP Filter
Dependencies   = winverbs


;*****************************************
; Uninstall section (not used now)
;*****************************************

[DefaultUninstall.ntx86]
DelFiles   = MLX4HCA.CopyFiles
DelFiles   = MLX4HCA.UMCopyFiles
DelReg     = MLX4HCA.ParamsReg
DelReg     = MLX4HCA.AddEventLogReg
DelReg     = ClassAddReg
DelFiles   = Ibal.UMCopyFiles
DelFiles   = Ibbus.CopyFiles
DelReg     = Ibbus.ParamsReg
DelFiles   = WinVerbs.CopySysFiles
DelFiles   = WinVerbs.CopyDllFiles
DelFiles   = WinMad.CopySysFiles
DelFiles   = WinMad.CopyDllFiles

[DefaultUninstall.ntamd64]
DelFiles   = MLX4HCA.CopyFiles
DelFiles   = MLX4HCA.UMCopyFiles
DelFiles   = MLX4HCA.WOW64CopyFiles
DelReg     = MLX4HCA.ParamsReg
DelReg     = MLX4HCA.AddEventLogReg
DelReg     = ClassAddReg
DelFiles   = Ibal.UMCopyFiles
DelFiles   = Ibal.WOW64CopyFiles
DelFiles   = Ibbus.CopyFiles
DelReg     = Ibbus.ParamsReg
DelFiles   = WinVerbs.CopySysFiles
DelFiles   = WinVerbs.CopyDllFiles
DelFiles   = WinMad.CopySysFiles
DelFiles   = WinMad.CopyDllFiles

[DefaultUninstall.ntia64]
DelFiles   = MLX4HCA.CopyFiles
DelFiles   = MLX4HCA.UMCopyFiles
DelFiles   = MLX4HCA.WOW64CopyFiles
DelReg     = MLX4HCA.ParamsReg
DelReg     = MLX4HCA.AddEventLogReg
DelReg     = ClassAddReg
DelFiles   = Ibal.UMCopyFiles
DelFiles   = Ibal.WOW64CopyFiles
DelFiles   = Ibbus.CopyFiles
DelReg     = Ibbus.ParamsReg
DelFiles   = WinVerbs.CopySysFiles
DelFiles   = WinVerbs.CopyDllFiles
DelFiles   = WinMad.CopySysFiles
DelFiles   = WinMad.CopyDllFiles

[DefaultUninstall.Services]
DelService = WinMad,%SPSVCINST_STOPSERVICE%
DelService = WinVerbs,%SPSVCINST_STOPSERVICE%
DelService = Ibbus,%SPSVCINST_STOPSERVICE%
DelService = mlx4_hca,%SPSVCINST_STOPSERVICE%

;*****************************************
; WDF Coinstaller installation section
;*****************************************

[MLX4HCA.DDInstall.ntx86.CoInstallers]
AddReg=Wdf_CoInstaller_AddReg
CopyFiles=Wdf_CoInstaller_CopyFiles

[MLX4HCA.DDInstall.ntamd64.CoInstallers]
AddReg=Wdf_CoInstaller_AddReg
CopyFiles=Wdf_CoInstaller_CopyFiles

[MLX4HCA.DDInstall.ntia64.CoInstallers]
AddReg=Wdf_CoInstaller_AddReg
CopyFiles=Wdf_CoInstaller_CopyFiles

[Wdf_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01007.dll,WdfCoInstaller"

[Wdf_CoInstaller_CopyFiles]
WdfCoInstaller01007.dll

[MLX4HCA.DDInstall.ntx86.Wdf]
KmdfService = mlx4_hca,WvWdfSect
KmdfService = WinVerbs,WvWdfSect
KmdfService = WinMad,WvWdfSect

[MLX4HCA.DDInstall.ntamd64.Wdf]
KmdfService = mlx4_hca,WvWdfSect
KmdfService = WinVerbs,WvWdfSect
KmdfService = WinMad,WvWdfSect

[MLX4HCA.DDInstall.ntia64.Wdf]
KmdfService = mlx4_hca,WvWdfSect
KmdfService = WinVerbs,WvWdfSect
KmdfService = WinMad,WvWdfSect

[WvWdfSect]
KmdfLibraryVersion = 1.7


;*****************************************
; Strings
;*****************************************

[Strings]
Mlx4HcaClassGuid = "{31B0B28A-26FF-4dca-A6FA-E767C7DFBA20}"
MTL="Mellanox Technologies Ltd."
MLX4HCA.ServiceDesc = "Mellanox ConnectX Virtual Infiband Driver"
Ibbus.ServiceDesc = "Mellanox InfiniBand Bus/AL (Filter Driver)"
WinVerbs.ServiceDesc = "WinVerbs Service"
WinMad.ServiceDesc = "WinMad Service"
Mlx4_Hca.DeviceDesc="Mellanox ConnectX Virtual Channel Adapter"
DiskId = "Mellanox Mlx4 HCA installation disk"
SPSVCINST_NULL         = 0x0
SPSVCINST_ASSOCSERVICE = 0x00000002
SPSVCINST_STOPSERVICE  = 0x00000200
SERVICE_KERNEL_DRIVER  = 1
SERVICE_BOOT_START     = 0
SERVICE_DEMAND_START   = 3
SERVICE_ERROR_NORMAL   = 1
REG_DWORD              = 0x00010001
REG_DWORD_NO_CLOBBER   = 0x00010003
REG_MULTI_SZ	       = 0x00010000
REG_MULTI_SZ_NO_CLOBBER = 0x00010002
REG_MULTI_SZ_APPEND    = 0x00010008
DIRID_SYSTEM           = 11
DIRID_DRIVERS          = 12
DIRID_SYSTEM_X86       = 16425
