Share via


Flash MDD and PDD Driver Architecture

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

Starting with Windows Embedded CE 6.0 R2, Windows Embedded CE provides a new, componentized flash driver model that consists of a model device driver (MDD) and platform-dependent driver (PDD). Additionally, the model includes a new partition driver, designed specifically for flash media, which replaces MSPART and the MBR format. The flash partition driver translates standard disk IOCTLs from the file system into flash-specific IOCTLs. The flash partition driver must be used with the flash driver MDD.

The following diagram provides an overview of the stack:

Bb821532.a6acbad7-c559-4041-996f-cde6e5c4ef5c(en-US,WinEmbedded.60).gif

Flash Driver MDD

The flash driver MDD takes the place of the flash abstraction layer (FAL) that was used in previous versions of Windows Embedded CE. The flash driver MDD is responsible for actions such as handling wear-leveling, writing sector transactions, translating logical sectors to physical sectors, and performing compaction. The flash MDD can operate regardless of the type of flash media, allowing it to support single-level cell (SLC) NAND, multi-level cell (MLC) NAND, and NOR media. The flash MDD is also capable of handling multiple platform-dependent drivers.

Flash Driver PDD

The flash driver PDD replaces the flash media driver (FMD) that was used in previous versions of Windows Embedded CE. The flash driver PDD is responsible for interacting with the flash hardware, and contains the basic functions necessary to access physical flash. Also, the PDD exposes a stream interface, and the PDD is where you implement the PDD IOCTLS to meet your specific hardware needs.

Partitioning Flash Memory

The flash driver model supports the concept of regions and partitions in flash memory. Flash regions are regions of flash memory that have properties such as sector size or block size. The PDD reports these properties to the upper layers. Flash partitions are subareas of flash regions. Each flash region can contain one or more flash partitions defined by the MDD. Each partition corresponds to a file system volume. Additionally, a partition can be designated as reserved. The reserved state corresponds to the concept in the previous driver model of a reserved region.

The new flash model replaces the MSPART driver and MBR format with a flash partition driver designed specifically for flash media. Each flash partition is wear-leveled independently and contains exactly one file system volume. Flash regions that were reserved under the old model are generalized as a partition and are directly mapped, instead of wear-leveled. Each partition is assigned a name, as well as a partition type GUID that identifies the appropriate file system to load.

Each partition is defined in terms of the number of logical blocks it contains. Through this method a partition can be defined independently of bad blocks. The flash MDD determines the physical block range for each partition and provides that information in the FLASH_PARTITION_INFO structure. Partitions are identified by a PARTITION_ID, which consists of the region index and the partition index.

The following diagram shows the relationship between regions, partitions, and volumes:

Bb821532.dafd883b-0f31-4925-b996-69d45709ed08(en-US,WinEmbedded.60).gif

See Also

Other Resources

Flash Drivers
Flash Driver MDD and PDD Model