none
Error loading drivers RRS feed

  • Question

  • Hi all,

    for a couple of driver i receive errors with different codes:

    PID:00400002 TID:00A10006 ERROR! DEVMGR: Failed to load 'Drivers\BuiltIn\Camera1'. dwStatus=0x2
    PID:00400002 TID:00A10006 OSAXST1: >>> Loading Module 'backlight.dll' (0xC0420440) at address 0xEE3A0000-0xEE3A9000 in Process 'NK.EXE' (0x84A8FAD0)
    PID:00400002 TID:00A10006 ERROR! DEVMGR: Failed to load 'Drivers\BuiltIn\Backlight'. dwStatus=0x1
    PID:00400002 TID:00A10006 OSAXST1: <<< Unloading Module 'backlight.dll' (0xC0420440) at address 0xEE3A0000-0xEE3A9000 in Process 'NK.EXE' (0x84A8FAD0)

    What about this codes?

    SteMMo

    Friday, August 24, 2012 3:42 PM

Answers

  • The file in :\WINCE600\PLATFORM\COMMON\lib\ARMV4I\debug\backlight_common_fsl_v2.def is specific to Freescale BSP's while the file c:\WinCE700\public\common\oak\inc\backlight.def is MSFT specific since -from WINCE700- they introduced a 'standard' MDD/PDD layer for backlight stream interface driver. With  this model, by design, the backlight driver exports 'unnamed' entry points (Open vs. BKL_Open, etc):for the device manager to be aware of this you need to add

       "Flags"=dword:8                      ; DEVFLAGS_NAKEDENTRIES

    But what does your backlight.dll *actually* exports? You can check it running 'dumpbin /exports backlight.dll' from the Platform Builder console window.

    Are you porting the BSP or the driver from WINCE600 to WINCE700?


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com

    • Marked as answer by SteMMo Monday, August 27, 2012 12:46 PM
    Monday, August 27, 2012 11:49 AM

All replies

  • About the Camera1 driver, i found that there was not the 'Dll' file into the image, caused by an error on the platform.bib file.

    SteMMo

    Monday, August 27, 2012 7:52 AM
  • Typically error codes are not made up, rather they are picked up from the list of the 'system errors', in this case:

    1

    Incorrect function.

    ERROR_INVALID_FUNCTION

    2

    The system cannot find the file specified.

    ERROR_FILE_NOT_FOUND

    Probably the .dll specified in 'Drivers\BuiltIn\Camera1' is not present on your device (ERROR_FILE_NOT_FOUND); for 'backlight.dll' proably the DLL does not export all the required entry points or does not have a prefix in the registry.

    The device manager code is part of the shared source program so you can have a look to its code: you will notice that the error message is printed at the end of DWORD DeviceContent::LoadLib(LPCTSTR RegPath) in ...\WINCE700\private\winceos\COREOS\device\devcore\devinit.cpp.

    Searching for the two errors in that file and looking at the comments will point you to the right direction to solve the issue


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com

    Monday, August 27, 2012 8:07 AM
  • So far, I checked the exported functions: it has only some of the common functions: Close, Deinit, Init, IOControl, Open, as stated from the def file!

    I added the registry item:

    [HKEY_LOCAL_MACHINE\DebugZones]

    "DevMgr" = dword:00ffffff

    but i'm not receiving any additional messages ..


    SteMMo

    Monday, August 27, 2012 10:35 AM
  • Check the registry entries of the backlight.dll driver and the .def file (maybe you can also post them): there are only 2 places where the device manager fails loading with ERROR_INVALID_FUNCTION and the comments in ...\WINCE700\private\winceos\COREOS\device\devcore\devinit.cpp are pretty clear about the causes


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com

    Monday, August 27, 2012 10:40 AM
  • I did not change anything from the original driver.

    BTW:

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Backlight]
        "Dll" = "backLight.Dll"
        "Prefix" = "BKL"
        "Index" = dword:1
        "Order" = dword:3            ; After PMIC
        "IClass" = "{A32942B7-920C-486b-B0E6-92A702A99B35}" ; GUID for generic power-managed devices.

    Freescale changes the location and content of the def file: for WinCE600 it was c:\WINCE600\PLATFORM\COMMON\lib\ARMV4I\debug\backlight_common_fsl_v2.def and it exports all the common functions called BKL_*.

    For WinCE700 it is located in c:\WinCE700\public\common\oak\inc\backlight.def and exports only some functions without the BKL_ prefix.


    SteMMo

    Monday, August 27, 2012 11:15 AM
  • The file in :\WINCE600\PLATFORM\COMMON\lib\ARMV4I\debug\backlight_common_fsl_v2.def is specific to Freescale BSP's while the file c:\WinCE700\public\common\oak\inc\backlight.def is MSFT specific since -from WINCE700- they introduced a 'standard' MDD/PDD layer for backlight stream interface driver. With  this model, by design, the backlight driver exports 'unnamed' entry points (Open vs. BKL_Open, etc):for the device manager to be aware of this you need to add

       "Flags"=dword:8                      ; DEVFLAGS_NAKEDENTRIES

    But what does your backlight.dll *actually* exports? You can check it running 'dumpbin /exports backlight.dll' from the Platform Builder console window.

    Are you porting the BSP or the driver from WINCE600 to WINCE700?


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com

    • Marked as answer by SteMMo Monday, August 27, 2012 12:46 PM
    Monday, August 27, 2012 11:49 AM
  • Luca,

    thanks a lot.

    It was missing your registry item 'Flags' !!

    It was also missing from the original BSP by Freescale !!!!!

    Now i receive the message:

    PID:00400002 TID:00A10006 Backlight: required registry key MaxBrightness could not be read.

    I found this one in public\common\oak\drivers\backlight\mdd\backlight_mdd.cpp. Unfortunately this message can be generated by two lines:

    187 - but i think that is a typo: the code is checking REG_DXSUPPORT_VALUE

    208 - checking REG_MAXBRIGHTNESS_VALUE

    BTW: now i have to insert the required items into the registry

    My guess is that Freescale check poorly this driver!! I also changed a directive into 'source' file for the backlight driver, otherwise the compilation should be impossible :(

    Edit: i found a backlight_template.reg file so i can align my reg file


    SteMMo


    • Edited by SteMMo Monday, August 27, 2012 12:48 PM
    Monday, August 27, 2012 12:46 PM