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.

WEC7: SDK 2.00.00. - Having problems making NAND registry hive persistent in AM37XX BSP; Mistral EVM

Other Parts Discussed in Thread: AM3517

Team,

Having issues getting ROM only filesystem and persistent registry.  They have implemented all the mods per wiki article.  See notes below.  I saw similar post for AM35xx BSP and looked like the partial conclusion was how 'reset' was being done - cold or warm.

Does persistent registry ONLY work for warm reset?  If so, on Mistral EVM, what is the correct button?

We are currently trying to implement the ROM-only filesystem and a Persistent Registry, and are running into some issues.  I’ve implemented all of the changes on this webpage - http://processors.wiki.ti.com/index.php/Persistent_Registry_in_ARM-A8_BSP - and they compile OK and look like they are doing what they are supposed to.

 

Initially the BSP source was set to be a ROM-only filesystem and Hive-based Registry, but other settings interfered with that resulting in a RAM-ROM filesystem.  We have gotten the filesystem to be persistent, but the Registry remains elusive.  What we see is that the Registry is now located in the /Windows/Registry folder (in the persistent filesystem), but changes we make to it are not flushed, and so are lost on the next reboot.

 

An additional issue is that when we suspend and then wake-up the system, it doesn’t recover properly and we see many “Data Abort” Exceptions.  The unmodified BSP does recover properly, but it is running with a RAM-ROM filesystem.

 

Do you know if there are any late-breaking changes or patches that would address the issues that we are seeing here?

 

  • Marc

    When you say its ROM-only filesystem, what are you using for root file system? is it NAND? Do you have PRJ_ENABLE_REGFLUSH_THREAD enabled? What is the flushing interval? Are you waiting for that time interval before warm rebooting the system? It will only work for warm reboot because wince kernel mounts a new registry on cold reboot - it is not in BSP control. For Mistral EVM, its the WRM_RST button. if this doesnt work, can you write a small app that changes some registry and then forces a save using RegFlushKey (http://msdn.microsoft.com/en-us/library/ee490431.aspx). Now if you warm reboot, does the registry persist?

    I am not sure about the data abort on resume.

    About the default OS-design released by TI for WEC7 (02.00.00), we are using ROM-only file system and not RAM-ROM filesystem. RamDisk is used as root file system and when persistent registry is enabled, NAND or SD is used for persistent storage (but they are not mounted as root filesystem)

    -Madhvi

  • For the ROM-only filesystem, we are using the SD card as root.  I have PRJ_ENABLE_REGFLUSH_THREAD set, and using all the defaults, so 120 second flush interval.  I waited at least 3 minutes before rebooting.  I did not do a WARM reboot, did a power-cycle.  Is that the only way it will work?  We were expecting it to persist through a power-cycle (it does on our systems), but I will try the warm boot to see if that works.  (nope.)

     

    About the ROM-only filesystem – I guess it depends on what you mean by a ROM-only filesystem.  Out of the box, only the files saved on the Storage Card (SD in this case) would persist through a power-cycle, but everything else was in RamDisk, so if you copied something to the Windows folder, say, it would disappear on the next reboot.  That sounds like a RAM-ROM filesystem.  We’ve set the SD card stuff to be “MountAsBootable” and MountAsRoot”, while turning off those options for the RamDisk.  Now, you can save a file anywhere in the filesystem, and it will persist through a power-cycle.  Trying to get the registry to do that as well.

     

    We get the “Data Abort” Exceptions on resume on our systems as well, we were hoping you had an idea how to fix it.

     

    Thanks,

    -Gene

     

  • I am confused - you want registry to be saved to NAND or SD? If you want NAND, then NAND partition (Mounted Volume) should be marked as MountAsBootable. Where is the \Windows\Registry folder created?

    Try creating a debug build and check the logs - it usually gives a good amount of information wrt registry.

    With ROM-only filesystem, I was referring to the catalog setting. It means that we are not using ObjectStore as the root file system.

    -Madhvi

  • We are not using the NAND flash.  We are saving everything to the SD card.  \Windows\Registry is being saved to the SD card (I can yank it and look at it on my PC and there it is).  I'm looking for a utility that will let me explore the system.hv file to see if the changes I make are being saved.  Any ideas?

    In the meantime, I'll try the debug build to see if it offer any clues as to what's going on.

    -Gene

  • Sorry, I see what the confusion is here -- when I asked the question originally (by email), I didn't specify whether I was using NAND or SD, and Marc posted it here assuming I was using NAND.  I'm not using NAND at all, I'm saving everything to the SD card.  (SDHC actually)

    I've been looking for an editor or something to verify whether the registry is being saved to the SD card.  The only one that comes close to working is "CERegEditor".  I was able to load the system.hv file saved on the SD card once, and I could see, sort of, that a string value that I created was being saved.  This editor is either really buggy or the .hv file format has changed for WEC7, because most of the time it can't even open the files.

    In any case, since it appears that the changes are being saved on the SD card, it would tend to indicate that the registry is being wiped every time I boot, whether it is a cold boot or a warm boot.  Any way to turn that feature off?

    -Gene

  • Thanks for the clarification.

    I am not really sure at this point as to what is causing the registry to be wiped clean on warm reboot. Did the debug build help? Usually, it gives a reason as to why its mounting the reghive from scratch. If not, see if any of the debug zones/celog help. You could post this question in msdn forum to see if they can provide you with more insight.

    Btw, are you trying these changes on top of 02.00.00 as is or do you have any other custom changes? Are you using TI EVM or your custom board?

    Just curious, if you dont mount SD card as root filesystem (use NAND as root filesystem instead), but make SD card as the bootable filesystem (so that registry gets stored on SD card) and do all the changes mentioned on the wiki - does the registry persist?

    -Madhvi

  • OK, I have the registry persisting through cold or warm boot.  I had to change the line of code *pfClean = TRUE; to *pfClean = FALSE; in the function BSPIoCtlGetHiveCleanFlag() in platform/AM35x_BSP/src/oal/oallib/ioctl.c.  Apparently the idea is to wipe the registry on a cold boot.  I noticed that even on a warm boot, I would see the line ">>> Forcing cold boot (non-persistent registry and other data will be wiped) <<<", so perhaps some logic is always deciding to do a cold boot, so there is another issue ;-).  In any case, it's being wiped intentionally rather than just "not working".  We'll need some other logic here, since we want persistence through a cold boot.

    As an answer to your questions -- I am using the TI EVM board, yes it's 02.00.00 and WEC7, but I'm also adding some of our custom software to it in order to evaluate for our needs.

    Tried doing a debug build but it fails, probably due to some of our changes, and not willing to spend the time fixing it unless absolutely necessary.  Didn't try using the NAND yet, may not since I got this working.

    Thanks,

    -Gene

  • Gene

    I am surprised that you see the line ">>> Forcing cold boot (non-persistent registry and other data will be wiped) <<<" for warm reboot. Did you change the eboot code (OEMPredownload())?. The way it works is Eboot determines boot type (cold or warm) by reading the PRM_RSTST in OEMPreDownload and sets the coldBoot flag in pArgs. This is the EBOOT ARGS structure that is shared between eboot and kernel. In BSPIoCtlGetHiveCleanFlag(), it gets the coldBoot flag using OALArgsQuery(OAL_ARGS_QUERY_COLDBOOT). So to debug it further, you need to dump the PRM_RSTST register in OEMPreDownload to see why its classifying warm reboot as cold reboot. We dont see this issue on our EVM when we use the WRM_RST button.

    I agree that you will have to change the implementation of BSPIoCtlGetHiveCleanFlag for cold reboot.

    -Madhvi

  • This is exactly how we solved this issue:http://e2e.ti.com/support/embedded/f/353/t/141328.aspx ..... The problem is with the BSP

  • I am not sure I understood your solution. Also, can you please provide details on the "problem with the BSP"?

    Thanks

      Madhvi

  • I had to change the line of code *pfClean = TRUE; to *pfClean = FALSE; in the function BSPIoCtlGetHiveCleanFlag() in platform/AM35x_BSP/src/oal/oallib/ioctl.c.

    This how my issue was resolved.

  • Madhvi said:

    I am surprised that you see the line ">>> Forcing cold boot (non-persistent registry and other data will be wiped) <<<" for warm reboot. Did you change the eboot code (OEMPredownload())?

    No, I didn't touch the eboot code at all.  In fact, the SD card that the EVM came with does this as well.  

    -Gene

  • This is what I just did:

    Download and install BSP_WINCE_ARM_A8_02_00_00_AMDM37XX_Demo.exe from TI website. Copy MLO and EBOOTSD.nb0 from C:\TI\BSP_WINCE_ARM_A8_02_00_00\Demo_images\AMDM37XX\EBOOT_XLDR\hamming1Bit to a SD card. Boot up my 37xx EVM using this SD card (cold boot). Hit space to enter config menu in eboot. This time I do see the "Forcing cold boot" line on serial port. Then use WRM_RST (left most of the 3 buttons) button to do warm reboot. This time I dont see the cold reboot line. See log below. I dont know why your EVM is behaving any differently. Did you try another EVM?

    -Madhvi

     

    Texas Instruments Windows CE SD X-Loader for EVM 3730
    Built Aug  4 2011 at 12:28:13
    Version BSP_WINCE_ARM_A8 2.00.00.02
    open ebootsd.nb0 file
    Init HW: controller RST
    SDCARD: reqested speed 1000000, actual speed 1000000
    SDCARD: reqested speed 25000000, actual speed 19200000
    jumping to ebootsd image

    Microsoft Windows CE Bootloader Common Library Version 1.4 Built Aug  4 2011 12:24:00

    Texas Instruments Windows CE EBOOT for OMAP35xx/37xx, Built Aug  4 2011 at 12:28:04
    EBOOT Version 0.0, BSP BSP_WINCE_ARM_A8 2.00.00.02

    TI OMAP3730 Version 0x00000012 (ES1.2)
    TPS659XX Version 0x30 (ES1.3)
    System ready!
    Preparing for download...
    INFO: Predownload....
    Checking bootloader blocks are marked as reserved (Num = 14)

    INFO: Boot configuration found
    IsValidMBR: MBR sector = 0x380 (valid MBR)
    OpenPartition: Partition Exists=0x1 for part 0x20.

    >>> Forcing cold boot (non-persistent registry and other data will be wiped) <<<
    Hit space to enter configuration menu 5...
    Hit space to enter configuration menu 4...
    Hit space to enter configuration menu 3...
    Hit space to enter configuration menu 2...

    --------------------------------------------------------------------------------
     Main Menu
    --------------------------------------------------------------------------------
     [1] Show Current Settings
     [2] Select Boot Device
     [3] Select KITL (Debug) Device
     [4] Network Settings
     [5] SDCard Settings
     [6] Set Device ID
     [7] Save Settings
     [8] Flash Management
     [9] Enable/Disable OAL Retail Messages
     [a] Select Display Resolution
     [b] Select OPP Mode
     [0] Exit and Continue

     Selection:
    Texas Instruments Windows CE SD X-Loader for EVM 3730
    Built Aug  4 2011 at 12:28:13
    Version BSP_WINCE_ARM_A8 2.00.00.02
    open ebootsd.nb0 file
    Init HW: controller RST
    SDCARD: reqested speed 1000000, actual speed 1000000
    SDCARD: reqested speed 25000000, actual speed 19200000
    jumping to ebootsd image

    Microsoft Windows CE Bootloader Common Library Version 1.4 Built Aug  4 2011 12:24:00

    Texas Instruments Windows CE EBOOT for OMAP35xx/37xx, Built Aug  4 2011 at 12:28:04
    EBOOT Version 0.0, BSP BSP_WINCE_ARM_A8 2.00.00.02

    TI OMAP3730 Version 0x00000012 (ES1.2)
    TPS659XX Version 0x30 (ES1.3)
    System ready!
    Preparing for download...
    INFO: Predownload....
    Checking bootloader blocks are marked as reserved (Num = 14)

    INFO: Boot configuration found
    IsValidMBR: MBR sector = 0x380 (valid MBR)
    OpenPartition: Partition Exists=0x1 for part 0x20.
    Hit space to enter configuration menu 5...
    Hit space to enter configuration menu 4...
    Hit space to enter configuration menu 3...
    Hit space to enter configuration menu 2...

    --------------------------------------------------------------------------------
     Main Menu
    --------------------------------------------------------------------------------
     [1] Show Current Settings
     [2] Select Boot Device
     [3] Select KITL (Debug) Device
     [4] Network Settings
     [5] SDCard Settings
     [6] Set Device ID
     [7] Save Settings
     [8] Flash Management
     [9] Enable/Disable OAL Retail Messages
     [a] Select Display Resolution
     [b] Select OPP Mode
     [0] Exit and Continue

     Selection:

     

  • Gene,

    IOCTL_HAL_GET_HIVE_CLEAN_FLAG gives BSP a way to indicate when to clean HIVE registry. You can implemented based on your BSP's specific requirements.

    In case, you want to return FALSE from BSPIoCtlGetHiveCleanFlag() all the time, you can remove IOCTL_HAL_GET_HIVE_CLEAN_FLAG from ioctl_tab.h.

    Thanks,

    Tao

  • Two things:

    Thing 1 - My EVM board has only two buttons near the display, and a big old slide switch for power. The button on the right is marked "reset", which is the one I use.  The left one is unmarked and doesn't do anything.  Perhaps I have a different board which does not support warm start?  The box says "TMDSEVM3517-A".

    Thing 2 - I do want to clean the registry under certain circumstances, like doing a "factory reset", in case the user screws up the system somehow, though if we do our job correctly, they shouldn't be able to. ;-)  We'll figure out what logic to put in there. For the time being, I just needed to prove that it was capable.

    Thanks,

    -Gene

     

  • Gene,

    Unfortunately, none of the buttons is WARM reset. The only way to do WARM reboot on AM3517 EVM, is to boot through "Reboot" command. And this command only works when you boot from NAND. This is because of another hardware limitation we have with board.

    Thanks,

    Tao

  • Gene

    Another source of confusion was the wrong device and board type mentioned on this post title " AM37XX BSP; Mistral EVM".  We were providing guidance based on this information, whereas the actual board you have is a AM3517 developed by LogicPD and not Mistral. AM37XX and AM3517 are different devices.

    Anyways, we are glad your issue is resolved.


    -Madhvi

  • All,

    This was my mistake.  I put AM37xx/Mistral EVM when it should have been AM3517/LogicPD EVM.