; Copyright (C), Intel Corporation. All rights reserved. 
; ********************************************************************************************** 
; **    Filename:  iaStorVD.inf 
; **    Revision:  07/22/2024,20.1.0.1015
; **    Abstract:  Windows* INF File for VMD Intel(R) Rapid Storage Technology Driver 
; **               Installs: RST VMD Controller Miniport + RST Filter Driver
; ********************************************************************************************** 
[Version] 
Signature="$Windows NT$" 
Provider=%INTEL% 
ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
Class=SCSIAdapter
CatalogFile=iaStorVD.cat
DriverVer=07/22/2024,20.1.0.1015
PnpLockDown=1

;*************************************
;* Source files and copy sections
;*************************************
[SourceDisksNames] 
1 = %DiskId1%,,,"" 

[SourceDisksFiles.amd64]
iaStorVD.sys = 1,,,
RstMwService.exe = 1,,,
RstMwEventLogMsg.dll = 1,,,

[DestinationDirs]
DefaultDestDir = 13
Driver_files_copy = 12
RstMwService_EventLog_files_copy = 11

[Driver_files_copy]
iaStorVD.sys

[RstMwService_EventLog_files_copy]
RstMwEventLogMsg.dll

;*************************************
;* Manufacturer and Model sections
;*************************************
[Manufacturer]
%INTEL% = INTEL, NTamd64.10.0...19041

[INTEL.NTamd64.10.0...19041]
%PCI\VEN_8086&DEV_09AB.DeviceDesc% = VMD_dummy_function_inst, PCI\VEN_8086&DEV_09AB
%PCI\VEN_8086&DEV_467F.DeviceDesc% = VMD_inst, PCI\VEN_8086&DEV_467F
%PCI\VEN_8086&DEV_A77F.DeviceDesc% = VMD_inst, PCI\VEN_8086&DEV_A77F
%PCI\VEN_8086&DEV_7D0B.DeviceDesc% = VMD_inst, PCI\VEN_8086&DEV_7D0B
%PCI\VEN_8086&DEV_AD0B.DeviceDesc% = VMD_inst, PCI\VEN_8086&DEV_AD0B

;******************************************************************************
;*
;* RST Volume Management Device install section
;*
;******************************************************************************
[VMD_inst.NTamd64]
CopyFiles=Driver_files_copy
CopyFiles=@RstMwService.exe
CopyFiles=RstMwService_EventLog_files_copy
FeatureScore=0x80
AddPowerSetting = RSTPowerSettingGeneric1,RSTPowerSettingGeneric2,RSTPowerSettingHybridOptane1,RSTPowerSettingHybridOptane2,RSTPowerSettingHybridNand1,RSTPowerSettingHybridNand2

[VMD_inst.ntamd64.Services]
AddService = iaStorVD, %SPSVCINST_ASSOCSERVICE%, iaStorVD_inst, iaStorVD_EventLog_inst
AddService = RstMwService, 0x00000000, RstMwService_inst, RstMwService_EventLog_inst, System, %RstMwService.EventLogSourceName%

[VMD_dummy_function_inst.NTamd64]
Include=machine.inf
Needs=NO_DRV

[VMD_dummy_function_inst.NTamd64.Services]
Include=machine.inf
Needs=NO_DRV.Services

;*************************************
;* Service: iaStorVD
;*************************************
[iaStorVD_inst]
DisplayName    = %iaStorVD.ServiceName%
ServiceType    = %SERVICE_KERNEL_DRIVER% 
StartType      = %SERVICE_BOOT_START% 
ErrorControl   = %SERVICE_ERROR_NORMAL% 
ServiceBinary  = %12%\iaStorVD.sys 
LoadOrderGroup = SCSI miniport 
AddReg = pnpsafe_pci_addreg
AddReg = bypassio_addreg

[pnpsafe_pci_addreg]
; Use raw values for BusType, not a DEFINE, ChkInf fails on hex alpha chars 
; BusType_ATA == 0x3, BusTypeATA, BusType_RAID == 0x8, BusType_SATA == 0xb
HKR, Parameters\PnpInterface,  5,  %REG_TYPE_DWORD%,  0x00000001 
HKR, Parameters, BusType, %REG_TYPE_DWORD%,  0x00000008

[bypassio_addreg]
HKR, Parameters, StorageSupportedFeatures, %REG_TYPE_DWORD%, 0x00000001
HKLM, System\CurrentControlSet\Services\ACPI\Parameters, StorageSupportedFeatures, %REG_TYPE_DWORD%, 0x00000001

[iaStorVD_EventLog_inst]
AddReg = iaStorVD_EventLog_addreg

[iaStorVD_EventLog_addreg] 
HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\iaStorVD.sys"
HKR,,TypesSupported,%REG_TYPE_DWORD%,7 

;*************************************
;* Service: RstMwService
;*************************************
[RstMwService_inst]
DisplayName   = %RstMwService.ServiceName%
Description   = %RstMwService.ServiceDescription%
ServiceType   = %SERVICE_WIN32_OWN_PROCESS%
StartType     = %SERVICE_AUTO_START%
ErrorControl  = %SERVICE_ERROR_NORMAL%
ServiceBinary = %13%\RstMwService.exe

[RstMwService_EventLog_inst] 
AddReg = RstMwService_EventLog_addreg 

[RstMwService_EventLog_addreg] 
HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\RstMwEventLogMsg.dll"
HKR,,TypesSupported,%REG_TYPE_DWORD%,0x1F
HKR,,CategoryCount,%REG_TYPE_DWORD%,1

;*************************************
;* Hardware install section
;*************************************
[VMD_inst.NTamd64.HW]
AddReg = msi_addreg
AddReg = storport_addreg
AddReg = etw_rst_addreg

[msi_addreg]
HKR, Interrupt Management, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, %REG_TYPE_DWORD%,   1
HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, %REG_TYPE_DWORD%,   80
HKR, Interrupt Management\Affinity Policy, 0x00000010
HKR, Interrupt Management\Affinity Policy, DevicePolicy, %REG_TYPE_DWORD%, 5 ;IrqPolicySpreadMessagesAcrossAllProcessors

[storport_addreg]
; Enables/Disables Idle Power Management for StorPort
HKR, StorPort, EnableIdlePowerManagement, %REG_TYPE_DWORD%, 0x00000001
; Force StorPort to keep all sense data in Pre-Win8 OSes (max value is 255)
HKR, StorPort, TotalSenseDataBytes, %REG_TYPE_DWORD%, 0x000000FF

[etw_rst_addreg]
; Configuring and Starting an AutoLogger Session
; LogFileMode = Buffering Mode | EVENT_TRACE_ADDTO_TRIAGE_DUMP(0x80000000) | EVENT_TRACE_NO_PER_PROCESSOR_BUFFERING (0x10000000)
HKLM, System\CurrentControlSet\Control\WMI\Autologger\IntelRST, LogFileMode, %REG_TYPE_DWORD%, 0x90000400
HKLM, System\CurrentControlSet\Control\WMI\Autologger\IntelRST, FileName
HKLM, System\CurrentControlSet\Control\WMI\Autologger\IntelRST, Guid, %REG_TYPE_SZ%, "{347659f2-c334-46ab-b19e-a451e851c695}"
HKLM, System\CurrentControlSet\Control\WMI\Autologger\IntelRST, Start, %REG_TYPE_DWORD%, 0x00000001
HKLM, System\CurrentControlSet\Control\WMI\Autologger\IntelRST, BufferSize, %REG_TYPE_DWORD%, 0x00001388
; Configure provider using GUID
HKLM, System\CurrentControlSet\Control\WMI\Autologger\IntelRST\{67c35f2c-bae5-4bc8-a999-d339e5ef89ac}, EnableProperty, %REG_TYPE_DWORD%, 0x00000000
HKLM, System\CurrentControlSet\Control\WMI\Autologger\IntelRST\{67c35f2c-bae5-4bc8-a999-d339e5ef89ac}, Enabled, %REG_TYPE_DWORD%, 0x00000001
; Level = TRACE_LEVEL_INFORMATION
HKLM, System\CurrentControlSet\Control\WMI\Autologger\IntelRST\{67c35f2c-bae5-4bc8-a999-d339e5ef89ac}, EnableLevel, %REG_TYPE_DWORD%, 0x00000004
; Flags = ALL
HKLM, System\CurrentControlSet\Control\WMI\Autologger\IntelRST\{67c35f2c-bae5-4bc8-a999-d339e5ef89ac}, EnableFlags, %REG_TYPE_DWORD%, 0x0000FFFF

[RSTPowerSettingGeneric1]
; Disk subgroup
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; APST ITPT for operational power states (ms) on any NVMe drive
Setting =  {7f68c523-7536-4a79-b339-0ba0998f5dc4}, %RstApstIdleTimeoutGeneric1%, %RstApstIdleTimeoutGeneric1Desc%,,0x00000001
; Range 0 to 1 minute (unit: ms)
ValueRange = 0, 60000, 1, %Milliseconds%

; High Performance
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 0, 0
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 1, 0
; Balanced
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 0, 60
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 1, 60
; Power Saving
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 0, 60
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 1, 60

[RSTPowerSettingGeneric2]
; Disk subgroup
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; APST ITPT for non-operational power states (ms) on any NVMe drive
Setting =  {5e8c011f-01bc-4821-b947-deffa95af8d2}, %RstApstIdleTimeoutGeneric2%, %RstApstIdleTimeoutGeneric2Desc%,,0x00000001
; Range 0 to 1 minute (unit: ms)
ValueRange = 0, 60000, 1, %Milliseconds%

; High Performance
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 0, 0
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 1, 0
; Balanced
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 0, 3000
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 1, 3000
; Power Saving
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 0, 3000
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 1, 3000

[RSTPowerSettingHybridOptane1]
; Disk subgroup
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; APST ITPT for operational power states (ms) on Hybrid Optane drive
Setting =  {bb50ccc4-ef9f-4008-a470-e6ea6737f152}, %RstApstIdleTimeoutHybridOptane1%, %RstApstIdleTimeoutHybridOptane1Desc%,,0x00000001
; Range 0 to 1 minute (unit: ms)
ValueRange = 0, 60000, 1, %Milliseconds%

; High Performance
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 0, 200
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 1, 200
; Balanced
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 0, 200
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 1, 60
; Power Saving
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 0, 60
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 1, 60

[RSTPowerSettingHybridOptane2]
; Disk subgroup
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; APST ITPT for non-operational power states (ms) on Hybrid Optane drive
Setting =  {4016abef-65af-42a2-9939-45cb45e92634}, %RstApstIdleTimeoutHybridOptane2%, %RstApstIdleTimeoutHybridOptane2Desc%,,0x00000001
; Range 0 to 1 minute (unit: ms)
ValueRange = 0, 60000, 1, %Milliseconds%

; High Performance
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 0, 3000
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 1, 3000
; Balanced
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 0, 3000
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 1, 3000
; Power Saving
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 0, 3000
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 1, 3000

[RSTPowerSettingHybridNand1]
; Disk subgroup
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; APST ITPT for operational power states (ms) on Hybrid Nand drive
Setting =  {b6c43707-23d2-46d4-bd1a-ac91685c76bb}, %RstApstIdleTimeoutHybridNand1%, %RstApstIdleTimeoutHybridNand1Desc%,,0x00000001
; Range 0 to 1 minute (unit: ms)
ValueRange = 0, 60000, 1, %Milliseconds%

; High Performance
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 0, 200
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 1, 200
; Balanced
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 0, 200
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 1, 60
; Power Saving
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 0, 60
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 1, 60

[RSTPowerSettingHybridNand2]
; Disk subgroup
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; APST ITPT for non-operational power states (ms) on Hybrid Nand drive
Setting =  {54bbd65b-b333-4808-ae71-461b696bf60e}, %RstApstIdleTimeoutHybridNand2%, %RstApstIdleTimeoutHybridNand2Desc%,,0x00000001
; Range 0 to 1 minute (unit: ms)
ValueRange = 0, 60000, 1, %Milliseconds%

; High Performance
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 0, 3000
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 1, 3000
; Balanced
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 0, 3000
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 1, 3000
; Power Saving
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 0, 3000
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 1, 3000



;******************************************************************************
;*
;* Strings
;*
;******************************************************************************
[Strings] 
INTEL = "Intel Corporation"
diskId1 = "RST Installation Disk" 

iaStorVD.ServiceName = "Intel(R) Chipset VMD RST Controller service"

RstMwService.ServiceName = "Intel(R) Storage Middleware Service"
RstMwService.ServiceDescription = "RPC endpoint service which allows communication between driver and Windows Store Application"
RstMwService.EventLogSourceName = "RST Middleware"

PCI\VEN_8086&DEV_09AB.DeviceDesc = "Intel RST VMD Managed Controller 09AB"
PCI\VEN_8086&DEV_467F.DeviceDesc = "Intel RST VMD Controller 467F"
PCI\VEN_8086&DEV_A77F.DeviceDesc = "Intel RST VMD Controller A77F"
PCI\VEN_8086&DEV_7D0B.DeviceDesc = "Intel RST VMD Controller 7D0B"
PCI\VEN_8086&DEV_AD0B.DeviceDesc = "Intel RST VMD Controller AD0B"

SPSVCINST_ASSOCSERVICE = 0x00000002 
REG_TYPE_SZ = 0x00000000 
REG_MULTI_SZ = 0x00010000 
REG_EXPAND_SZ = 0x00020000 
REG_TYPE_DWORD = 0x00010001 
SERVICE_KERNEL_DRIVER  = 1 
SERVICE_FILE_SYSTEM_DRIVER = 2
SERVICE_WIN32_OWN_PROCESS = 0x00000010
SERVICE_BOOT_START = 0
SERVICE_AUTO_START = 2
SERVICE_DEMAND_START = 3
SERVICE_ERROR_NORMAL = 1

Milliseconds                = "milliseconds"
RstApstIdleTimeoutGeneric1          = "APST ITPT for operational power states (ms) on any NVMe drive"
RstApstIdleTimeoutGeneric1Desc      = "APST ITPT for operational power states (ms) on any NVMe drive"
RstApstIdleTimeoutGeneric2          = "APST ITPT for non-operational power states (ms) on any NVMe drive"
RstApstIdleTimeoutGeneric2Desc      = "APST ITPT for non-operational power states (ms) on any NVMe drive"
RstApstIdleTimeoutHybridOptane1     = "APST ITPT for operational power states (ms) on Hybrid Optane drive"
RstApstIdleTimeoutHybridOptane1Desc = "APST ITPT for operational power states (ms) on Hybrid Optane drive"
RstApstIdleTimeoutHybridOptane2     = "APST ITPT for non-operational power states (ms) on Hybrid Optane drive"
RstApstIdleTimeoutHybridOptane2Desc = "APST ITPT for non-operational power states (ms) on Hybrid Optane drive"
RstApstIdleTimeoutHybridNand1       = "APST ITPT for operational power states (ms) on Hybrid Nand drive"
RstApstIdleTimeoutHybridNand1Desc   = "APST ITPT for operational power states (ms) on Hybrid Nand drive"
RstApstIdleTimeoutHybridNand2       = "APST ITPT for non-operational power states (ms) on Hybrid Nand drive"
RstApstIdleTimeoutHybridNand2Desc   = "APST ITPT for non-operational power states (ms) on Hybrid Nand drive"
