; Copyright (C), Intel Corporation. All rights reserved. 
; ********************************************************************************************** 
; **    Filename:  iaStorAC.inf 
; **    Revision:  03/18/2020,17.8.8.1072
; **    Abstract:  Windows* INF File for AHCI Intel(R) Rapid Storage Technology Driver 
; **               Installs: RST AHCI RAID Controller Miniport + RST Filter Driver
; ********************************************************************************************** 
[Version] 
Signature="$Windows NT$" 
Provider=%INTEL% 
ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
Class=SCSIAdapter
CatalogFile=iaStorAC.cat
DriverVer=03/18/2020,17.8.8.1072
;
[PackageInfo]
Name=RAID64
;
[SourceDisksNames] 
1 = %DiskId1%,,,"" 
;
[DestinationDirs] 
DefaultDestDir = 12
iaStorAfs_UserFiles_Copy = 11
RstMwService_Binary_Copy = 13
RstMwService_EventLogMsg_Copy = 11
iaStorAfs_EventLogMsg_Copy = 11
HfcDisableService_CopyFiles = 13
;
[ControlFlags] 
ExcludeFromSelect = * 
;
[Manufacturer] 
%INTEL% = INTEL, NTamd64.6.2
;
[iaStorAC_Service_Inst] 
DisplayName    = %iaStorAC.DeviceDesc%
ServiceType    = %SERVICE_KERNEL_DRIVER% 
StartType      = %SERVICE_BOOT_START% 
ErrorControl   = %SERVICE_ERROR_NORMAL% 
ServiceBinary  = %12%\iaStorAC.sys 
LoadOrderGroup = SCSI miniport 
AddReg = pnpsafe_pci_addreg
;
[iaStorAC_EventLog_Inst] 
AddReg = iaStorAC_EventLog_AddReg 
;
[iaStorAC_EventLog_AddReg] 
HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\iaStorAC.sys"
HKR,,TypesSupported,%REG_TYPE_DWORD%,7 
;
[iaStorAfs_Service_Inst]
DisplayName      = %iaStorAfs.DisplayName%
Description      = %iaStorAfs.ServiceDescription%
Dependencies     = FltMgr
ServiceType      = %SERVICE_FILE_SYSTEM_DRIVER% 
StartType        = %SERVICE_BOOT_START%       
ErrorControl     = %SERVICE_ERROR_NORMAL%       
ServiceBinary    = %12%\iaStorAfs.sys
LoadOrderGroup   = FSFilter Activity Monitor
AddReg           = iaStorAfs_AddRegistry
;
[iaStorAfs_AddRegistry]
HKR,,"SupportedFeatures",0x00010001,0x3
HKR,"Instances","DefaultInstance",0x00000000,%DefaultInstance%
HKR,"Instances\"%Instance.Name%,"Altitude",0x00000000,%Instance.Altitude%
HKR,"Instances\"%Instance.Name%,"Flags",0x00010001,%Instance.Flags%
;
[iaStorAfs_WindowsService_Inst]
DisplayName   = %iaStorAfsWindowsService.Name%
Description   = %iaStorAfsWindowsService.Description%
Dependencies  = iaStorAfs
ServiceType   = %SERVICE_WIN32_OWN_PROCESS%
StartType     = %SERVICE_AUTO_START%
ErrorControl  = %SERVICE_ERROR_NORMAL%
ServiceBinary = %11%\iaStorAfsService.exe
;EventLogs registration
[iaStorAfs_EventLog_Inst] 
AddReg = iaStorAfs_EventLog_AddReg 
;
[iaStorAfs_EventLog_AddReg] 
HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\OptaneEventLogMsg.dll"
HKR,,TypesSupported,%REG_TYPE_DWORD%,0x1F
HKR,,CategoryCount,%REG_TYPE_DWORD%,1

;
[HfcDisableService_inst]
DisplayName   = %HfcDisableService.DisplayName%
Description   = %HfcDisableService.Desc%
ServiceType   = 0x10   ; SERVICE_WIN32_OWN_PROCESS
StartType     = 0x02   ; SERVICE_AUTO_START
ErrorControl  = 0x00   ; SERVICE_ERROR_IGNORE
ServiceBinary = %13%\HfcDisableService.exe

[HfcDisableService_EventLog_inst]
AddReg = HfcDisableService_EventLog_reg

[HfcDisableService_EventLog_reg]
HKR,,EventMessageFile,0x00020000,%13%\HfcDisableService.exe
HKR,,TypesSupported,0x00010001,0x07
;

[RstMwService_Inst]
DisplayName   = %RstMwService.Name%
Description   = %RstMwService.Description%
ServiceType   = %SERVICE_WIN32_OWN_PROCESS%
StartType     = %SERVICE_AUTO_START%
ErrorControl  = %SERVICE_ERROR_NORMAL%
ServiceBinary = %13%\RstMwService.exe
;EventLogs registration
[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

;
;******************************************************************************
;*
;* 64-BIT X86 ARCHITECTURE
;*
;* This section specifies the 64-bit architecture specific INF file entries
;* required to install a driver as a 64-bit compatible driver.
;*
;******************************************************************************
[SourceDisksFiles.amd64]
iaStorAC.sys = 1,,,
iaStorAfs.sys = 1,,,
iaStorAfsService.exe = 1,,,
iaStorAfsNative.exe = 1,,,
Optane.dll = 1,,,
HfcDisableService.exe = 1,,,
OptaneEventLogMsg.dll = 1,,,

RstMwService.exe = 1,,,
RstMwEventLogMsg.dll = 1,,,
;
;Win8 and above
[INTEL.NTamd64.6.2]
%PCI\VEN_8086&DEV_2822&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_2822&CC_0104
%PCI\VEN_8086&DEV_282A&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_282A&CC_0104
%PCI\VEN_8086&DEV_9D07&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_9D07&CC_0104
%PCI\VEN_8086&DEV_A286&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_A286&CC_0104
%PCI\VEN_8086&DEV_9DD7&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_9DD7&CC_0104
%PCI\VEN_8086&DEV_A356&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_A356&CC_0104
%PCI\VEN_8086&DEV_A357&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_A357&CC_0104
%PCI\VEN_8086&DEV_A35E&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_A35E&CC_0104
%PCI\VEN_8086&DEV_34D7&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_34D7&CC_0104
%PCI\VEN_8086&DEV_02D7&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_02D7&CC_0104
%PCI\VEN_8086&DEV_06D6&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_06D6&CC_0104
%PCI\VEN_8086&DEV_06D7&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_06D7&CC_0104
%PCI\VEN_8086&DEV_06DE&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_06DE&CC_0104
%PCI\VEN_8086&DEV_A386&CC_0104.DeviceDesc% = iaStorAC_inst_8, PCI\VEN_8086&DEV_A386&CC_0104
%PCI\VEN_8086&CC_0108.DeviceDesc% = iaStorAC_NVMe_inst_8, PCI\VEN_8086&CC_0108

;
[iaStorAC_inst_8.NTamd64]
CopyFiles=@iaStorAC.sys
CopyFiles=@iaStorAfs.sys
CopyFiles=iaStorAfs_UserFiles_Copy
CopyFiles=RstMwService_Binary_Copy
CopyFiles=RstMwService_EventLogMsg_Copy
CopyFiles=iaStorAfs_EventLogMsg_Copy
CopyFiles=HfcDisableService_CopyFiles
FeatureScore=0x80
;
[iaStorAC_NVMe_inst_8.NTamd64]
CopyFiles=@iaStorAC.sys
CopyFiles=@iaStorAfs.sys
CopyFiles=iaStorAfs_UserFiles_Copy
FeatureScore=0x80
;
[iaStorAfs_UserFiles_Copy]
iaStorAfsService.exe
iaStorAfsNative.exe
Optane.dll
;
[RstMwService_Binary_Copy]
RstMwService.exe
[RstMwService_EventLogMsg_Copy]
RstMwEventLogMsg.dll
[iaStorAfs_EventLogMsg_Copy]
OptaneEventLogMsg.dll

[HfcDisableService_CopyFiles]
HfcDisableService.exe
;
[iaStorAC_inst_8.NTamd64.HW]
AddReg = msi_addreg
AddReg = storport_addreg
AddReg = etw_rst
;
[iaStorAC_NVMe_inst_8.NTamd64.HW]
AddReg = msi_addreg
AddReg = storport_addreg
AddReg = etw_rst

[iaStorAC_inst_8.ntamd64.Services]
AddService = iaStorAC, %SPSVCINST_ASSOCSERVICE%, iaStorAC_Service_Inst, iaStorAC_EventLog_Inst
AddService = iaStorAfs,0x000000F0,iaStorAfs_Service_Inst, iaStorAfs_EventLog_Inst, System
AddService = iaStorAfsService,0x000000F0,iaStorAfs_WindowsService_Inst
AddService = RstMwService, 0x00000000, RstMwService_Inst, RstMwService_EventLog_Inst, System, %RstMwService.EventLogSourceName%
AddService = HfcDisableService,0x00000000,HfcDisableService_inst, HfcDisableService_EventLog_inst, Application
;
[iaStorAC_NVMe_inst_8.ntamd64.Services]
AddService = iaStorAC, %SPSVCINST_ASSOCSERVICE%, iaStorAC_Service_Inst, iaStorAC_EventLog_Inst
AddService = iaStorAfs,0x000000F0,iaStorAfs_Service_Inst
AddService = iaStorAfsService,0x000000F0,iaStorAfs_WindowsService_Inst
;******************************************************************************
;
;


;

[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
;
; Opt into StorPort's I/O latency cap.
HKR, "Parameters",             "IoLatencyCap",              %REG_TYPE_DWORD%,  0x000001F4 
;
[Strings] 
; Localizable Strings 
diskId1 = "RST Installation Disk" 
;
; Client devices
iaStorAC.DeviceDesc                      = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_2822&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_282A&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_9D07&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_A286&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_9DD7&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_A356&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_A357&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_A35E&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_34D7&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_02D7&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_06D6&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_06D7&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_06DE&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&DEV_A386&CC_0104.DeviceDesc = "Intel(R) Chipset SATA/PCIe RST Premium Controller"
PCI\VEN_8086&CC_0108.DeviceDesc = "Intel(R) NVMe Controller"

;
INTEL = "Intel Corporation"
;
; Non-Localizable Strings 
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
;
; iaStorAfs strings
iaStorAfs.DisplayName = "iaStorAfs"
iaStorAfs.ServiceDescription = "Identifies frequently used files for acceleration with Intel(R) Optane(TM) memory"
;
; Afs Instances specific information.
DefaultInstance        = "iaStorAfs"
Instance.Name          = "iaStorAfs"
Instance.Altitude      = "385100"
Instance.Flags         = 0x0
;
iaStorAfsWindowsService.Name = "Intel(R) Optane(TM) Memory Service"
iaStorAfsWindowsService.Description = "Enables amazing system performance and responsiveness by accelerating frequently used files"
;
HfcDisableService.DisplayName   = "Intel(R) RST HFC Disable Service"
HfcDisableService.Desc          = "Turns off hiberfile caching in Intel(R) RST driver."
;
; RstMwService strings
RstMwService.Name = "Intel(R) Storage Middleware Service"
RstMwService.Description = "RPC endpoint service which allows communication between driver and Windows Store Application"
RstMwService.EventLogSourceName = "RST Middleware"
;
; MSI enables. 
[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]
; Configuring and Starting an AutoLogger Session
;   LogFileMode = Buffering Mode | EVENT_TRACE_ADDTO_TRIAGE_DUMP(0x80000000)
HKLM, System\CurrentControlSet\Control\WMI\Autologger\IntelRST, LogFileMode, %REG_TYPE_DWORD%, 0x80000400
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%, 0x000003e7
; 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