;
; Copyright ©Samsung Electronic Co,. Ltd 2015
;

[Version]
Signature="$Windows NT$"
Provider=%SAM%
ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
Class=SCSIAdapter
CatalogFile=secnvme.cat
DriverVer = 02/12/2018,3.0.0.1802

[Manufacturer]
%SAM% = COMM, NTamd64

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

[DestinationDirs]
DefaultDestDir   = 12

[nvme_Service_Inst]
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_BOOT_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\secnvme.sys
LoadOrderGroup = SCSI miniport
AddReg         = pnpsafe_pci_addreg

[nvme_EventLog_Inst]
AddReg = nvme_EventLog_AddReg

[nvme_EventLog_AddReg]
HKR, , EventMessageFile, %REG_EXPAND_SZ%, "%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\secnvme.sys"
HKR, , TypesSupported, %REG_DWORD%, 7

[pnpsafe_pci_addreg]
HKR, "Parameters\PnpInterface", "5", %REG_DWORD%, 0x00000001
HKR, "Parameters", "BusType", %REG_DWORD%, 0x00000011

[msi_addreg]
HKR, Interrupt Management, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, 0x00000010
HKR, Interrupt Management\Affinity Policy, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, %REG_DWORD%, 1
HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, %REG_DWORD%, 2048
HKR, Interrupt Management\Affinity Policy, DevicePolicy, %REG_DWORD%, 5 ;IrqPolicySpreadMessagesAcrossAllProcessors
HKR, Interrupt Management\Affinity Policy, DevicePriority, %REG_DWORD%, 3
HKR, Interrupt Management\Affinity Policy, GroupPolicy, %REG_DWORD%, 1

[SourceDisksFiles.amd64] 
secnvme.sys = 1,,, 

[COMM.NTamd64] 
%COMMNvmeUBX.DeviceDesc% 	= nvme_inst, PCI\VEN_144D&DEV_A802
%COMMNvmePolaris.DeviceDesc% 	= nvme_inst, PCI\VEN_144D&DEV_A804
%COMMNvmePhoenix.DeviceDesc%	= nvme_inst, PCI\VEN_144D&DEV_A808

[nvme_inst.NTamd64]
CopyFiles=@secnvme.sys
AddPowerSetting = NVMeFxProfile1,NVMeFxProfile2

[nvme_inst.NTamd64.HW]
AddReg = msi_addreg

[nvme_inst.NTamd64.Services]
AddService = secnvme, 0x00000002 , nvme_Service_Inst, nvme_EventLog_Inst

[NVMeFxProfile1]
; Disk subgroup
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; Maximum Tolerable Trasition Latency (ms)
Setting =  {A9D4776D-785B-4AE8-903B-B742AE4B6B62}, %MaxTolerableLatencyName%,,,0x00000001
; Range 0 to 100 (unit: ms)
ValueRange = 0, 100, 1, %Milliseconds%

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

[NVMeFxProfile2]
; Disk subgroup
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; Idle Timeout (ms)
Setting =  {6B013A00-F775-4D61-9036-A62F7E7A6A5B}, %IdleTimeoutName%,,,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, 100
; Balanced
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 0, 200
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 1, 100
; Power Saving
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 0, 200
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 1, 100


[Strings]
;
; Localizable Strings
;
diskId1 = "NVME Installation Disk"
COMMNvmeUBX.DeviceDesc      = "Samsung NVMe Controller"
COMMNvmePolaris.DeviceDesc  = "Samsung NVMe Controller"
COMMNvmePhoenix.DeviceDesc  = "Samsung NVMe Controller"

SAM = "Samsung Electronics Co., Ltd"

Milliseconds                = "milliseconds"
MaxTolerableLatencyName = "SEC NVMe Maximum Tolerable Trasition Latency"
IdleTimeoutName         = "SEC NVMe Idle Timeout"


;
; Non-Localizable Strings
;

REG_EXPAND_SZ  = 0x00020000
REG_DWORD      = 0x00010001
SERVICE_KERNEL_DRIVER  = 1
SERVICE_BOOT_START     = 0
SERVICE_ERROR_NORMAL   = 1
SERVICE_ERROR_CRITICAL = 3
