none
CE 6.0 (x86): GWES fails to initialize the video driver dll RRS feed

  • Question

  • I am using Win CE 6.0 and my BSP is based off of CEPC BSP. We have XGI Volari Z9M PCI based VGA card on our target.  The vendor provided a CE 6.0 driver dll (ddi_xgi.dll) binary file. I followed the typical method of adding a 3rd party driver in Win CE by first adding the appropriate registry in platform.reg:

    IF BSP_DISPLAY_XGIZ9M
    [HKEY_LOCAL_MACHINE\System\GDI\DisplayCandidates] "Candidate3"="Drivers\\BuiltIn\\PCI\\Instance\\XGI" [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\XGI] "DisplayDll"="ddi_xgi.dll" "Class"=dword:03 "SubClass"=dword:00 "ProgIF"=dword:00 "VendorID"=multi_sz:"18ca","18ca","18ca" "DeviceID"=multi_sz:"0020","0021","0027" [HKEY_LOCAL_MACHINE\System\GDI\Drivers] "Display"="ddi_xgi.dll" [HKEY_LOCAL_MACHINE\Drivers\Display\XGI] "BITDEPTH"=dword:20 "WIDTH"=dword:400 "HEIGHT"=dword:300 "REFRESH"=dword:3c "DALRULE_CRTSupportsAllModes"=dword:1 "TARGETDelay"=dword:3 [HKEY_LOCAL_MACHINE\System\GWE] "PORepaint"=dword:2 [HKEY_LOCAL_MACHINE\Drivers\Display] ;3 - LVDS 32bpp "ModeNumber"=dword:3 ;12 - VGA 1024x768x32x60 "ModeNumber"=dword:12
    ENDIF BSP_DISPLAY_XGIZ9M


    then adding the entry in platform.bib:

    ; @CESYSGEN IF CE_MODULES_DISPLAY
    
    	; Include XGI Volari Z9M Display Driver
    	IF BSP_DISPLAY_XGIZ9M
    		ddi_xgi.dll         $(_FLATRELEASEDIR)\ddi_xgi.dll            	NK SHK
    	ENDIF BSP_DISPLAY_XGIZ9M
    	
    ; @CESYSGEN ENDIF CE_MODULES_DISPLAY


    and finally setting the following variable(s) in myBSP.bat:

    @REM For EPM-V4E (XGI Volari Z9M)
    set BSP_DISPLAY_XGIZ9M=1
    set BSP_DISPLAY_FLAT=

    I then added the following in  MyOSDesign->Custom Build Actions->Pre-Make:

    copy %_WINCEROOT%\3rdParty\XGIZ9M\ddi_xgi.dll %_FLATRELEASEDIR%\ddi_xgi.dll

    After Building the BSP and OS Image, booting NK.bin (debug) gives the following output on Serial Port 1:

     

    FILESYS: Launching gwes.dll
    Filesys: Loaded gwes.dll
    Ceddk!CalibrateStallCounter: Enter
    Ceddk!CalibrateStallCounter: Stall counter loaded from registry(35)
    System Default HKL value set to 00000409
                                            Grow Gdi handle table from 0 to 64
                                                                              LogFontFromRegistry(SYSTEM\GDI\SysFnt), lfHeight = -12Exception 'Access Violation' (14): Thread-Id=051f0'
    PC=d37e3f0f(ddi_xgi.dll+0x00003f0f) RA=d37e7d63(ddi_xgi.dll+0x00007d63) SP=d37bf03c, BVA=00007080
    *** FAILED TO INITIALIZE DISPLAY DRIVER (ddi_xgi.dll)! ***
    *** MAKE SURE DISPLAY DRIVER CONFIGURATION SETTINGS ARE CORRECT! ***
    Unknown: DEBUGCHK failed in file D:\Dublin2-14\private\winceos\COREOS\gwe\mgdi\base\.\driver.cpp at line 118 
    DEBUG_BREAK @c01a57d3 Ignored.
    Unknown: DEBUGCHK failed in file D:\Dublin2-14\private\winceos\COREOS\gwe\mgdi\base\.\driver.cpp at line 121 
    DEBUG_BREAK @c01a5809 Ignored.
    *** ATTEMPTING TO LOAD DISPLAY DRIVER DDI.DLL! ***
    *** COULD NOT LOAD DISPLAY DRIVER (DDI.DLL)! ***
    *** ATTEMPTING TO LOAD DISPLAY DRIVER DDI_NOP.DLL! ***
    *** COULD NOT LOAD DISPLAY DRIVER (DDI_NOP.DLL)! ***
    *** GWES FAILED TO LOAD A DISPLAY DRIVER!!! PREPARE FOR MAYHEM!!! ***
    Unknown: DEBUGCHK failed in file D:\Dublin2-14\private\winceos\COREOS\gwe\mgdi\base\.\gdi.cpp at line 2635 
    DEBUG_BREAK @c01c990e Ignored.
    Coredll: DEBUGCHK failed in file d:\yzkiqfe\private\winceos\coreos\core\dll\cscode.c at line 169 
    DEBUG_BREAK @c004bf29 Ignored.
    Exception 'Access Violation' (14): Thread-Id=051f0002(pth=835082d4), Proc-Id=00400002(pprc=8204bca0) 'NK.EXE', VM-active=00400002(pprc=8204bca0) 'NK.EXE'
    PC=c020756f(gwes.dll+0x0009756f) RA=c02074fb(gwes.dll+0x000974fb) SP=d37bfb80, BVA=00000104
    Eax=00000000 Ebx=00000000 Ecx=d37d06c0 Edx=d37d06c0
    Esi=00000000 Edi=00000000 Ebp=d37bfb88 Esp=d37bfb80 Eip=c020756f
    CS=0019 DS=d37d0040 ES=c0050040 SS=0021 FS=d37b0060 GS=0000
    URtlDispatchException: returning failure. Flags=0
    
    Unhandled exception c0000005:
    Terminating thread 835082d4
    Secondary thread in proc 00400002 faulted, Exception code = c0000005, Exception Address = c020756f!
    Terminating Thread 051f0002
    achedVolume_t::WriteBackThread starting, pVolume=0xd0ad04a0
    [NOTIFY] HandleSystemEvent 5 none
    FSDMGR!StoreDisk_t::MountStore: Opened the store "DSK4:" hStore=0xD2D1C780
    FSDMGR!StoreDisk_t::MountStore: Geometry: NumSec=0 BytesPerSec=0 FreeSec=0 BiggestCreatable=0
    Partition PART01 NumSectors=39996
    FSDMGR!StoreDisk_t::LoadPartition: mounting partition "PART01" on store "DSK4:"FSDMGR!ParitionDisk::LoadPartition: Partition Type 0x00 --> "MSIFS_CD"
    FSDMGR!DetectorState_t::RunDetector - UDFS.DLL::UDF_RecognizeVolume GUID={1DFE4CC8-525B-4613-BA79-8FB510950BDD}
    UDFSFS!UDFSMain: DLL_PROCESS_ATTACH
    UDFSFS!UDFSMain: DLL_PROCESS_DETACH
    FSDMGR!DetectorState_t::RunDetector - CDFS.DLL::CDFS_RecognizeVolume GUID={0B1005CD-3940-4563-829C-61D68521D}
    FSDMGR!ParitionDisk::LoadPartition: DetectFileSystem failed; error=30
    FSDMGR!StoreDisk_t::MountPartition: mounting partition "PART01" on store "DSK4:"FSDMGR!ParitionDisk::LoadPartition: Partition Type 0x00 --> "MSIFS_CD"
    FSDMGR!DetectorState_t::RunDetector - UDFS.DLL::UDF_RecognizeVolume GUID={1DFE4CC8-525B-4613-BA79-8FB510950BDD}
    UDFSFS!UDFSMain: DLL_PROCESS_ATTACH
    UDFSFS!UDFSMain: DLL_PROCESS_DETACH
    FSDMGR!DetectorState_t::RunDetector - CDFS.DLL::CDFS_RecognizeVolume GUID={0B1005CD-3940-4563-829C-61D68521D}
    FSDMGR!ParitionDisk::LoadPartition: DetectFileSystem failed; error=30
    CDisk::SetDiskPowerState> Power state (1) not supported


    Looks like the OS image did boot fine and is very much alive but there is no video output because GWES failed to load the driver. Any ideas what am I doing wrong here?

     

    Friday, September 16, 2011 12:06 AM

All replies

  • Well it looks like the code in the device driver is triggering an exception:Exception 'Access Violation' (14): Thread-Id=051f0'
    PC=d37e3f0f(ddi_xgi.dll+0x00003f0f) RA=d37e7d63(ddi_xgi.dll+0x00007d63) SP=d37bf03c, BVA=00007080.

    Without the code or the map file is difficult to understand what's happening (although you can set a breakpoint in DrvEnableDriver and follow the assembly): maybe you have some missing or wrong registry value which makes the driver crash


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Friday, September 16, 2011 12:45 PM
  • The registry settings were provided by the driver vendor. I just modified the "ModeNumber" value based on my display resolution which should not cause the driver failure.  Is there any resource explaining the DrvEnableDriver breakpoint method since I have never used it before.
    Friday, September 16, 2011 4:33 PM
  • See this blog Post for details about setting a breakpoint when you have no source code:http://blogs.msdn.com/b/ce_base/archive/2005/11/30/tips-for-using-breakpoints.aspx


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Friday, September 16, 2011 5:04 PM