Changes between Version 39 and Version 40 of MMC
- Timestamp:
- 05/01/2025 05:55:15 PM (4 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MMC
v39 v40 116 116 - eMMC can be programmed once with enhanced capabilities which is done when the device is partitioned by the manufacturer. This programming includes number of boot partitions, size of replay protected memory block (RPMB), up to four general purpose partitions (which can be 0 len) and a user data area. Some manufacturers will provide the opportunity to re-configure. 117 117 118 Note that changing your eMMC partitioning differs a bit for each eMMC part (Manufacturer make and model) and needs to be done very early on as it can't succeed after a certain number of writes have occurred. If you need a specific partition configuration for a high volume product contact sales@gateworks.com for more info. 119 118 120 119 121 [=#emmc-partconf] 120 122 === eMMC PARTITION_CONFIG (Boot partition selection) === 121 Because eMMC provides multiple hardware partitions but only one can be selected at a time. A non-volatile register in the eMMC device provides a PARTITION_CONFIG that is used to determine what partition is selected at power-up for boot devices. To access this data you need to read/write a 'Card Specific Data' or CSD register (EXT_CSD[179] - EXT_CSC_PART_CONFIG). This can be done both in Linux (see [#emmc-linux below]) or U-Boot (see [#emmc-uboot below]). 122 123 Note that changing your eMMC partitioning differs a bit for each eMMC part (Manufacturer make and model) and needs to be done very early on as it can't succeed after a certain number of writes have occurred. If you need a specific partition configuration for a high volume product contact sales@gateworks.com for more info. 123 eMMC devices provides multiple hardware partitions but only one can be selected at a time. A non-volatile register in the eMMC device provides a PARTITION_CONFIG that is used to determine what partition is selected at power-up for boot devices. To access this data you need to read/write a 'Card Specific Data' or CSD register (EXT_CSD![179] - EXT_CSC_PART_CONFIG). This can be done both in Linux (see [#emmc-linux below]) or U-Boot (see [#emmc-uboot below]). 124 124 125 125 [=#emmc-uboot] … … 184 184 }}} 185 185 186 To determine the current eMMC hardware boot partition you need to look at the PARTITION_CONFIG(EXT_CSD![179]) register bits ![5:3] 'BOOT_PARTITION_ENABLE' where 1='Boot Partition 1' (we call this boot0) 2='Boot Partition 2' (we call this boot1) and 7=User area (we call this user). 187 188 Here is a set of bash commands in Linux that will use {{{mmc}}} (from the {{{mmc-utils}}} package) to read the CSD, decode the value and display the names we use to refer to the boot partition: 189 {{{#!bash 190 PARTITION_CONFIG=$(mmc extcsd read /dev/mmcblk2 | grep PARTITION_CONFIG | grep -o "0x[0-9a-fA-F]\+") 191 BOOT_PARTITION_ENABLE=$(( $(( $((PARTITION_CONFIG)) & 0x38 )) >> 3)) # convert hex to dec and mask off bits[5:3] and shift 192 case $BOOT_PARTITION_ENABLE in 193 1) echo boot0;; # Boot partition 1 194 2) echo boot1;; # Boot partition 2 195 7) echo user;; # User area 196 esac 197 }}} 198 186 199 Some additional use cases: 187 200 {{{#!bash … … 194 207 }}} 195 208 209 210 196 211 References: 197 212 * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/mmc/mmc-tools.txt … … 201 216 === eMMC Enhanced User Area and Pseudo SLC 202 217 The eMMC 4.4 standard introduced the concept of 'Enhanced User Area' in order to improve reliability, performance, and endurance. This allows a one-time configuration of the eMMC to configure all or some of the MLC NAND flash as Psuedo SLC (pSLC) where instead of 2 bits per cell it uses 1 bit per cell. This will reduce the available size of the eMMC as a trade-off for improved reliability, performance, and endurance. 218 219 Note that changing your eMMC partitioning differs a bit for each eMMC part (Manufacturer make and model) and needs to be done very early on as it can't succeed after a certain number of writes have occurred. If you need a specific partition configuration for a high volume product contact sales@gateworks.com for more info. 203 220 204 221 The specification for Enhanced User Area does not specify a particular implementation or require eMMC devices to even support Enhanced User Area.