;/*++
;
;Copyright (c) 20??-2019 Red Hat Inc.
;
;
;Module Name:
;    viorng.inf
;
;Abstract:
;
;Installation Notes:
;    Using Devcon: Type "devcon install viorng.inf PCI\VEN_1AF4&DEV_1005&SUBSYS_00041AF4&REV_00" or
;                       "devcon install viorng.inf PCI\VEN_1AF4&DEV_1044&SUBSYS_11001AF4&REV_01" to install
;
;--*/

[Version]
Signature       = "$WINDOWS NT$"
Class           = System
ClassGuid       = {4d36e97d-e325-11ce-bfc1-08002be10318}
Provider        = %VENDOR%
CatalogFile     = viorng.cat
PnpLockdown     = 1
DriverVer = 04/12/2019,61.77.104.17100

[DestinationDirs]
DefaultDestDir = 12
VirtRng_Provider_CopyFiles = 11
VirtRng_Wdf_CoInstaller_CopyFiles = 11

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

[SourceDisksFiles]
viorng.sys = 1,,
viorngum.dll = 1
viorngci.dll = 1
WdfCoInstaller01009.dll = 1 ; make sure the number matches with SourceDisksNames

; ---------------
; Install Section
; ---------------

[Manufacturer]
%VENDOR% = Standard,NTx86.6.1

[Standard.NTx86.6.1]
%VirtRng.DeviceDesc% = VirtRng_Device, PCI\VEN_1AF4&DEV_1005&SUBSYS_00041AF4&REV_00, PCI\VEN_1AF4&DEV_1005
%VirtRng.DeviceDesc% = VirtRng_Device, PCI\VEN_1AF4&DEV_1044&SUBSYS_11001AF4&REV_01, PCI\VEN_1AF4&DEV_1044

[VirtRng_Device.NT]
CopyFiles = VirtRng_CopyFiles
CopyFiles = VirtRng_Provider_CopyFiles

[VirtRng_Device.NT.HW]
AddReg = VirtRng_AddReg

[VirtRng_CopyFiles]
viorng.sys

[VirtRng_AddReg]
HKR,Interrupt Management,,0x00000010
HKR,Interrupt Management\MessageSignaledInterruptProperties,,0x00000010
HKR,Interrupt Management\MessageSignaledInterruptProperties,MSISupported,0x00010001,1
HKR,Interrupt Management\MessageSignaledInterruptProperties,MessageNumberLimit,0x00010001,1

; --------------------
; Service Installation
; --------------------

[VirtRng_Device.NT.Services]
AddService = VirtRng,0x00000002,VirtRng_Service_Install

[VirtRng_Service_Install]
DisplayName    = %VirtRng.Service%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\viorng.sys
LoadOrderGroup = Extended Base

; -------------------------
; RNG Provider Installation
; -------------------------

[VirtRng_Provider_CopyFiles]
viorngum.dll

; -------------------------------------
; WDF & Device CoInstaller Installation
; -------------------------------------

[VirtRng_Device.NT.CoInstallers]
AddReg=VirtRng_Wdf_CoInstaller_AddReg
CopyFiles=VirtRng_Wdf_CoInstaller_CopyFiles

[VirtRng_Wdf_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000,"viorngci.dll,VirtRngCoInstaller", \
    "WdfCoInstaller01009.dll,WdfCoInstaller"

[VirtRng_Wdf_CoInstaller_CopyFiles]
WdfCoInstaller01009.dll
viorngci.dll

[VirtRng_Device.NT.Wdf]
KmdfService = VirtRng, VirtRng_wdfsect

[VirtRng_wdfsect]
KmdfLibraryVersion = 1.9

[Strings]
VENDOR              = "Red Hat, Inc."
DiskName            = "VirtIO RNG Installation Disk"
VirtRng.DeviceDesc  = "VirtIO RNG Device"
VirtRng.Service     = "VirtIO RNG Service"
