jerry79
驱动牛犊
驱动牛犊
  • 注册日期2002-10-24
  • 最后登录2009-06-22
  • 粉丝0
  • 关注0
  • 积分2分
  • 威望15点
  • 贡献值0点
  • 好评度5点
  • 原创分0分
  • 专家分0分
阅读:1404回复:0

MSFLASH 驱动问题

楼主#
更多 发布于:2009-02-20 12:24
我的平台是PXA270+Wince6.0,64M Intel P30 NOR Flash
为了替代wince5.0下的IPSM软件,我现在想使用MSFALH来将flash剩余容量利用起来,遇到了一些问题,也有一些疑问,请大家帮忙一下。
现在的问题是看不到Norflash的盘符,串口信息提示错误:FSDMGR!MountStore: Failed mounting store "MSFlash"; error=3
我查了很多资料,也参考了前辈大侠们的一些帖子,我现在的做法是:
1、在catolog中加入MSFLASH驱动
2、修改注册表和platform.bib文件。
有几个疑问如下:
1、MSFLASH驱动是否一定要和BINFS文件格式同时使用?我在别的帖子中看到的是:要在bootloader中就将Flash分区和格式化,要加入BINFS的支持。
2、如果一定要在bootloader中将flash分区和格式化,应该如何做呢?能否提供一些参考的代码?我现在的bootloader中的flash 部分,已经实现了FlashWrite,FlashRead,FlashErase这几个函数,请问如何用这几个函数实现分区和格式化呢?
3、对于MS提供的MSFLASH驱动,我查了一些资料,发现似乎不用修改这个驱动,直接使用即可,只需要在注册表中进行正确的设置。请问是这样吗?

OEMtable中关于flash的信息如下:
IF :DEF: MCPII_MODULE 
DCD 0x9AA00000, 0x00000000, 64 ; MAINSTONEII: nCS0: MCPII Module Boot Flash (64MB). 
ELSE 
DCD 0x9AA00000, 0x04000000, 32 ; MAINSTONEII: nCS1: Secondary flash (32MB). 
DCD 0x9CA00000, 0x00000000, 32 ; MAINSTONEII: nCS0: Boot Flash (32MB).



我的注册表资料如下:
;HIVE BOOT SECTION                               
IF IMGULDR
[HKEY_LOCAL_MACHINE\Drivers\BlockDevice\RAMDisk]
    "Size"=dword:00800000        ; 8MB
ENDIF IMGULDR
; END HIVE BOOT SECTION
; @CESYSGEN ENDIF CE_MODULES_RAMDISK

; HIVE BOOT SECTION
;-------------------------------------------------------------
; MsFlash(Strata Flash Driver)
;-------------------------------------------------------------
; StrataFlash block driver.
[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}"
  "IsPairedFlash"=dword:1
  "BlockSize"=dword:40000
  "WriteBufferSize"=dword:40
  "MemBase"=dword:BCA00000     
  "MemLen"=dword:100000

; 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:1
    "Order"=dword:0
    "BootPhase"=dword:0


; Override names in default profile
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
"DefaultFileSystem"="FATFS"
"PartitionDriver"="mspart.dll"
"AutoMount"=dword:1
"AutoPart"=dword:1
"AutoFormat"=dword:1
"BootPhase"=dword:0
"Name"="MSFLASH for STRATAFLASH"
"Folder"="Flash"
"MountFlags"=dword:2
"MountAsBootable"=dword:1

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\FATFS]
"FriendlyName"="FAT FileSystem"
"Dll"="fatfsd.dll"
;"Flags"=dword:00000024
"Paging"=dword:1
"CacheSize"=dword:0
"EnableCacheWarm"=dword:0
"EnableCache"=dword:1
"MountFlags"=dword:2

; Valid Bits for Flags registry value
; If no flags are set, the hive will be stored in the object store.
;
; 0x00000001    Start storage manager in boot phase 1 for hive-based registry
; 0x00000002    Start device manager in boot phase 1 for hive-based registry
; 0x00000004    Start storage manager in boot phase 1 for registry in
;              external ROM (such as BINFS)
; 0x00000008    Start device manager in boot phase 1 for registry in
;              external ROM (such as BINFS)

;[HKEY_LOCAL_MACHINE\init\BootVars]
;  "SystemHive"="Documents and Settings\\system.hv"
;  "ProfileDir"="Documents and Settings"
;  "Start DevMgr"=dword:1
;  "Flags"=dword:3
;  "RegistryFlags"=dword:1

;[HKEY_LOCAL_MACHINE\init\BootVars]
;"DefaultUser"="default"
; END HIVE BOOT SECTION




  

游客

返回顶部