emb315 non-volatile object store and hive based registry design for windows ce rick austin principle...

35
EMB315 EMB315 Non-Volatile Object Non-Volatile Object Store And Hive Based Store And Hive Based Registry Design For Registry Design For Windows CE Windows CE Rick Austin Rick Austin Principle Engineer Principle Engineer Intermec Corporation Intermec Corporation

Upload: hollie-lane

Post on 26-Dec-2015

222 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

EMB315EMB315

Non-Volatile Object Store Non-Volatile Object Store And Hive Based Registry And Hive Based Registry Design For Windows CEDesign For Windows CE

Rick AustinRick AustinPrinciple EngineerPrinciple EngineerIntermec CorporationIntermec Corporation

Page 2: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation
Page 3: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

MManagementanagementTToolsools

CCommunicationsommunications& & MMessagingessaging

Device Update Agent

Software Update Services

Live Communications Server

Exchange Server

Internet Security and Acceleration Server

Speech Server

Image Update

LLocation ocation SServiceservices

MMultimediaultimedia

MapPoint

DirectX

Windows Media

Visual Studio 2005DDevelopment evelopment TToolsools

MFC 8.0, ATL 8.0

Win32NNativeative

MManagedanaged

SServer erver SSideide

LLightweightightweight

RRelationalelationalSQL Server 2005 Express EditionEDB

DDa

taata

PPro

gra

mm

ing

ro

gra

mm

ing

MM

od

el

od

el

DDevice evice BBuilding uilding TToolsools

HHardware/ardware/DDriversrivers

Windows XP DDK

Windows Embedded Studio

Platform Builder

OEM/IHV SuppliedBSP

(ARM, SH4, MIPS)OEM Hardware and Standard Drivers

Standard PC Hardware and Drivers

SQL Server 2005SQL Server 2005 Mobile Edition

ASP.NET Mobile Controls ASP.NET

.NET Compact Framework .NET Framework

Microsoft Operations Manager

Systems Management Server

Page 4: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

HistoryHistory

RAM Registry RAM Registry SYSGEN_FSREGRAM SYSGEN_FSREGRAM

Most Common Implementation in PDAsMost Common Implementation in PDAs

Content Loss on bootContent Loss on boot

Save And Restore Methods require difficult codeSave And Restore Methods require difficult codepReadRegistryFromOEMpReadRegistryFromOEM

pWriteRegistryToOEMpWriteRegistryToOEM

RAM Object store RAM Object store SYSGEN_FSRAMROM SYSGEN_FSRAMROM

most common denominator for application developmentmost common denominator for application development

Object Store Volume is always mountedObject Store Volume is always mounted

Object Store is the Root of the file system Object Store is the Root of the file system

Content Loss on cold boot Content Loss on cold boot

Object Store and Executable Memory TradeoffObject Store and Executable Memory TradeoffFSRAMPERCENT FSRAMPERCENT

SetSystemMemoryDivision()SetSystemMemoryDivision()

RAM Object store limited to 256 MB RAM Object store limited to 256 MB

Page 5: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Persistence BenefitsPersistence Benefits

Simplifies Cold Boot System startup Simplifies Cold Boot System startup Data and Configuration is permanentData and Configuration is permanent

Install applications onceInstall applications once

Reduce Data Reduce Data Backup/Restore RequirementBackup/Restore Requirement

Eliminate Redundant Data Eliminate Redundant Data storage Requirementstorage Requirement

Reduce Cold Boot TimesReduce Cold Boot Times

No Limit On Object Store SizeNo Limit On Object Store Size

Page 6: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Persistence BenefitsPersistence Benefits

Better Power ManagementBetter Power ManagementReduce/Remove Backup Battery needsReduce/Remove Backup Battery needs

Increase Battery run time Increase Battery run time

Lower RAM requirements = Lower PowerLower RAM requirements = Lower Power

Easy to ImplementEasy to ImplementLargely Transparent to current AppsLargely Transparent to current Apps

Mainly Simple Registry Setup RequiredMainly Simple Registry Setup Required

Lower Cost systemsLower Cost systemsFlash is cheaper than RAM for Data StoreFlash is cheaper than RAM for Data Store

Page 7: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Boot Phase DefinitionsBoot Phase Definitions

0 = Prior to init of locale (wince.nls)0 = Prior to init of locale (wince.nls)

1 = After locale init (wince.nls) but 1 = After locale init (wince.nls) but before registry is functional before registry is functional

2 = After registry is functional2 = After registry is functional

Page 8: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

File System FundamentalsFile System Fundamentals

Autoload file systemsAutoload file systemsHKLM\System\StorageManager\AutoLoad HKLM\System\StorageManager\AutoLoad

Do not need block driversDo not need block drivers

Don’t require Device.exeDon’t require Device.exe

Loaded by Storage ManagerLoaded by Storage Manager

Can Start in BootPhase 0 or 1Can Start in BootPhase 0 or 1

Can Load Synchronously or AsynchronouslyCan Load Synchronously or Asynchronously[HKLM\System\StorageManager\Autoload\<your file [HKLM\System\StorageManager\Autoload\<your file

system>]system>]

““BootPhase” = dword:0BootPhase” = dword:0

““LoadFlags” = dword:0 LoadFlags” = dword:0 ;Async (default);Async (default)

;Sync = 1;Sync = 1

Page 9: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

File System FundamentalsFile System Fundamentals

Block Driver Based File SystemsBlock Driver Based File SystemsLoaded By Device.exeLoaded By Device.exe

IClass indicates its managed by storage IClass indicates its managed by storage manager {A4E7EDDA-E575-4252-9D6B-manager {A4E7EDDA-E575-4252-9D6B-4195D48BB865}4195D48BB865}

Specifies partition and File system driversSpecifies partition and File system drivers

Must Start in Bootphase 1Must Start in Bootphase 1

HKLM\Drivers\Builtin\<your block device>HKLM\Drivers\Builtin\<your block device>

“ “BootPhase” = dword:1BootPhase” = dword:1

Page 10: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Hive FundamentalsHive Fundamentals

Hives are registry files stored on Hives are registry files stored on persistent file systemspersistent file systems

Boot HiveBoot HiveChanges made during boot are copied to Changes made during boot are copied to system hivesystem hive

Default Hive / System HiveDefault Hive / System HiveSystem Data (HKLM, HKCR, HKU)System Data (HKLM, HKCR, HKU)

User HiveUser HiveUser Data (HKCU)User Data (HKCU)

Allows settings for different users at logonAllows settings for different users at logon

Only Deltas are storedOnly Deltas are stored

Page 11: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Hive FundamentalsHive Fundamentals

The kernel starts Filesys.exeThe kernel starts Filesys.exeFilesys loads the Boot Hive from the ROM ImageFilesys loads the Boot Hive from the ROM ImageFilesys may start Device.exe to gain access to Filesys may start Device.exe to gain access to system hivesystem hive

Device.exe starts block drivers based on the boot registryDevice.exe starts block drivers based on the boot registry

The boot file system is initialized based on The boot file system is initialized based on registry keysregistry keysFilesys loads and mounts system registryFilesys loads and mounts system registryThe Kernel initializes using the system registryThe Kernel initializes using the system registryThe Kernel signals FilesysThe Kernel signals FilesysFilesys.exe starts applications (Launch Keys)Filesys.exe starts applications (Launch Keys)

Device.exe is loaded if not already loaded Device.exe is loaded if not already loaded Filesys.exe signals BootPhase2 eventFilesys.exe signals BootPhase2 eventDevice.exe then re-enumerates, starting drivers Device.exe then re-enumerates, starting drivers

Page 12: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Hive FundamentalsHive Fundamentals

[HKLM\init\BootVars][HKLM\init\BootVars]"SystemHive"="<system hive path>” "SystemHive"="<system hive path>” "Start DevMgr"=dword:<your value>"Start DevMgr"=dword:<your value>

;0 = don’t start;0 = don’t start ;;1 = Start1 = Start

““Default User”=“<username>”Default User”=“<username>”““ProfileDir”= <path>ProfileDir”= <path>““Flags” = dword:3 Flags” = dword:3

;Bit 0 = start storage manager ;Bit 0 = start storage manager

;Bit 1 = start device manager ;Bit 1 = start device manager

““RegistryFlags”=dword:<your value>RegistryFlags”=dword:<your value>;1 = enables aggressive flushing;1 = enables aggressive flushing;0 = default behavior;0 = default behavior

Page 13: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Hive ImplementationHive Implementation

Select Catalog ComponentsSelect Catalog ComponentsHive Based Registry support Hive Based Registry support

(SYSGEN_FSREGHIVE)(SYSGEN_FSREGHIVE)

Storage Manager ComponentsStorage Manager ComponentsSYSGEN_STOREMGRSYSGEN_STOREMGR

FAT (SYSGEN_FATFS) ?FAT (SYSGEN_FATFS) ?

TFAT (SYSGEN_TFAT) ? TFAT (SYSGEN_TFAT) ?

Partition Driver (SYSGEN_MSPART) ? Partition Driver (SYSGEN_MSPART) ?

Components required depends on boot deviceComponents required depends on boot deviceSee Examples See Examples

Mike Hall
Which Samples - where ?
Page 14: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Hive ImplementationHive Implementation

Define Registry Hive Boot SectionsDefine Registry Hive Boot SectionsDefine the drivers and other system Define the drivers and other system components required to start the system components required to start the system and access the boot media. and access the boot media.

Wrap all boot hive registry entries in the Wrap all boot hive registry entries in the following commentsfollowing comments

;Hive Boot Section;Hive Boot Section

<registry settings><registry settings>

;End Hive Boot Section;End Hive Boot Section

Common.reg has default definitions Common.reg has default definitions

Page 15: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Hive Implementation Hive Implementation

Prevent device.exe from loading drivers twicePrevent device.exe from loading drivers twice[HKLM\Builtin\drivers\...][HKLM\Builtin\drivers\...]

““Flags”=dword:1000Flags”=dword:1000

Analyze the File system components required Analyze the File system components required to load the device used to store the hivesto load the device used to store the hivesDoes it need partitioning or format?Does it need partitioning or format?Beware of drivers that use IsAPIReady()Beware of drivers that use IsAPIReady()Enable Additional Debug Zones Enable Additional Debug Zones

[HKCU\Pegasus\Zones][HKCU\Pegasus\Zones] "FileSys" = dword:20"FileSys" = dword:20

Page 16: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Hive Implementation Hive Implementation

Indicate System Registry LocationIndicate System Registry Location[HKLM\System\StorageManager\Profiles\<ProfileName>\[HKLM\System\StorageManager\Profiles\<ProfileName>\<FileSystemName>]<FileSystemName>]

"MountFlags"=dword:2"MountFlags"=dword:2

oror

““MountAsBootable”=dword:1MountAsBootable”=dword:1

Page 17: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Hive ImplementationHive Implementation

Implement Registry FlushingImplement Registry FlushingSuspend/Resume/PowerDown Flushing is Suspend/Resume/PowerDown Flushing is automatic if power aware (more later)automatic if power aware (more later)

Do one or more of the followingDo one or more of the followingEnable Aggressive FlushingEnable Aggressive Flushing[HKLM\init\BootVars][HKLM\init\BootVars]

““RegistryFlags"=dword:1RegistryFlags"=dword:1

RegFlushKey() during power downRegFlushKey() during power down

Enable Lazy Flushing Environment Variable at Enable Lazy Flushing Environment Variable at build timebuild time

PRJ_ENABLE_REGFLUSH_THREAD PRJ_ENABLE_REGFLUSH_THREAD

Page 18: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Persistent Object StorePersistent Object Store

Select the Catalog ComponentsSelect the Catalog ComponentsSelect ROM-Only File System from Select ROM-Only File System from Catalog (SYSGEN_FSROMONLY)Catalog (SYSGEN_FSROMONLY)

Select Storage Manager Components Select Storage Manager Components from Catalogfrom Catalog

SYSGEN_STOREMGRSYSGEN_STOREMGR

FAT (SYSGEN_FATFS) ? FAT (SYSGEN_FATFS) ?

FAT (SYSGEN_TFAT) ?FAT (SYSGEN_TFAT) ?

Partition Driver (SYSGEN_MSPART) ? Partition Driver (SYSGEN_MSPART) ?

Page 19: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Persistent Object StorePersistent Object Store

Mount Root File SystemMount Root File System[HKLM\System\StorageManager\Profiles\[HKLM\System\StorageManager\Profiles\<Your File System>]<Your File System>]

““MountAsRoot” = dword:1MountAsRoot” = dword:1

Page 20: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Persistent Object Store Persistent Object Store

Update FSRAMPERCENT in Config.bibUpdate FSRAMPERCENT in Config.bibDefaults to 0x80808080 if not setDefaults to 0x80808080 if not set

Set FSRAMPERCENT to >= 32KB Set FSRAMPERCENT to >= 32KB

Still need some RAM for Object Store Still need some RAM for Object Store OperationsOperations

Recycle BinRecycle Bin

Copy OperationsCopy Operations

Manage Stack and Memory HeapManage Stack and Memory Heap

Compress and Expand FilesCompress and Expand Files

*pOEMCalcFSPages() *pOEMCalcFSPages()

Page 21: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Exploring A Exploring A Persistent SystemPersistent System

Page 22: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

iPSM ExampleiPSM Example

; This registry setting indicates the PSM contains the registry and sets PSM ; This registry setting indicates the PSM contains the registry and sets PSM ; to load in the first boot phase with the boot registry. ; to load in the first boot phase with the boot registry.

[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\PSM][HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\PSM] "Dll"="PSMFSD.dll""Dll"="PSMFSD.dll" "Paging"=dword:1"Paging"=dword:1 "LoadFlags"=dword:1"LoadFlags"=dword:1 "MountFlags"=dword:2"MountFlags"=dword:2 "Flags"=dword:1000"Flags"=dword:1000 "MountAsRoot"=dword:1"MountAsRoot"=dword:1 ;makes psm the root of the file system;makes psm the root of the file system "MountAsBootable"=dword:1 ;specifies the drive contains the system hive. "MountAsBootable"=dword:1 ;specifies the drive contains the system hive. "BootPhase"=dword:1 ;NLS support needed"BootPhase"=dword:1 ;NLS support needed

; The following key loads the PSMLock dll to support power management issue ; The following key loads the PSMLock dll to support power management issue with PSMwith PSM[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PSMLock][HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PSMLock] "Prefix"="PSL""Prefix"="PSL" "Dll"="PSMLock.Dll""Dll"="PSMLock.Dll" "IClass"=multi_sz:"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}""IClass"=multi_sz:"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"

Page 23: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

iPSM ExampleiPSM Example

; This registry key specifies the name of the PSM folder.; This registry key specifies the name of the PSM folder.[HKEY_LOCAL_MACHINE\Drivers\Builtin\FlshDrv][HKEY_LOCAL_MACHINE\Drivers\Builtin\FlshDrv] "FolderName"="Flash File Store“"FolderName"="Flash File Store“

[HKEY_LOCAL_MACHINE\System\StorageManager][HKEY_LOCAL_MACHINE\System\StorageManager] "Dll"="fsdmgr.dll“"Dll"="fsdmgr.dll“; This flag tells the device manager to load fsdmgr in the first boot phase; This flag tells the device manager to load fsdmgr in the first boot phase; with the boot registry, and not to load it a second time in the second ; with the boot registry, and not to load it a second time in the second ; boot phase with the system registry; boot phase with the system registry "Flags"=dword:1000"Flags"=dword:1000

[HKEY_LOCAL_MACHINE\System\Platform][HKEY_LOCAL_MACHINE\System\Platform] "RegPath" = "\\Flash File Store""RegPath" = "\\Flash File Store"

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\PSM][HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\PSM] "MountAsRoot"=dword:1"MountAsRoot"=dword:1 ;makes PSM the root of the file system;makes PSM the root of the file system "MountAsBootable"=dword:1 ;specifies PSM contains the system hive. "MountAsBootable"=dword:1 ;specifies PSM contains the system hive. "BootPhase"=dword:1 ; NLS support is required"BootPhase"=dword:1 ; NLS support is required

Page 24: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

DOC ExampleDOC Example

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\TrueFFS][HKEY_LOCAL_MACHINE\Drivers\BuiltIn\TrueFFS] "Index"=dword:1"Index"=dword:1 "Dll"="TrueFFS.dll""Dll"="TrueFFS.dll" "Prefix"="DSK""Prefix"="DSK" "Order"=dword:1"Order"=dword:1 "Ioctl"=dword:4"Ioctl"=dword:4 "AutoFormat"=dword:1 ; test for format to boot"AutoFormat"=dword:1 ; test for format to boot "DocAccessType"=dword:10"DocAccessType"=dword:10 "WindowBase"=dword:0c000000"WindowBase"=dword:0c000000 "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}“"IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}“

"Flags"=dword:1000"Flags"=dword:1000 ;avoid loading the driver twice ;avoid loading the driver twice "BootPhase"=dword:1 ;NLS support required"BootPhase"=dword:1 ;NLS support required

Page 25: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

DOC ExampleDOC Example

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\TRUEFFS_DOC][HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\TRUEFFS_DOC] "Name"="DiskOnChip M-Systems""Name"="DiskOnChip M-Systems" "Folder"="DiskOnChip""Folder"="DiskOnChip" "AutoFormat"=dword:1 ;auto format if needed"AutoFormat"=dword:1 ;auto format if needed "AutoPart"=dword:1 ;auto partition if needed"AutoPart"=dword:1 ;auto partition if needed

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\TRUEFFS_DOC][HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\TRUEFFS_DOC] "DefaultFileSystem"="FATFS""DefaultFileSystem"="FATFS" "AutoMount"=dword:1"AutoMount"=dword:1 ;mount any partition automatically;mount any partition automatically "MountAsRoot"=dword:1"MountAsRoot"=dword:1 ;makes trueffs the root of the file system;makes trueffs the root of the file system "MountAsBootable"=dword:1"MountAsBootable"=dword:1 ;specifies that Trueffs contains the system hive. ;specifies that Trueffs contains the system hive. "BootPhase"=dword:1"BootPhase"=dword:1 ;NLS required ;NLS required

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\TRUEFFS_DOC\FATFS][HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\TRUEFFS_DOC\FATFS] “ “MountAsBootable"=dword:1 ;FATFS is mounted as bootableMountAsBootable"=dword:1 ;FATFS is mounted as bootable "MountAsRoot"=dword:1"MountAsRoot"=dword:1 ;FATFS contains the system hive ;FATFS contains the system hive

Page 26: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Debug ExampleDebug Example

Page 27: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Power Management Power Management ConsiderationsConsiderations

Use SetSystemPowerState() Use SetSystemPowerState() allow power manager to properly flush file system on allow power manager to properly flush file system on suspend/resume cyclessuspend/resume cyclesImplement Graceful ShutdownsImplement Graceful ShutdownsSoftware enabled cold and warm bootsSoftware enabled cold and warm bootsIClass {8DD679CE-8AB4-43c8-A14A-EA4963FAA715} IClass {8DD679CE-8AB4-43c8-A14A-EA4963FAA715} indicates Power Managed Block Deviceindicates Power Managed Block Device

Provide methods to protect against file system Provide methods to protect against file system corruptioncorruption

TFATTFATOther software methodsOther software methodsHardware methodsHardware methodsSystem recovery tools (ScanVolume())System recovery tools (ScanVolume())

Page 28: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Performance ConsiderationsPerformance Considerations

Performance will be slower than RAM based Object StorePerformance will be slower than RAM based Object Store

Consider the System Data UseConsider the System Data Use

NOR Flash MemoryNOR Flash MemoryFast ReadFast Read

Slower Write than NANDSlower Write than NAND

NAND Flash MemoryNAND Flash MemorySlower Read than NorSlower Read than Nor

Faster Write than NorFaster Write than Nor

RamDrive can be used to boost application performanceRamDrive can be used to boost application performance

Implement Proper File System CachingImplement Proper File System CachingHKLM\SYSTEM\StorageManager\FATFS HKLM\SYSTEM\StorageManager\FATFS

““EnableCache” = dword:1 EnableCache” = dword:1

““CacheSize” = dword:?CacheSize” = dword:?

FATFS_VERIFY_WRITES Flag ?FATFS_VERIFY_WRITES Flag ?

FATSF_WRITETHROUGH Flag ?FATSF_WRITETHROUGH Flag ?

Implement Proper System Data CachingImplement Proper System Data Caching

Tune File System Drivers for PerformanceTune File System Drivers for Performance

Page 29: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Application ConsiderationsApplication Considerations

Rogue Applications can prevent bootRogue Applications can prevent bootImplement Clean/Safe BootImplement Clean/Safe Boot

Format MediaFormat MediaIOCTL_HAL_QUERY_FORMAT_PARTITONIOCTL_HAL_QUERY_FORMAT_PARTITON

Restore Default (ROM) HiveRestore Default (ROM) HiveIOCTL_HAL_GET_HIVE_CLEAN_FLAGIOCTL_HAL_GET_HIVE_CLEAN_FLAG

Old Registry is deletedOld Registry is deletedNew Registry is createdNew Registry is createdReverts system to Factory DefaultsReverts system to Factory Defaults

Provide tools for diagnosis of failureProvide tools for diagnosis of failureRead Media from BootstrapRead Media from Bootstrap

Diagnose RegistryDiagnose RegistryDiagnose File SystemDiagnose File System

Page 30: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Application ConsiderationsApplication Considerations

Registry Save and Restore functions existRegistry Save and Restore functions existRegSaveKey(HKEY_LOCAL_MACHINE,…)RegSaveKey(HKEY_LOCAL_MACHINE,…)

RegReplaceKey(HKEY_LOCAL_MACHINE,…)RegReplaceKey(HKEY_LOCAL_MACHINE,…)

RegSaveKey(HKEY_CURRENT_USER,…)RegSaveKey(HKEY_CURRENT_USER,…)SetCurrentUser(NULL,…)SetCurrentUser(NULL,…)

CopyFile(CurrentUser,….)CopyFile(CurrentUser,….)

Use Persisted Keys for determining when to Use Persisted Keys for determining when to backup registrybackup registry

[HKEY_LOCAL_MACHINE][HKEY_LOCAL_MACHINE]"RegPersisted"=dword:1"RegPersisted"=dword:1

[HKEY_CURRENT_USER][HKEY_CURRENT_USER]““RegPersisted”=dword:1RegPersisted”=dword:1

Page 31: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Questions?Questions?

Page 32: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

While at MEDC 2005…While at MEDC 2005…Fill outFill out an evaluation for this session an evaluation for this session

Randomly selected instant Randomly selected instant WINWIN prizes! prizes!

Use Use real technology in a labreal technology in a lab Instructor led Instructor led Reef E/FReef E/F & & Breakers LBreakers L

Self-paced Self-paced Reef B/CReef B/C

VisitVisit the Microsoft Product Pavilion the Microsoft Product Pavilion

in the Exhibit Hall in the Exhibit Hall Shorelines BShorelines B

Page 33: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

After The Conference…After The Conference…

DevelopDevelop

BuildBuild

InstallInstall

BuildBuild

JoinJoin

InstallInstall

EnterEnter

JoinJoin

Full-featured trial versions of Windows CE Full-featured trial versions of Windows CE and/or Windows XP Embeddedand/or Windows XP Embedded

Cool stuff & tell us about it: Cool stuff & tell us about it: msdn.microsoft.com/embedded/community

Windows Embedded Partner Program:Windows Embedded Partner Program:www.mswep.com

Windows Mobile 5.0 Eval Kit including Windows Mobile 5.0 Eval Kit including Visual Studio 2005 Beta 2Visual Studio 2005 Beta 2

Mobile2Market Contest and win up to $25000: Mobile2Market Contest and win up to $25000: mobile2marketcontest.com

Microsoft Solutions Partner Program:Microsoft Solutions Partner Program:partner.microsoft.com

Page 34: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

Tools & ResourcesTools & Resources

msdn.microsoft.com/msdn.microsoft.com/ embeddedembedded

microsoft.public.microsoft.public. windowsxp.embeddedwindowsxp.embedded windowsce.platbuilderwindowsce.platbuilder windowsce.embedded.vcwindowsce.embedded.vc

blogs.msdn.com/blogs.msdn.com/ mikehallmikehall

Windows CE 5.0 Eval KitWindows CE 5.0 Eval KitWindows XP Embedded Eval KitWindows XP Embedded Eval Kit

msdn.microsoft.com/msdn.microsoft.com/ mobilitymobility

microsoft.public.microsoft.public. pocketpc.developer pocketpc.developer smartphone.developer smartphone.developer dotnet.framework.compactframeworkdotnet.framework.compactframework

blogs.msdn.com/blogs.msdn.com/ windowsmobilewindowsmobile vsdteamvsdteam netcfteamnetcfteam

Windows Mobile 5.0 Eval KitWindows Mobile 5.0 Eval Kit

WebsitesWebsites

NewsgroupsNewsgroups

BlogsBlogs

ToolsTools

BuildBuild DevelopDevelop

Page 35: EMB315 Non-Volatile Object Store And Hive Based Registry Design For Windows CE Rick Austin Principle Engineer Intermec Corporation

© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.