;/*++
;
;Copyright (c) 2021-2025 Red Hat Inc.
;
;
;Module Name:
;    VIOMEM.INF
;
;Abstract:
;
;Installation Notes:
;    Step by step driver installation wiki:
;        https://github.com/virtio-win/kvm-guest-drivers-windows/wiki/Driver-installation
;

[Version]
Signature="$WINDOWS NT$"
;Class=System
;ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
Class=MTD
ClassGuid={4d36e970-e325-11ce-bfc1-08002be10318}
Provider=%VENDOR%
DriverVer = 02/02/2026,100.102.104.29600
CatalogFile=viomem.cat
DriverPackageType = PlugAndPlay
DriverPackageDisplayName = %VIOMEM.DeviceDesc%
PnpLockdown = 1

[DestinationDirs]
DefaultDestDir = 12

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

[SourceDisksFiles]
viomem.sys  = 1,,

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

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

[Standard.NTx86.10.0]
;%VIOMEM.DeviceDesc%=VIOMEM_Device, PCI\VEN_1AF4&DEV_1002&SUBSYS_00051AF4&REV_00, PCI\VEN_1AF4&DEV_1002
%VIOMEM.DeviceDesc%=VIOMEM_Device, PCI\VEN_1AF4&DEV_1058&SUBSYS_11001AF4&REV_01, PCI\VEN_1AF4&DEV_1058

[VIOMEM_Device.NT]
CopyFiles=Drivers_Dir

[Drivers_Dir]
viomem.sys

;-------------- Service installation
[VIOMEM_Device.NT.Services]
AddService = VIOMEM,%SPSVCINST_ASSOCSERVICE%, VIOMEM_Service_Inst, VIOMEM_Logging_Inst

; -------------- VIOMEM driver install sections
[VIOMEM_Service_Inst]
DisplayName    = %VIOMEM.SVCDESC%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START 
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\viomem.sys
AddReg         = Dmar.AddReg

[Dmar.AddReg]
HKR,Parameters,DmaRemappingCompatible,0x00010001,0

; -------------- VIOMEM driver eventlog install sections
[VIOMEM_Logging_Inst]
AddReg = VIOMEM_Logging_Inst_AddReg

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

[VIOMEM_Device.NT.Wdf]
KmdfService =  VIOMEM, VIOMEM_wdfsect
[VIOMEM_wdfsect]
KmdfLibraryVersion = 1.15


[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
VENDOR = "Red Hat, Inc."
DiskId1 = "VirtIO Viomem Installation Disk #1"
VIOMEM.DeviceDesc = "VirtIO Viomem Driver"
VIOMEM.SVCDESC = "VirtIO Viomem Service"
ClassName       = "VirtIO Viomem Device"
