Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
0 Architecture
Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com
Speaker
Douglas Boling
dbolingmedc @ bolingconsulting.com
Author Programming Microsoft Windows CE 3rd 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
Agenda
Overview - Introduction Windows CE 6 Memory Model New Features Compatibility BSP Changes
Brief History
Pegasus/Alder
Windows CE 1.0 11/1996
Macallan
Windows CE 5.0 8/2004
Tomatin NMD FP
Yamazaki
Windows CE 6 H2/2006
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
2 GB Kernel Space
Kernel
Shared Memory
Slot 32 Slot 31 : : Slot 7 Slot 6 Explorer.exe Slot 5 Services.exe Slot 4 GWES.exe Slot 3 Device.exe Slot 2 FileSys.exe Slot 1 ROM DLLs Slot 0 Execution
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
2 GB Kernel Space
2 GB per Process
32 K Process
Improved system performance Increased security and robustness High degree of backwards compatibility
Shared System Heap 255 MB RAM Backed Mapfiles 256 MB Shared User DLLs 512 MB
0x00000000
System Trap Area Kernel Virtual Memory Shared by all kernel Servers and drivers Ram file system & ram registry
All XIP DLLs in kernel Uncached access to physical memory
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
New OS Layout
Applications
User Space SHELL
SERVICES.EXE
Services Services Services Services
UDEVICE.EXE
Kernel
Validates parameters Maps Service into Slot 0
Possible Cache Flush
Service
Runs Returns to Kernel
Kernel
Kernel
Maps App into Slot 0
Possible cache flush
Returns to App
Kernel
Validates parameters Calls into to the service
Kernel Service
Service
Runs Returns directly to the app
New Features
New Features
New Security Model
Trust / Run / No Load model gone New: Trust / No Load
New Features
New File Systems
ExFAT
Large file support Large volume support
New Features
New driver support
USB On-the-go (OTG) New USB Function / Host class drivers
New Features
Wireless 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
Compatibility
Compatibility
Binary compatibility for applications is the key goal
Well behaved applications will work w/ little/no changes
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
BSP Changes
Kernel
Device Emulator
Aruba Board TI OMAP 2420 MIPS NEC Rockhopper SG2 Vr5500 Hitachi/Renesas Aspen x86 (CEPC)
Title
ARMv4i
ARMv4i ARMv6 MIPSII & II_PF, MIPSIV & IV_FP
Yes
No Yes Yes
SH4
x86
Code
EMB321 EMB308
SH4
X86
Yes
Yes
Speakers Travis Hobrla; Don Weber Steve Maillet; Glen Langer
Porting a Windows CE 5.0 BSP to the next release of Windows CE Windows CE Secure Boot Loader
OAL Changes
OAL split from kernel
Becomes NK.EXE Kernel code becomes Kernel.DLL
Kernel
OAL
OS Timer library
RTC library
RTC
Timers
Caches
Hardware
USB port
KITL library
Ethernet port
Serial port
NKStub.lib
oal.exe
(nk.exe)
kitl.dll
Interrupt library Startup library Cache library IOCTL library
OS Timer library
Timers
RTC library
RTC
Caches
Hardware
USB port
Ethernet port
Serial port
Drivers
Two types of drivers will be supported
Kernel Mode for performance User Mode for robustness
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
Slot 32
Slot 32
Slot 31
. . .
0600 0000 0400 0000 0200 0000 0000 0000
Slot 3 Slot 2
. . .
Device Mgr FileSys
FileSys
Slot 31 Clone
Slot 3 Clone
Kernel
Kernel Drivers
Kernel
Kernel Drivers
Application
Application
Before Call
During Call
Handling Calls
App memory already mapped correctly
Can access it without re-mapping pointers
Deprecated APIs:
SetProcPermissions, MapPtrToProcess, MapCallerPointer,
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
Summary
Great new architecture
Removes the old limits Performance expected as good as current
Questions
dbolingmedc @ bolingconsulting.com
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.