00001 /* 00002 * This program is free software; you can redistribute it and/or 00003 * modify it under the terms of the GNU General Public License 00004 * as published by the Free Software Foundation; either version 00005 * 2 of the License, or (at your option) any later version. 00006 * 00007 * Copyright 2004 Spiro Trikaliotis 00008 * 00009 */ 00010 00020 #include <wdm.h> 00021 #include "cbm_driver.h" 00022 #include "iec.h" 00023 00038 BOOLEAN 00039 cbm_isr(IN PKINTERRUPT Interrupt, IN PVOID Pdx) 00040 { 00041 // Make sure we do not do any debugging outputs 00042 // For this, this function ommits the FUNC_ENTER() 00043 // FUNC_LEAVE() sandwich and makes sure the debugging 00044 // flags are unset when calling the ISR routine. 00045 00046 // This is needed as we cannot guard the debugging memory 00047 // functions against anything running at IRQL > DISPATCH_LEVEL. 00048 00049 BOOLEAN result; 00050 00051 #if DBG 00052 00053 ULONG dbgFlagsOld; 00054 00055 // Make sure we do not try to write into the debugging memory 00056 // as long as we are executing in the ISR 00057 00058 // Remember the old DbgFlags 00059 00060 dbgFlagsOld = DbgFlags; 00061 00062 // Now, unset the flag which tells the system to write into 00063 // the debugging memory 00064 00065 DbgFlags &= ~DBGF_DBGMEMBUF; 00066 00067 #endif // #if DBG 00068 00069 // let the libiec library do the hard work 00070 00071 PERF_EVENT_VERBOSE(0x2000, 0); 00072 result = cbmiec_interrupt(Pdx); 00073 PERF_EVENT_VERBOSE(0x2001, 0); 00074 00075 #if DBG 00076 00077 // Restore the debugging flags 00078 00079 DbgFlags = dbgFlagsOld; 00080 00081 #endif // #if DBG 00082 00083 return result; 00084 }
1.4.2