CAM, FreeBSD, mmccam

Implementing a MMC/SD/SDIO stack using CAM framework(Part 1)

In this blog post we will have a detailed look at all the files added/changed while implementing the MMC/SD/SDIO stack via CAM framework. We will basically discuss the commit  https://github.com/freebsd/freebsd/commit/a87c7a85be3e3727b6b08b19741b4282f942400d which aims at adding MMC/SD/SDIO stack to FreeBSD’s already existing CAM framework. So, lets start one by one with each file: mmc.h #ifndef CAM_MMC_H #define CAM_MMC_H #include <dev/mmc/mmcreg.h> /* * This structure describes an MMC/SD card */ struct mmc_params { u_int8_t model[40]; /* Card model */ /* Card OCR */ uint32_t card_ocr; /* OCR of the IO portion of the card */ uint32_t io_ocr; /* Card CID — raw and…

Continue Reading

CAM, FreeBSD

Understanding FreeBSD’s CAM Framework

This blog post presents a gist of Free BSD’s doc on CAM(here) and chapter 14 of the book FreeBSD device driver- A guide for intrepid. It gives an introduction to the CAM(Common access method), it’s applications, it’s working and it’s organization in FreeBSD. It is written to get myself a really good understanding of mmccam stack which is nothing but SDHC/SDIO protocols wired within the CAM framework. COMMON ACCESS METHOD CAM is a method for separating HBA adapters from storage adapters and is primarily used for SCSI. By separating these drivers it reduces the complexity of both the drivers.Furthermore, this…

Continue Reading