none
NAND based hive registry is not persistent RRS feed

  • Question

  • Hi all,

      I am implementing hive registry in NAND on a WinCE 7 based freescale platform . Following is the registry setting i am using:

    ; HIVE BOOT SECTION

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\NAND_Flash]
        "Dll"="flashmdd.dll"
        "Order"=dword:0
        "FlashPddDll"="flashpdd_nand.dll"
        "Prefix"="DSK"
        "Ioctl"=dword:4
        "Profile"="NAND_Flash"
        "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"

        "FriendlyName"="NAND FLASH Driver"
        "Flags"=dword:1000

    ; Override names in default profile
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\NAND_Flash]
            "Name"="NAND FLASH"
            "Folder"="NAND Flash"
            "AutoMount"=dword:1
            "AutoPart"=dword:1
            "AutoFormat"=dword:1
            "PartitionDriver"="FLASHPART.dll"
            "DefaultFileSystem"="FATFS"
            
    ; Uncomment to autoload NAND FLASH driver before device manager.
    ; Needed if registry is stored in NOR. Eg persistent storage
    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\NAND_Flash]
           "DriverPath"="Drivers\\BuiltIn\\NAND_Flash"
           "Order"=dword:0
           "BootPhase"=dword:1
            
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\NAND_Flash\FATFS]
            "MountAsBootable"=dword:1
        
    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\ObjectStore]
        "Dll"="filesys.dll"
        "LoadFlags"=dword:1
        "BootPhase"=dword:1
        "MountPermanent"=dword:0
        "MountAsBootable"=dword:0
        "MountAsRoot"=dword:1
        
    [HKEY_LOCAL_MACHINE\init\BootVars]
            "SystemHive"="system.hv"
            "ProfileDir"=""
            "Flags"=dword:3
            "Start DevMgr"=dword:1
            ;"RegistryFlags"=dword:2
            
    ;[HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]
    ;    "SpawnThread"=dword:1
    ;    "FlushPriority256"=dword:FF
    ;    "FlushPeriod"=dword:7D0    

    ; END HIVE BOOT SECTION

    i added SYSGEN_FSREGHIVE and SYSGEN_FSRAMROM and gave clean sysgen. In my target platform, system.hv file is created in Nand flash folder. But if i change any settings in the target and rebooted the system, the changes are not saved. Please help me to solve this issue.

    Thanks and Regards,

    Sowmya

     

    Wednesday, September 26, 2012 7:21 AM

Answers

  • You've disabled the RegFlush service. Enable it:

    ; Auto registry flush settings

    ; Will flush every 1000 seconds on a seperate thread and will flush on every change (Activitythreadhold = 1)
    [HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]
        "SpawnThread"=dword:1
        "FlushPriority256"=dword:FF
        "ActivityThreshold"=dword:1
        "FlushPeriod"=dword:3E8


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    • Marked as answer by A.Sowmya Thursday, September 27, 2012 5:37 AM
    Wednesday, September 26, 2012 7:23 AM
    Moderator

All replies

  • You've disabled the RegFlush service. Enable it:

    ; Auto registry flush settings

    ; Will flush every 1000 seconds on a seperate thread and will flush on every change (Activitythreadhold = 1)
    [HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]
        "SpawnThread"=dword:1
        "FlushPriority256"=dword:FF
        "ActivityThreshold"=dword:1
        "FlushPeriod"=dword:3E8


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    • Marked as answer by A.Sowmya Thursday, September 27, 2012 5:37 AM
    Wednesday, September 26, 2012 7:23 AM
    Moderator
  • Hi Michel,

       Thank you for the quick reply. After adding the reg flush settings in my registry file iam getting the following exception:

    Windows CE Kernel for ARM (Thumb Enabled)
    PL310 ID = 0x410000c7
    L2 cache enabled
    OEMInit:  silicon rev = 0x10
    BoardID = 0xffff.
    WARN: OALKitlInit: KITL Disabled
    SMP support enabled
    -OEMInit
    +OEMMpStartAllCPUs
    Detected 4 CPUs
    -OEMMpStartAllCPUs
    PID:00400005 TID:00000016 OEMMpPerCPUInit:  CPU1 is running
    PID:00400003 TID:00000016 OEMMpPerCPUInit:  CPU2 is running
    PID:00400004 TID:00000016 OEMMpPerCPUInit:  CPU3 is running
    PID:00400002 TID:00510002 OALIoCtlHalInitRTC(2006/1/1 12:0:0.000)
    PID:00400002 TID:00510002 WARNING: SNVS was reset.
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48debd4, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48deb78, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48deb78, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48de3d8, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48de0bc, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48dec74, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48de958, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028
    PID:00400002 TID:00510002 Exception 'Data Abort' (0x4): Thread-Id=00510002(pth=c080262c), Proc-Id=00400002(pprc=83b7f5e0) 'NK.EXE', VM-active=00400002(pprc=83b7f5e0) 'NK.EXE'
    PID:00400002 TID:00510002 PC=80279d40(kernel.dll+0x0003cd40) RA=00000001(???+0x00000001) SP=c48df4b0, BVA=04280028

    i added the RegFlush registry setting as follows in my nand registry:

    ; HIVE BOOT SECTION

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\NAND_Flash]
        "Dll"="flashmdd.dll"
        "Order"=dword:0
        "FlashPddDll"="flashpdd_nand.dll"
        "Prefix"="DSK"
        "Ioctl"=dword:4
        "Profile"="NAND_Flash"
        "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"

        "FriendlyName"="NAND FLASH Driver"
        "Flags"=dword:1000

    ; Override names in default profile
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\NAND_Flash]
            "Name"="NAND FLASH"
            "Folder"="NAND Flash"
            "AutoMount"=dword:1
            "AutoPart"=dword:1
            "AutoFormat"=dword:1
            "PartitionDriver"="FLASHPART.dll"
            "DefaultFileSystem"="FATFS"
            
    ; Uncomment to autoload NAND FLASH driver before device manager.
    ; Needed if registry is stored in NOR. Eg persistent storage
    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\NAND_Flash]
           "DriverPath"="Drivers\\BuiltIn\\NAND_Flash"
           "Order"=dword:0
           "BootPhase"=dword:1
            
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\NAND_Flash\FATFS]
            "MountAsBootable"=dword:1
        
    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\ObjectStore]
        "Dll"="filesys.dll"
        "LoadFlags"=dword:1
        "BootPhase"=dword:1
        "MountPermanent"=dword:0
        "MountAsBootable"=dword:0
        "MountAsRoot"=dword:1
        
    [HKEY_LOCAL_MACHINE\init\BootVars]
            "SystemHive"="system.hv"
            "ProfileDir"=""
            "Flags"=dword:3
            "Start DevMgr"=dword:1
            ;"RegistryFlags"=dword:2
            
    [HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]
        "SpawnThread"=dword:1
        "FlushPriority256"=dword:FF
        "ActivityThreshold"=dword:1
        "FlushPeriod"=dword:3E80    

    ; END HIVE BOOT SECTION


    Thanks and Regards,

    Sowmya





    Wednesday, September 26, 2012 11:07 AM
  • Hi Michel,

       After adding "FormatTfat"=dword:1, hive registry started working.

    Thanks and Regards,

    Sowmya

    Wednesday, September 26, 2012 1:15 PM
  • That doesn't really make any sense. Your NAND probably needed a format, but then the flag AutoFormat should've worked even without the FormatTfat flag set to 1.

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Wednesday, September 26, 2012 9:46 PM
    Moderator