Re: Mount CF card using ATAPI



if the CF is on the IDE bus it would use ATAPI. if it's the master device on
secondary
IDE channell you should use:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Atapi\Device2]

--

Luca Calligaris
www.eurotech.it

<time_error@xxxxxxxxxxx> ha scritto nel messaggio
news:313741d9-6ea7-4bbd-91d1-cd479a94aeaf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi
System:
Standard CECP BSP running on Aaeon PCM8152 Celeron M industrial
board. WinCE 5.0. Image successfully boots from CF.

My goal is to save a hive based registry on CF card - that means that
I have to mount the CF card during the first phase of boot.

The CF card is recognized/detected by the BIOS as MASTER on the
secondary IDE channel. I have managed to convince myself into
believing that I shall use ATAPI to mount the device - am I right in
this assumption?
The CF card is FAT.


Here is a part of my platform.reg:
; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Atapi]
"Order"=dword:0
"Index"=dword:1
"Prefix"="IDE"
"FSD"="fatfsd.dll"
"Dll"="atapi.dll"
"IoBase"=multi_sz:"1f0", "3f4"
"IoLen"=multi_sz:"8", "4"
"Irq"=dword:0e
"Settings"=dword:2
"DeviceId"=dword:0
"Legacy"=dword:1
"ConfigEntry"="GenericConfig"
"SoftResetTimeout"=dword:03
"StatusPollCycles"=dword:100 ; Status register DRQ/BSY polling;
256 poll cycles
"StatusPollsPerCycle"=dword:20 ; Status register DRQ/BSY polling;
32 polls per cycle
"StatusPollCyclePause"=dword:05 ; Status register DRQ/BSY polling; 5
milliseconds between poll cycles
"RegisterStride"=dword:01 ; ATA register stride; register
block is contiguous
"SpawnFunction"="CreatePCIHD" ; controller-specific instantiation
function
"IClass"=multi_sz:"{CDDC3621-3512-4b3f-BB6F-B4DD5E061795}"

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Atapi\Device0]
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"Prefix"="DSK"
"Dll"="atapi.dll"
"InterruptDriven"=dword:01 ; enable interrupt driven I/O
"DMA"=dword:01 ; enable DMA
"DoubleBufferSize"=dword:10000 ; 128 sector (65536 byte) double
buffer
"DrqDataBlockSize"=dword:200 ; 1 sector (512 byte) DRQ data
block
"WriteCache"=dword:01 ; enable on-disk write cache
"LookAhead"=dword:01 ; enable on-disk look-ahead
"DeviceId"=dword:02 ; device 2, i.e., secondary master
"TransferMode"=dword:FF ; use device default transfer mode
(Ultra DMA 3, 4 require 80-conductor cable)
"SpawnFunction"="CreatePCIHD" ; controller-specific instantiation
function

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile]
"Name"="IDE Hard Disk Drive"
"Folder"="HD"
"MountFlags"=dword:2

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile\FATFS]
"EnableCacheWarm"=dword:0

; END HIVE BOOT SECTION




Debug output looks like this:

DEVICE!DevloadInit
DEVICE!InitDevices: Root Key is Drivers\BuiltIn.
DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\Prefix)
returned 2
DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn
\BusPrefix) returned 2
Loading module busenum.dll at address 0x03F10000-0x03F17000 (RW data at
0x01FF8000-0x01FF850C)
Loaded symbols for 'C:\WINCE500\PBWORKSPACES\PCM_8152_A\RELDIR
\CEPC_X86_DEBUG\BUSENUM.DLL'
DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\PCCARD
\Prefix) returned 2
DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\PCCARD
\BusPrefix) returned 2
Loading module pcibus.dll at address 0x01D30000-0x01D49000
Loaded symbols for 'C:\WINCE500\PBWORKSPACES\PCM_8152_A\RELDIR
\CEPC_X86_DEBUG\PCIBUS.DLL'
Loading module pcc_serv.dll at address 0x01C30000-0x01C57000
Loaded symbols for 'C:\WINCE500\PBWORKSPACES\PCM_8152_A\RELDIR
\CEPC_X86_DEBUG\PCC_SERV.DLL'
CardBus.DLL DLL_PROCESS_ATTACH
DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\Atapi
\BusPrefix) returned 2
Loading module atapi.dll at address 0x03CE0000-0x03D06000 (RW data at
0x01FD7000-0x01FD7608)
Loaded symbols for 'C:\WINCE500\PBWORKSPACES\PCM_8152_A\RELDIR
\CEPC_X86_DEBUG\ATAPI.DLL'
ATAPI DLL_PROCESS_ATTACH
Atapi!DumpRegKey> Drivers\Active\4294967282
Hnd = 00035CF0
Name = IDE1:
Key = Drivers\BuiltIn\Atapi
BusParent = 00031220
InterfaceType = 00000000
BusName = BuiltInPhase1_0_13_0
Atapi!DumpRegKey> Drivers\BuiltIn\Atapi
Order = 00000000
Index = 00000001
Prefix = IDE
FSD = fatfsd.dll
Dll = atapi.dll
IoBase :1f0 3f4
IoLen :8 4
Irq = 0000000E
Settings = 00000002
DeviceId = 00000000
Legacy = 00000001
ConfigEntry = GenericConfig
SoftResetTimeout = 00000003
StatusPollCycles = 00000100
StatusPollsPerCycle = 00000020
StatusPollCyclePause = 00000005
RegisterStride = 00000001
SpawnFunction = CreatePCIHD
IClass :
{CDDC3621-3512-4b3f-BB6F-B4DD5E061795}
Atapi!AtaGetRegistryResources> bus type not specified, using PCI as
default
Atapi!IDE_Init> Start of IDE/ATA device enumeration
Atapi!IDE_Init> Enumerated IDE/ATA device Drivers\BuiltIn\Atapi
\Device0
Atapi!IDE_Init> End of IDE/ATA device enumeration
Atapi!IDE_Init> Activating IDE/ATA device Drivers\BuiltIn\Atapi
\Device0
DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\Atapi
\Device0\BusPrefix) returned 2
Atapi!DumpRegKey> Drivers\Active\4294967283
Hnd = 00035500
Name = DSK1:
Key = Drivers\BuiltIn\Atapi\Device0
Atapi!DumpRegKey> Drivers\BuiltIn\Atapi\Device0
Port = 00035EE0
DeviceId = 00000000
IClass :
{A4E7EDDA-E575-4252-9D6B-4195D48BB865}
Prefix = DSK
Dll = atapi.dll
InterruptDriven = 00000001
DMA = 00000001
DoubleBufferSize = 00010000
DrqDataBlockSize = 00000200
WriteCache = 00000001
LookAhead = 00000001
TransferMode = 000000FF
SpawnFunction = CreatePCIHD
Atapi!CPCIDisk::CPCIDisk> device count(1)
Atapi!CDisk::ResetController> Device is ready
Atapi!CDisk::IsDevicePresent> Device 0 is not present; Error
register(0x0)
Atapi!CDisk::InitController> Device did not respond to identify
Atapi!CDisk::Init> Failed to initialize device
Atapi!CPCIDisk::~CPCIDisk> device count(0)
DEVICE!LaunchDevice: Init() failed for device 0x00035500
DEVICE!I_ActivateDeviceEx: couldn't activate: prefix DSK, index 1, dll
atapi.dll, context 0x802dc78


As can be seen from the output the device reports back that it is
ready but Device 0 is "not present"!?!?. Shall I use device 2 because
the CF card is physically connected as secondary master?


Can anyone verify my understanding of the persistent hive based
registry that is generated on the CF card (when I get it to work).
During the first phase of boot the registry values is read from a
"magic" place - though the actual registry does not exist yet on the
CF. Then, when the CF is mounted, the *.hv files are dumped, and the
system read all registry data from this location afterwards. Next time
the system is booted the registry is detected as already existing and
is NOT overwritten - this is based on MD5 checksum.

Best regards,
Jonas, DK


.



Relevant Pages

  • Mount CF card using ATAPI
    ... I have to mount the CF card during the first phase of boot. ... Atapi!IDE_Init> Start of IDE/ATA device enumeration ... registry that is generated on the CF card. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: re-installing Delphi Application
    ... Do you know if the RegSvr32 modifies the registry? ... >If the JumpDrive is what I think it is, and is run through the USB, ... That took them a while since the card wasn't recognized ... I'll have my customer contact the hardware ...
    (comp.lang.pascal.delphi.misc)
  • Re: How to get SD card/IPSM name ??
    ... search in the registry for references to psmfsd.dll to decide yes/no on PSM ... I have to perform some operations over IPSM of teh device ... ... with the help of this registry I could know about the name of SD card. ... this registry key is just a way of finding out what the ...
    (microsoft.public.windowsce.embedded)
  • Re: How to add Prism 2.5 Wireless card drivers?
    ... Don't forget that, with CERDISP running, you can use the keyboard on the PC ... We have devices that work out to be essentially headless where I use CERDISP ... etc.), and then save the registry entries that doing that creates, it will ... I can now stick the card in, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Develop file system filter for windows mobile 6
    ... My main target is writing a filesystem filter for SD card only so I ... which part of the registry should I add to in order to load ...
    (microsoft.public.windowsce.platbuilder)