BSDCan2007 - Confirmed Schedule

BSDCan 2007
The Technical BSD Conference

Warner Losh
Day 3
Room SITE A0150
Start time 10:00
Duration 01:00
ID 23
Event type Lecture
Track Embedded
Language English

FreeBSD SD/MMC cards

An implementation overview

This lecture will present an outline of FreeBSD's SD/MMC infrastructure. It will summarize the relevant standards and relate them to the implementation. The interfaces between layers will be explored in enough detail to learn how to write drivers for new SD/MMC devices or to expand the number of supported host interface adapters.

While SD/MMC support on the i386 platform is a nice to have item, usually the needs of that platform are covered by a small USB dongle. The i386 platform has used the CF flash device in True IDE mode to load the OS. There are a few places where SD/MMC cards are natively supported (mostly in laptops). There hasn't been much of an inroads on the i386 platform for these devices.

However, the situation is quite a bit different in the embedded world. Here, cost concerns drive selection of devices with reduced pin count. Lower cost devices are interfaced serially rather than in parallel (or with bus widths that are signficantly smaller than 32 or 64 as is typical in the i386 world). Due to the semi-openness of the SD/MMC standards, these devices have won out in many cases over other flash technology. Most embedded systems today that support some kind of mass storage device support the SD/MMC cards. Many are even starting to support the SDIO standard as well.

As FreeBSD moves into more embedded platforms, the need to support a variety of SD/MMC bridges is great. Most embedded platforms do not follow the same interfaces as the i386 laptops, mostly due to a desire to keep costs down by keeping royalty payments down. At present, linux supports about a dozen different flavors of bridges. If FreeBSD is to compete in this area, it must have an architecture that is as flexible and extensible as Linux.

Now that most of the SD standards are freely available, many of the barriers to entry into this market are gone. This talk will review the SD standards, how they relate to the older MMC standard, how both standards are evolving. The first part of this lecture will give the basics necessary to even begin work in this area. SDHC is an emerging standard that will be discussed in detail.

Once that is complete, a summary of the current state of the art in FreeBSD will be given. Cards that are supported will be enumerated, as well as the current bridges.

The last part of the lecture will concentrate on writing drivers for SD cards, as well as writing bridge drivers for new platforms. The APIs will be discussed, and the mechanisms for effecting transfers will be explored. Future directions for the APIs will also be discussed. The author will present areas where enthusiastic individuals can contribute to the overall efforts.