Windows CE: Enhanced BusEnum

Windows CE: Enhanced BusEnum
Created by samphung on 11/20/2010 10:54:27 PM

Enhancing BusEnum to improve perceived time to boot Windows CE  


Yuqun Cao, SDE, Windows CE JDP of Microsoft, released a whitepaper on enhancing BusEnum a few months ago. I finally had a chance to read it yesterday and was impressed by the additions that he made to BusEnum.   The changes allow for drivers to be loaded asynchronously. This change can be used to speed up the perceived time to boot a Windows CE system to the desktop or a kiosk application.

The BusEnum that comes with Platform Builder loads drivers one at a time. It loads the drivers using ActivateDeviceEx() and waits for each to load before loading the next driver. This approach works, but the desktop doesn’t display until after each has loaded and GWES is loaded and starts the display driver. So the changes that Yuqun Cao makes gives us the ability to delay driver loading so that the system can get a display shown to the customer earlier.

I will leave it to you to read the whitepaper for more information, but I want to add to it. The whitepaper states that the changes work for both Windows CE 5.0 and 6.0, but the download is for Windows CE 6.0.

So I downloaded the example and tried to use it with Windows CE 5.0. The first thing that I noticed was that it doesn’t compile. Now that should have been a sign to me, but I ignored it and made a few changes to get it to compile. But when I tested it, it failed miserably with several Data Aborts, which is when I noticed that the download is for Windows CE 6.0.

Not ready for failure, I quit for the night and decided to try it again in the morning. When I started working on it this morning I set out to integrate the changes into the CE 5.0 BusEnum. The following is what I did to integrate the changes:

1.        Copy $(WINCEROOT)\Public\Common\OAK\Drivers\BusEnum to my platform’s Drivers folder.

2.       Add BusEnum to Drivers\Dirs

3.       Edit BusEnum\BusEnum\Sources to:

a.       Delete DOSYSGEN=1

b.      Add RELEASETYPE=PLATFORM

c.       Change

SOURCELIBS=$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\DefBusLib.lib

To

SOURCELIBS=$(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\DefBusLib.lib

Because we want to link with defbuslib.lib that we are changing.

4.       Edit BusEnum\BusDef\Sources to:

a.      Add CDEFINES=$(CDEFINES) -DBUSENUM2=1

b.      Add RELEASETYPE=PLATFORM

5.       Copy Public\Common\OAK\inc\defbus.h to BusEnum\BusEnum

6.     Then Search for:

#ifdef BUSENUM2
...

#endif

In the Windows CE 6.0 example source and integrate only those changes into the Windows CE 5.0 source code that you copied in step 1. This is much easier than it may sound, so I won't detail those changes.

I did do a couple of things different; I put the defbus.h file in a different folder and I did not change the name of busdef.dll, so this drops in easier, but of course it doesn’t stand out that it is different.

After building and seeing that even with this new busdef in the OS that drivers still load. With success and the debug output, I looked through the drivers that had loaded and added keys the ones that I knew were not needed at initial system boot to the end of my platform.reg and set them to load after 10 seconds per the instructions in the whitepaper. The result was that the desktop was displayed about 2 seconds sooner.

So I cut down the time from reset to display of the desktop by about 2 seconds, not bad. I say not bad because I invested about 30 minutes in this over about an hour while I was also doing other things. Imagine if I spend a little more time on this and figured out which drivers could be loaded earlier, but could load asynchronously.

 

Note:  This article is written by Bruce Eitman, and is posted to the Embedded101 site with Bruce’s permission.

Copyright © 2010 – Bruce Eitman – All Rights Reserved

http://geekswithblogs.net/BruceEitman/

Embedded101 Articles

Click to Expand/Collapse Groups
Skip Navigation Links.
Collapse Windows Embedded Compact (CE)Windows Embedded Compact (CE)
Collapse Compact 7Compact 7
Build A Windows Network Projector wi...
Filter Device Drivers
Asynchronous I/O request support
Configure Flash Storage to Launch Co...
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
Collapse CE 6.0CE 6.0
Stream Driver with CEDriverWiz rev 0...
Connecting Visual Studio IDE to CE 6...
Windows CE: Save and Restore the Re...
Windows CE: Stream Interface Driver...
Windows CE: Persisting Registry Chan...
Windows CE: Enhanced BusEnum
Windows CE: Soft Reset
Windows CE: Reading a String from th...
Windows CE: Displaying Disk Informa...
Windows CE: Formatting TFAT
Windows CE: C# Application to Format...
Hive-Based Registry for CE 6.0
AutoLaunch for CE 6.0
Configure Flash Storage to Launch Co...
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
Collapse CE 5.0CE 5.0
Configure Flash Storage to Launch Co...
Collapse Platform Builder & OS DesignPlatform Builder & OS Design
Platform Builder: Automatically Flus...
Windows CE: Enhanced BusEnum
Windows CE: Soft Reset
Windows CE: Displaying Disk Informa...
Build A Windows Network Projector wi...
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
Collapse BSP, OAL & BootloaderBSP, OAL & Bootloader
Windows CE 6.0: User Mode KernelIoC...
Windows CE: Displaying Disk Informa...
Collapse RegistryRegistry
Platform Builder: Automatically Flus...
Windows CE: Save and Restore the Re...
Windows CE: Stream Interface Driver...
Windows CE: Persisting Registry Chan...
Windows CE: Reading a String from th...
Hive-Based Registry for CE 6.0
Collapse Device DriverDevice Driver
Stream Driver with CEDriverWiz rev 0...
Windows CE: Stream Interface Driver...
Windows CE: Enhanced BusEnum
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
Collapse File SystemFile System
Windows CE: Formatting TFAT
Windows CE: C# Application to Format...
Collapse Application DevelopmentApplication Development
Connecting Visual Studio IDE to CE 6...
Windows CE: Persisting Registry Chan...
Windows CE: Reading a String from th...
Windows CE: Formatting TFAT
Windows CE: C# Application to Format...
AutoLaunch for CE 6.0
Windows CE: Stream Interface Driver ...
IBW & ICE
Stream Driver with CEDriverWiz rev 0...
Connecting Visual Studio IDE to CE 6...
Platform Builder: Automatically Flus...
Windows CE: Save and Restore the Re...
Windows CE: Stream Interface Driver...
Windows CE: Persisting Registry Chan...
Windows CE: Enhanced BusEnum
Windows CE: Reading a String from th...
Windows CE: Displaying Disk Informa...
Windows CE: Formatting TFAT
Windows CE: C# Application to Format...
Build A Windows Network Projector wi...
Hive-Based Registry for CE 6.0
AutoLaunch for CE 6.0
Hello all
Filter Device Drivers
Asynchronous I/O request support
Configure Flash Storage to Launch Co...
CEDriverWiz Version 2.00 User Manual
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
CEDriverWiz Version 2.00: An Example
CEDriverWiz Version 2.00: Using the ...
Collapse Windows Embedded StandardWindows Embedded Standard
WES7
WES-2009
Windows XP Embedded
Target Designer
Enhanced Write Filter
Collapse NET Compact FrameworkNET Compact Framework
Windows CE: C# Application to Format...
Windows Phone 7
Misc.
Turkish porno izle video site in rokettubeporno izle