;************************************************************************************
;                           - oemsetup.inf - 
;		This is the INF file for Windows Vista and above only 
;					Areca SAS 3G/6G/12G PCI Host Adapters
;
;		*********************************************************************
;		*                                                                   *
;		*  Copyright 2012 ARECA, Inc. All rights reserved.                  *
;		*                                                                   *
;		*  This file is property of ARECA, Inc. and is licensed for         *
;		*  use as is.  The receipt of or possession of this file does not   *
;		*  convey any rights to modify its contents, in whole, or in part,  *
;		*  without the specific written consent of ARECA, Inc.              *
;		*                                                                   *
;		*********************************************************************
;************************************************************************************

[Version]
Signature="$Windows NT$"
Class=SCSIAdapter
ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
Provider=%ARECA%
DriverVer = 09/05/2018,6.0.0.16
CatalogFile=arcsas3.cat

[DestinationDirs]
DefaultDestDir = 12                 ; DIRID_DRIVERS

[SourceDisksFiles]
arcsas3.sys = 1

[SourceDisksNames]
1 = %ArcSAS3.Source.Disk.Name%,,,

[Manufacturer]
%ARECA%=ARECA,NTamd64

[ARECA.NTamd64]
%ArcSAS3.DevDesc3G%  = ArcSAS3_PciIoSpace_Inst, PCI\VEN_17D3&DEV_1300
%ArcSAS3.DevDesc6G%  = ArcSAS3_Inst, PCI\VEN_17D3&DEV_1320
%ArcSAS3.DevDesc12G% = ArcSAS3_Inst, PCI\VEN_17D3&DEV_1330
%ArcSAS3.DevDesc12G% = ArcSAS3_Inst, PCI\VEN_1000&DEV_0097

[ControlFlags]
ExcludeFromSelect = PCI\VEN_17D3&DEV_1300
ExcludeFromSelect = PCI\VEN_17D3&DEV_1320
ExcludeFromSelect = PCI\VEN_17D3&DEV_1330
ExcludeFromSelect = PCI\VEN_1000&DEV_0097

;************************************************
;** ARC1300 Need PciIoSpace ,MSI does not support 
;************************************************

[ArcSAS3_PciIoSpace_Inst]
CopyFiles = @arcsas3.sys
CopyINF = arcvdev.inf
AddReg = ArcSAS3_AddReg

[ArcSAS3_PciIoSpace_Inst.HW]
Include = machine.inf
AddReg = ArcSAS3_Removal_Addreg
AddReg = ArcSAS3_Shutdown_Addreg
DelReg = ArcSAS3_LegacyStorportValues

[ArcSAS3_PciIoSpace_Inst.Services]
AddService = arcsas3, %SPSVCINST_ASSOCSERVICE%, ArcSAS3_Service_Inst, ArcSAS3_EventLog_Inst

;************************************************
;**     ARC1320,ARC1330,ARC1330-TLR 
;**        PciIoSpace NotRequired
;************************************************

[ArcSAS3_Inst]
CopyFiles = @arcsas3.sys
CopyINF = arcvdev.inf
AddReg = ArcSAS3_AddReg

[ArcSAS3_Inst.HW]
Include = machine.inf
Needs   = PciIoSpaceNotRequired
AddReg  = ArcSAS3_Removal_Addreg
AddReg  = ArcSAS3_Interrupt_Management_Addreg
AddReg  = ArcSAS3_Shutdown_Addreg
DelReg  = ArcSAS3_LegacyStorportValues

[ArcSAS3_Inst.Services]
AddService = arcsas3, %SPSVCINST_ASSOCSERVICE%, ArcSAS3_Service_Inst, ArcSAS3_EventLog_Inst

;************************************************
;**
;************************************************

[ArcSAS3_Service_Inst]
DisplayName    = %ArcSAS3.DevDesc%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_BOOT_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\arcsas3.sys
LoadOrderGroup = SCSI Miniport
AddReg         = ArcSAS3_Parameters_Addreg
AddReg         = ArcSAS3_BusType_Addreg

[ArcSAS3_Parameters_Addreg]
HKR, "Parameters\PnpInterface", "5", 0x00010001, 0x00000001 ;PCIBus (5), Isa (1), Eisa (2) and PCMCIABus (8).
HKR, "Parameters\PnpInterface", "Thunderbolt", 0x00010001, 0x00000001 ;
;;; The next 2 values will allow a 16 MB virtual harddisk as reported in Disk Manager (diskmgmt.msc).
HKR, "Parameters", "VirtualDiskSize",   %REG_DWORD%,  0x01000000
HKR, "Parameters", "PhysicalDiskSize",  %REG_DWORD%,  0x01000000
HKR, "Parameters", "NbrLUNsperHBA",     %REG_DWORD%,  0x00000002
;;;HKR, "Parameters", "CombineVirtDisks",  %REG_DWORD%,  0x00000001

[ArcSAS3_Removal_Addreg] 
HKR, , "RemovalPolicy", 0x00010001, 3 ; REMOVAL_POLICY 3

[ArcSAS3_Interrupt_Management_Addreg]
HKR, "Interrupt Management", 0x00000010
HKR, "Interrupt Management\MessageSignaledInterruptProperties", 0x00000010
HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 1
;HKR, "Interrupt Management\Affinity Policy", DevicePriority, 0x00010001, 3; 
;HKR, "Interrupt Management\Affinity Policy", DevicePolicy, 0x00010001, 5 ;IrqPolicySpreadMessagesAcrossAllProcessors
;HKR, "Interrupt Management\Affinity Policy", GroupPolicy, 0x00010001, 1;  

[ArcSAS3_BusType_Addreg]
HKR, "Parameters", "BusType", 0x00010001, 0x0000000A

[ArcSAS3_AddReg]
HKLM,SYSTEM\CurrentControlSet\Services\disk,TimeOutValue,0x00010001,0x5a
HKLM,SYSTEM\CurrentControlSet\Services\arcsas3\Parameters\Device,MaximumSGList,0x00010001,0x000001FE
HKLM,SYSTEM\CurrentControlSet\Services\arcsas3\Parameters\Device,NumberOfRequests,0x00010001,255 ; REQUEST_COUNT 257

;************************************************
;** --- arcsas3 Coinstaller installation ---
;[DestinationDirs]
;ArcSAS3_CoInstaller_CopyFiles = 11
;
;[arcsas3.CoInstallers]
;AddReg=ArcSAS3_CoInstaller_AddReg
;CopyFiles=ArcSAS3_CoInstaller_CopyFiles;
;
;[ArcSAS3_CoInstaller_AddReg]
;HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller"
;
;[ArcSAS3_CoInstaller_CopyFiles]
;WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll
;
;[SourceDisksFiles.$ARCH$]
;WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1,  ; make sure the number matches with SourceDisksNames
;[arcsas3.Wdf]
;KmdfService = arcsas3, ArcSAS3_wdfsect
;
;[ArcSAS3_wdfsect]
;KmdfLibraryVersion = $KMDFVERSION$
;** --- arcsas3 Coinstaller installation ---
;************************************************

[ArcSAS3_EventLog_Inst]
AddReg = ArcSAS3_EventLog_AddReg

[ArcSAS3_EventLog_AddReg]
HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\Drivers\arcsas3.sys"
HKR,,TypesSupported,%REG_DWORD%,7

[ArcSAS3_Shutdown_Addreg]
HKR,"ScSiPort","NeedsSystemShutdownNotification",0x00010001,1

[ArcSAS3_LegacyStorportValues]
HKR,ScsiPort,BusNumber
HKR,ScsiPort,LegacyInterfaceType
HKR,ScsiPort,SlotNumber

[Strings]
ARECA                    = "Areca Technology Corporation"
ArcSAS3.DevDesc          = "Areca SAS Host Adapter"
ArcSAS3.DevDesc3G        = "Areca SAS 3G PCI Host Adapter"
ArcSAS3.DevDesc6G        = "Areca SAS 6G PCI Host Adapter"
ArcSAS3.DevDesc12G       = "Areca SAS 12G PCI Host Adapter"
ArcSAS3.Source.Disk.Name = "Areca SAS PCI HBA Installation Disk"

;*************************************************
;** Handy macro substitutions (non-localizable)
;*************************************************

REMOVAL_POLICY         = 3              ;where Policy = 2 for ExpectOrderlyRemoval, Policy = 3 for ExpectSurpriseRemoval.
REQUEST_COUNT          = 510
TIMEOUT_SECS           = 90
PCI_BUS                = 5
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER  = 1
SERVICE_BOOT_START     = 0
SERVICE_ERROR_NORMAL   = 1
REG_EXPAND_SZ          = 0x00020000
REG_DWORD              = 0x00010001
