/*++

    Copyright (c) Microsoft Corporation.  All rights reserved.

Rule Name:

    IrqlExApcLte2

Domain:

    Wdm

Rule ID:

    0x00020006

Description:

    The IrqlExApcLte2 rule specifies that the driver calls the following 
    routines only at IRQL <= APC_LEVEL:
        CmRegisterCallback
        CmUnRegisterCallback
        ExCreateCallback
        ExAllocateFromPagedLookasideList
        ExAllocatePoolWithQuota
        ExAllocatePoolWithQuotaTag
        ExDeletePagedLookasideList
        ExFreeToPagedLookasideList
        ExInitializePagedLookasideList
        ExRegisterCallback
        ExSetTimerResolution
        ExUnregisterCallback
        ProbeForRead
        ProbeForWrite

Help Link:

    https://go.microsoft.com/fwlink/?LinkId=216023

--*/


#include "slic_base.h"

CmRegisterCallback.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}

CmRegisterCallbackEx.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}

CmUnRegisterCallback.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}

ExCreateCallback.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}

ExDeletePagedLookasideList.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}


ExInitializePagedLookasideList.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}

ExRegisterCallback.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}

ExSetTimerResolution.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}

ExUnregisterCallback.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}

ProbeForRead.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}

ProbeForWrite.entry
{
    if ( sdv_irql_current > APC_LEVEL ) {
        abort "$fname should only be called at IRQL <= APC_LEVEL.";
    }
}

