This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Persistent Hive on SD

Other Parts Discussed in Thread: OMAP3530

For reasons I won't go into I need to implement hive based persistent registry on the SD card. I am using A8_1.00.00.14 and testing on EVM3530. I had this sort of working under a much earlier release (using an eMMC device) but can't seem to get it functioning now on this release. I know the NAND based persistent registry is working fine but in my final design I will not have NAND so I removed the NAND driver from the catalog for this test.

I moved the sdhc, gpio,dma,TPX659XX and TPS659XX_gpio drivers all under the HIVE BOOT SECTION and set the flags to load in boot phase 1. Also moved the SDMemory class profiles under the HIVE BOOT SECTION, created the StorageManager\Profiles\SDMemory etc.etc.

I also set the various other registry values like MountAsBootable, MountAsRoot  and various others.

From the debug output I can see the SDHC driver initialize correctly, detect the card/Write Protect status etc. It sets clocks correctly detects the density (High capacity (2.0+)) etc. It is also choosing the correct SDMemory profile.  But then it crashes and never fully mounts the volume.

The best clue is this error line:

SDSynchronousBusRequest__X: Failed status 0xC0000014

SDMemDoBusRequest Failed: CMD17 returned API status 0xC0000014

Which I get multiple times just before it finally gives up.

I know the SD/MMC controller is working as I can several other CMDXX and responses earlier before I get to this point which is much later in the boot sequence.

I have only modified the platform.reg file which I can send if it would help.

  • Hi David,

    I am new to Windows CE programming and currently working on persistent registry for NAND.  In this post, you said you had NAND based persistent registry working.  Would you please show me how to do this?

    Thanks very much,

    Luan

  • David

    can you share your changes so that i can try it on my end?

    Thanks

     Madhvi

  • platform.reg included:

    1256.platform.reg.txt

    I created another enviroment variable BSP_PRJ_PERSIST_REG that you need to set. Also have the set IMGREGHIVE=1 in the batch file.

    I am thinking the OmapBus.reg may also need to be in the boot section but it does not build if I move it. I also expermented with some of the other settings but nothing helped.

     

  • Any progress on this issue? Were you able to duplicate the symptoms?

  • David

    I looked at your platform.reg and looks like you took care of most of the settings needed for persistent storage. Unfortunately, I haven't yet tried your platform.reg on my setup. You mentioned that there was some command-response between SD card and driver before the system got stuck. Is it possible for you to post that log?

    Thanks,
    Madhvi

     

     

  • Here is a debug dump. Might have somthing to do with block size?

    1460.SDpersistfail.txt

     

     

  • I am assuming because there has been no response, using peristent registry with the newest BSP on SD or eMMC will not be possible.

    This is ashame as I (along with others) first thought eMMC would be a good option for onboard bulk storage. No support for hive registry on an eMMC device is a real short comming. I guess there are other ways to do this but all are much harder to implement.

     

  • Hi David

    Sorry for the delayed response - we had holidays last week and hence haven't been able to test the scenario you are having issues with. We have not tested persistent storage with SD/eMMC so far in our BSP and hence don't have an immediate response for you. We do understand the importance of eMMC and its support in our BSP  - we will look into ways how to make it easy to integrate with our BSP.

    -Madhvi

     

     

  • Hi David

    I am not sure where you got the settings for SDMemory driver in platform.reg but this seems to be causing the problem. For OMAP35xx, the MSFT provided SDMemory driver is used and hence following should be used in platform.reg. I used these values and I was able to boot up and SD card was mounted as the root filesystem.

    -Madhvi

     

    ; SD Memory Storage class driver
    [HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]
       "Dll"="SDMemory.dll"
       "Prefix"="DSK"
       "BlockTransferSize"=dword:40  ; send no more than 64 blocks of data per bus transfer
       ;"SingleBlockWrites"=dword:1  ; alternatively force the driver to use single block access
       ;"IdleTimeout"=dword:7D0      ; 2000 milliseconds
       ;"IdlePowerState"=dword:2     ; 0 == D0, 1 == D1, etc.
       ;"DisablePowerManagement"=""  ; if value present, then disable (remove value to enable)

       "Profile"="SDMemory"
       "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
                         "{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
       "Flags"=dword:00001000                    

    ; SDHC Memory Storage class driver
    [HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class\High_Capacity]
       "Dll"="SDMemory.dll"
       "Prefix"="DSK"
       "BlockTransferSize"=dword:40  ; send no more than 64 blocks of data per bus transfer
       ;"SingleBlockWrites"=dword:1  ; alternatively force the driver to use single block access
       ;"IdleTimeout"=dword:7D0      ; 2000 milliseconds
       ;"IdlePowerState"=dword:2     ; 0 == D0, 1 == D1, etc.
       ;"DisablePowerManagement"=""  ; if value present, then disable (remove value to enable)

       "Profile"="SDMemory"
       "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
                         "{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
       "Flags"=dword:00001000

  • Madhvi, Thank you for the reply.

    I will try again. I do remember trying with both the MS and TI (SDMemory.dll and omap_sdmemory.dll) with the same failed results.

    Are you using the A8_1.00.00.14 BSP?

    I noticed it worked with the 6.15 TI release but not with the Unified BSP.

  • I tried several more times with same failed results.

    Steps to reproduce (using 3430 EVM):

    1) Install A8_1.00.00.14 BSP (EVM_OMAP3530)

    2) Install standard OSdesign EVM_3530 (distributed with BSP)

    3) Unselect NAND driver and Camera driver from catalog

    4) Persistent Hive Registry Storage selected from BSP Kernel features catalog

    5) set IMGREGHIVE=1 in EVM_OMAP3530.bat

    6) Replace platform.reg with modified version from above attachment.

    7) Create new enviroment variable BSP_PRJ_PERSIST_REG and set to 1

    8) Rebuild and download.

    Even with SDmemory.dll instead of omap_sdmemory.dll and IdlePowerState commented out I am still seeing the failure.

    I have another OSdesign with all the DSP,codec and several other nonessential components removed (just to get the image size down) which I do a debug build with. Same failure. Also tried with several different SD cards ...no difference.

    ???

     

  •  

    DavidVescovi said:

    I tried several more times with same failed results.

    Steps to reproduce (using 3430 EVM):

    1) Install A8_1.00.00.14 BSP (EVM_OMAP3530)

     

    [Madhvi] same here

     

    DavidVescovi said:

    2) Install standard OSdesign EVM_3530 (distributed with BSP)

    3) Unselect NAND driver and Camera driver from catalog

     

    [Madhvi]I didnt deselect camera but that shouldnt make a difference here. For NAND, I just commented out the inclusion of nand.reg from platform.reg

     

    DavidVescovi said:

    4) Persistent Hive Registry Storage selected from BSP Kernel features catalog

    5) set IMGREGHIVE=1 in EVM_OMAP3530.bat

     

    [Madhvi]I didnt do these 2 steps as this variable is not needed for SD card. I just enabled PRJ_ENABLE_REGFLUSH_THREAD in EVM_OMAP3530.bat

     

    DavidVescovi said:

    6) Replace platform.reg with modified version from above attachment.

    7) Create new enviroment variable BSP_PRJ_PERSIST_REG and set to 1

    8) Rebuild and download.

    Even with SDmemory.dll instead of omap_sdmemory.dll and IdlePowerState commented out I am still seeing the failure.

    I have another OSdesign with all the DSP,codec and several other nonessential components removed (just to get the image size down) which I do a debug build with. Same failure. Also tried with several different SD cards ...no difference.

     

    [Madhvi] I am using sandisk 2GB card and the default OS-design that comes with the drop. I have attached the platform.reg I am using. In addition to this I have enabled only PRJ_ENABLE_REGFLUSH_THREAD in EVM_OMAP3530.bat. Here is the boot-up log section where it mounts SD card for bootable filesystem.

     

    4251.sdcard_persistent_storage.txt

    6443.platform.reg.txt

  • Don't know what is going on. Followed your directions and also replaced my platform.reg with yours and rebuilt.

    2844.SD Persist fail.txt

  • David

    Look at this post and see if you can take some help from here.

    http://e2e.ti.com/support/embedded/f/353/p/80174/284030.aspx#284030

    -Madhvi

     

  • Madhvi:

    Well I was finally able to get rid of the SDSynchronousBusRequest__X: error by including the omapBus.reg driver in the HIVE BOOT SECTION also.

    How you got your version to work without it I do not know.

    The early boot phases are now working and I can see the SD file system mount and the initial paths created and hive registry files created and stored on the SD card.

    The problem now is after GWES starts none of the remaining drivers load and I get a "servicessd.exe encountered a serious error" message on the screen.

    I am using a small OSDESIGN to test which only uses the USB host (w/HID) and USB device (Activesync) in addition to only the other essential drivers (GPIO etc.).

    again the image boots and works just fine if I do no define the BSP_SAVEREGISTRY_SD enviroment variable.

    platform.reg:

    0045.platform.reg.txt

    debug:

    6305.debug sd persist.txt

    The problem area:

     FILESYS: Launching explorer.exe
    AddToProcessInputLocaleTable: Added process to ProcessInputLocale table, hProces
    s = 0x01FD0002FILESYS: Launching servicesStart.exe
    Initializating services for Services.exe
    DEVICE!RegReadActivationValues RegQueryValueEx(Services\Prefix) returned 2
    DEVICE!RegReadActivationValues RegQueryValueEx(Services\BusPrefix) returned 2
    DEVICE!RegReadActivationValues RegQueryValueEx(Services\LPCD\BusPrefix) returned
     2
    FILESYS: Done launching apps
    -DEVICE!DevloadPostInit
    This device has booted 1 times !!!
    hello servicesd.exe $services_0002
    FSDMGR!MountTable_t::RegisterVolumeName: Registered "$services_0002" at index 8A
    PISCreateAPIHandle: pvData == NULL
    FSDMGR!MountTable_t::RegisterVolume: Registered volume at index 8 (Name="$servic
    es_0002", MountFlags=0x101)!!DecodeAPI: Invalid API: iApiSet = 00000053 'NONE',
    iMethod = 0000001c
                      SetupErrorReturn: Raising exception because of invalid argumen
    t
    ObjectCall: returning 8006456c
    Exception 'Raised Exception' (-1): Thread-Id=00ea0006(pth=9da0c000), Proc-Id=00b
    80006(pprc=9db3aedc) 'servicesd.exe', VM-active=00b80006(pprc=9db3aedc) 'service
    sd.exe'
    PC=402e2d70(ws2.dll+0x00002d70) RA=80063ea4(kernel.dll+0x00019ea4) SP=0607f584,
    BVA=00000000
    RtlDispatchException: returning failure. Flags=1

    Unhandled exception c000001c:
    Terminating thread 9da0c000
    Secondary thread in proc 00b80006 faulted, Exception code = c000001c, Exception
    Address = 402e2d70!
    AddToProcessInputLocaleTable: Added process to ProcessInputLocale table, hProces
    s = 0x00B80006DlgMgr: FindDlgItem id 1 returning NULL.
    DeviceFolder::LoadDevice(Services\LPCD) last 161 TicksDEVICE!RegReadActivationVa
    lues RegQueryValueEx(Services\DCOMSSD\BusPrefix) returned 2
    DEVICE!RegReadActivationValues RegQueryValueEx(Notify\BusPrefix) returned 2
    udevice.exe $udevice_0003

    Any ideas? My guess is the servicesd uses the file system also and for some reasion the API is not being signaled as ready??