none
System is crashing with DRIVER_IRQL_NOT_LESS_OR_EQUAL (Error code: 0x1D) RRS feed

  • Question

  • Hi,

    I 'm writing a KMDF driver for a FPGA based board in one PCI slot. I use the Toaster sample driver for reference. In my case i am creating a bus driver over pci.sys. this bus driver will create two pdo's dynamically. on top of one pdo my custom DMA driver(FDO) will install.

    in my current case interrupts are coming to bus driver ISR, from there i am able to call my DMA driver function (which i am receiving  through two-way interface in bus driver).

    The problem is, if I call DMA driver function from bus ISR or bus ISR_DPC, system is crashing with below error:

    DRIVER_IRQL_NOT_LESS_OR_EQUAL (Error code: 0x1D)

    below is my DMA driver function which i am calling from bus ISR/DPC:

    VOID TPH_EvtInterruptDpc_new(
        IN ULONG  mask_1,
        IN WDFOBJECT    WdfDevice
        )
    {
        PFDO_DATA fdoData = NULL;
        ULONG mask = mask_1;

        fdoData = TPH_FdoGetData(WdfDevice);
        KdPrint(("TPH_EvtInterruptDpc 0x%x\n", mask));
        //WdfInterruptAcquireLock(WdfInterrupt);
        //mask = fdoData->IrqStatusReg;
        //fdoData->IrqStatusReg = 0;
        //WdfInterruptReleaseLock(WdfInterrupt);
            
        if (mask & (1 << 0)) startDma(fdoData, CHANNEL1, A);

    }

    as soon as i call this function system crashes with above error, if i comment startDma function call, its working properly print will come and system doesn't crash.

    below is startDma function call:

    NTSTATUS startDma(
        PFDO_DATA fdoData,
        ULONG Channel,
        ULONG DmaBuffer
        )
    {
        //PAGED_CODE();
        NTSTATUS status = STATUS_SUCCESS;
        PSDI_CHANNEL pch = &fdoData->channel[Channel];
         KdPrint(("--------->startDma\n"));

        //*************************************************************************
        // INVERSE DMA INDEX
        //*************************************************************************

        pch->NextDmaBuffer = 1 - pch->NextDmaBuffer;

        //*************************************************************************

        // Enable next DMA transaction for this buffer
        WRITE_REGISTER_ULONG(&pch->pRegMap->DmaEnable[DmaBuffer], 0);    // reg access is working properly
        
        return status;
    }




    Thursday, January 1, 2015 7:21 AM

All replies

  • Post the output of !analyze -v. Make sure your symbols are correct. Also, use the pcidrv sample as a starting point

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, January 1, 2015 8:18 AM