Presentation is loading. Please wait.

Presentation is loading. Please wait.

Windows CE 6.0 Architecture Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com.

Similar presentations


Presentation on theme: "Windows CE 6.0 Architecture Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com."— Presentation transcript:

1

2 Windows CE 6.0 Architecture Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com

3 Speaker Douglas Boling dbolingmedc @ bolingconsulting.com Author – “Programming Microsoft Windows CE 3 rd Edition” Trainer – Classes on Windows CE App Development Windows CE OAL Development.NET Compact Framework Consultant – Work with companies to help their Windows CE application and platform development efforts Douglas Boling dbolingmedc @ bolingconsulting.com Author – “Programming Microsoft Windows CE 3 rd Edition” Trainer – Classes on Windows CE App Development Windows CE OAL Development.NET Compact Framework Consultant – Work with companies to help their Windows CE application and platform development efforts

4 Agenda Overview - Introduction Windows CE 6 Memory Model New Features Compatibility BSP Changes Overview - Introduction Windows CE 6 Memory Model New Features Compatibility BSP Changes

5 SP1 2.11 SP2 2.12 Jameson 4.1 McKendric 4.2 Tomatin NMD FP Brief History What we’ve been doing Pegasus/Alder Windows CE 1.0 11/1996 Birch Windows CE 2.0 11/1997 Cedar Windows CE 3.0 4/2000 Talisker Windows CE.NET 4.0 1/2002 Macallan Windows CE 5.0 8/2004 Yamazaki Windows CE 6 H2/2006

6 Windows CE Limits From Windows CE 1 to Windows CE 5, Windows CE has always had limits 32 processes at any one time 32 MB Virtual Memory per process From Windows CE 1 to Windows CE 5, Windows CE has always had limits 32 processes at any one time 32 MB Virtual Memory per process

7 :::::::: Windows CE 5.0 Memory Model Shared Memory Kernel 32 Slots for Processes Single 2 GB VM for all Processes Execution Slot and Shared DLL Slot Slot 0 – Execution Slot 1 – ROM DLLs Slot 2 – FileSys.exe Slot 3 – Device.exe Slot 4 – GWES.exe Slot 5 – Services.exe Slot 31 Slot 32 Slot 6 – Explorer.exe 2 GB Kernel Space Slot 7

8 Windows CE 5.0 Memory Model Virtual Memory Map 2 GB for Kernel Single 2 GB mapping for all processes Divided up into 32 MB “slots” 32 Process Limit Each process has one 32 MB slot 32 slots for processes Shared memory Upper half of user space is shared memory Read / Write by all processes Virtual Memory Map 2 GB for Kernel Single 2 GB mapping for all processes Divided up into 32 MB “slots” 32 Process Limit Each process has one 32 MB slot 32 slots for processes Shared memory Upper half of user space is shared memory Read / Write by all processes

9 Windows CE 6.0 Memory Model

10 32 K Process 2 GB per Process 2 GB Kernel Space Windows CE Memory Model Process Code User VM Kernel Filesystem GWES Drivers...

11 Introducing the New Kernel 2 GB of Virtual Memory per process 32,000 processes Unified Kernel Critical OS components moved into kernel space Improved system performance Increased security and robustness High degree of backwards compatibility 2 GB of Virtual Memory per process 32,000 processes Unified Kernel Critical OS components moved into kernel space Improved system performance Increased security and robustness High degree of backwards compatibility

12 Application Virtual Memory Space Shared User DLLs 512 MB RAM Backed Mapfiles 256 MB Shared System Heap 255 MB Process space 1 GB per process User Space 2 Gigabytes Each process has its own mapping R/W for OS components Read only for user process RAM Backed Mapfiles Mapped at fixed location for better backwards compatibility All DLLs – code and data Same mapping across all processes Data pages are unique physical pages Code pages are shared Executable code and data VM Allocation File Back Mapfiles 0x00000000 0x40000000 0x80000000

13 Kernel Virtual Memory Space Kernel Space 2 Gigabytes Fixed mapping independent of user space 0xFFFFFFFF All XIP DLLs in kernel Cached access to physical memory Uncached access to physical memory Ram file system & ram registry Kernel Virtual Memory Shared by all kernel Servers and drivers System Trap Area CPU Specific VM Kernel VM 256 / 512 MB Object Store (128MB) Kernel XIP DLLs (128 MB) Static Mapped Uncached 512 MB Static Mapped Cached 512 MB

14 New OS Layout Moving critical drivers, file system, and graphical window manager into the kernel Kernel version of Coredll.dll Same APIs without the thunks Benefit Greatly reduces the overhead of system calls between these components Reduces overhead of all calls from user space to kernel space Increase code sharing between base OS services Moving critical drivers, file system, and graphical window manager into the kernel Kernel version of Coredll.dll Same APIs without the thunks Benefit Greatly reduces the overhead of system calls between these components Reduces overhead of all calls from user space to kernel space Increase code sharing between base OS services

15 New OS Layout OAL (NK.EXE)

16 Performance & Size Improvements expected in process switching Same performance Thread Switching Memory Allocation System Calls Some slow down with interprocess calls Now involves data marshalling Size increase is less then 5% Improvements expected in process switching Same performance Thread Switching Memory Allocation System Calls Some slow down with interprocess calls Now involves data marshalling Size increase is less then 5%

17 Windows CE 5.0 System Calls Application makes call PSL jump Kernel Validates parameters Maps Service into Slot 0 Possible Cache Flush Calls into to the service Service Runs Returns to Kernel Kernel Maps App into Slot 0 Possible cache flush Returns to App ApplicationService(FileSys)(Device)(GWES) Kernel

18 Windows CE 6.0 Beta System Calls Application makes call Same call to coredll.dll App stays mapped during the call Kernel Validates parameters Calls into to the service Service Runs Returns directly to the app Application Service Kernel

19 New Features

20 New Security Model “Trust / Run / No Load” model gone New: “Trust / No Load” Prepares operating system for ACL security Windows XP-like Access Control List security to be implemented in the future New Security Model “Trust / Run / No Load” model gone New: “Trust / No Load” Prepares operating system for ACL security Windows XP-like Access Control List security to be implemented in the future

21 New Features New File Systems ExFAT Large file support Large volume support UDFS 2.5 read only support Large Memory Mapped File Support Support for mapping views into very large files Up to 64-bit files Big benefit for in car navigation and multimedia New File Systems ExFAT Large file support Large volume support UDFS 2.5 read only support Large Memory Mapped File Support Support for mapping views into very large files Up to 64-bit files Big benefit for in car navigation and multimedia

22 New Features New driver support USB On-the-go (OTG) New USB Function / Host class drivers Enhanced VoIP support VoIP support over wired and WLAN networks Full-featured phone application Updated SIP signaling and Media stack (RTC 1.5) New driver support USB On-the-go (OTG) New USB Function / Host class drivers Enhanced VoIP support VoIP support over wired and WLAN networks Full-featured phone application Updated SIP signaling and Media stack (RTC 1.5)

23 New Features W ireless LAN enhancements Multiple radio support and faster AP-AP roaming Added 802.11i support for WPA2 compliance Added 802.11e support for QoS Bluetooth enhancements BT protocol stack performance optimizations Enhanced BT profiles: A2DP, AVRCP W ireless LAN enhancements Multiple radio support and faster AP-AP roaming Added 802.11i support for WPA2 compliance Added 802.11e support for QoS Bluetooth enhancements BT protocol stack performance optimizations Enhanced BT profiles: A2DP, AVRCP

24 Compatibility

25 Binary compatibility for applications is the key goal Well behaved applications will work w/ little/no changes Compatibility maintained through CoreDLL Minimize impact on Win32 APIs Changes hidden in API libraries Apps using undocumented techniques… Will likely have to be modified Such as passing handles or pointers between processes Main changes will be in drivers and services Some drivers will migrate with little work Binary compatibility for applications is the key goal Well behaved applications will work w/ little/no changes Compatibility maintained through CoreDLL Minimize impact on Win32 APIs Changes hidden in API libraries Apps using undocumented techniques… Will likely have to be modified Such as passing handles or pointers between processes Main changes will be in drivers and services Some drivers will migrate with little work

26 Application Porting Test Cases WM 5.0 ported to Windows CE 6.0 Beta Running Windows CE 5.0 commercial applications on Windows CE 6.0 Beta WM 5.0 ported to Windows CE 6.0 Beta Running Windows CE 5.0 commercial applications on Windows CE 6.0 Beta

27 Compatibility Tester Identifies removed / deprecated / changed APIs Supports both static and runtime analysis Produces a detail report of any issues it finds Includes documentation and suggestions We will release it before Windows CE 6.0 RTM Will allow customers to prepare ahead of time Identifies removed / deprecated / changed APIs Supports both static and runtime analysis Produces a detail report of any issues it finds Includes documentation and suggestions We will release it before Windows CE 6.0 RTM Will allow customers to prepare ahead of time

28 BSP Changes

29 FamilyBSPKernel Will be in the beta release (Yes/No) ARM Intel Mainstone III (C- Step) ARMv4iYes Plato VoIP Reference Platform ARMv4iYes Device Emulator ARMv4iYes Aruba Board ARMv4iNo TI OMAP 2420 ARMv6Yes MIPS NEC Rockhopper SG2 Vr5500 MIPSII & II_PF, MIPSIV & IV_FP Yes SH4 Hitachi/Renesas Aspen SH4Yes x86 x86 (CEPC)X86 Yes Windows CE 6 Beta BSPs CodeTitleSpeakersEMB321 Porting a Windows CE 5.0 BSP to the next release of Windows CE Travis Hobrla; Don Weber EMB308 Windows CE Secure Boot Loader Steve Maillet; Glen Langer

30 OAL Changes OAL split from kernel Becomes “NK.EXE” Kernel code becomes “Kernel.DLL” Enables separate updates Overall OAL structure remains the same Same OEM functions OAL / kernel interface through shared structures OAL split from kernel Becomes “NK.EXE” Kernel code becomes “Kernel.DLL” Enables separate updates Overall OAL structure remains the same Same OEM functions OAL / kernel interface through shared structures

31 Windows CE 5.0 OAL Design Kernel OAL Hardware RTC CachelibraryInterruptlibraryIOCTLlibraryStartuplibraryRTClibraryKITLlibrary OS Timer library TimersCachesSerialportEthernetportUSBport

32 kernel.dll oal.exe oal.exe RTC CachelibraryInterruptlibraryIOCTLlibraryStartuplibrary RTClibrary kitl.dll OS Timer library TimersCachesSerialportEthernetportUSBport Hardware NKGLOBAL KITL IOCTL Windows CE 6.0 OAL Design OEMGLOBAL NKStub.lib (nk.exe)

33 Drivers Two types of drivers will be supported Kernel Mode for performance User Mode for robustness The overall structure of the drivers remains Main changes are in how the drivers access client memory Drivers are still DLLs Same Stream interface Two types of drivers will be supported Kernel Mode for performance User Mode for robustness The overall structure of the drivers remains Main changes are in how the drivers access client memory Drivers are still DLLs Same Stream interface

34 Kernel Mode Drivers Operate in kernel’s address space Calls to operating system functions very fast ISRs and ISTs operate in the same process space Thunking layer available for user interface services Drivers needing the best performance should be kernel mode Such as those with lots of quick API calls Operate in kernel’s address space Calls to operating system functions very fast ISRs and ISTs operate in the same process space Thunking layer available for user interface services Drivers needing the best performance should be kernel mode Such as those with lots of quick API calls

35 User Mode Drivers Loaded by udevices.exe No access to kernel structures or memory Same API support as applications Examples: Expansion buses like USB and SDIO Drivers where performance is not a factor should consider moving to user mode Called less often and do more work Loaded by udevices.exe No access to kernel structures or memory Same API support as applications Examples: Expansion buses like USB and SDIO Drivers where performance is not a factor should consider moving to user mode Called less often and do more work

36 Porting Drivers to the New Windows CE OS Most drivers become kernel mode drivers Driver writers must focus on security and stability Maximum backward-compatibility is maintained Though, some driver modifications are required Deprecated APIs Asynchronous buffer access User Interface Handling Most drivers become kernel mode drivers Driver writers must focus on security and stability Maximum backward-compatibility is maintained Though, some driver modifications are required Deprecated APIs Asynchronous buffer access User Interface Handling

37 Caller Process Mapping (5.0) Slot 31 Clone Slot 2 Slot 3...... 0000 0200 0000 0400 0000 0600 0000 3E00 0000 4000 0000 4200 0000 FileSys Device Mgr Slot 32 Application (Slot 31) Slot 3 Clone Slot 2 Slot 3...... FileSys Device Mgr Slot 32 Slot 31 At call to DeviceIoControlWhen DeviceIoControl processed

38 Caller Process Mapping (6.0) Application Kernel Application Kernel Drivers Kernel Drivers Before CallDuring Call Application space visible to application Application Space visible to driver Kernel space visible to driver Kernel space hidden from application

39 Handling Calls App memory already mapped correctly Can access it without re-mapping pointers Marshalling Helper Library Provides APIs for handling user data Deprecated APIs: SetProcPermissions, MapPtrToProcess, MapCallerPointer, … App memory already mapped correctly Can access it without re-mapping pointers Marshalling Helper Library Provides APIs for handling user data Deprecated APIs: SetProcPermissions, MapPtrToProcess, MapCallerPointer, …

40 Driver Pointer Safety OS checks buffers referenced by caller parameters Buffers are accessed checked Embedded pointers are valid but not access checked Safe drivers should use CeMapCallerPointer / CeCloseCallerBuffer Paranoid drivers should force duplication of buffer OS checks buffers referenced by caller parameters Buffers are accessed checked Embedded pointers are valid but not access checked Safe drivers should use CeMapCallerPointer / CeCloseCallerBuffer Paranoid drivers should force duplication of buffer

41 Asynchronous Access Windows CE 6 forces new treatment of asynchronous access from driver to application Old: SetProcPermissions to change thread access rights New: CeAllocAsynchronousBuffer / CeFreeAsynchronousBuffer to marshal data Windows CE 6 forces new treatment of asynchronous access from driver to application Old: SetProcPermissions to change thread access rights New: CeAllocAsynchronousBuffer / CeFreeAsynchronousBuffer to marshal data

42 Summary Great new architecture Removes the old limits Performance expected as good as current Memory footprint similar OAL / Driver porting fairly straightforward Great new architecture Removes the old limits Performance expected as good as current Memory footprint similar OAL / Driver porting fairly straightforward

43 Questions dbolingmedc @ bolingconsulting.com

44 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "Windows CE 6.0 Architecture Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com."

Similar presentations


Ads by Google