반응형

Windows Driver 5

[Windows Driver] Choosing a driver model

작성하려는 Driver에 따라 어떤 Driver model을 선택해야 하는지를 알아 보자. Choosing a driver model Microsoft Windows는 driver를 작성하기 위해 다양한 driver model을 제공한다. 가장 좋은 driver model을 선택하는 전략은 당신이 계획하고 있는 driver가 어떤 type인지와 연관이 있다. 아래와 같은 옵션이 있다. Device function driver Device filter driver Software driver File system filter driver File system driver Choosing a driver model for a device function driver Hardware device를 설계할 때,..

Windows Driver 2020.11.14

[Windows Driver] Device objects and device stacks

Device node가 무엇이고 device stack이 무엇인지 알아보자. Device nodes and device stacks Windows에서 device들은 Plug and Play(PnP) device tree에서 device node들에 의해 표현된다. 일반적으로 I/O request를 device로 보낼 때, 많은 driver들이 request를 처리하는데 도움 준다. 각각의 driver들이 device object와 연결이 되어 있다. 그리고 device objects들은 stack에 배열이 된다. Driver들에 연결된 device objects의 순서를 device stack이라 한다. 각 device node는 자체의 device stack을 가지고 있다. Device nodes a..

Windows Driver 2020.11.13

[Windows Driver] User mode and kernel mode

Windows에서 실행되는 컴퓨터의 processor는 2가지 mode가 있다. User mode와 Kernel mode이다. 이 Processor는 어떤 type의 code가 실행되는지에 따라 Processor에서 두 가지 모드를 서로 전환해 준다. Application은 User mode에서 실행되고 핵심 운영체제 components는 kernel mode에서 실행된다. 많은 driver들이 kernel mode에서 동작하지만, 몇몇은 user mode에서 동작한다. User mode application을 시작할 때, Windows는 Application을 위한 process를 만든다. Process는 application에 private virtual address space와와 private h..

Windows Driver 2020.11.12

[Windows Driver] What is driver?

Driver에는 포괄적인 의미를 담고 있고 정말 정교한 정의를 내리긴 힘들다. 하지만, 기초적인 관점에서 Driver를 정의 하자면 Driver는 운영체제와 Device를 통신하게 하는 software component라 말할 수 있다. 예를 들어 Device로부터 특정data를 읽어와야 하는 Application이 필요가 있다고 가정하자. Application은 운영체제에 의해 수행되는 function을 호출하고 운영체제는 Driver에 의해 수행되는 function를 호출할 것이다. Device를 제작하고 제조한 곳과 동일한 회사에서 제작된 Driver는 data를 얻기 위해 device hardware와 어떻게 통신을 할지 이미 알고 있다. Driver가 device로부터 data를 얻으면 운영체제..

Windows Driver 2020.11.11

[Windows Driver] ‘Build.exe’ tool is replaced to ‘MSBuild.exe’ for Windows Driver build

정말 오랜 만에 Windows 7용으로 사용되던 Legacy Windows Device Driver를 Windows 10용으로 Build하는 일이 필요해 검색해 보니, 달라진 사실이 있었다. WDK를 이용한 Driver build도 MSBuilld로 통합되었기 때문에, 예전 방식처럼 WDK를 설치 후 Build.exe를 이용하여 Driver를 build할 수 없다. 아래 원문을 번역한 내용을 참고할 것. WDK가 Visual Studio로 통합되었다. 그래서 Visual Studio의 solution과 project에서 사용하는 것과 동일한 complier와 build tool을 사용한다. MSBuild가 WDK 8 이전부터 사용되어 오던 Windows Build Utility(Build.exe)를 대체..

Windows Driver 2020.11.10
반응형