;*******************************************************************************
;*                                                                            **
;*                     I N T E L   P R O P R I E T A R Y                      **
;*                                                                            **
;*   COPYRIGHT (c) 2003-2013 BY INTEL CORPORATION. ALL RIGHTS RESERVED.  NO   **
;*   PART  OF  THIS  PROGRAM OR PUBLICATION MAY BE REPRODUCED, TRANSMITTED,   **
;*   TRANSCRIBED, STORED IN A RETRIEVAL  SYSTEM,  OR  TRANSLATED  INTO  ANY   **
;*   LANGUAGE OR COMPUTER LANGUAGE IN ANY FORM OR BY ANY MEANS, ELECTRONIC,   **
;*   MECHANICAL, MAGNETIC, OPTICAL, CHEMICAL, MANUAL, OR OTHERWISE, WITHOUT   **
;*   THE PRIOR WRITTEN PERMISSION OF :                                        **
;*                                                                            **
;*                             INTEL CORPORATION                              **
;*                                                                            **
;*                          2200 MISSION COLLEGE BLVD                         **
;*                                                                            **
;*                     SANTA CLARA, CALIFORNIA 95052-8119                     **
;*                                                                            **
;*******************************************************************************
;
;
; File Name: TeeDriver.inf
; Install information file for TeeDriver Driver
;--------- Version Section ---------------------------------------------------

[Version]
Signature="$WINDOWS NT$"
Class=System
ClassGUID={4d36e97d-e325-11ce-bfc1-08002be10318}
Provider=%Provider%
DriverVer=08/19/2013,9.5.14.1724
CatalogFile=HECI.cat

[ControlFlags]
; Pnp drivers should not be installable via non-PnP hardware dialogs
ExcludeFromSelect = *

;--------- DestinationDirs Section -------------------------------------------

[DestinationDirs]
DefaultDestDir = 12
COPYMETADATA_EN = 24, \ProgramData\Microsoft\Windows\DeviceMetadataStore\EN ;
TEE_DDI_CoInstaller_CopyFiles = 11

;--------- SourceDiskNames and SourceDiskFiles Section -----------------------
; These sections identify source disks and files for installation.

[SourceDisksNames]
1=%Location%,

[SourceDisksFiles.x86]
TeeDriver.sys=1,.\x86
HECI.sys=1,.\x86
wdfcoinstaller01011.dll=1,.\x86
3f3ca95b-3978-4168-b47b-5444f42d6c89.devicemetadata-ms= 1,, ;A metadata package file for EN - Win8
46a6fdbe-c823-4579-bab6-35f67e01f793.devicemetadata-ms= 1,, ;A metadata package file for EN - Win7

[SourceDisksFiles.amd64]
TeeDriverx64.sys=1,.\x64
HECIx64.sys=1,.\x64
wdfcoinstaller01011.dll=1,.\x64
3f3ca95b-3978-4168-b47b-5444f42d6c89.devicemetadata-ms= 1,, ;A metadata package file for EN - Win8
46a6fdbe-c823-4579-bab6-35f67e01f793.devicemetadata-ms= 1,, ;A metadata package file for EN - Win7

;--------- Manufacturer and Models Sections ----------------------------------

[Manufacturer]
%MfgName% = Intel, NTx86.6.1, NTamd64.6.1, NTx86.5.1, NTamd64.5.1

[Intel.NTx86.6.1]
; DisplayName               Section           DeviceId
%TEE_DeviceDesc%=TEE_DDI, PCI\VEN_8086&DEV_1E3A
%TEE_DeviceDesc%=TEE_DDI, PCI\VEN_8086&DEV_1CBA
%TEE_DeviceDesc%=TEE_DDI, PCI\VEN_8086&DEV_1C3A
%TEE_DeviceDesc%=TEE_DDI, PCI\VEN_8086&DEV_1DBA
%TEE_DeviceDesc%=TEE_DDI, PCI\VEN_8086&DEV_1D3A
%TEE_DeviceDesc%=TEE_DDI, PCI\VEN_8086&DEV_8C3A
%TEE_DeviceDesc%=TEE_DDI, PCI\VEN_8086&DEV_9C3A

[Intel.ntamd64.6.1]
; DisplayName               Section           DeviceId
%TEE_DeviceDesc%=TEE_DDI_x64, PCI\VEN_8086&DEV_1E3A
%TEE_DeviceDesc%=TEE_DDI_x64, PCI\VEN_8086&DEV_1CBA
%TEE_DeviceDesc%=TEE_DDI_x64, PCI\VEN_8086&DEV_1C3A
%TEE_DeviceDesc%=TEE_DDI_x64, PCI\VEN_8086&DEV_1DBA
%TEE_DeviceDesc%=TEE_DDI_x64, PCI\VEN_8086&DEV_1D3A
%TEE_DeviceDesc%=TEE_DDI_x64, PCI\VEN_8086&DEV_8C3A
%TEE_DeviceDesc%=TEE_DDI_x64, PCI\VEN_8086&DEV_9C3A

;
; ============== XP Support ==================
;
[Intel.NTx86.5.1]
; DisplayName               Section           DeviceId
%TEE_DeviceDesc%=TEE_DDI_XP, PCI\VEN_8086&DEV_1E3A
%TEE_DeviceDesc%=TEE_DDI_XP, PCI\VEN_8086&DEV_1CBA
%TEE_DeviceDesc%=TEE_DDI_XP, PCI\VEN_8086&DEV_1C3A
%TEE_DeviceDesc%=TEE_DDI_XP, PCI\VEN_8086&DEV_1DBA
%TEE_DeviceDesc%=TEE_DDI_XP, PCI\VEN_8086&DEV_1D3A
%TEE_DeviceDesc%=TEE_DDI_XP, PCI\VEN_8086&DEV_8C3A
%TEE_DeviceDesc%=TEE_DDI_XP, PCI\VEN_8086&DEV_9C3A

[Intel.ntamd64.5.1]
; DisplayName               Section           DeviceId
%TEE_DeviceDesc%=TEE_DDI_XP_x64, PCI\VEN_8086&DEV_1E3A
%TEE_DeviceDesc%=TEE_DDI_XP_x64, PCI\VEN_8086&DEV_1CBA
%TEE_DeviceDesc%=TEE_DDI_XP_x64, PCI\VEN_8086&DEV_1C3A
%TEE_DeviceDesc%=TEE_DDI_XP_x64, PCI\VEN_8086&DEV_1DBA
%TEE_DeviceDesc%=TEE_DDI_XP_x64, PCI\VEN_8086&DEV_1D3A
%TEE_DeviceDesc%=TEE_DDI_XP_x64, PCI\VEN_8086&DEV_8C3A
%TEE_DeviceDesc%=TEE_DDI_XP_x64, PCI\VEN_8086&DEV_9C3A


[Intel]
; Empty section, so this INF does not support Windows 2000.

;---------- DDInstall Sections -----------------------------------------------
; --------- Windows NT -----------------

[TEE_DDI]
CopyFiles=TEE_Files_Driver
CopyFiles=COPYMETADATA_EN
AddReg=TEE_NT_AddReg

[TEE_DDI_x64]
CopyFiles=TEE_Files_Driver_x64
CopyFiles=COPYMETADATA_EN
AddReg=TEE_NT_AddReg

[TEE_DDI.Services]
AddService = MEI, %FLG_ADDREG_NOCLOBBER%, TEE_Service, winxp.EventLog

[TEE_DDI_x64.Services]
AddService = MEIx64, %FLG_ADDREG_NOCLOBBER%, TEE_Service_x64, winxp_x64.EventLog

; --------- Files ----------------------
[TEE_Files_Driver]
TeeDriver.sys

[TEE_Files_Driver_x64]
TeeDriverx64.sys


; --------- Registry ----------------------

[TEE_NT_AddReg]
;reg-root,[subkey],[value-entry-name],[flags],[value]
HKR,,WdTimerTic,%REG_DWORD%,120

[TEE_NT_AddReg.Security]
"D:P(A;CI;GA;;;BA)(A;CI;GA;;;SY)(A;CI;GA;;;LS)"

[TEE_DDI.HW]
AddReg=TEE__NT_HW_AddReg

[TEE_DDI_x64.HW]
AddReg=TEE__NT_HW_AddReg

[TEE__NT_HW_AddReg]
HKR,,DeviceCharacteristics,0x10001,0x100
HKR,,Security,,"D:P(A;;GA;;;BA)(A;;GA;;;SY)(A;CI;GA;;;LS)"
HKR, Interrupt Management,, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties,, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, 0x00010001, 1

; --------- Service ----------------------
[TEE_Service]
DisplayName    = %TEE_SvcDesc%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\TeeDriver.sys
LoadOrderGroup = Extended Base

[TEE_Service_x64]
DisplayName    = %TEE_SvcDesc%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\TeeDriverx64.sys
LoadOrderGroup = Extended Base

;-----------------------------------------------------------------------------
; Common base for all drivers for Eventlog and TextModeFlags
;
[winxp.EventLog]
AddReg = winxp.AddEventLog.reg

[winxp.AddEventLog.reg]
HKR, , EventMessageFile, 0x00020000, %EventLogMessageDllPath_winxp%
HKR, , TypesSupported,   0x00010001, 7

[winxp_x64.EventLog]
AddReg = winxp_x64.AddEventLog.reg

[winxp_x64.AddEventLog.reg]
HKR, , EventMessageFile, 0x00020000, %EventLogMessageDllPath_winxpx64%
HKR, , TypesSupported,   0x00010001, 7



;
; ============== XP Support ==================
;
[TEE_DDI_XP]
CopyFiles=HECI_Files_Driver
AddReg=TEE_NT_AddReg

[TEE_DDI_XP_x64]
CopyFiles=HECI_Files_Driver_X64
AddReg=TEE_NT_AddReg

; --------- Files ----------------------
[HECI_Files_Driver]
HECI.sys

[HECI_Files_Driver_X64]
HECIx64.sys

[TEE_DDI_XP.Services]
AddService = MEI, %FLG_ADDREG_NOCLOBBER%, TEE_Service_xp, winxp.EventLog

[TEE_DDI_XP_x64.Services]
AddService = MEIx64, %FLG_ADDREG_NOCLOBBER%, TEE_Service_xp_x64, winxp.EventLog

; --------- Service ----------------------

[TEE_Service_xp]
DisplayName    = %TEE_SvcDesc%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\HECI.sys
LoadOrderGroup = Extended Base

[TEE_Service_xp_x64]
DisplayName    = %TEE_SvcDesc%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\HECIx64.sys
LoadOrderGroup = Extended Base

;
;--- TEE_DDI Coinstaller installation ------
;
[TEE_DDI.CoInstallers]
AddReg=TEE_DDI_CoInstaller_AddReg
CopyFiles=TEE_DDI_CoInstaller_CopyFiles

[TEE_DDI_x64.CoInstallers]
AddReg=TEE_DDI_CoInstaller_AddReg
CopyFiles=TEE_DDI_CoInstaller_CopyFiles

[TEE_DDI_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01011.dll,WdfCoInstaller"

[TEE_DDI_CoInstaller_CopyFiles]
WdfCoInstaller01011.dll

[TEE_DDI.Wdf]
KmdfService =  MEI, TEEDriver_wdfsect

[TEE_DDI_x64.Wdf]
KmdfService =  MEIx64, TEEDriver_wdfsect

[TEEDriver_wdfsect]
KmdfLibraryVersion = 1.11

;--------- Device Metadata Section ---------------------------------------------------
[COPYMETADATA_EN]
3f3ca95b-3978-4168-b47b-5444f42d6c89.devicemetadata-ms,,,0x00000800 ;COPYFLG_NODECOMP
46a6fdbe-c823-4579-bab6-35f67e01f793.devicemetadata-ms,,,0x00000800 ;COPYFLG_NODECOMP


;--------- Strings Section ---------------------------------------------------

[Strings]
;---------------------------------------------------------------------------------------------------
EventLogMessageDllPath_winxp	= "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\TeeDriver.sys"
EventLogMessageDllPath_winxpx64 = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\TeeDriverx64.sys"

Provider = "Intel"
MfgName = "Intel"
TEE_DeviceDesc = "Intel(R) Management Engine Interface "
TEE_SvcDesc = "Intel(R) Management Engine Interface "
Location = "Intel(R) Management Engine Interface"

REG_SZ                      = 0x00000000
REG_MULTI_SZ                = 0x00010000
REG_EXPAND_SZ               = 0x00020000
REG_BINARY                  = 0x00000001
REG_DWORD                   = 0x00010001
REG_NONE                    = 0x00020001

SERVICE_KERNEL_DRIVER       = 0x00000001
SERVICE_FILE_SYSTEM_DRIVER  = 0x00000002
SERVICE_ADAPTER             = 0x00000004
SERVICE_RECOGNIZER_DRIVER   = 0x00000008

SERVICE_BOOT_START          = 0x0
SERVICE_SYSTEM_START        = 0x1
SERVICE_AUTO_START          = 0x2
SERVICE_DEMAND_START        = 0x3
SERVICE_DISABLED            = 0x4

SERVICE_ERROR_IGNORE        = 0x00000000
SERVICE_ERROR_NORMAL        = 0x00000001
SERVICE_ERROR_SEVERE        = 0x00000002
SERVICE_ERROR_CRITICAL      = 0x00000003

FLG_ADDREG_NOCLOBBER        = 0x00000002
FLG_ADDREG_DELVAL           = 0x00000004
FLG_ADDREG_APPEND           = 0x00000008
FLG_ADDREG_KEYONLY          = 0x00000010
FLG_ADDREG_OVERWRITEONLY    = 0x00000020
FLG_ADDREG_64BITKEY         = 0x00001000
FLG_ADDREG_KEYONLY_COMMON   = 0x00002000
FLG_ADDREG_32BITKEY         = 0x00004000

SPSVCINST_STOPSERVICE			= 0x00000200
SPSVCINST_DELETEEVENTLOGENTRY	= 0x00000004	

