\input{configpres}

\subsection{Memory Technology Devices (MTD)}

\title{\lq Memory Technology Devices (MTD)\rq}
\maketitle

\begin{frame}
\tableofcontents
\end{frame}

\subsubsection{Overview}
\begin{frame}
\frametitle{Overview}
\begin{itemize}
\item designed for flash devices (NAND, NOR, DataFlash, OneNAND, \dots)
\pause
\item software- and hardware-ECC support
\pause
\item takes care on deletion of specified eraseblocksizes
\pause
\item wiring of chip is not relevant (Localbus, SPI, \dots)
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{None MTD Flash Devices}
\begin{itemize}
\item USB sticks, CompactFlash Cards, SD Cards, SSD\dots
\pause
\item devices have NAND flash, but own flashcontroller
\pause
\item kernel handles them as block device, like a regular HDD
\pause
\item flash properties, like eraseblocksize, are hidden by flashcontroller
\end{itemize}
\end{frame}

\subsubsection{MTD Kernelsubsystem}
\begin{frame}
\frametitle{responsibility of the MTD subsystem}
\begin{itemize}
\item definition of a userspace interface
\pause
\item partitioning of mtd devices (mtd0, mtd1, \dots)
\pause
\item hides flash internals from user
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{NOT part of the MTD subsystem}
\begin{itemize}
\item filesystems
\pause
\item wear-leveling
\pause
\item protection of writing to bad blocks
\pause
\item data protection for writes during power loss
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{mtdblock}
\begin{itemize}
\item enable use of common filesystem on flash devices
\pause
\item bad idea: no wear-leveling, bad performance, \dots
\pause
\item obsoleted by UBI
\end{itemize}
\end{frame}

\subsubsection{MTD Error Correction}

\begin{frame}
\frametitle{Kernel Support}
\begin{itemize}
\item Software ECC
\begin{itemize}
\item single bitflips (Hamming code) \\ 3 byte ECC per 256/512 byte
\item multiple bitflips (BCH code) \\ e.g. 7 byte ECC per 512 byte (4 bitflips)
\end{itemize}
\item Hardware ECC
\begin{itemize}
\item depends on NAND Hardware capabilities
\end{itemize}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{ECC variations}
\begin{beamerboxesrounded}[shadow=true]{Software ECC}
\begin{itemize}
\item full flexibility
\item performance on small CPUs
\end{itemize}~\\
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{images/nand_ecc_sw.png}
\end{figure}
\end{beamerboxesrounded}
\end{frame}

\begin{frame}
\frametitle{ECC variations}
\begin{beamerboxesrounded}[shadow=true]{Hardware-assisted ECC}
\begin{itemize}
\item restricted to HW Algorithms
\item good performance on small CPUs
\end{itemize}~\\
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{images/nand_ecc_hw_part.png}
\end{figure}
\end{beamerboxesrounded}
\end{frame}

\begin{frame}
\frametitle{ECC variations}
\begin{beamerboxesrounded}[shadow=true]{Hardware ECC}
\begin{itemize}
\item restricted to HW Algorithms
\item good performance on small CPUs
\item transparent usage
\item different layout requirements
\end{itemize}~\\
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{images/nand_ecc_hw_full.png}
\end{figure}
\end{beamerboxesrounded}
\end{frame}

\begin{frame}
\frametitle{ECC Layout}
Software ECC
\begin{itemize}
\item read data in one step and store ECC in OOB area
\end{itemize}
\begin{beamerboxesrounded}[shadow=true]{Software ECC Layout}
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{images/mtd_ecc_sw.png}
\end{figure}
\end{beamerboxesrounded}
\end{frame}

\begin{frame}
\frametitle{ECC Layout}
Full Hardware ECC
\begin{itemize}
\item read data in chunks and store ECC aligned
\item bad block marker in OOB are no longer usable
\item requires badblock table (BBT)
\end{itemize}
\begin{beamerboxesrounded}[shadow=true]{Hardware ECC Layout}
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{images/mtd_ecc_hw.png}
\end{figure}
\end{beamerboxesrounded}
\end{frame}

\begin{frame}
\frametitle{ECC pitfalls}
\begin{itemize}
\item bootloader:
\begin{itemize}
\item algorithm
\item layout
\end{itemize}
\item runtime:
\begin{itemize}
\item periodical reads of all UBI partitions
\item UBI copy PEBs with bitflips to new PEBs
\end{itemize}
\end{itemize}
\end{frame}

\input{tailpres}
