/*
	Copyright (c) Microsoft Corporation.  All rights reserved.
*/

/* This file is a subset of the files: sdv_wdm.h, sdv_ntddk.h,
   sdv_ntifs.h, sdv_csq and sdv_wdmsec.h.  It is used when we compile
   the slic rules, so that no matter whether they are stated in term
   of function foo or function sdv_foo, they will work correctly.
*/
#define ExFreePool sdv_ExFreePool
#define ExInitializeFastMutex sdv_ExInitializeFastMutex
#define HalQuerySystemInformation sdv_HalQuerySystemInformation
#define InitializeObjectAttributes sdv_InitializeObjectAttributes
#define InterlockedDecrement sdv_InterlockedDecrement
#define InterlockedIncrement sdv_InterlockedIncrement
#define IoAcquireRemoveLock sdv_IoAcquireRemoveLock
#define IoAdjustPagingPathCount sdv_IoAdjustPagingPathCount
#define IoAllocateAdapterChannel sdv_IoAllocateAdapterChannel
#define IoAssignArcName sdv_IoAssignArcName
#define IoCallDriver sdv_IoCallDriver
#define IoCompleteRequest sdv_IoCompleteRequest
#define IoCopyCurrentIrpStackLocationToNext sdv_IoCopyCurrentIrpStackLocationToNext
#define IoCreateDeviceSecure sdv_IoCreateDeviceSecure
#define IoCsqInitialize sdv_IoCsqInitialize
#define IoCsqInitializeEx sdv_IoCsqInitializeEx
#define IoCsqInsertIrp sdv_IoCsqInsertIrp
#define IoCsqInsertIrpEx sdv_IoCsqInsertIrpEx
#define IoCsqRemoveIrp sdv_IoCsqRemoveIrp
#define IoCsqRemoveNextIrp sdv_IoCsqRemoveNextIrp
#define IoDeassignArcName sdv_IoDeassignArcName
#define IoFlushAdapterBuffers sdv_IoFlushAdapterBuffers
#define IoFreeAdapterChannel sdv_IoFreeAdapterChannel
#define IoFreeMapRegisters sdv_IoFreeMapRegisters
#define IoGetCurrentIrpStackLocation sdv_IoGetCurrentIrpStackLocation
#define IoGetFunctionCodeFromCtlCode sdv_IoGetFunctionCodeFromCtlCode
#define IoGetNextIrpStackLocation sdv_IoGetNextIrpStackLocation
#define IoGetRemainingStackSize sdv_IoGetRemainingStackSize
#define IoInitializeDpcRequest sdv_IoInitializeDpcRequest
#define IoInitializeRemoveLock sdv_IoInitializeRemoveLock
#define IoIsErrorUserInduced sdv_IoIsErrorUserInduced
#define IoMapTransfer sdv_IoMapTransfer
#define IoMarkIrpPending sdv_IoMarkIrpPending
#define IoReleaseRemoveLock sdv_IoReleaseRemoveLock
#define IoReleaseRemoveLockAndWait sdv_IoReleaseRemoveLockAndWait
#define IoRequestDpc sdv_IoRequestDpc
#define IoSetCancelRoutine sdv_IoSetCancelRoutine
#define IoSetCompletionRoutine sdv_IoSetCompletionRoutine
#define IoSetNextIrpStackLocation sdv_IoSetNextIrpStackLocation
#define IoSizeOfIrp sdv_IoSizeOfIrp
#define IoSizeofWorkItem sdv_IoSizeofWorkItem
#define IoSkipCurrentIrpStackLocation sdv_IoSkipCurrentIrpStackLocation
#define IoWMIDeviceObjectToProviderId sdv_IoWMIDeviceObjectToProviderId
#define KeAcquireSpinLock sdv_KeAcquireSpinLock
#define KeAcquireSpinLockAtDpcLevel sdv_KeAcquireSpinLockAtDpcLevel
#define KeFlushIoBuffers sdv_KeFlushIoBuffers
#define KeGetCurrentIrql sdv_KeGetCurrentIrql
#define KeLowerIrql sdv_KeLowerIrql
#define KeRaiseIrql sdv_KeRaiseIrql
#define KeRaiseIrqlToSynchLevel sdv_KeRaiseIrqlToSynchLevel
#define KeInitializeSpinLock sdv_KeInitializeSpinLock
#define KeReleaseSpinLock sdv_KeReleaseSpinLock
#define KeReleaseSpinLockFromDpcLevel sdv_KeReleaseSpinLockFromDpcLevel
#define KeWaitForMutexObject sdv_KeWaitForMutexObject
#define MmGetSystemAddressForMdl sdv_MmGetSystemAddressForMdl
#define MmGetSystemAddressForMdlSafe sdv_MmGetSystemAddressForMdlSafe
#define MmLockPagableCodeSection sdv_MmLockPagableCodeSection
#define ObDereferenceObject sdv_ObDereferenceObject
#define ObReferenceObject sdv_ObReferenceObject
#define RtlMoveMemory sdv_RtlMoveMemory
#define InsertTailList sdv_InsertTailList
#define RemoveEntryList sdv_RemoveEntryList
#define IsListEmpty sdv_IsListEmpty
#define ExAllocateFromNPagedLookasideList sdv_ExAllocateFromNPagedLookasideList
#define ExIsResourceAcquiredShared sdv_ExIsResourceAcquiredShared 
#define ExIsResourceAcquired sdv_ExIsResourceAcquired
#define ExIsResourceAcquiredExclusive sdv_ExIsResourceAcquiredExclusive
#define ExInitializeResource sdv_ExInitializeResource
#define ExAllocateFromPagedLookasideList sdv_ExAllocateFromPagedLookasideList
#define ExFreeToPagedLookasideList sdv_ExFreeToPagedLookasideList
#define _ReadWriteBarrier sdv__ReadWriteBarrier
#define ExInterlockedCompareExchange64 sdv_ExInterlockedCompareExchange64
#define ExInterlockedPopEntrySList sdv_ExInterlockedPopEntrySList 
#define ExInterlockedPopEntrySList sdv_ExInterlockedPopEntrySList 
#define ExInterlockedPushEntrySList sdv_ExInterlockedPushEntrySList 
#define ExAcquireSpinLock sdv_ExAcquireSpinLock
#define ExAcquireSpinLockAtDpcLevel sdv_ExAcquireSpinLockAtDpcLevel
#define ExReleaseSpinLock sdv_ExReleaseSpinLock 
#define ExReleaseSpinLockFromDpcLevel sdv_ExReleaseSpinLockFromDpcLevel
#define KeReleaseSpinLockFromDpcLevel sdv_KeReleaseSpinLockFromDpcLevel 
#define KeAcquireSpinLockAtDpcLevel sdv_KeAcquireSpinLockAtDpcLevel
#define ExIsResourceAcquiredLite sdv_ExIsResourceAcquiredLite 
#define ExInterlockedInsertHeadList sdv_ExInterlockedInsertHeadList 
#define ExInterlockedInsertTailList sdv_ExInterlockedInsertTailList
#define ExInterlockedPopEntryList sdv_ExInterlockedPopEntryList
#define ExInterlockedPushEntryList sdv_ExInterlockedPushEntryList
#define ExInterlockedRemoveHeadList sdv_ExInterlockedRemoveHeadList
#define IoAcquireRemoveLock sdv_IoAcquireRemoveLock 
#define IoReleaseRemoveLock sdv_IoReleaseRemoveLock
#define IoReleaseRemoveLockAndWait sdv_IoReleaseRemoveLockAndWait
#define IoRequestDpc sdv_IoRequestDpc
#define InterlockedCompareExchangeAcquire sdv_InterlockedCompareExchangeAcquire
#define ExInterlockedPopEntrySList sdv_ExInterlockedPopEntrySList
#define ExInterlockedFlushSList sdv_ExInterlockedFlushSList
#define InterlockedPushEntrySList sdv_InterlockedPushEntrySList
#define InterlockedPopEntrySList sdv_InterlockedPopEntrySList
#define ObDereferenceObjectWithTag sdv_ObDereferenceObjectWithTag
#define ObReferenceObjectWithTag sdv_ObReferenceObjectWithTag

#define StorPortInitialize	   sdv_StorPortInitialize
#define StorPortFreeDeviceBase	   sdv_StorPortFreeDeviceBase
#define StorPortGetBusData	   sdv_StorPortGetBusData
#define StorPortSetBusDataByOffset	   sdv_StorPortSetBusDataByOffset
#define StorPortGetDeviceBase	   sdv_StorPortGetDeviceBase
#define StorPortGetLogicalUnit	   sdv_StorPortGetLogicalUnit
#define StorPortGetScatterGatherList	   sdv_StorPortGetScatterGatherList
#define StorPortGetPhysicalAddress	   sdv_StorPortGetPhysicalAddress
#define StorPortGetVirtualAddress	   sdv_StorPortGetVirtualAddress
#define StorPortGetUncachedExtension	   sdv_StorPortGetUncachedExtension
#define StorPortPauseDevice	   sdv_StorPortPauseDevice
#define StorPortResumeDevice	   sdv_StorPortResumeDevice
#define StorPortPause	   sdv_StorPortPause
#define StorPortResume	   sdv_StorPortResume
#define StorPortDeviceBusy	   sdv_StorPortDeviceBusy
#define StorPortDeviceReady	   sdv_StorPortDeviceReady
#define StorPortBusy	   sdv_StorPortBusy
#define StorPortReady	   sdv_StorPortReady
#define StorPortSetDeviceQueueDepth	   sdv_StorPortSetDeviceQueueDepth
#define StorPortLogError	   sdv_StorPortLogError
#define StorPortCompleteRequest	   sdv_StorPortCompleteRequest
#define StorPortStallExecution	   sdv_StorPortStallExecution
#define StorPortSynchronizeAccess	   sdv_StorPortSynchronizeAccess
#define StorPortReadPortUchar	   sdv_StorPortReadPortUchar
#define StorPortReadPortUshort	   sdv_StorPortReadPortUshort
#define StorPortReadPortUlong	   sdv_StorPortReadPortUlong
#define StorPortReadPortBufferUchar	   sdv_StorPortReadPortBufferUchar
#define StorPortReadPortBufferUshort	   sdv_StorPortReadPortBufferUshort
#define StorPortReadPortBufferUlong	   sdv_StorPortReadPortBufferUlong
#define StorPortReadRegisterUchar	   sdv_StorPortReadRegisterUchar
#define StorPortReadRegisterUshort	   sdv_StorPortReadRegisterUshort
#define StorPortReadRegisterUlong	   sdv_StorPortReadRegisterUlong
#define StorPortReadRegisterBufferUchar	   sdv_StorPortReadRegisterBufferUchar
#define StorPortReadRegisterBufferUshort	   sdv_StorPortReadRegisterBufferUshort
#define StorPortReadRegisterBufferUlong	   sdv_StorPortReadRegisterBufferUlong
#define StorPortWritePortUchar	   sdv_StorPortWritePortUchar
#define StorPortWritePortUshort	   sdv_StorPortWritePortUshort
#define StorPortWritePortUlong	   sdv_StorPortWritePortUlong
#define StorPortWritePortBufferUchar	   sdv_StorPortWritePortBufferUchar
#define StorPortWritePortBufferUshort	   sdv_StorPortWritePortBufferUshort
#define StorPortWritePortBufferUlong	   sdv_StorPortWritePortBufferUlong
#define StorPortWriteRegisterUchar	   sdv_StorPortWriteRegisterUchar
#define StorPortWriteRegisterUshort	   sdv_StorPortWriteRegisterUshort
#define StorPortWriteRegisterUlong	   sdv_StorPortWriteRegisterUlong
#define StorPortWriteRegisterBufferUchar     sdv_StorPortWriteRegisterBufferUchar
#define StorPortWriteRegisterBufferUshort	   sdv_StorPortWriteRegisterBufferUshort
#define StorPortWriteRegisterBufferUlong	   sdv_StorPortWriteRegisterBufferUlong
#define StorPortMoveMemory	   sdv_StorPortMoveMemory
#define StorPortConvertUlongToPhysicalAddress	   sdv_StorPortConvertUlongToPhysicalAddress
#define StorPortConvertPhysicalAddressToUlong	   sdv_StorPortConvertPhysicalAddressToUlong
#define StorPortQuerySystemTime	   sdv_StorPortQuerySystemTime
#define StorPortAllocateRegistryBuffer	   sdv_StorPortAllocateRegistryBuffer
#define StorPortFreeRegistryBuffer	   sdv_StorPortFreeRegistryBuffer
#define StorPortRegistryRead	   sdv_StorPortRegistryRead
#define StorPortRegistryWrite	   sdv_StorPortRegistryWrite
#define StorPortValidateRange	   sdv_StorPortValidateRange
#define StorPortDebugPrint	   sdv_StorPortDebugPrint



#define StorPortInitialize sdv_StorPortInitialize
#define ComputeCRC32 sdv_ComputeCRC32
#define SaveSystemProcess sdv_SaveSystemProcess
#define AttachToSystemProcess sdv_AttachToSystemProcess
#define DetachFromSystemProcess sdv_DetachFromSystemProcess
#define AsciiStringToWideCharString sdv_AsciiStringToWideCharString
#define WideCharStringToAsciiString sdv_WideCharStringToAsciiString
#define WCharArrayToUTF8Array sdv_WCharArrayToUTF8Array
#define WCharToUTF8 sdv_WCharToUTF8
#define GetValueForKey sdv_GetValueForKey
#define IsSearchKey sdv_IsSearchKey
#define CompareKeys sdv_CompareKeys
#define GetNextValueFromList sdv_GetNextValueFromList
#define GetAddressAndPortNumber sdv_GetAddressAndPortNumber
#define GetCHAPChallenge sdv_GetCHAPChallenge
#define GetCHAPResponse sdv_GetCHAPResponse
#define DecodeHexString sdv_DecodeHexString
#define DecodeB64String sdv_DecodeB64String
#define ConvertToHexString sdv_ConvertToHexString
#define ConvertToBase64String sdv_ConvertToBase64String
#define GetBinaryForAscii sdv_GetBinaryForAscii
#define GetAsciiForBinary sdv_GetAsciiForBinary
#define AsciiStringToBinary sdv_AsciiStringToBinary
#define GetB64Value sdv_GetB64Value
#define AllocateMdlAndIrp sdv_AllocateMdlAndIrp
#define FreeMdlAndIrp sdv_FreeMdlAndIrp
#define GetAuthMethodValue sdv_GetAuthMethodValue
#define GetDigestTypeValue sdv_GetDigestTypeValue
#define GetDecimalValue sdv_GetDecimalValue
#define GetBooleanValue sdv_GetBooleanValue
#define StringToNumeral sdv_StringToNumeral
#define InitializeQueue sdv_InitializeQueue
#define CleanupQueue sdv_CleanupQueue
#define ProcessKernelRequest sdv_ProcessKernelRequest
#define ProcessQueuedRequests sdv_ProcessQueuedRequests
#define RemoveQueuedRequest sdv_RemoveQueuedRequest


#define TdiRegisterPnPHandlers sdv_TdiRegisterPnPHandlers
#define TdiDeregisterPnPHandlers sdv_TdiDeregisterPnPHandlers

/*
Functions exported by mplib

#define MPLIBSendDeviceIoControlSynchronous sdv_MPLIBSendDeviceIoControlSynchronous
#define MPLibSendPassThroughDirect sdv_MPLibSendPassThroughDirect

#define MPLIBGetDescriptor sdv_MPLIBGetDescriptor
#define MPLibReleaseQueue sdv_MPLibReleaseQueue
#define MPLibSendTUR sdv_MPLibSendTUR
*/

/*
	t-anseyf
	Added this for new StorPort SDV rules.
*/
#define StorPortAcquireSpinLock sdv_StorPortAcquireSpinLock
#define StorPortAllocatePool sdv_StorPortAllocatePool
#define StorPortReleaseSpinLock sdv_StorPortReleaseSpinLock
#define StorPortAcquireMSISpinLock sdv_StorPortAcquireMSISpinLock
#define StorPortEnablePassiveInitialization sdv_StorPortEnablePassiveInitialization
#define StorPortInitializeDpc sdv_StorPortInitializeDpc
#define StorPortIssueDpc sdv_StorPortIssueDpc
#define StorPortStateChangeDetected sdv_StorPortStateChangeDetected
#define ScsiPortWmiDispatchFunction sdv_ScsiPortWmiDispatchFunction
#define ScsiPortWmiGetReturnSize sdv_ScsiPortWmiGetReturnSize
#define ScsiPortWmiGetReturnStatus sdv_ScsiPortWmiGetReturnStatus
#define ScsiPortWmiPostProcess sdv_ScsiPortWmiPostProcess
#define StorPortRequestTimer sdv_StorPortRequestTimer
#define FIELD_OFFSET sdv_FIELD_OFFSET
#define RTL_FIELD_SIZE sdv_RTL_FIELD_SIZE
#define RTL_SIZEOF_THROUGH_FIELD sdv_RTL_SIZEOF_THROUGH_FIELD
#define RTL_CONTAINS_FIELD sdv_RTL_CONTAINS_FIELD
#define ScsiGetTotalSenseByteCountIndicated sdv_ScsiGetTotalSenseByteCountIndicated
#define ScsiGetFixedSenseKeyAndCodes sdv_ScsiGetFixedSenseKeyAndCodes
#define ScsiGetDescriptorSenseKeyAndCodes sdv_ScsiGetDescriptorSenseKeyAndCodes
#define ScsiGetDescriptorSenseKeyAndCodes sdv_ScsiGetDescriptorSenseKeyAndCodes
#define ScsiValidateInformationSenseDescriptor sdv_ScsiValidateInformationSenseDescriptor
#define ScsiValidateInformationSenseDescriptor sdv_ScsiValidateInformationSenseDescriptor
#define ScsiConvertToFixedSenseFormat sdv_ScsiConvertToFixedSenseFormat
#define ScsiGetNextSenseDescriptorByType sdv_ScsiGetNextSenseDescriptorByType
#define StorPortExtendedFunction sdv_StorPortExtendedFunction
#define StorPortFreePool sdv_StorPortFreePool
#define StorPortAllocateMdl sdv_StorPortAllocateMdl
#define StorPortFreeMdl sdv_StorPortFreeMdl
#define StorPortBuildMdlForNonPagedPool sdv_StorPortBuildMdlForNonPagedPool
#define StorPortGetSystemAddress sdv_StorPortGetSystemAddress
#define StorPortGetOriginalMdl sdv_StorPortGetOriginalMdl
#define StorPortCompleteServiceIrp sdv_StorPortCompleteServiceIrp
#define StorPortGetDeviceObjects sdv_StorPortGetDeviceObjects
#define StorPortBuildScatterGatherList sdv_StorPortBuildScatterGatherList
#define StorPortPutScatterGatherList sdv_StorPortPutScatterGatherList
#define StorPortAcquireMSISpinLock sdv_StorPortAcquireMSISpinLock
#define StorPortReleaseMSISpinLock sdv_StorPortReleaseMSISpinLock
#define StorPortGetMSIInfo sdv_StorPortGetMSIInfo
#define StorPortInitializePerfOpts sdv_StorPortInitializePerfOpts
#define StorPortGetStartIoPerfParams sdv_StorPortGetStartIoPerfParams
#define StorPortLogSystemEvent sdv_StorPortLogSystemEvent
#define StorPortGetCurrentProcessorNumber sdv_StorPortGetCurrentProcessorNumber
#define StorPortGetGroupAffinity sdv_StorPortGetGroupAffinity
#define StorPortGetActiveGroupCount sdv_StorPortGetActiveGroupCount
#define StorPortGetNodeAffinity sdv_StorPortGetNodeAffinity
#define StorPortGetActiveNodeCount sdv_StorPortGetActiveNodeCount
#define StorPortGetHighestNodeNumber sdv_StorPortGetHighestNodeNumber
#define StorPortGetLogicalProcessorRelationship sdv_StorPortGetLogicalProcessorRelationship
#define StorPortAllocateContiguousMemorySpecifyCacheNode sdv_StorPortAllocateContiguousMemorySpecifyCacheNode
#define StorPortFreeContiguousMemorySpecifyCache sdv_StorPortFreeContiguousMemorySpecifyCache
#define StorPortSetPowerSettingNotificationGuids sdv_StorPortSetPowerSettingNotificationGuids
#define StorPortInvokeAcpiMethod sdv_StorPortInvokeAcpiMethod
#define StorPortGetActivityIdSrb sdv_StorPortGetActivityIdSrb
#define StorPortGetDataInBufferMdl sdv_StorPortGetDataInBufferMdl
#define StorPortGetDataInBufferSystemAddress sdv_StorPortGetDataInBufferSystemAddress
#define StorPortGetDataInBufferScatterGatherList sdv_StorPortGetDataInBufferScatterGatherList
#define StorPortMarkDumpMemory sdv_StorPortMarkDumpMemory
#define StorPortSetUnitAttributes sdv_StorPortSetUnitAttributes
#define StorPortQueryPerformanceCounter sdv_StorPortQueryPerformanceCounter
#define StorPortGetSystemPortNumber sdv_StorPortGetSystemPortNumber
#define InterlockedAnd sdv_InterlockedAnd
#define InterlockedOr sdv_InterlockedOr
#define StorPortGetRequestInfo sdv_StorPortGetRequestInfo
#define StorPortInitializeWorker sdv_StorPortInitializeWorker
#define StorPortQueueWorkItem sdv_StorPortQueueWorkItem
#define StorPortFreeWorker sdv_StorPortFreeWorker
#define StorPortInitializeTimer sdv_StorPortInitializeTimer
#define StorPortFreeTimer sdv_StorPortFreeTimer
#define StorPortStateChangeDetected sdv_StorPortStateChangeDetected
#define StorPortInitializeSListHead sdv_StorPortInitializeSListHead
#define StorPortInterlockedFlushSList sdv_StorPortInterlockedFlushSList
#define StorPortInterlockedPopEntrySList sdv_StorPortInterlockedPopEntrySList
#define StorPortInterlockedPushEntrySList sdv_StorPortInterlockedPushEntrySList
#define StorPortQueryDepthSList sdv_StorPortQueryDepthSList
#define StorPortReadRegisterUlong64 sdv_StorPortReadRegisterUlong64
#define StorPortReadRegisterBufferUlong64 sdv_StorPortReadRegisterBufferUlong64
#define StorPortWriteRegisterUlong64 sdv_StorPortWriteRegisterUlong64
#define StorPortWriteRegisterBufferUlong64 sdv_StorPortWriteRegisterBufferUlong64
#define StorPortPoFxActivateComponent sdv_StorPortPoFxActivateComponent
#define StorPortPoFxIdleComponent sdv_StorPortPoFxIdleComponent
#define StorPortPoFxSetComponentLatency sdv_StorPortPoFxSetComponentLatency
#define StorPortPoFxSetComponentResidency sdv_StorPortPoFxSetComponentResidency
#define StorPortPoFxPowerControl sdv_StorPortPoFxPowerControl
#define StorPortInitializePoFxPower sdv_StorPortInitializePoFxPower
