Re: Ho to run CF driver before reading hive-based registry



Eike,

Below is an example of SD card Hive Registry mounting, make sure that
all drivers needed by the CF driver are loaded earlier too in "HIVE
BOOT SECTION"(example: IrqDriver below):


[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory]
"MountAsRoot"=dword:1 ; WinCE 5.0 way
"Folder"="" ; Need to override WinCE's default,
otherwise it's mounted twice and there is exception

;**************************************************************************
;********* HIVE REGISTRY INFO
*********
;**************************************************************************
; HIVE BOOT SECTION
[HKEY_LOCAL_MACHINE\init\BootVars]
"Start DevMgr"=dword:1
"Flags"=dword:3 ; start both device.exe(2) and Storage manager(1)
Flags=0 also works
"RegistryFlags"=dword:2 ; disable aggressive flushing
; This tells Filesys to load FSDMGR
[HKEY_LOCAL_MACHINE\System\StorageManager]
"Flags"=dword:1000
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\IrqDriver]
"Prefix"="IRQ"
"Dll"="IrqDriver.dll"
"Index"=dword:1
"Order"=dword:5
"Flags"=dword:1000 ; Added for loading in Boot phase, not twice
"BootPhase"=dword:1 ; block-driver based file system, must boot in
phase 1
[
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDHC27x]
"Order"=dword:21
"Dll"="sdhc27x.dll"
"Prefix"="SDH"
"ControllerIRQ"=dword:15 ;Card Ready
"ControllerISTPriority"=dword:64
"CardDetectIRQ"=dword:21 ;Card Detect
"CardDetectISTPriority"=dword:65
"ClockAlwaysOn"=dword:0
"ClockOnIfInterruptsEnabled"=dword:1
"Flags"=dword:1000 ; Added for loading in Boot phase, not twice
"BootPhase"=dword:1 ; block-driver based file system, must boot in
phase 1

[HKEY_LOCAL_MACHINE\Drivers\Builtin\SDBusDriver]
"Order"=dword:15
"Dll"="SDBus.dll"
"Prefix"="SDC"
"ThreadPriority"=dword:64 ; default thread priority for
dispatch thread
"RequestListDepth"=dword:30 ; pre-allocated requests
"IClass"=multi_sz:"{20FA98A8-B298-4b32-8D72-C716AEE2FA84}=
%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"
"Flags"=dword:1000 ; Added for loading in Boot phase, not twice
"BootPhase"=dword:1 ; block-driver based file system, must boot in
phase 1

[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]
"Dll"="SDMemory.dll"
"Prefix"="DSK"
"BlockTransferSize"=dword:200 ; 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}",
"{A32942B7-920C-486b-B0E6-92A702A99B35}"
"Flags"=dword:1000 ; Added for loading in Boot phase, not twice
"BootPhase"=dword:1 ; block-driver based file system, must boot in
phase 1
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory]
; "MountAsRoot"=dword:1 ; WinCE 5.0 way
"MountAsRoot"=dword:0 ; WinCE 5.0 way
"MountAsBootable"=dword:1 ; bootable, may contain hive
"Folder"="" ; Need to override WinCE's default,
otherwise it's mounted twice
; END HIVE BOOT SECTION

Elias
On May 22, 8:48 am, Eike <E...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I am booting a device from a Compact Flash (U-boot resides in flash and later
starts the .nb0 file from Compact Flash). The Compact Flash is not located on
an ordinary PCI bus, so I had to rewrite the driver for it. The driver works
fine and was at some time loaded successfully during the boot process and the
Compact Flash was later shown by the Explorer.

The problem is now the hive-based registry. After adding the hive-based
registry to my image and adding some of the registry setting (I tried all
kinds of parameters for the reg-key "HKEY_LOCAL_MACHINE\init\BootVars" and
the subkeys "flags" or "Start DevMgr") it always hangs on this step:

Booting kernel with clean memory configuration:
Memory Sections:
[0] : start: 81d8e000, extension: 00003000, length: 0226f000
Sp=ffffc7cc
ARMInit done.
Windows CE KernelInit
Updated eptr->e32_vsize to = 0014b000
Scheduling the first thread.
0x83fff024: KernelInit2: pCurThread=83fff024 hCurThread=03fff266
hCurProc=03fff002, KernelInit = 8036a8f0
0x83fff024: Detecting VFP...0x83fff024: VFP Not Found!
0x83fff024: Updated eptr->e32_vsize to = 00006000
0x83fff024: Updated eptr->e32_vsize to = 00029000
0x83fff024: +OEMIoControl: IOCTL_HAL_GET_DEVICE_INFO
0x83fff024: +OEMIoControl: IOCTL_HAL_GET_DEVICE_INFO
0x83fff024: +OEMIoControl: IOCTL_HAL_GET_DEVICE_INFO
0x83fff024: Updated eptr->e32_vsize to = 00009000
0x83fff024: Updated eptr->e32_vsize to = 00022000
0x83fff024: ERROR: d:\macallan\private\winceos\coreos\nk\kernel\kwin32.c
line 777: 0x83fff024: ConnectDebugger failed
0x83fff024: first = 01ed0000, last = 02000000, SharedDllBase = 02810000
0x83fff024: OEMIoControl: IOCTL_HAL_POSTINIT called
0x83fff024:
RT_Init_GetRealTime() entered
0x83fe9b2c: CertMod.dll not found, using old OEM Trust Model
0x83fe9b2c: FileSystem Starting - starting with clean file system
0x83fe9b2c: +OEMIoControl: IOCTL_HAL_INIT_RTC
0x83fe9b2c: RT_Bare_SetRealTime() dwLastCurMSec = 0xFFFCF406
0x83fe9b2c: RT_Bare_SetRealTime() tLastSetTime.dwLowDateTime = 0x1C2B18D
0x83fe9b2c: RT_Bare_SetRealTime() tLastSetTime.dwLowDateTime = 0x1C2B18D
0x83fe9b2c: FS: initializing ROM/RAM file system
0x83fe9b2c: SC_CreateAPIHandle: pvData == NULL
0x83fe9b2c: FS: Registering file system ROM, index 2, flags 0x00000031
0x83fe9b2c: FS: Mount complete (ROM, index 2, flags 0x00000031)
0x83fe9b2c: OEMIoControl: IOCTL_HAL_GETREGSECUREKEYS not supported
0x83fe9b2c: FSVOL: Opening existing volume
0x83fe9b2c: FSVOL: Volume heap already initialized
0x83fe9b2c: FSREG: Mounted ROM portion of boot registry
0x83fe9b2c: FSVOL: Creating clean virtual volume
0x83fe9b2c: FSVOL: Initializing volume heap
0x83fe9b2c: FSREG: Mounted RAM portion of boot registry
0x83fe9b2c: OEMIoControl: IOCTL_HAL_INITREGISTRY
0x83fe9b2c: PCIReg(key: , device: 0/0/0)
0x83fe9b2c: FS: Creating signal event SYSTEM/DevMgrApiSetReady
0x83fe9b2c: FS: Creating signal event SYSTEM/PowerManagerReady
0x83fe9b2c: FS: Creating signal event SYSTEM/GweApiSetReady
0x83fe9b2c: FS: Creating signal event ReleaseFSD
0x83fe9b2c: FSREG: Unable to read value "Start DevMgr" under
HKEY_LOCAL_MACHINE\init\BootVars
0x83fe9b2c: FILESYS: Starting storage manager.
0x83fe9b2c: FS: Registering file system StoreMgr, index 3, flags 0x00000001
0x83fe9b2c: InitSharedHeap: 46200000 10000 c
0x83fe9b2c: InitSharedHeap: return 46200060
0x83fe9b2c: FILESYS: Restarting storage manager.
0x83fe9b2c: OEMIoControl: Unsupported IOCTL code: 0x'10100CC'
0x83fe9b2c: FILESYS: Starting device and waiting for boot file system.
0x83fac400: OEMIoControl: Unsupported IOCTL code: 0x'1010024'
0x83fac770: InitSharedHeap: 46200000 0 c
0x83fac770: InitSharedHeap: return 46200060
0x83fac770: *** DLL_PROCESS_ATTACH - Current Process: 0x42, ID: 0x63fac9d6 ***
0x83fac770: +InitDeviceFileSystems
0x83fac770: FS: Registering file system $device, index 4, flags 0x00000001
0x83fac770: FS: Registering file system $bus, index 5, flags 0x00000001
0x83fac770: -InitDeviceFileSystems: status is 1
0x83fe9b2c: FS: Waiting for device to signal BootPhase1 completion
0x83fac770: Ceddk!CalibrateStallCounter: Enter
0x83fac770: Ceddk!CalibrateStallCounter: Could not find stall counter
0x83fac770: Ceddk!BeginCalibration: min(66667) max(74075)
0x83fac770: Ceddk!BeginCalibration: Elapsed is 73781
0x83fac770: Ceddk!BeginCalibration: Delay is 20
0x83fac770: DEVICE!DevloadInit
0x83fac770: DEVICE!InitDevices: Root Key is Drivers\BuiltIn.
0x83fac770: DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\BuiltIn\Prefix) returned 2
0x83fac770: DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\BuiltIn\BusPrefix) returned 2
0x83fac770: DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\BuiltIn\StrataFMD\BusPrefix) returned 2
0x83fac770:
: FMD_Init lpActiveReg:602E7EC , pRegIn:0, pRegOut: 0
0x83fac770: INFO: FMD_Init: Flash Address=0xb4740000 Length=0xa0000.
0x83fac770: INFO: FLASH VENDOR CHECK
0x83fac770: INFO: FLASH VENDOR 1.
0x83fac770: ERROR: InitializeFlash: invalid manufacturing code.
0x83fac770: ERROR: FMD_Init: Failed to initialize flash.
0x83fac770: FLASHDRV.DLL:Unable to initialize FLASH Media Driver (FMD).
0x83fac770: Invalid handle: Set=1 Method=2
0x83fac770: FLASHDRV.DLL:CP_StopCompactor() - Unable to suspend compactor
thread!!!
0x83fac770: FLASHDRV.DLL:CP_DeinitCompactor() - Unable to stop compactor,
CP_StopCompactor() failed
0x83fac770: Deleting an uninitialized critical section, ignored!
0x83fac770: Deleting an uninitialized critical section, ignored!
0x83fac770: DEVICE!LaunchDevice: Init() failed for device 0x00030f30
0x83fac770: DEVICE!I_ActivateDeviceEx: couldn't activate: prefix DSK, index
1, dll ixp4xx_stratad.dll, context 0x602e7ec
0x83fe9b2c: FILESYS: Starting device and waiting for boot file system.

here it stops.
The driver ist not the Flashdrv.dll, but has another name. It does not
appear here, because it is not loaded yet (the problems with the flash
driver Flashdrv.dll are not important, some stuff from the bsp which I can't
remove). I think that at this time, the Compact Flash DLL should have loaded,
so that CE can read from it. Is this correct? If so, how can I get CE to load
my driver this early?

Thanks,
Eike


.



Relevant Pages

  • Re: ROM-only FS and persisting registry on USB HD
    ... driver and step into the code to figure out how it failed. ... PCI bus driver and its relative registry setting should be moved into BOOT ... you have to have your USB host controller's driver ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Ho to run CF driver before reading hive-based registry
    ... BOOT SECTION": ... and later starts the .nb0 file from Compact Flash). ... is not located on an ordinary PCI bus, so I had to rewrite the driver ... hive-based registry to my image and adding some of the registry ...
    (microsoft.public.windowsce.platbuilder)
  • Re: FlashROM as a disk in CE 5.0
    ... FileSystem Starting - starting with clean file system ... Lower flash. ... 0x83fc8994: FLASHDRV.DLL:Unable to initialize FLASH Media Driver. ... I have added the Registry settings to Project.reg file like ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Ho to run CF driver before reading hive-based registry
    ... Did you place all the registry settings related to your CF driver inside ... ; END HIVE BOOT SECTION ... The problem is now the hive-based registry. ... FileSystem Starting - starting with clean file system ...
    (microsoft.public.windowsce.platbuilder)
  • Re: FBWF and Registry Filter (Changing IP Address)
    ... Looks like last night I wasn't careful in playing with the driver load order and missed the right value. ... I already made a workaround in commiting the whole Registry when IP ... First I created an image where I could perfectly repro the problem in a similar setup (Minlogon, netsh, EWF, RegFilter). ... registry hives at the next boot time. ...
    (microsoft.public.windowsxp.embedded)