Block Device Drivers for Linear Flash Memory Devices

The first version of Windows CE was used solely on platforms with battery-backed RAM storage with a simple file system to manage the storage. However, Windows CE versions 2.10 and later are often used on embedded systems that require persistent storage and cannot depend on battery-backed RAM storage. As a solution, flash memory has been implemented since it is the industry standard for non-volatile storage in embedded applications.

The two leading types of flash memory architecture are Advanced Technology Attachment (ATA) flash and linear flash memory. Both conform to the industry standard PC Card form factor, and they can be used interchangeably in existing PC Card sockets. However, there are significant differences between the two architectures that affect their performance on Windows CE.

ATA cards emulate the behavior of an ATA-style hard drive by means of linear flash memory components and a special microcontroller chip, which performs hardware emulation of an ATA-style hard disk. An ATA card appears as an ordinary hard drive to an operating system. ATA-style hard disks are block devices, and thus ATA cards require block device drivers in order to work with Windows CE.

Linear flash memory takes its name from the fact that, unlike ATA-style flash, the individual storage locations form a contiguous range of memory addresses, each of which can be accessed directly. Thus, linear flash memory can be read directly as though it were RAM or ROM. However, linear flash memory can only be written to in blocks. Moreover, linear flash memory on Windows CE uses a software driver layer to emulate a disk drive; this eliminates the need for special controller hardware. Linear flash memory devices that operate in this block-oriented fashion use the driver layer to translate data to and from a block format that Windows CE can understand.

This driver layer is called the flash translation layer (FTL). The underlying data format used by FTL software has been adopted by the PC Card industry as an official data format. The FTL software component implemented on Windows CE is the TrueFFS driver from M-Systems, Inc. The TrueFFS driver, a stream interface driver, exposes standard Windows CE stream interface functions to the operating system. Currently, the TrueFFS driver can access only a DiskOnChip built-in device from M-System, Inc. Windows CE supports linear flash memory in several form factors: minicards, industry standard PC Cards, and built-in DiskOnChip devices.