; File: MhiHost.inf 
; Description: INF file for installing the Qualcomm Mhi Host driver

[Version]
Signature="$WINDOWS NT$"
Class=System
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
Provider=%ProviderName%
CatalogFile=surface_mhihost.cat
DriverVer = 07/30/2024,0.0.426.0
PnpLockdown=1

; ================= Class section =====================

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

; ================== Install Section ==================

[Manufacturer]
%ManufacturerName%=Standard,NTamd64.10.0...19041

[Standard.NTamd64.10.0...19041]
%PCI\VEN_17CB&DEV_0308.DeviceDesc% = MhiHost_Device, PCI\VEN_17CB&DEV_0308

[MhiHost_Device.NT]
CopyFiles=Drivers_Dir
AddReg = swbusAddReg

[swbusAddReg]
; Support Muxing
HKR,, MuxSupport, 0x00010001, 0x00000000
; Number of Mux Interfaces
HKR,, NumMuxIfaces, 0x00010001, 0x00000007

[Drivers_Dir]
MhiHost.sys

[MhiHost_Device.NT.HW]
AddReg=MhiHost_Device_Addreg
Include = PCI.inf
Needs = PciD3ColdSupported.HW

[MhiHost_Device_Addreg]
HKR,Interrupt Management,,0x00000010
HKR,Interrupt Management\MessageSignaledInterruptProperties,,0x00000010
HKR,Interrupt Management\MessageSignaledInterruptProperties,MSISupported,0x00010001,1
HKR,Interrupt Management\MessageSignaledInterruptProperties,MessageNumberLimit,0x00010001,16
HKR,,HwInERIntMod,0x00000001,01,00,00,00;
HKR,,MhiInactivityThreshold,0x00000001,E8,03,00,00,00,00,00,00
HKR,,MhiTestCase,0x00000001,00,00,00,00
HKR,,MhiDevResetTimer,0x00000001,00,00,00,00
HKR,,MhiHostMemBase,0x00000001,00,00,00,00,00,00,00,00
HKR,,MhiHostMemSize,0x00000001,00,00,00,00,20,00,00,00
HKR,,RS6OSInfo,0x00000001,70,49,00,0A,00,00,00,00
HKR,,BurstMode,0x00000001,01,00,00,00
HKR,,MhiS0IdleExcludeD3,0x00000001,00,00,00,00
HKR,,MhiAssert,0x00000001,01,00,00,00
HKR,,BusPdoGuid,%REG_SZ%,%BusPdoGuid%
HKR,,BusPdoQmuxGuid,%REG_SZ%,%BusPdoQmuxGuid%
HKR,,UdePdo,%REG_SZ%,%UdePdo%
HKR,,QmuxPdo,%REG_SZ%,%QmuxPdo%
HKR,,CancelTimeout,%REG_DWORD%,5
HKR,,DeviceResetInterface,0x00000001,00,00,00,01        ; MSFT_CHANGE to enable modem PLDR

; =============== Service installation ================

[MhiHost_Device.NT.Services]
AddService = MhiHost,%SPSVCINST_ASSOCSERVICE%, MhiHost_Service_Inst

; ========== MhiHost driver install sections ==========

[MhiHost_Service_Inst]
AddReg=MhiHost_Device_Services_AddReg
DisplayName    = %MhiHost.SVCDESC%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %13%\MhiHost.sys
LoadOrderGroup = Extended Base

[MhiHost_Device_Services_AddReg]
HKR,Parameters,DmaRemappingCompatible,0x00010001,1

; ====== MhiHost_Device Coinstaller installation ======

[DestinationDirs]
DefaultDestDir = 13
MhiHost_Device_CoInstaller_CopyFiles = 11

[MhiHost_Device.NT.CoInstallers]
AddReg=MhiHost_Device_CoInstaller_AddReg
CopyFiles=MhiHost_Device_CoInstaller_CopyFiles

[MhiHost_Device_CoInstaller_AddReg]
;


[MhiHost_Device_CoInstaller_CopyFiles]
;


[SourceDisksFiles]
MhiHost.sys  = 1,,
;


[MhiHost_Device.NT.Wdf]
KmdfService =  MhiHost, MhiHost_wdfsect
[MhiHost_wdfsect]
KmdfLibraryVersion = 1.33

[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
ProviderName="Surface"
ManufacturerName="Microsoft"
ClassName="Qualcomm Modem Host Interface" 
DiskName = "MhiHost Installation Disk"
PCI\VEN_17CB&DEV_0308.DeviceDesc = "SDX65"
MhiHost.SVCDESC = "Modem Host Interface Service"
REG_SZ              = 0x00000000
REG_DWORD           = 0x00010001
UdePdo="QcUde"
QmuxPdo="QcQmux_MSFT_DE"
BusPdoGuid="{3a4d657c-0a42-4501-9627-ba1b76ffc39d}"
BusPdoQmuxGuid="{B82F6C5F-E258-49B8-B4EA-84E1BB830B50}"
