SlideShare a Scribd company logo
Windows CE Driver Architecture Jay Loney Program Manager Windows CE Drivers JayLoney @ Microsoft.com
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Windows CE Architecture OEM Hardware Embedded Shell Applications WIN32 APIs COREDLL, WINSOCK, OLE, COMMCTRL, COMMDLG, WININET, TAPI Windows CE Shell Services Remote Connectivity Kernel Library IrDA GWES Device Manager File Manager TCP/IP OAL Bootloader Drivers Device drivers File drivers Microsoft OEM ISV Network drivers
What Is A Driver In Windows CE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Driver Architecture
Types Of Drivers
Native Versus Stream Loading Mechanism ,[object Object],[object Object],[object Object]
Device Manager ,[object Object],[object Object],[object Object]
Device Manager ,[object Object],[object Object],[object Object],[object Object]
Device Manager  ,[object Object],DEVICE.EXE Kernel I/O Resource Manager (part of Device.exe) REGENUM.DLL PCIBUS.DLL loads loads loads DEVICE.EXE I/O Resource Manager (part of Device.exe) REGENUM.DLL PCIBUS.DLL
Registry Enumerator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Driver Registry Keys ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ActivateDeviceEx ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Driver Loading ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Registry Key Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Interface Classes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
I/O Resource Manager ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Registry Helper Routines ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Contrast:  Windows XP WDM Loading Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Power Management ,[object Object],[object Object],[object Object],[object Object],[object Object]
Power Management ,[object Object],[object Object],Suspend User Idle System Idle On D2 Standby D4 Off D1 Low Performance D3 Sleep D0 Fully Powered
Power Manager Architecture Drivers Power Manager (pm.dll) PM APIs Application Notification Message Queue Driver APIs Application APIs
Contrast:  WDM Power Management ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Physical Memory 64 MB RAM 32 MB Flash Dbg Serial Port 2 GB User 512 MB Uncached 512 MB Cached 64 MB RAM 32 MB Flash 64 MB RAM 32 MB Flash Physical Memory Kernel Virtual Address Reserved 04000000 82000000 80000000 80000000 A0000000 C0000000 0
Virtual Address Space Not Used Slot 0 Slot 32 64 KB 32 MB 64 MB 2 GB 3 GB 4 GB Memory mapped files Above 2G-3G Mapped to physical memory Virtual address space Slot 1 Slot 32 NULL pointers  0x80000000 0xA0000000 Accessable via MmMapiIoSpace 512M Cached   512M Non-Cached
Memory Management Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Driver Memory Access – Mapped Pointers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Driver Memory Access – Mapped Pointers App Calls DeviceIOControl DM mapped into Slot 0 App is mapped into Slot 0 DM Calls xxx_IoControl DM Sets permissions to App space APP DM Slot 0 APP APP Mapped pointer Driver Calls MapPtrToProcess Driver returns from xxx_IoControl DM Re-Sets permissions to App space App is mapped into Slot 0 APP DM APP Original pointer DM APP
Contrast:  WDM Basic Memory Management ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CEDDK ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CEDDK Abstraction ,[object Object],[object Object],[object Object],Device Manager Device Driver CEDDK.DLL Hardware
CEDDK Internals READ_REGISTER_XXXX WRITE_REGISTER_XXXX READ_PORT_XXXX WRITE_PORT_XXXX I/O Access XXXX =>  UCHAR/USHORT/ULONG MmMapIOSpace – MmUnmapIOSpace HalAllocateCommonBuffer Memory Management HalGetBusDataByOffset() HalGetBusData() HalSetBusDataByOffset() HalSetBusData() HalTranslateBusAddress() HalTranslateSystemAddress() Bus  Management Function Examples Coverage
Contrast:  WDM Advanced Memory Management ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Interrupt Architecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CE 3.0 Interrupt Handling User  Mode HW All  None Device Driver IST Processing Set Event EOI Except. Handler ISR Enable App IRQ Masked All IRQ Enabled WFSO WFSO on Event Application Resumes   Kernel OAL Higher  Priority PSR SYSINTR_ ID
Notes On ISRs And ISTs  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ISR Observations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CE .NET Installable ISRs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CE .NET Interrupt Handling IISR  Kernel OAL Driver HW Set Event SYSINTR_ ID IRQ Masked IST None Except. Handler ISR Higher Priority IRQs Enabled PSR SYSINTR_xx SYSINTR_NOP IISR 1 NKCallIntChain(IRQ) IISR n SYSINTR_CHAIN IISR 2
IISR Control Flow ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Interrupt Service Thread ,[object Object],[object Object],[object Object],[object Object],[object Object]
Interrupt Service Thread  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Typical IST Start struct ISTData  // Declare the Strucure to pass to the IST { HANDLE hThread; // IST Handle DWORD sysIntr;  // Logical ID HANDLE hEvent;  // handle to the event to wait for interrupt volatile BOOL abort;  // flag to test to exit the IST }; ISTData g_KeypadISTData; // Create event to link to IST  g_KeypadISTData.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); // Translate IRQ to an logical ID (x86 CEPC) g_KeypadISTData.sysIntr =Mapirq2Sysintr(5); // start the thread g_KeypadISTData.hThread = CreateThread(NULL,0,&KeypadIST, &g_KeypadISTData, 0, NULL);
Typical IST Start ,[object Object],[object Object],[object Object],//Change the threads priority CeSetThreadPriority(g_KeypadISTData.hThread,0); //disconnect any previous event from logical ID InterruptDisable(g_KeypadISTData.sysIntr); // Connect Logical ID with Event InterruptInitialize(g_KeypadISTData.sysIntr, g_KeypadISTData. hEvent,NULL,0);
Typical IST Start  DWORD KeypadIST(void *dat) {  ISTData* pData= (ISTData*)dat; // loop until told to stop While(!pData->abort) {  // wait for the interrupt event...  WaitForSingleObject(pData->hEvent, INFINITE) if(pData->abort) break; // Handle the interrupt... // Let OS know the interrupt processing is done InterruptDone(pData->sysIntr);  } Return 0; }
Typical IST Stop ,[object Object],[object Object],[object Object],// set abort flag to true to let thread know // that it should exit g_KeypadISTData.abort =TRUE; //disconnect event from logical ID //this internally sets g_KeypadISTData.sysIntr which in turn //sets g_KeypadISTData.hEvent through the kernel InterruptDisable(g_KeypadISTData.sysIntr); //wait for thread to exit WaitForSingleObject(g_KeypadISTData.hEvent,INFINITE); CloseHandle(g_KeypadISTData.hEvent); CloseHandle(g_KeypadISTData.hThread);
Contrast:  WDM Interrupts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bus Drivers Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PCMCIA Host ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
USB Host ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Community Resources ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 

More Related Content

What's hot

Modul Pelatihan Internet Dasar (Free Download)
Modul Pelatihan Internet Dasar (Free Download)Modul Pelatihan Internet Dasar (Free Download)
Modul Pelatihan Internet Dasar (Free Download)
Indriyatno Banyumurti
 
Presentasi Pengenalan Jurusan TKJ SMK Darut Taqwa pada MOS 2013
Presentasi Pengenalan Jurusan TKJ SMK Darut Taqwa pada MOS 2013Presentasi Pengenalan Jurusan TKJ SMK Darut Taqwa pada MOS 2013
Presentasi Pengenalan Jurusan TKJ SMK Darut Taqwa pada MOS 2013
Mas Judin
 
Presentasi Bab 5 Jaringan Komputer dan Internet.pdf
Presentasi Bab 5 Jaringan Komputer dan Internet.pdfPresentasi Bab 5 Jaringan Komputer dan Internet.pdf
Presentasi Bab 5 Jaringan Komputer dan Internet.pdf
KayyasahNayla
 
Presentasi-Bangkit Cloud Computing.pptx
Presentasi-Bangkit Cloud Computing.pptxPresentasi-Bangkit Cloud Computing.pptx
Presentasi-Bangkit Cloud Computing.pptx
SamuelDjodi
 
Perkembangan teknologi jaringan nirkabel wifi 802.11.ac
Perkembangan teknologi jaringan nirkabel wifi 802.11.acPerkembangan teknologi jaringan nirkabel wifi 802.11.ac
Perkembangan teknologi jaringan nirkabel wifi 802.11.ac
Bagus Bernadi Saputra
 
Ppt cloudcomputing
Ppt cloudcomputingPpt cloudcomputing
Ppt cloudcomputing
rizki pradana
 
Modul Praktikum Instalasi Sistem Operasi
Modul Praktikum  Instalasi Sistem  Operasi Modul Praktikum  Instalasi Sistem  Operasi
Modul Praktikum Instalasi Sistem Operasi
Dwi Ely Kurniawan
 
PPS presentation.pptx
PPS presentation.pptxPPS presentation.pptx
PPS presentation.pptx
AbidKhanNishat1
 
Contoh Proposal Usaha Warnet
Contoh Proposal Usaha WarnetContoh Proposal Usaha Warnet
Contoh Proposal Usaha WarnetAfif Habibi
 
Sejarah dan Perkembangan Memori External
Sejarah dan Perkembangan Memori ExternalSejarah dan Perkembangan Memori External
Sejarah dan Perkembangan Memori External
WireThic, Electronic and Computing Program
 
Makalah Teknologi Informasi & Komunikasi (TIK) - Laptop (untuk kelas x MA/SMA...
Makalah Teknologi Informasi & Komunikasi (TIK) - Laptop (untuk kelas x MA/SMA...Makalah Teknologi Informasi & Komunikasi (TIK) - Laptop (untuk kelas x MA/SMA...
Makalah Teknologi Informasi & Komunikasi (TIK) - Laptop (untuk kelas x MA/SMA...
Mulia Fathan
 
Presentasi Informatika BAB 5 Jaringan Komputer dan Internet
Presentasi Informatika BAB 5 Jaringan Komputer dan InternetPresentasi Informatika BAB 5 Jaringan Komputer dan Internet
Presentasi Informatika BAB 5 Jaringan Komputer dan Internet
MemesByMasAgus
 
Jaringan komputer dan internet
Jaringan komputer dan internetJaringan komputer dan internet
Jaringan komputer dan internet
ARzikyyusya
 
Informatika dan Keterampilan Generik (IoT)
Informatika dan Keterampilan Generik (IoT)Informatika dan Keterampilan Generik (IoT)
Informatika dan Keterampilan Generik (IoT)
Farichah Riha
 
Keterampilan Berpikir Komputasional
Keterampilan Berpikir KomputasionalKeterampilan Berpikir Komputasional
Keterampilan Berpikir Komputasional
Togar Simatupang
 
Contoh Power Point Presentasi PKL
Contoh Power Point Presentasi PKLContoh Power Point Presentasi PKL
Contoh Power Point Presentasi PKL
Fahmi Diin Al-haq
 
presentasi Perkembangan IT Komputer
presentasi Perkembangan IT Komputerpresentasi Perkembangan IT Komputer
presentasi Perkembangan IT Komputer
Ahmad Saiful Islam
 
Makalah
MakalahMakalah
Web Interaktif
Web InteraktifWeb Interaktif
Web Interaktif
Wahyu Widodo
 

What's hot (20)

Modul Pelatihan Internet Dasar (Free Download)
Modul Pelatihan Internet Dasar (Free Download)Modul Pelatihan Internet Dasar (Free Download)
Modul Pelatihan Internet Dasar (Free Download)
 
Presentasi Pengenalan Jurusan TKJ SMK Darut Taqwa pada MOS 2013
Presentasi Pengenalan Jurusan TKJ SMK Darut Taqwa pada MOS 2013Presentasi Pengenalan Jurusan TKJ SMK Darut Taqwa pada MOS 2013
Presentasi Pengenalan Jurusan TKJ SMK Darut Taqwa pada MOS 2013
 
Presentasi Bab 5 Jaringan Komputer dan Internet.pdf
Presentasi Bab 5 Jaringan Komputer dan Internet.pdfPresentasi Bab 5 Jaringan Komputer dan Internet.pdf
Presentasi Bab 5 Jaringan Komputer dan Internet.pdf
 
Presentasi-Bangkit Cloud Computing.pptx
Presentasi-Bangkit Cloud Computing.pptxPresentasi-Bangkit Cloud Computing.pptx
Presentasi-Bangkit Cloud Computing.pptx
 
Perkembangan teknologi jaringan nirkabel wifi 802.11.ac
Perkembangan teknologi jaringan nirkabel wifi 802.11.acPerkembangan teknologi jaringan nirkabel wifi 802.11.ac
Perkembangan teknologi jaringan nirkabel wifi 802.11.ac
 
Ppt cloudcomputing
Ppt cloudcomputingPpt cloudcomputing
Ppt cloudcomputing
 
Modul Praktikum Instalasi Sistem Operasi
Modul Praktikum  Instalasi Sistem  Operasi Modul Praktikum  Instalasi Sistem  Operasi
Modul Praktikum Instalasi Sistem Operasi
 
PPS presentation.pptx
PPS presentation.pptxPPS presentation.pptx
PPS presentation.pptx
 
Ubuntu Enterprise Cloud
Ubuntu Enterprise CloudUbuntu Enterprise Cloud
Ubuntu Enterprise Cloud
 
Contoh Proposal Usaha Warnet
Contoh Proposal Usaha WarnetContoh Proposal Usaha Warnet
Contoh Proposal Usaha Warnet
 
Sejarah dan Perkembangan Memori External
Sejarah dan Perkembangan Memori ExternalSejarah dan Perkembangan Memori External
Sejarah dan Perkembangan Memori External
 
Makalah Teknologi Informasi & Komunikasi (TIK) - Laptop (untuk kelas x MA/SMA...
Makalah Teknologi Informasi & Komunikasi (TIK) - Laptop (untuk kelas x MA/SMA...Makalah Teknologi Informasi & Komunikasi (TIK) - Laptop (untuk kelas x MA/SMA...
Makalah Teknologi Informasi & Komunikasi (TIK) - Laptop (untuk kelas x MA/SMA...
 
Presentasi Informatika BAB 5 Jaringan Komputer dan Internet
Presentasi Informatika BAB 5 Jaringan Komputer dan InternetPresentasi Informatika BAB 5 Jaringan Komputer dan Internet
Presentasi Informatika BAB 5 Jaringan Komputer dan Internet
 
Jaringan komputer dan internet
Jaringan komputer dan internetJaringan komputer dan internet
Jaringan komputer dan internet
 
Informatika dan Keterampilan Generik (IoT)
Informatika dan Keterampilan Generik (IoT)Informatika dan Keterampilan Generik (IoT)
Informatika dan Keterampilan Generik (IoT)
 
Keterampilan Berpikir Komputasional
Keterampilan Berpikir KomputasionalKeterampilan Berpikir Komputasional
Keterampilan Berpikir Komputasional
 
Contoh Power Point Presentasi PKL
Contoh Power Point Presentasi PKLContoh Power Point Presentasi PKL
Contoh Power Point Presentasi PKL
 
presentasi Perkembangan IT Komputer
presentasi Perkembangan IT Komputerpresentasi Perkembangan IT Komputer
presentasi Perkembangan IT Komputer
 
Makalah
MakalahMakalah
Makalah
 
Web Interaktif
Web InteraktifWeb Interaktif
Web Interaktif
 

Viewers also liked

Installing driver
Installing driverInstalling driver
Installing driver
Online
 
Design Of A Usb Device Driver (Overview)
Design Of A Usb Device Driver (Overview)Design Of A Usb Device Driver (Overview)
Design Of A Usb Device Driver (Overview)
allankliu
 
Device tree support on arm linux
Device tree support on arm linuxDevice tree support on arm linux
Device tree support on arm linux
Chih-Min Chao
 
Introduction of USB 3.1
Introduction of USB 3.1 Introduction of USB 3.1
Introduction of USB 3.1
Rainny Tu
 
Introduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmwareIntroduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmwaredefinecareer
 
Device Drivers
Device DriversDevice Drivers
Device Drivers
Kushal Modi
 
USB Powerpoint
USB PowerpointUSB Powerpoint
USB Powerpointaaron924
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
Houcheng Lin
 
The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017
LinkedIn
 

Viewers also liked (10)

Installing driver
Installing driverInstalling driver
Installing driver
 
Design Of A Usb Device Driver (Overview)
Design Of A Usb Device Driver (Overview)Design Of A Usb Device Driver (Overview)
Design Of A Usb Device Driver (Overview)
 
Device tree support on arm linux
Device tree support on arm linuxDevice tree support on arm linux
Device tree support on arm linux
 
Introduction of USB 3.1
Introduction of USB 3.1 Introduction of USB 3.1
Introduction of USB 3.1
 
Introduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmwareIntroduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmware
 
Device Drivers
Device DriversDevice Drivers
Device Drivers
 
USB Powerpoint
USB PowerpointUSB Powerpoint
USB Powerpoint
 
PCI Drivers
PCI DriversPCI Drivers
PCI Drivers
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017
 

Similar to WinCE

Device Driver in WinCE 6.0 R2
Device Driver in WinCE 6.0 R2Device Driver in WinCE 6.0 R2
Device Driver in WinCE 6.0 R2
rahul_p_shukla
 
Chapter02 Managing Hardware Devices
Chapter02      Managing  Hardware  DevicesChapter02      Managing  Hardware  Devices
Chapter02 Managing Hardware DevicesRaja Waseem Akhtar
 
Device drivers and their applications
Device drivers and their applicationsDevice drivers and their applications
Device drivers and their applications
AliddekiBryan
 
Windows guest debugging presentation from KVM Forum 2012
Windows guest debugging presentation from KVM Forum 2012Windows guest debugging presentation from KVM Forum 2012
Windows guest debugging presentation from KVM Forum 2012
Yan Vugenfirer
 
Unit 5.2 Device Driver.pdf (Device Driver)
Unit 5.2 Device Driver.pdf (Device Driver)Unit 5.2 Device Driver.pdf (Device Driver)
Unit 5.2 Device Driver.pdf (Device Driver)
AnilkumarBrahmane2
 
Solid-State diskA solid-state drive also known as a solid-state di.pdf
Solid-State diskA solid-state drive also known as a solid-state di.pdfSolid-State diskA solid-state drive also known as a solid-state di.pdf
Solid-State diskA solid-state drive also known as a solid-state di.pdf
saahinmanpam
 
Real Machine Cloud Computing Che Rung Lee.pptx
Real Machine Cloud Computing Che Rung Lee.pptxReal Machine Cloud Computing Che Rung Lee.pptx
Real Machine Cloud Computing Che Rung Lee.pptx
DanyMoko
 
Operating system
Operating systemOperating system
Operating system
Dilfaroz Khan
 
Windows Architecture Explained by Stacksol
Windows Architecture Explained by StacksolWindows Architecture Explained by Stacksol
Windows Architecture Explained by Stacksol
Stacksol
 
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
Russell Sanford
 
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
Russell Sanford
 
LINUX Device Drivers
LINUX Device DriversLINUX Device Drivers
LINUX Device Drivers
Partha Bhattacharya
 
Window architecture
Window architecture Window architecture
Window architecture
IGZ Software house
 
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
44CON
 
Operating system ppt
Operating system pptOperating system ppt
Operating system ppt
kaviya kumaresan
 
Operating system ppt
Operating system pptOperating system ppt
Operating system ppt
kaviya kumaresan
 
Operating system ppt
Operating system pptOperating system ppt
Operating system ppt
kaviya kumaresan
 
Operating system ppt
Operating system pptOperating system ppt
Operating system ppt
kaviya kumaresan
 

Similar to WinCE (20)

Device Driver in WinCE 6.0 R2
Device Driver in WinCE 6.0 R2Device Driver in WinCE 6.0 R2
Device Driver in WinCE 6.0 R2
 
Chapter02 Managing Hardware Devices
Chapter02      Managing  Hardware  DevicesChapter02      Managing  Hardware  Devices
Chapter02 Managing Hardware Devices
 
Device drivers and their applications
Device drivers and their applicationsDevice drivers and their applications
Device drivers and their applications
 
Windows guest debugging presentation from KVM Forum 2012
Windows guest debugging presentation from KVM Forum 2012Windows guest debugging presentation from KVM Forum 2012
Windows guest debugging presentation from KVM Forum 2012
 
Unit 5.2 Device Driver.pdf (Device Driver)
Unit 5.2 Device Driver.pdf (Device Driver)Unit 5.2 Device Driver.pdf (Device Driver)
Unit 5.2 Device Driver.pdf (Device Driver)
 
Ch07 system administration
Ch07 system administration Ch07 system administration
Ch07 system administration
 
Solid-State diskA solid-state drive also known as a solid-state di.pdf
Solid-State diskA solid-state drive also known as a solid-state di.pdfSolid-State diskA solid-state drive also known as a solid-state di.pdf
Solid-State diskA solid-state drive also known as a solid-state di.pdf
 
Real Machine Cloud Computing Che Rung Lee.pptx
Real Machine Cloud Computing Che Rung Lee.pptxReal Machine Cloud Computing Che Rung Lee.pptx
Real Machine Cloud Computing Che Rung Lee.pptx
 
Operating system
Operating systemOperating system
Operating system
 
Windows Architecture Explained by Stacksol
Windows Architecture Explained by StacksolWindows Architecture Explained by Stacksol
Windows Architecture Explained by Stacksol
 
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
 
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
 
LINUX Device Drivers
LINUX Device DriversLINUX Device Drivers
LINUX Device Drivers
 
Window architecture
Window architecture Window architecture
Window architecture
 
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
Reverse Engineering and Bug Hunting on KMDF Drivers - Enrique Nissim - 44CON ...
 
Operating system ppt
Operating system pptOperating system ppt
Operating system ppt
 
Operating system ppt
Operating system pptOperating system ppt
Operating system ppt
 
Operating system ppt
Operating system pptOperating system ppt
Operating system ppt
 
Operating system ppt
Operating system pptOperating system ppt
Operating system ppt
 
Linux io
Linux ioLinux io
Linux io
 

Recently uploaded

3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx
tanyjahb
 
Affordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n PrintAffordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n Print
Navpack & Print
 
The-McKinsey-7S-Framework. strategic management
The-McKinsey-7S-Framework. strategic managementThe-McKinsey-7S-Framework. strategic management
The-McKinsey-7S-Framework. strategic management
Bojamma2
 
Filing Your Delaware Franchise Tax A Detailed Guide
Filing Your Delaware Franchise Tax A Detailed GuideFiling Your Delaware Franchise Tax A Detailed Guide
Filing Your Delaware Franchise Tax A Detailed Guide
YourLegal Accounting
 
Attending a job Interview for B1 and B2 Englsih learners
Attending a job Interview for B1 and B2 Englsih learnersAttending a job Interview for B1 and B2 Englsih learners
Attending a job Interview for B1 and B2 Englsih learners
Erika906060
 
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
BBPMedia1
 
BeMetals Presentation_May_22_2024 .pdf
BeMetals Presentation_May_22_2024   .pdfBeMetals Presentation_May_22_2024   .pdf
BeMetals Presentation_May_22_2024 .pdf
DerekIwanaka1
 
Sustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & EconomySustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & Economy
Operational Excellence Consulting
 
Pitch Deck Teardown: RAW Dating App's $3M Angel deck
Pitch Deck Teardown: RAW Dating App's $3M Angel deckPitch Deck Teardown: RAW Dating App's $3M Angel deck
Pitch Deck Teardown: RAW Dating App's $3M Angel deck
HajeJanKamps
 
Skye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto AirportSkye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto Airport
marketingjdass
 
Exploring Patterns of Connection with Social Dreaming
Exploring Patterns of Connection with Social DreamingExploring Patterns of Connection with Social Dreaming
Exploring Patterns of Connection with Social Dreaming
Nicola Wreford-Howard
 
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
BBPMedia1
 
India Orthopedic Devices Market: Unlocking Growth Secrets, Trends and Develop...
India Orthopedic Devices Market: Unlocking Growth Secrets, Trends and Develop...India Orthopedic Devices Market: Unlocking Growth Secrets, Trends and Develop...
India Orthopedic Devices Market: Unlocking Growth Secrets, Trends and Develop...
Kumar Satyam
 
Brand Analysis for an artist named Struan
Brand Analysis for an artist named StruanBrand Analysis for an artist named Struan
Brand Analysis for an artist named Struan
sarahvanessa51503
 
Improving profitability for small business
Improving profitability for small businessImproving profitability for small business
Improving profitability for small business
Ben Wann
 
Cracking the Workplace Discipline Code Main.pptx
Cracking the Workplace Discipline Code Main.pptxCracking the Workplace Discipline Code Main.pptx
Cracking the Workplace Discipline Code Main.pptx
Workforce Group
 
Role of Remote Sensing and Monitoring in Mining
Role of Remote Sensing and Monitoring in MiningRole of Remote Sensing and Monitoring in Mining
Role of Remote Sensing and Monitoring in Mining
Naaraayani Minerals Pvt.Ltd
 
Digital Transformation in PLM - WHAT and HOW - for distribution.pdf
Digital Transformation in PLM - WHAT and HOW - for distribution.pdfDigital Transformation in PLM - WHAT and HOW - for distribution.pdf
Digital Transformation in PLM - WHAT and HOW - for distribution.pdf
Jos Voskuil
 
The Parable of the Pipeline a book every new businessman or business student ...
The Parable of the Pipeline a book every new businessman or business student ...The Parable of the Pipeline a book every new businessman or business student ...
The Parable of the Pipeline a book every new businessman or business student ...
awaisafdar
 
Memorandum Of Association Constitution of Company.ppt
Memorandum Of Association Constitution of Company.pptMemorandum Of Association Constitution of Company.ppt
Memorandum Of Association Constitution of Company.ppt
seri bangash
 

Recently uploaded (20)

3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx
 
Affordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n PrintAffordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n Print
 
The-McKinsey-7S-Framework. strategic management
The-McKinsey-7S-Framework. strategic managementThe-McKinsey-7S-Framework. strategic management
The-McKinsey-7S-Framework. strategic management
 
Filing Your Delaware Franchise Tax A Detailed Guide
Filing Your Delaware Franchise Tax A Detailed GuideFiling Your Delaware Franchise Tax A Detailed Guide
Filing Your Delaware Franchise Tax A Detailed Guide
 
Attending a job Interview for B1 and B2 Englsih learners
Attending a job Interview for B1 and B2 Englsih learnersAttending a job Interview for B1 and B2 Englsih learners
Attending a job Interview for B1 and B2 Englsih learners
 
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
 
BeMetals Presentation_May_22_2024 .pdf
BeMetals Presentation_May_22_2024   .pdfBeMetals Presentation_May_22_2024   .pdf
BeMetals Presentation_May_22_2024 .pdf
 
Sustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & EconomySustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & Economy
 
Pitch Deck Teardown: RAW Dating App's $3M Angel deck
Pitch Deck Teardown: RAW Dating App's $3M Angel deckPitch Deck Teardown: RAW Dating App's $3M Angel deck
Pitch Deck Teardown: RAW Dating App's $3M Angel deck
 
Skye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto AirportSkye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto Airport
 
Exploring Patterns of Connection with Social Dreaming
Exploring Patterns of Connection with Social DreamingExploring Patterns of Connection with Social Dreaming
Exploring Patterns of Connection with Social Dreaming
 
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
 
India Orthopedic Devices Market: Unlocking Growth Secrets, Trends and Develop...
India Orthopedic Devices Market: Unlocking Growth Secrets, Trends and Develop...India Orthopedic Devices Market: Unlocking Growth Secrets, Trends and Develop...
India Orthopedic Devices Market: Unlocking Growth Secrets, Trends and Develop...
 
Brand Analysis for an artist named Struan
Brand Analysis for an artist named StruanBrand Analysis for an artist named Struan
Brand Analysis for an artist named Struan
 
Improving profitability for small business
Improving profitability for small businessImproving profitability for small business
Improving profitability for small business
 
Cracking the Workplace Discipline Code Main.pptx
Cracking the Workplace Discipline Code Main.pptxCracking the Workplace Discipline Code Main.pptx
Cracking the Workplace Discipline Code Main.pptx
 
Role of Remote Sensing and Monitoring in Mining
Role of Remote Sensing and Monitoring in MiningRole of Remote Sensing and Monitoring in Mining
Role of Remote Sensing and Monitoring in Mining
 
Digital Transformation in PLM - WHAT and HOW - for distribution.pdf
Digital Transformation in PLM - WHAT and HOW - for distribution.pdfDigital Transformation in PLM - WHAT and HOW - for distribution.pdf
Digital Transformation in PLM - WHAT and HOW - for distribution.pdf
 
The Parable of the Pipeline a book every new businessman or business student ...
The Parable of the Pipeline a book every new businessman or business student ...The Parable of the Pipeline a book every new businessman or business student ...
The Parable of the Pipeline a book every new businessman or business student ...
 
Memorandum Of Association Constitution of Company.ppt
Memorandum Of Association Constitution of Company.pptMemorandum Of Association Constitution of Company.ppt
Memorandum Of Association Constitution of Company.ppt
 

WinCE

  • 1. Windows CE Driver Architecture Jay Loney Program Manager Windows CE Drivers JayLoney @ Microsoft.com
  • 2.
  • 3. Windows CE Architecture OEM Hardware Embedded Shell Applications WIN32 APIs COREDLL, WINSOCK, OLE, COMMCTRL, COMMDLG, WININET, TAPI Windows CE Shell Services Remote Connectivity Kernel Library IrDA GWES Device Manager File Manager TCP/IP OAL Bootloader Drivers Device drivers File drivers Microsoft OEM ISV Network drivers
  • 4.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. Power Manager Architecture Drivers Power Manager (pm.dll) PM APIs Application Notification Message Queue Driver APIs Application APIs
  • 23.
  • 24. Physical Memory 64 MB RAM 32 MB Flash Dbg Serial Port 2 GB User 512 MB Uncached 512 MB Cached 64 MB RAM 32 MB Flash 64 MB RAM 32 MB Flash Physical Memory Kernel Virtual Address Reserved 04000000 82000000 80000000 80000000 A0000000 C0000000 0
  • 25. Virtual Address Space Not Used Slot 0 Slot 32 64 KB 32 MB 64 MB 2 GB 3 GB 4 GB Memory mapped files Above 2G-3G Mapped to physical memory Virtual address space Slot 1 Slot 32 NULL pointers 0x80000000 0xA0000000 Accessable via MmMapiIoSpace 512M Cached 512M Non-Cached
  • 26.
  • 27.
  • 28. Driver Memory Access – Mapped Pointers App Calls DeviceIOControl DM mapped into Slot 0 App is mapped into Slot 0 DM Calls xxx_IoControl DM Sets permissions to App space APP DM Slot 0 APP APP Mapped pointer Driver Calls MapPtrToProcess Driver returns from xxx_IoControl DM Re-Sets permissions to App space App is mapped into Slot 0 APP DM APP Original pointer DM APP
  • 29.
  • 30.
  • 31.
  • 32. CEDDK Internals READ_REGISTER_XXXX WRITE_REGISTER_XXXX READ_PORT_XXXX WRITE_PORT_XXXX I/O Access XXXX => UCHAR/USHORT/ULONG MmMapIOSpace – MmUnmapIOSpace HalAllocateCommonBuffer Memory Management HalGetBusDataByOffset() HalGetBusData() HalSetBusDataByOffset() HalSetBusData() HalTranslateBusAddress() HalTranslateSystemAddress() Bus Management Function Examples Coverage
  • 33.
  • 34.
  • 35. CE 3.0 Interrupt Handling User Mode HW All None Device Driver IST Processing Set Event EOI Except. Handler ISR Enable App IRQ Masked All IRQ Enabled WFSO WFSO on Event Application Resumes Kernel OAL Higher Priority PSR SYSINTR_ ID
  • 36.
  • 37.
  • 38.
  • 39. CE .NET Interrupt Handling IISR Kernel OAL Driver HW Set Event SYSINTR_ ID IRQ Masked IST None Except. Handler ISR Higher Priority IRQs Enabled PSR SYSINTR_xx SYSINTR_NOP IISR 1 NKCallIntChain(IRQ) IISR n SYSINTR_CHAIN IISR 2
  • 40.
  • 41.
  • 42.
  • 43. Typical IST Start struct ISTData // Declare the Strucure to pass to the IST { HANDLE hThread; // IST Handle DWORD sysIntr; // Logical ID HANDLE hEvent; // handle to the event to wait for interrupt volatile BOOL abort; // flag to test to exit the IST }; ISTData g_KeypadISTData; // Create event to link to IST g_KeypadISTData.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); // Translate IRQ to an logical ID (x86 CEPC) g_KeypadISTData.sysIntr =Mapirq2Sysintr(5); // start the thread g_KeypadISTData.hThread = CreateThread(NULL,0,&KeypadIST, &g_KeypadISTData, 0, NULL);
  • 44.
  • 45. Typical IST Start DWORD KeypadIST(void *dat) { ISTData* pData= (ISTData*)dat; // loop until told to stop While(!pData->abort) { // wait for the interrupt event... WaitForSingleObject(pData->hEvent, INFINITE) if(pData->abort) break; // Handle the interrupt... // Let OS know the interrupt processing is done InterruptDone(pData->sysIntr); } Return 0; }
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.  
  • 52.
  • 53.