Geeks With Blogs
Kate Moss' Open Space

The default root bus driver, BusEnum, enumerate and active drivers one by one in synchronized manner. It is not only slowing the boot time but in the even if any of driver's init function (XXX_init) get hanged, the whole system won't boot at all.
There is a sample of enhanced root bus driver, BusEnum2, on the
The page provides the sample code and the detail explanation of the design concept.
With multi-threaded BusEnum2 on CE7 with SMP enabled system, the scalability is even more significant. Since you have more than one processor and it can load drivers in parallel!

Everything looks good so far, except to there is a small bug in the sample code.
Fortunately, it is easy to fix. But hard to trace if you ever enc outer it!
The BUSENUM2 flag only defined in BUSENUM2\BUSDEF\sources but not in BUSENUM2\BUSENUM\sources.
The DeviceFolder is implemented in BUSENUM2\BUSDEF but the instance is created in BUSENUM2\BUSENUM\busenum.cpp, so the result is it allocates less memory than actual need.
into BUSENUM2\BUSENUM\sources and the problem fixed!

Posted on Wednesday, June 29, 2011 5:42 PM | Back to top

Comments on this post: BusEnum2 and a Minor Bug Fix

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Kate Moss' Open Space | Powered by: