;******************************************************************************/
; INTEL CONFIDENTIAL Copyright 2021 Intel Corporation All Rights Reserved.
;
; The source code contained or described herein and all documents related to
; the source code ("Material") are owned by Intel Corporation or its suppliers
; or licensor. Title to the Material remains with Intel Corporation or its
; suppliers and licensor. The Material contains trade secrets and proprietary
; and confidential information of Intel or its suppliers and licensor.
; The Material is protected by worldwide copyright and trade secret laws and
; treaty provisions. No part of the Material may be used, copied, reproduced,
; modified, published, uploaded, posted, transmitted, distributed,
; or disclosed in any way without Intel's prior express written permission.

; No license under any patent, copyright, trade secret or other intellectual
; property right is granted to or conferred upon you by disclosure or
; delivery of the Materials, either expressly, by implication, inducement,
; estoppal or otherwise. Any license under such intellectual property rights
; must be express and approved by Intel in writing.
;
;
;******************************************************************************/

[Version]
Signature="$Windows NT$"
Class=System
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
Provider=%ManufacturerName%
CatalogFile=FwFlashDriver.cat
DriverVer = 02/09/2023,5.0.43.0
PnpLockdown=1

[Manufacturer]
%ManufacturerName%=Firmware,NTamd64

[Firmware.NTamd64]
%DeviceName%=FwFlashDevice_Install, ACPI\INTC1073 ;;

[SourceDisksFiles]
FwFlashDriver.dll=1
FwFlashService.exe=1 ; FwFlashService
IntelModemFwFlashNotification.exe=1 ; IntelModemFwFlashNotification.exe
FwManageDll.dll=1 ; oem.dll
flash.dll=1 ; flash.dll

[SourceDisksNames]
1=%DiskName%

; =================== UMDF Device ==================================

[FwFlashDevice_Install.NT]
CopyFiles=UMDriverCopy, CoInstallers_CopyFiles


[FwFlashDevice_Install.NT.hw]
Addreg=FwFlashSvc_AutoLogger_AddReg
Addreg=Feature_Control_AddReg

;[FwFlashHWReg]
;;HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services\FwUpdateDriver\Parameters, INPROGRESS, %RegTypeDW%, 1

[FwFlashSvc_AutoLogger_AddReg]
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc, LogFileMode, %REG_DWORD%, 0x10000002 ;FILE_MODE_CIRCULAR,EVENT_TRACE_NO_PER_PROCESSOR_BUFFERING 
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc, BufferSize, %REG_DWORD%, 0x00000004 ;4kb
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc, MaxFileSize, %REG_DWORD%, 0x0000000A ;10MB
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc, FileMax, %REG_DWORD%, 0x00000005 ;5 files
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc, FlushTimer, %REG_DWORD%, 0x00000001 ;1s
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc, Guid,, "{f418b735-4a5f-4f7a-af40-abb36c6f2685}" ;same define in ServiceDebug.cpp
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc, MaximumBuffers, %REG_DWORD%, 0x00000004 ;4kb
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc, MinimumBuffers, %REG_DWORD%, 0x00000004 ;4kb
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc, ClockType, %REG_DWORD%, 0x00000001 ;Performance counter value (high resolution)
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc, Start, %REG_DWORD%, 0 ;set to 0, waiting for flash service startup
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc\{89ff445e-1fa7-42cf-81e7-bce9ec56b5f5}, Enabled, %REG_DWORD%, 00000001
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc\{89ff445e-1fa7-42cf-81e7-bce9ec56b5f5}, EnableFlags,%REG_DWORD%, 0xFFFFFFFF
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\WwanFWFlashSvc\{89ff445e-1fa7-42cf-81e7-bce9ec56b5f5}, EnableLevel, %REG_DWORD%, 00000005

[Feature_Control_AddReg]
HKLM,SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services\FwFlashDriver\Parameters, EurcrptFeature, %REG_DWORD%, 1

[FwFlashDevice_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall
AddService=%FwFlashService.Name%, 0x00000800, FWswitch_Inst ;;add fw update service


[FWswitch_Inst] ;;add fw update service
DisplayName=%FwFlashService.Name%
Description=%FwFlashService.Desc%
ServiceType=%SERVICE_WIN32_OWN_PROCESS%
StartType=%SERVICE_AUTO_START%
ErrorControl=%SERVICE_ERROR_NORMAL%
ServiceBinary=%10%\WWAN\IntelFlashService\FwFlashService.exe


[FwFlashDevice_Install.NT.CoInstallers]
CopyFiles=CoInstallers_CopyFiles
AddReg=CoInstallers_AddReg


[FwFlashDevice_Install.NT.Wdf]
UmdfService=FwFlashDriver,FwFlashDriver_Install
UmdfServiceOrder=FwFlashDriver


[FwFlashDriver_Install]
UmdfLibraryVersion=2.15.0 
ServiceBinary=%12%\UMDF\FwFlashDriver.dll

[WUDFRD_ServiceInstall]
DisplayName=%WudfRdDisplayName%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\WUDFRd.sys

[CoInstallers_CopyFiles]
FwFlashService.exe
IntelModemFwFlashNotification.exe
FwManageDll.dll
flash.dll;;

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WUDFCoinstaller.dll"

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf
CoInstallers_CopyFiles=10,WWAN\IntelFlashService ;; C:\Windows\WWAN\IntelFlashService

[UMDriverCopy]
FwFlashDriver.dll

; =================== Generic ==================================

[Strings]
ManufacturerName="Intel"
DiskName="FwFlashDriver Installation Disk"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
DeviceName="Intel 5G Solution 5000 WWAN FW Flash Driver"
SERVICE_BOOT_START=0x0
SERVICE_SYSTEM_START=0x1
SERVICE_AUTO_START=0x2
SERVICE_DEMAND_START=0x3
SERVICE_DISABLED=0x4
SERVICE_ERROR_IGNORE=0x0
SERVICE_ERROR_NORMAL=0x1
SERVICE_ERROR_SEVERE=0x2
SERVICE_ERROR_CRITICAL=0x3
SERVICE_WIN32_OWN_PROCESS=0x00000010
; DO NOT change the FwFlashService name never
FwFlashService.Name="Intel WWAN Firmware Flash Service"
FwFlashService.Desc="Intel WWAN Firmware Flash Service - To flash WWAN module firmware."
REG_DWORD=0x00010001
