一、關鍵字:html
KeRaiseIrql(https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-keraiseirql)編程
KeLowerIrql(https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-kelowerirql)windows
KeRaiseIrqlToDpcLevel(https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-keraiseirqltodpclevel)緩存
KeGetCurrentIrql(https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-kegetcurrentirql)安全
#define PASSIVE_LEVEL 0 #define LOW_LEVEL 0 #define APC_LEVEL 1 #define DISPATCH_LEVEL 2 #define PROFILE_LEVEL 27 #define CLOCK1_LEVEL 28 #define CLOCK2_LEVEL 28 #define IPI_LEVEL 29 #define POWER_LEVEL 30 #define HIGH_LEVEL 31
二、資料:多線程
2.一、Managing Hardware Priorities _ Microsoft Docs.html(https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/managing-hardware-priorities)函數
2.二、Dispatch Routines and IRQLs _ Microsoft Docs.html(https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/dispatch-routines-and-irqls)post
2.三、url
_IO_STACK_LOCATION _ Microsoft Docs.html(https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/ns-wdm-_io_stack_location)spa
I_O Stack Locations _ Microsoft Docs.html(https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/i-o-stack-locations)
IRP structure (Windows Drivers).html(https://msdn.microsoft.com/library/windows/hardware/ff550694)
2.四、設備驅動程序和線程上下文切換的IRQL問題,怎麼解決 - 91® 編程問答.html(百度搜索 "設備驅動程序和線程上下文切換的IRQL問題")(ZC:貌似 原來的帖子打不開...只能看百度的快照了...)
2.五、IRQL中斷請求級別及APC_LEVEL討論 - CSDN博客.html(https://blog.csdn.net/yujiao90/article/details/37880247)
ZC:這個文章講的 比較詳細,裏面的內容看上去很像是官網上的內容,可是 我一直想找官方的文檔(關於各個IRQL級別的解釋),就是一直都沒能找到...
ZC:參看:What is IRQL_ – A Hole In My Head.html(https://blogs.msdn.microsoft.com/doronh/2010/02/02/what-is-irql/)
2.六、ZC:貌似 WinDbg能看 切換到Debugger以前的保存的IRQL:
irql extension command _ Microsoft Docs.html(https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/-irql)
When the target computer breaks into the debugger, the IRQL changes, but the IRQL that was effective just before the debugger break is saved. The !irql extension displays the saved IRQL.
三、
[分享]映射驅動內存到用戶空間藍屏(KERNEL_DATA_INPAGE_ERROR)的一種可能的解決方法-『編程技術』-看雪安全論壇.html(https://bbs.pediy.com/thread-214600.htm)
ZC:裏面提:驅動申請內存,而後給 不一樣的用戶程序使用,比較有想法
ZC:帖子的回覆中提到:
(1)、驅動中建立子線程,我查了 關鍵是幾個函數:
PsCreateSystemThread、PsTerminateSystemThread、"經過內核事件KEVENT和內核等待KeWaitForSingleObject來演示事件的建立過程"
參考文章:
驅動程序多線程 PsCreateSystemThread - 沉痾 - 博客園.html(http://www.javashuo.com/article/p-dnompyaa-c.html)
驅動開發之 建立線程函數PsCreateSystemThread - CSDN博客.html(https://blog.csdn.net/liyun123gx/article/details/30500703)
(2)、workitem (我的不知道是什麼,還覺得是 工做線程的意思(∵上面也提到了線程...),查了一下 才知道是 和 DPC有關...)
ZC:在<<Windows 驅動開發技術詳解>> 第10章 定時器,有 "10.2.1 DPC 定時器"
ZC:(20180610)上書中,第9章 "9.6 DPC 例程"(書P.275,PDF P.300)
ZC:這個是發問題的帖子:[結貼]DMA共用緩存區映射到用戶進程空間失敗,KERNEL_DATA_INPAGE_ERROR藍屏-『經典問答』-看雪安全論壇.html(https://bbs.pediy.com/thread-214508.htm)
四、
五、