Re: FMD driver problem - Unable to add FlashDisk to my OS Design

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Gary,

I don't know exactly what the "WriteBufferSize" and "BlockSize" registry
settings are doing. But I have added an UNLOCK command at the beginning of
the
FMD_Init() function. And now I can run through the FMD_Init() function
without an exception. I have read in some internet discussion groups, that
the block lock can be a problem. But I don’t get an Flash Folder at Windows
CE. And I get some errors on the debug output:

FSDMGR!AutoLoadBlockDevice: Auto-loading block driver from
"Drivers\BuiltIn\StrataFMD"FSDMGR!MountStore: Attaching new storage device
"MSFlash"OSAXST1: >>> Loading Module 'stratad.dll' (0x83FAE708) at address
0xC0D20000-0xC0D41000 in Process 'NK.EXE' (0x813D9AA0)
OSAXST1: >>> Loading Module 'k.ceddk.dll' (0x83FAE840) at address
0xC0630000-0xC063E000 in Process 'NK.EXE' (0x813D9AA0)
Kernel DLL 'stratad.dll' needs thread creation/deletion notification
INFO: FMD_Init: -> InitializeFlash() 8 Blocks unlocked from virtual Flash
Address =0x9aa00000
INFO: FMD_Init: Flash Address=0x9aa00000 Length=0x100000.
Unknown: DEBUGCHK failed in file
C:\ymzki\private\winceos\DRIVERS\msflash\src\.\falmain.cpp at line 1409
DEBUG_BREAK @c0d2ddf0 Ignored.
FLASHDRV.DLL:CalculateLogicalRange() - Invalid number of logical blocks 0
FSDMGR!MountStore: Failed mounting store "MSFlash"; error=50
FSDMGR!StoreDisk_t::~StoreDisk_t: deleting store (D0021D30)OSAXST1: <<<
Unloading Module 'stratad.dll' (0x83FAE708) at address 0xC0D20000-0xC0D41000
in Process 'NK.EXE' (0x813D9AA0)
OSAXST1: <<< Unloading Module 'k.ceddk.dll' (0x83FAE840) at address
0xC0630000-0xC063E000 in Process 'NK.EXE' (0x813D9AA0)
FSDMGR!AutoLoadFileSystems: Unable to auto-load
HKLM\System\StorageManager\AutoLoad\MSFlash;
error=50FSDMGR!STOREMGR_StartBootPhase BootPhase=1 (PrevBootPhase=0)
FSDMGR!AutoLoadFileSystems: CurrentBootPhase=1, LoadFlags=1
FSVOL: Using system database volume "\Documents and Settings\default.vol"

But Bruce Eitman wrote, that the driver doesn't support "P30" StrataFlash.
Do you know something about that?

Thanks,
Andreas

"Gary Swalling" wrote:

Hi Andreas,
Do you know what the FMD is doing with the "WriteBufferSize" and "BlockSize"
registry settings?
It seems like these are important configurations. Maybe the exception is
raised from a calculation based on one of these values. Can you step
through the FMD_Init to see which line raises the exception?

You said the FMD use CFI. Do you see reasonable values returned from the
flash? Hardware might work, but maybe the FMD is not able to access it.

Regards,
Gary

"ageisreiter" <ageisreiter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EA341867-ECE5-4932-985A-F845ADCFF59A@xxxxxxxxxxxxxxxx
Hi Gary,

I can use CFI, if I don't specify the registry settings "WriteBufferSize"
and "BlockSize". Then the driver try to connect the Flash via the CFI.
But I get the following error message:

OSAXST1: >>> Loading Module 'stratad.dll' (0x83DC7438) at address
0xC0D20000-0xC0D41000 in Process 'NK.EXE' (0x813D9AA0)
Kernel DLL 'stratad.dll' needs thread creation/deletion notification
Exception 'Data Abort' (4): Thread-Id=00bf0002(pth=83f93600),
Proc-Id=00400002(pprc=813d9aa0) 'NK.EXE',
VM-active=00400002(pprc=813d9aa0)
'NK.EXE'
PC=c0637390(k.ceddk.dll+0x00007390) RA=c0d3b3c0(stratad.dll+0x0001b3c0)
SP=d023df9c, BVA=01000000
Exception 'Raised Exception' (-1): Thread-Id=00bf0002(pth=83f93600),
Proc-Id=00400002(pprc=813d9aa0) 'NK.EXE',
VM-active=00400002(pprc=813d9aa0)
'NK.EXE'
PC=c00f985c(k.coredll.dll+0x0003985c) RA=80131e08(kernel.dll+0x00019e08)
SP=d023d764, BVA=ffffffff
DEVICE!LaunchDevice: exception in Init for device 0xd04221b0
DEVICE!LaunchDevice: Init() failed for device 0xd04221b0
DEVICE!I_ActivateDeviceEx: couldn't activate: prefix DSK, index 1, dll
stratad.dll, context 0xd023e67c
OSAXST1: <<< Unloading Module 'stratad.dll' (0x83DC7438) at address
0xC0D20000-0xC0D41000 in Process 'NK.EXE' (0x813D9AA0)

And I'm not sure if the driver needs the virtual or the physical address.
But if I set the registry setting MEMBase to the physical address, I get
the
error MMUFAIL at my debugging tool.
Generally is the hardware working, because I can access the flash form the
bootloader.
Do you have an idea, what I can do?

Thank you,
Andreas

"Gary Swalling" wrote:

Hi Andreas,
you are getting into FMD_Init...does it seem like you are talking to
flash
at all? Is there some kind of check for CFI or ID codes? I thought the
FMD
would take a physical address and generate virtual address with system
calls, but I'm not very familiar with this FMD.

Regards,
Gary

"ageisreiter" <ageisreiter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EA12CED7-DE74-4569-9A92-C3C5C800D71B@xxxxxxxxxxxxxxxx
Hi Bruce and Gary,

I have changed MEMBase to 9AA00000. This is the virtual address which
is
denoted in the OEMAddressTabel. But is MEMBase really an virtual
address?
Because I now get an virtual address as return value of the function
GetPhysicalSectorAddress() (file
C:\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\BLOCK\MSFLASHFMD\STRATA\fmd.cpp).
I
think the function name say's, that I should get an physical address as
return value.

But I have started the OS design with the virtual address for MEMBase,
I
don't get the MMUFail error. But now I get other errors:

STRATA Error: Programming Error for Block 0 ... Lower flash.
FMD_EraseBlock: Unable to whack block signature
VerifySignatures: error in FMD_EraseBlock, bailing
ERROR: FMD_Init: Error while trying to verify block signatures.
Unknown: DEBUGCHK failed in file
C:\ymzki\private\winceos\DRIVERS\msflash\src\.\falmain.cpp at line 201

Faulted in KCall, pCurThread->dwStartAddr = c0471120, PageFreeCount =
0000110d!!
Original Context when thread faulted:
Exception 'Data Abort'(4) Thread-Id=00bf0002(pth=83f93600) PC=801324d0
BVA=d02eeff8, dwInfo = 00000406
R0=0000b373 R1=00bf0002 R2=00000000 R3=00000000
R4=c048829c R5=00000000 R6=00000000 R7=00000000
R8=00000000 R9=00009999 R10=00001010 R11=d023e388
R12=00000000 SP=d023e124 Lr=c0d29720 Psr=6000001f

I think that some other registry settings are wrong. Which settings do
I
need for my hardware?
Description:
- 32MB Intel StrataFlash P30
- Block Size 128kB
- 16bit databus
- physical addresses: 0x00000000 - 0x02000000
- physical address range for FlashDisk: 0x01000000 - 0x01FFFFFF (16MB)
- physical address range for Bootloader and nk.bin: 0x00000000 -
0x00FFFFFF
(16MB)
- asynchronous connection to CPU

I can't find an description of the registry settings at the internet.
And
I'm not sure, that I can split the Flash memory in two pieces. The
second
part should be the FlashDisk form the address 0x01000000 up to
0x01FFFFFF.

Thanks,
Andreas

"Bruce Eitman [eMVP]" wrote:

IIRC, the membase is a Virtual address, but you have used a physical
address.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

"ageisreiter" <ageisreiter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DF0C7166-1CDE-4D14-81D4-CF7733CFBBC7@xxxxxxxxxxxxxxxx
I am trying to add an FlashDisk to my WinCE OS design. My hardware is
an
PXA270 modul with Intel strata NOR flash. The driver i am using is
the
sample
FMD code given by Microsoft for NOR flashes (strata folder in
MSFLASHFMD).
I
am not able mount the "NOR folder" at boot time. For this i have
included
the
SYSGEN_MSFLASH_STRATAD=1 in the environmental variables and i
included
the
stratad.dll in platform.bib like
stratad.dll $(_FLATRELEASEDIR)\stratad.dll NK SHK

I have added the Registry settings to Project.reg file like
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\StrataFMD]
"Dll"="stratad.dll"
"Order"=dword:2
"Prefix"="DSK"
"Ioctl"=dword:4
"Profile"="MSFlash"
"IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"MemBase"=dword:01000000
"MemLen"=dword:01000000
"BlockSize"=dword:20000
"WriteBufferSize"=dword:20
"SectorSize"=dword:200
"IsPairedFlash"=dword:0 ; 16 bit Data-Bus width

; Support XIP in IMGFS
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\IMGFS]
"XIP"=dword:1

; Override names in default profile
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
"Name"="MSFLASH for STRATAFLASH"
"Folder"="NOR Flash"

[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\MSFlash]
"DriverPath"="Drivers\\BuiltIn\\StrataFMD"
; LoadFlags 0x01 == load synchronously
"LoadFlags"=dword:0
"Order"=dword:0
"BootPhase"=dword:0

IF IMGULDR
; Allow xip and read-only filesys regions to be written to
; in the update loader only
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\StrataFMD]
"UpdateReadOnly"=dword:1

I have updated the oemaddrtab_cfg.inc to
DCD 0x9AA00000, 0x01000000, 16 ; MAINSTONEII: nCS0: Storage
(16MB).
DCD 0x9BA00000, 0x00000000, 16 ; MAINSTONEII: nCS0:
Boot
Flash
(16MB).

Now i am downloading the Image to Flash. But at the WinCE start I
get
the
debug message:
DEVICE!LaunchDevice: Init() failed for device 0xd0423a10
Unloading Module 'stratad.dll' (0x83D94024) at address
0xC0D20000-0xC0D41000
in Process 'NK.EXE' (0x813D9AA0)

And at my Debugging-Tool I get the message MMUFail if the physikal
Address
0x01000000 is assigned to the FMD driver variable pBaseAddress.

Is there any failure in the OEM AddressTable? And which registry
settings
do
I need for my Flash device? (Flash with 16bit databus)

Thanks,
Andreas









.



Relevant Pages

  • Re: FMD driver problem - Unable to add FlashDisk to my OS Design
    ... WriteBufferSize and BlockSize are defined in the data sheet for your flash. ... Bruce.Eitman AT EuroTech DOT com ... settings are doing. ... if I don't specify the registry settings ...
    (microsoft.public.windowsce.embedded)
  • Re: FMD driver problem - Unable to add FlashDisk to my OS Design
    ... Do you know sonthing about the following registry settings? ... I will not boot from the Flash, but I will use the Flash for Hive Based ... Bruce.Eitman AT EuroTech DOT com ... actual value will depend on how your driver uses it. ...
    (microsoft.public.windowsce.embedded)
  • Re: FMD driver problem - Unable to add FlashDisk to my OS Design
    ... The driver still doesn't work. ... Then I could compare working settings with my own. ... I believe XIP means raw writes with no flash driver metadata. ... Bruce.Eitman AT EuroTech DOT com ...
    (microsoft.public.windowsce.embedded)
  • Re: Confused about flash
    ... When I use the flash indoors on the full auto setting my pictures ... When I set the camera to manual setting and set ... images that will tell you the actual exposure settings used. ...
    (alt.photography)
  • RE: stratad and stratak settings for persistent storage
    ... can you post the registry settings, so that i can go through that. ... no problem with your SOURCES file settings. ... flash, used as paired flash making 64 MB). ... The registry settings are made as per msdn in platform.reg. ...
    (microsoft.public.windowsce.platbuilder)