;-------------------------------------------------------------------------------
; INTEL CONFIDENTIAL
;
; Copyright (c) 2013-2023 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 licensors. Title to the Material remains with Intel Corporation or its 
; suppliers and licensors. The Material contains trade secrets and proprietary 
; and confidential information of Intel or its suppliers and licensors. 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, estoppel or 
; otherwise. Any license under such intellectual property rights must be 
; expressed and approved by Intel in writing.
;------------------------------------------------------------------------------

[Version] 
Signature = "$WINDOWS NT$" 
Class=System
ClassGUID = {4D36E97D-E325-11CE-BFC1-08002BE10318}
Provider = %INTEL% 
CatalogFile = ipf_cpu.cat
DriverVer = 04/10/2023,1.0.11203.34112
PnpLockDown=1

;----------------------------------------------------------------------
; File Information
;----------------------------------------------------------------------

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

[SourceDisksFiles]
ipf_lf.sys = 1
ipf_umdf2.dll = 1
ipf_cpu.sys = 1
dsp.dv = 1
ppm.dv = 1
ipf_uf.exe = 1
upe_capi.dll = 1
upe_wwan.dll = 1
upe_wifi.dll = 1
upe_nvme.dll = 1
upe_battery.dll = 1
upe_nvapi.dll = 1
upe_socwc.dll = 1
upe_hwpf.dll = 1
ipf_helper.exe = 1
ipf_cmp.dll = 1
ipfcore.dll = 1
ipfipc.dll = 1
ipfsrv.dll = 1

[DestinationDirs]
DefaultDestDir = 13
IpfCpu_CopyFiles = 13

;-------------------------------------------------------------------------------
; Manufacturer and Models Section
;-------------------------------------------------------------------------------

[Manufacturer]
%INTEL% = INTEL, NTamd64.10.0...17763, NTamd64.10.0...22621

[INTEL.NTamd64.10.0...17763]
%PROCADL.DeviceDesc%  = IpfInstall_Win10_17763,PCI\VEN_8086&DEV_461D
%PROCFHF.DeviceDesc%  = IpfInstall_Win10_17763,PCI\VEN_8086&DEV_3258
%PROCRPL.DeviceDesc%  = IpfInstall_Win10_17763,PCI\VEN_8086&DEV_A71D

[INTEL.NTamd64.10.0...22621]
%PROCADL.DeviceDesc%  = IpfInstall_Win11_22621,PCI\VEN_8086&DEV_461D
%PROCFHF.DeviceDesc%  = IpfInstall_Win11_22621,PCI\VEN_8086&DEV_3258
%PROCRPL.DeviceDesc%  = IpfInstall_Win11_22621,PCI\VEN_8086&DEV_A71D

;------------------------------------------------------------------------------
; IPF Install Section
;------------------------------------------------------------------------------

[IpfInstall_Win10_17763.NTamd64]
CopyFiles = IpfCpu_CopyFiles

[IpfInstall_Win11_22621.NTamd64]
CopyFiles = IpfCpu_CopyFiles

[IpfInstall_Win10_17763.NTamd64.Services]
AddService = ipf_lf,, IpfLfService_Install, IpfLfEtw_Install, System, ipf_lf
AddService = ipf_cpu,0x00000002, IpfCpuService_Install, IpfCpuEtw_Install, System, ipf_cpu
AddService = WUDFRd,0x000001f8, WUDFRDService_Install, IpfUfLogging_Install, Application
AddService = ipfsvc, 0x000009f8, IpfUfService_Install_Win10_17763, IpfUfSupportLogging_Install, Application, IPF

[IpfInstall_Win11_22621.NTamd64.Services]
AddService = ipf_lf,, IpfLfService_Install, IpfLfEtw_Install, System, ipf_lf
AddService = ipf_cpu,0x00000002, IpfCpuService_Install, IpfCpuEtw_Install, System, ipf_cpu
AddService = WUDFRd,0x000001f8, WUDFRDService_Install, IpfUfLogging_Install, Application
AddService = ipfsvc, 0x000009f8, IpfUfService_Install_Win11_22621, IpfUfSupportLogging_Install, Application, IPF

[IpfLfService_Install]
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %13%\ipf_lf.sys
LoadOrderGroup = Base
AddReg = IpfVersion_AddReg

[IpfVersion_AddReg]
HKR,"Parameters","Version",,"1.0.11203.34112"
HKR,"Parameters","Display",,"Intel(R) Innovation Platform Framework"
HKR,"Parameters","Path",,"%13%"

[IpfCpuService_Install]
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %13%\ipf_cpu.sys
LoadOrderGroup = Base

[WUDFRDService_Install]
DisplayName    = %ReflectorName%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\WUDFRd.sys

[IpfInstall_Win10_17763.NTamd64.HW]
AddReg = Hw_AddFilterReg
AddReg = Hw_AddLocationReg

[IpfInstall_Win11_22621.NTamd64.HW]
AddReg = Hw_AddFilterReg
AddReg = Hw_AddLocationReg

[Hw_AddFilterReg]
HKR,,"UpperFilters", 0x00010008, "ipf_lf"
HKR,,"UpperFilters", 0x00010008, "WUDFRd"
HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)"

[Hw_AddLocationReg]
HKR,,"InstallDir",,%13%

[IpfInstall_Win10_17763.NTamd64.Wdf]
KmdfService = ipf_lf, Wdf_KmdfSection
KmdfService = ipf_cpu, Wdf_KmdfSection
UmdfService = ipf_umdf2, Wdf_UmdfSection10.0
UmdfServiceOrder = ipf_umdf2
UmdfImpersonationLevel = Impersonation
UmdfKernelModeClientPolicy = AllowKernelModeClients 
UmdfFileObjectPolicy = AllowNullAndUnknownFileObjects
UmdfHostProcessSharing = ProcessSharingDisabled
UmdfDispatcher = FileHandle

[IpfInstall_Win11_22621.NTamd64.Wdf]
KmdfService = ipf_lf, Wdf_KmdfSection
KmdfService = ipf_cpu, Wdf_KmdfSection
UmdfService = ipf_umdf2, Wdf_UmdfSection10.0
UmdfServiceOrder = ipf_umdf2
UmdfImpersonationLevel = Impersonation
UmdfKernelModeClientPolicy = AllowKernelModeClients 
UmdfFileObjectPolicy = AllowNullAndUnknownFileObjects
UmdfHostProcessSharing = ProcessSharingDisabled
UmdfDispatcher = FileHandle

[Wdf_KmdfSection]
KmdfLibraryVersion = 1.11

[Wdf_UmdfSection10.0]
UmdfLibraryVersion = 2.0.0 ;hardcoded as the same inf is used for 1.11 too.
ServiceBinary = %13%\ipf_umdf2.dll

;----------------------------------------------------------------------
; ETW Support compontents
;----------------------------------------------------------------------

[IpfLfEtw_Install]
AddReg=IpfLfEtw_AddReg

[IpfLfEtw_AddReg]
HKLM,%IpfLfEtwProviderKey%,,%REG_SZ%,"EsifLfEtwProvider"
HKLM,%IpfLfEtwProviderKey%,"ResourceFileName",%REG_EXPAND_SZ%,"%13%\ipf_lf.sys"
HKLM,%IpfLfEtwProviderKey%,"MessageFileName",%REG_EXPAND_SZ%,"%13%\ipf_lf.sys"
HKLM,%IpfLfEtwProviderKey%,"Enabled",%REG_DWORD%,1

[IpfCpuEtw_Install]
AddReg=IpfCpuEtw_AddReg

[IpfCpuEtw_AddReg]
HKLM,%IpfCpuEtwProviderKey%,,%REG_SZ%,"DptfCpuEtwProvider"
HKLM,%IpfCpuEtwProviderKey%,"ResourceFileName",%REG_EXPAND_SZ%,"%13%\ipf_cpu.sys"
HKLM,%IpfCpuEtwProviderKey%,"MessageFileName",%REG_EXPAND_SZ%,"%13%\ipf_cpu.sys"
HKLM,%IpfCpuEtwProviderKey%,"Enabled",%REG_DWORD%,1

[IpfUfLogging_Install]
AddReg=IpfUmdf2Etw_AddReg
AddReg=IpfUmdf2EventLog_AddReg

[IpfUmdf2Etw_AddReg]
HKLM,%IpfUmdf2EtwProviderKey%,,%REG_SZ%,"EsifUmdf2EtwProvider"
HKLM,%IpfUmdf2EtwProviderKey%,"ResourceFileName",%REG_EXPAND_SZ%,"%13%\ipf_umdf2.dll"
HKLM,%IpfUmdf2EtwProviderKey%,"MessageFileName",%REG_EXPAND_SZ%,"%13%\ipf_umdf2.dll"
HKLM,%IpfUmdf2EtwProviderKey%,"Enabled",%REG_DWORD%,1

[IpfUmdf2EventLog_AddReg]
HKLM,%IpfUmdf2EventLogProviderKey%,,%REG_SZ%,"IPF"
HKLM,%IpfUmdf2EventLogProviderKey%,"ResourceFileName",%REG_EXPAND_SZ%,"%13%\ipf_umdf2.dll"
HKLM,%IpfUmdf2EventLogProviderKey%,"MessageFileName",%REG_EXPAND_SZ%,"%13%\ipf_umdf2.dll"
HKLM,%IpfUmdf2EventLogProviderKey%,"Enabled",%REG_DWORD%,1
HKLM,%IpfUmdf2EventLogProviderKey%"\ChannelReferences","Count",%REG_DWORD%,1
HKLM,%IpfUmdf2EventLogProviderKey%"\ChannelReferences\0\",,%REG_SZ%,"Application"
HKLM,%IpfUmdf2EventLogProviderKey%"\ChannelReferences\0\","Flags",%REG_DWORD%,1
HKLM,%IpfUmdf2EventLogProviderKey%"\ChannelReferences\0\","Id",%REG_DWORD%,9
HKLM,%IpfUmdf2EventLogChannelKey%,"Enabled",%REG_DWORD%,1
HKLM,%IpfUmdf2EventLogChannelKey%,"EnableLevel",%REG_DWORD%,0
HKLM,%IpfUmdf2EventLogChannelKey%,"EnableProperty",%REG_DWORD%,1
HKLM,%IpfUmdf2EventLogChannelKey%,"LoggerName",%REG_EXPAND_SZ%,"EventLog-Application"
HKLM,%IpfUmdf2EventLogChannelKey%,"MatchAnyKeyword",%REG_QWORD%,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80
HKLM,%IpfUmdf2EventLogChannelKey%,"MatchAllKeyword",%REG_QWORD%,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

;----------------------------------------------------------------------
; Various IPF UF components.
;----------------------------------------------------------------------

[IpfCpu_CopyFiles]
ipf_lf.sys,,,2
ipf_cpu.sys,,,2
ipf_umdf2.dll,,,2
ipf_uf.exe,,,%COPYFLG_NOSKIP%
dsp.dv,,,%COPYFLG_NOSKIP%
ppm.dv,,,%COPYFLG_NOSKIP%
upe_capi.dll,,,%COPYFLG_NOSKIP%
upe_wwan.dll,,,%COPYFLG_NOSKIP%
upe_wifi.dll,,,%COPYFLG_NOSKIP%
upe_nvme.dll,,,%COPYFLG_NOSKIP%
upe_battery.dll,,,%COPYFLG_NOSKIP%
upe_nvapi.dll,,,%COPYFLG_NOSKIP%
upe_socwc.dll,,,%COPYFLG_NOSKIP%
upe_hwpf.dll,,,%COPYFLG_NOSKIP%
ipf_helper.exe,,,%COPYFLG_NOSKIP%
ipf_cmp.dll,,,%COPYFLG_NOSKIP%
ipfcore.dll,,,%COPYFLG_NOSKIP%
ipfipc.dll,,,%COPYFLG_NOSKIP%
ipfsrv.dll,,,%COPYFLG_NOSKIP%

[IpfUfService_Install_Win10_17763]
DisplayName=%ServiceDisplayName%
Description=%ServiceDescription%
ServiceType = %SERVICE_WIN32_OWN_PROCESS%
StartType = %SERVICE_AUTO_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = """%13%\%ServiceFile%"""
AddReg = IpfUfService_AddReg

[IpfUfService_AddReg]
HKR,,"FailureActions",%REG_BINARY%,80,51,01,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,00,01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

[IpfUfService_Install_Win11_22621]
DisplayName=%ServiceDisplayName%
Description=%ServiceDescription%
ServiceType = %SERVICE_WIN32_OWN_PROCESS%
StartType = %SERVICE_AUTO_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = """%13%\%ServiceFile%"""
FailureActions=ServiceFailureActions

[ServiceFailureActions]
ResetPeriod=86400
NonCrashFailures=0x1
Action=1,0
Action=1,0
Action=0,0

[IpfUfSupportLogging_Install]
AddReg=IpfUfEventLog_AddReg
AddReg=IpfUfEtw_AddReg
AddReg=IpfHelperEventLog_AddReg
AddReg=IpfHelperEtw_AddReg
AddReg=IpfCoreEtw_AddReg
AddReg=IpfIpcEtw_AddReg

[IpfUfEventLog_AddReg]
HKLM,%IpfSvcEventLogProviderKey%,,%REG_SZ%,"ipfsvc"
HKLM,%IpfSvcEventLogProviderKey%,"ResourceFileName",%REG_EXPAND_SZ%,"%13%\ipf_uf.exe"
HKLM,%IpfSvcEventLogProviderKey%,"MessageFileName",%REG_EXPAND_SZ%,"%13%\ipf_uf.exe"
HKLM,%IpfSvcEventLogProviderKey%,"Enabled",%REG_DWORD%,1
HKLM,%IpfSvcEventLogProviderKey%"\ChannelReferences","Count",%REG_DWORD%,1
HKLM,%IpfSvcEventLogProviderKey%"\ChannelReferences\0\",,%REG_SZ%,"Application"
HKLM,%IpfSvcEventLogProviderKey%"\ChannelReferences\0\","Flags",%REG_DWORD%,1
HKLM,%IpfSvcEventLogProviderKey%"\ChannelReferences\0\","Id",%REG_DWORD%,9
HKLM,%IpfSvcEventLogChannelKey%,"Enabled",%REG_DWORD%,1
HKLM,%IpfSvcEventLogChannelKey%,"EnableLevel",%REG_DWORD%,0
HKLM,%IpfSvcEventLogChannelKey%,"EnableProperty",%REG_DWORD%,1
HKLM,%IpfSvcEventLogChannelKey%,"LoggerName",%REG_EXPAND_SZ%,"EventLog-Application"
HKLM,%IpfSvcEventLogChannelKey%,"MatchAnyKeyword",%REG_QWORD%,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80
HKLM,%IpfSvcEventLogChannelKey%,"MatchAllKeyword",%REG_QWORD%,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

[IpfUfEtw_AddReg]
HKLM,%IpfSvcEtwProviderKey%,,%REG_SZ%,"EsifSvcEtwProvider"
HKLM,%IpfSvcEtwProviderKey%,"ResourceFileName",%REG_EXPAND_SZ%,"%13%\ipf_uf.exe"
HKLM,%IpfSvcEtwProviderKey%,"MessageFileName",%REG_EXPAND_SZ%,"%13%\ipf_uf.exe"
HKLM,%IpfSvcEtwProviderKey%,"Enabled",%REG_DWORD%,1

[IpfHelperEventLog_AddReg]
HKLM,%IpfHelperEventLogProviderKey%,,%REG_SZ%,"DPTFHELPER"
HKLM,%IpfHelperEventLogProviderKey%,"ResourceFileName",%REG_EXPAND_SZ%,"%13%\ipf_helper.exe"
HKLM,%IpfHelperEventLogProviderKey%,"MessageFileName",%REG_EXPAND_SZ%,"%13%\ipf_helper.exe"
HKLM,%IpfHelperEventLogProviderKey%,"Enabled",%REG_DWORD%,1
HKLM,%IpfHelperEventLogProviderKey%"\ChannelReferences","Count",%REG_DWORD%,1
HKLM,%IpfHelperEventLogProviderKey%"\ChannelReferences\0\",,%REG_SZ%,"Application"
HKLM,%IpfHelperEventLogProviderKey%"\ChannelReferences\0\","Flags",%REG_DWORD%,1
HKLM,%IpfHelperEventLogProviderKey%"\ChannelReferences\0\","Id",%REG_DWORD%,9
HKLM,%IpfHelperEventLogChannelKey%,"Enabled",%REG_DWORD%,1
HKLM,%IpfHelperEventLogChannelKey%,"EnableLevel",%REG_DWORD%,0
HKLM,%IpfHelperEventLogChannelKey%,"EnableProperty",%REG_DWORD%,1
HKLM,%IpfHelperEventLogChannelKey%,"LoggerName",%REG_EXPAND_SZ%,"EventLog-Application"
HKLM,%IpfHelperEventLogChannelKey%,"MatchAnyKeyword",%REG_QWORD%,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80
HKLM,%IpfHelperEventLogChannelKey%,"MatchAllKeyword",%REG_QWORD%,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

[IpfHelperEtw_AddReg]
HKLM,%IpfHelperEtwProviderKey%,,%REG_SZ%,"DptfHelperEtwProvider"
HKLM,%IpfHelperEtwProviderKey%,"ResourceFileName",%REG_EXPAND_SZ%,"%13%\ipf_helper.exe"
HKLM,%IpfHelperEtwProviderKey%,"MessageFileName",%REG_EXPAND_SZ%,"%13%\ipf_helper.exe"
HKLM,%IpfHelperEtwProviderKey%,"Enabled",%REG_DWORD%,1

[IpfCoreEtw_AddReg]
HKLM,%IpfCoreEtwProviderKey%,,%REG_SZ%,"IpfCoreEtwProvider"
HKLM,%IpfCoreEtwProviderKey%,"ResourceFileName",%REG_EXPAND_SZ%,"%13%\ipfcore.dll"
HKLM,%IpfCoreEtwProviderKey%,"MessageFileName",%REG_EXPAND_SZ%,"%13%\ipfcore.dll"
HKLM,%IpfCoreEtwProviderKey%,"Enabled",%REG_DWORD%,1

[IpfIpcEtw_AddReg]
HKLM,%IpfIpcEtwProviderKey%,,%REG_SZ%,"IpfIpcEtwProvider"
HKLM,%IpfIpcEtwProviderKey%,"ResourceFileName",%REG_EXPAND_SZ%,"%13%\ipfipc.dll"
HKLM,%IpfIpcEtwProviderKey%,"MessageFileName",%REG_EXPAND_SZ%,"%13%\ipfipc.dll"
HKLM,%IpfIpcEtwProviderKey%,"Enabled",%REG_DWORD%,1

;----------------------------------------------------------------------
; Strings and Constants
;----------------------------------------------------------------------

[Strings]
INTEL = "Intel"
DiskName = "Intel(R) Innovation Platform Framework"
ReflectorName="Windows Driver Foundation - User-mode Driver Framework Reflector"

SERVICE_AUTO_START = 2
SERVICE_DEMAND_START  = 3
SERVICE_ERROR_NORMAL  = 1
SERVICE_KERNEL_DRIVER = 1
SERVICE_WIN32_OWN_PROCESS = 0x00000010

REG_SZ                          = 0x00000000
REG_DWORD                       = 0x00010001
REG_MULTI_SZ                    = 0x00010000
REG_EXPAND_SZ                   = 0x00020000
REG_BINARY = 0x00000001
REG_QWORD = 0x000B0001

COPYFLG_NOSKIP = 0x00000002

ServiceDisplayName="Intel(R) Innovation Platform Framework Service"
ServiceDescription="Intel(R) Innovation Platform Framework Service"
ServiceFile="ipf_uf.exe"
IpfCpuEtwProviderKey="SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{651E0E5C-0946-43FF-B70F-AECD299B29B4}"
IpfLfEtwProviderKey="SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{FDC7B3F9-EB64-4043-9D47-BF2B7457BAA6}"
IpfUmdf2EtwProviderKey="SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{3F51786B-B787-4B2F-84FC-272B76348F6D}"
IpfUmdf2EventLogProviderKey="SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{d3cb85d1-d61c-4bcf-9674-7910ee54d6af}"
IpfUmdf2EventLogChannelKey="SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Application\{d3cb85d1-d61c-4bcf-9674-7910ee54d6af}"
IpfSvcEtwProviderKey="SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{3E0F531A-5403-4DF0-99BB-65376BB2AFF0}"
IpfSvcEventLogProviderKey="SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{1E1AE642-78CF-4E42-96F9-204141EC1061}"
IpfSvcEventLogChannelKey="SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Application\{1E1AE642-78CF-4E42-96F9-204141EC1061}"
IpfHelperEtwProviderKey="SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{3929A44B-4233-421A-B231-C0EBC5175481}"
IpfHelperEventLogProviderKey="SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{251DF2F5-DADB-4F41-B907-5638AA2E048A}"
IpfHelperEventLogChannelKey="SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Application\{251DF2F5-DADB-4F41-B907-5638AA2E048A}"
IpfCoreEtwProviderKey="SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{F7D67706-0BB1-47DD-86FC-6293D1EC3CF4}"
IpfIpcEtwProviderKey="SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{66899E7E-2E7A-4253-9BB9-7AE3F812514F}"

PROCADL.DeviceDesc  = "Intel(R) Innovation Platform Framework Processor Participant"
PROCFHF.DeviceDesc  = "Intel(R) Innovation Platform Framework Processor Participant"
PROCRPL.DeviceDesc  = "Intel(R) Innovation Platform Framework Processor Participant"
