;/*++
;
;Copyright (c) 2010-2020, Intel Corporation
;
;Abstract:
;    INF file for installing Thunderbolt Bus driver
;
;--*/

[Version]
Signature="$WINDOWS NT$"
Class       = System
ClassGuid   = {4D36E97D-E325-11CE-BFC1-08002BE10318}
Provider    = %Intel%
CatalogFile = TbtHostController.cat
DriverVer = 05/12/2020,1.41.914.0

[DestinationDirs]
DefaultDestDir = 12
UMDriverCopy = 12,UMDF

[SourceDisksNames]
1 = %DiskName%,,,""

[SourceDisksFiles]
TbtBusDrv.sys  = 1,,
TbtFilterDrv.dll = 1,,

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

[Manufacturer]
%Intel% = Thunderbolt,NTamd64.10.0...16299

[Thunderbolt.NTamd64.10.0...16299]
; DisplayName                Section            Device Id
; -----------                -------            ---------
%TbtBusDrv_DeviceDesc1575% = TbtBusDrv_Device, PCI\VEN_8086&DEV_1575&CC_0880
%TbtBusDrv_DeviceDesc1577% = TbtBusDrv_Device, PCI\VEN_8086&DEV_1577&CC_0880
%TbtBusDrv_DeviceDesc15BF% = TbtBusDrv_Device, PCI\VEN_8086&DEV_15BF&CC_0880
%TbtBusDrv_DeviceDesc15D2% = TbtBusDrv_Device, PCI\VEN_8086&DEV_15D2&CC_0880
%TbtBusDrv_DeviceDesc15D9% = TbtBusDrv_Device, PCI\VEN_8086&DEV_15D9&CC_0880
%TbtBusDrv_DeviceDesc15E8% = TbtBusDrv_Device, PCI\VEN_8086&DEV_15E8&CC_0880
%TbtBusDrv_DeviceDesc15EB% = TbtBusDrv_Device, PCI\VEN_8086&DEV_15EB&CC_0880
%TbtBusDrv_DeviceDesc1137% = TbtBusDrv_Device, PCI\VEN_8086&DEV_1137
%TbtBusDrv_DeviceDesc15DC% = TbtBusDrv_Device, PCI\VEN_8086&DEV_15DC&CC_0880
%TbtBusDrv_DeviceDesc15DD% = TbtBusDrv_Device, PCI\VEN_8086&DEV_15DD&CC_0880
%TbtBusDrv_DeviceDesc15DE% = TbtBusDrv_Device, PCI\VEN_8086&DEV_15DE&CC_0880
%TbtBusDrv_DeviceDesc8A17% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_8A17&CC_0880
%TbtBusDrv_DeviceDesc8A0D% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_8A0D&CC_0880
%TbtBusDrv_DeviceDesc8AA3% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_8AA3&CC_0880
%TbtBusDrv_DeviceDesc8AA0% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_8AA0&CC_0880
%TbtBusDrv_DeviceDesc8AB3% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_8AB3&CC_0880
%TbtBusDrv_DeviceDesc8AB0% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_8AB0&CC_0880
%TbtBusDrv_DeviceDesc9A1B% = TbtBusDrv_TigerLakeA0Device, PCI\VEN_8086&DEV_9A1B&CC_0880
%TbtBusDrv_DeviceDesc9A1D% = TbtBusDrv_TigerLakeA0Device, PCI\VEN_8086&DEV_9A1D&CC_0880
%TbtBusDrv_DeviceDesc9A1F% = TbtBusDrv_TigerLakeA0Device, PCI\VEN_8086&DEV_9A1F&CC_0880
%TbtBusDrv_DeviceDesc9A21% = TbtBusDrv_TigerLakeA0Device, PCI\VEN_8086&DEV_9A21&CC_0880
%TbtBusDrv_DeviceDesc9A1BUsb4% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_9A1B&CC_0C03
%TbtBusDrv_DeviceDesc9A1DUsb4% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_9A1D&CC_0C03
%TbtBusDrv_DeviceDesc9A1FUsb4% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_9A1F&CC_0C03
%TbtBusDrv_DeviceDesc9A21Usb4% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_9A21&CC_0C03
%TbtBusDrv_DeviceDesc463E% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_463E&CC_0880
%TbtBusDrv_DeviceDesc466D% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_466D&CC_0880
%TbtBusDrv_DeviceDesc464E% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_464E&CC_0880
%TbtBusDrv_DeviceDesc467D% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_467D&CC_0880
%TbtBusDrv_DeviceDesc465E% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_465E&CC_0880
%TbtBusDrv_DeviceDesc468D% = TbtBusDrv_YflDevice, PCI\VEN_8086&DEV_468D&CC_0880

[TbtBusDrv_Device.NT]
CopyFiles = Drivers_Dir
CopyFiles = UMDriverCopy
CopyINF=TbtP2pNdisDrv.inf
CopyINF=TbtHostControllerHsaComponent.inf

[TbtBusDrv_YflDevice.NT]
CopyFiles = Drivers_Dir
CopyINF=TbtP2pNdisDrv.inf
CopyINF=TbtHostControllerHsaComponent.inf

[TbtBusDrv_TigerLakeA0Device.NT]
CopyFiles = Drivers_Dir
CopyINF=TbtP2pNdisDrv.inf
CopyINF=TbtHostControllerHsaComponent.inf

[Drivers_Dir]
TbtBusDrv.sys

[UMDriverCopy]
TbtFilterDrv.dll

;-------------- Service installation
[TbtBusDrv_Device.NT.Services]
AddService = nhi, 0x000001fa, TbtBusDrv_Service_Inst
AddService = WUDFRd, 0x000001f8, WUDFRD_ServiceInstall

[TbtBusDrv_YflDevice.NT.Services]
AddService = nhi, 0x000001fa, TbtBusDrv_Service_Inst_Yfl

[TbtBusDrv_TigerLakeA0Device.NT.Services]
AddService = nhi, 0x000001fa, TbtBusDrv_Service_Inst_TigerLakeA0

[TbtBusDrv_Device.NT.HW]
AddReg = MSI.reg
AddReg = Filter.reg
AddReg = Security.reg

[TbtBusDrv_YflDevice.NT.HW]
AddReg = MSI.reg
AddReg = Filter_Yfl.reg
AddReg = Security.reg

[TbtBusDrv_TigerLakeA0Device.NT.HW]
;AddReg = MSI.reg
AddReg = Filter_Yfl.reg
AddReg = Security.reg

[Security.reg]
HKR,,DeviceCharacteristics,0x10001,0x100
HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)(A;;GA;;;WD)"

[MSI.reg]
HKR, "Interrupt Management",                                      0x00000010
HKR, "Interrupt Management\MessageSignaledInterruptProperties",   0x00000010
HKR, "Interrupt Management\MessageSignaledInterruptProperties",   MSISupported,        0x00010001, 1
HKR, "Interrupt Management\MessageSignaledInterruptProperties",   MessageNumberLimit,  0x00010001, 16

[Filter.reg]
HKR,,"UpperFilters",0x00010008,"WUDFRd" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND
HKR,"WDF","WdfDirectedPowerTransitionEnable",0x00010001,1
HKR,"WDF","WdfDirectedPowerTransitionChildrenOptional", 0x00010001,1

[Filter_Yfl.reg]
HKR,"WDF","WdfDirectedPowerTransitionEnable",0x00010001,1
HKR,"WDF","WdfDirectedPowerTransitionChildrenOptional", 0x00010001,1

; -------------- TbtBusDrv driver install sections
[TbtBusDrv_Service_Inst]
DisplayName    = %TbtBusDrv_SVCDESC%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\TbtBusDrv.sys
LoadOrderGroup = Extended Base
AddReg         = TbtBusDrv_Service_Events_AddReg

[TbtBusDrv_Service_Inst_Yfl]
DisplayName    = %TbtBusDrv_SVCDESC%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\TbtBusDrv.sys
LoadOrderGroup = Extended Base
AddReg         = TbtBusDrv_Service_Events_AddReg

[TbtBusDrv_Service_Inst_TigerLakeA0]
DisplayName    = %TbtBusDrv_SVCDESC%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\TbtBusDrv.sys
LoadOrderGroup = Extended Base
AddReg         = TbtBusDrv_Service_Events_AddReg_TigerLakeA0

[TbtBusDrv_Service_Events_AddReg]
HKR, Parameters, DmaRemappingCompatible, 0x00010001, 1
HKR,, Universal, 0x00010001, 0
HKR, Parameters, PowerPolicyIdleTimeoutType, 0x00010001, 2
HKR, Parameters, InterDomainConnectionShortcutEnabled, 0x00010001, 1

[TbtBusDrv_Service_Events_AddReg_TigerLakeA0]
HKR, Parameters, DmaRemappingCompatible, 0x00010001, 0
HKR,, Universal, 0x00010001, 0
HKR, Parameters, PowerPolicyIdleTimeoutType, 0x00010001, 2
HKR, Parameters, InterDomainConnectionShortcutEnabled, 0x00010001, 1
HKR, Parameters, TglA0, 0x00010001, 1
HKR, Parameters, TglA0VtdWorkaroundEnabled, 0x00010001, 1

[TbtBusDrv_Device.NT.Wdf]
KmdfService =  nhi, TbtBusDrv_wdfsect
UmdfService = TbtFilterDrv,TbtFilterDrv_Install
UmdfServiceOrder = TbtFilterDrv
UmdfFileObjectPolicy = AllowNullAndUnknownFileObjects

[TbtBusDrv_YflDevice.NT.Wdf]
KmdfService =  nhi, TbtBusDrv_wdfsect

[TbtBusDrv_TigerLakeA0Device.NT.Wdf]
KmdfService =  nhi, TbtBusDrv_wdfsect

[TbtBusDrv_wdfsect]
KmdfLibraryVersion = 1.15

[TbtFilterDrv_Install]
UmdfLibraryVersion = 2.15.0 
ServiceBinary = %12%\UMDF\TbtFilterDrv.dll

[WUDFRD_ServiceInstall]
DisplayName    = %WudfRdDisplayName%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\WUDFRd.sys

[TbtBusDrv_Device.NT.Components]
AddComponent = ThunderboltHostControllerHSA,,ThunderboltHostController_Component_Install

[TbtBusDrv_YflDevice.NT.Components]
AddComponent = ThunderboltHostControllerHSA,,ThunderboltHostController_Component_Install

[TbtBusDrv_TigerLakeA0Device.NT.Components]
AddComponent = ThunderboltHostControllerHSA,,ThunderboltHostController_Component_Install

[ThunderboltHostController_Component_Install]
ComponentIDs = PROVIDER_Intel&&COMPONENT_ThunderboltHSA
DisplayName = "Thunderbolt Support Application"

[Strings]
Intel = "Intel(R) Corporation"
DiskName = "Thunderbolt(TM) Controller Installation Disk"
TbtBusDrv_DeviceDesc1575 = "Thunderbolt(TM) Controller - 1575"
TbtBusDrv_DeviceDesc1577 = "Thunderbolt(TM) Controller - 1577"
TbtBusDrv_DeviceDesc15BF = "Thunderbolt(TM) Controller - 15BF"
TbtBusDrv_DeviceDesc15D2 = "Thunderbolt(TM) Controller - 15D2"
TbtBusDrv_DeviceDesc15D9 = "Thunderbolt(TM) Controller - 15D9"
TbtBusDrv_DeviceDesc15E8 = "Thunderbolt(TM) Controller - 15E8"
TbtBusDrv_DeviceDesc15EB = "Thunderbolt(TM) Controller - 15EB"
TbtBusDrv_DeviceDesc1137 = "Thunderbolt(TM) Controller - 1137"
TbtBusDrv_DeviceDesc15DC = "Intel(R) Controller - 15DC"
TbtBusDrv_DeviceDesc15DD = "Intel(R) Controller - 15DD"
TbtBusDrv_DeviceDesc15DE = "Intel(R) Controller - 15DE"
TbtBusDrv_DeviceDesc8A17 = "Thunderbolt(TM) Controller - 8A17"
TbtBusDrv_DeviceDesc8A0D = "Thunderbolt(TM) Controller - 8A0D"
TbtBusDrv_DeviceDesc8AA3 = "Thunderbolt(TM) Controller - 8AA3"
TbtBusDrv_DeviceDesc8AA0 = "Thunderbolt(TM) Controller - 8AA0"
TbtBusDrv_DeviceDesc8AB3 = "Thunderbolt(TM) Controller - 8AB3"
TbtBusDrv_DeviceDesc8AB0 = "Thunderbolt(TM) Controller - 8AB0"
TbtBusDrv_DeviceDesc9A1B = "Thunderbolt(TM) Controller - 9A1B"
TbtBusDrv_DeviceDesc9A1D = "Thunderbolt(TM) Controller - 9A1D"
TbtBusDrv_DeviceDesc9A1F = "Thunderbolt(TM) Controller - 9A1F"
TbtBusDrv_DeviceDesc9A21 = "Thunderbolt(TM) Controller - 9A21"
TbtBusDrv_DeviceDesc9A1BUsb4 = "Thunderbolt(TM) Controller - 9A1B"
TbtBusDrv_DeviceDesc9A1DUsb4 = "Thunderbolt(TM) Controller - 9A1D"
TbtBusDrv_DeviceDesc9A1FUsb4 = "Thunderbolt(TM) Controller - 9A1F"
TbtBusDrv_DeviceDesc9A21Usb4 = "Thunderbolt(TM) Controller - 9A21"
TbtBusDrv_DeviceDesc463E = "Thunderbolt(TM) Controller - 463E"
TbtBusDrv_DeviceDesc466D = "Thunderbolt(TM) Controller - 466D"
TbtBusDrv_DeviceDesc464E = "Thunderbolt(TM) Controller - 464E"
TbtBusDrv_DeviceDesc467D = "Thunderbolt(TM) Controller - 467D"
TbtBusDrv_DeviceDesc465E = "Thunderbolt(TM) Controller - 465E"
TbtBusDrv_DeviceDesc468D = "Thunderbolt(TM) Controller - 468D"

TbtBusDrv_SVCDESC = "Thunderbolt(TM) Controller"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
SERVICE_KERNEL_DRIVER = 1
SERVICE_DEMAND_START = 3
SERVICE_ERROR_NORMAL = 1
REG_DWORD=0x00010001
REG_SZ=0x00000000
FLG_ADDREG_KEYONLY = 0x00000010
