科美工业存储论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2890|回复: 2

eMMC查看底层运行状况信息的方法

[复制链接]

11

主题

16

帖子

91

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
91
发表于 2022-8-16 08:52:27 | 显示全部楼层 |阅读模式
最近,经常有客户咨询如何查看eMMC底层信息,如何了解eMMC运行状况,或者如和把握eMMC使用剩余寿命,eMMC是否有类似于SSD的SMART信息的窗口。

实际上,这是有的,但是功能没有SMART强大。
这个工具就是:mmc-utilshttps://packages.debian.org/stretch/mmc-utils)中的“ mmc”实用程序。其他下载地址:git(https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git/

但是,我还没有看到写入和/或坏块计数器。

示例:
  1. # mmc extcsd read /dev/mmcblk1
  2. =============================================
  3.   Extended CSD rev 1.7 (MMC 5.0)
  4. =============================================

  5. Card Supported Command sets [S_CMD_SET: 0x01]
  6. HPI Features [HPI_FEATURE: 0x01]: implementation based on CMD13
  7. Background operations support [BKOPS_SUPPORT: 0x01]
  8. Max Packet Read Cmd [MAX_PACKED_READS: 0x3f]
  9. Max Packet Write Cmd [MAX_PACKED_WRITES: 0x3f]
  10. Data TAG support [DATA_TAG_SUPPORT: 0x01]
  11. Data TAG Unit Size [TAG_UNIT_SIZE: 0x03]
  12. Tag Resources Size [TAG_RES_SIZE: 0x03]
  13. Context Management Capabilities [CONTEXT_CAPABILITIES: 0x05]
  14. Large Unit Size [LARGE_UNIT_SIZE_M1: 0x00]
  15. Extended partition attribute support [EXT_SUPPORT: 0x03]
  16. Generic CMD6 Timer [GENERIC_CMD6_TIME: 0x19]
  17. Power off notification [POWER_OFF_LONG_TIME: 0x19]
  18. Cache Size [CACHE_SIZE] is 4096 KiB
  19. Background operations status [BKOPS_STATUS: 0x00]
  20. 1st Initialisation Time after programmed sector [INI_TIMEOUT_AP: 0x50]
  21. Power class for 52MHz, DDR at 3.6V [PWR_CL_DDR_52_360: 0x00]
  22. Power class for 52MHz, DDR at 1.95V [PWR_CL_DDR_52_195: 0xdd]
  23. Power class for 200MHz at 3.6V [PWR_CL_200_360: 0xdd]
  24. Power class for 200MHz, at 1.95V [PWR_CL_200_195: 0x00]
  25. Minimum Performance for 8bit at 52MHz in DDR mode:
  26. [MIN_PERF_DDR_W_8_52: 0x00]
  27. [MIN_PERF_DDR_R_8_52: 0x00]
  28. TRIM Multiplier [TRIM_MULT: 0x03]
  29. Secure Feature support [SEC_FEATURE_SUPPORT: 0x55]
  30. Boot Information [BOOT_INFO: 0x07]
  31. Device supports alternative boot method
  32. Device supports dual data rate during boot
  33. Device supports high speed timing during boot
  34. Boot partition size [BOOT_SIZE_MULTI: 0x20]
  35. Access size [ACC_SIZE: 0x08]
  36. High-capacity erase unit size [HC_ERASE_GRP_SIZE: 0x01]
  37. i.e. 512 KiB
  38. High-capacity erase timeout [ERASE_TIMEOUT_MULT: 0x03]
  39. Reliable write sector count [REL_WR_SEC_C: 0x01]
  40. High-capacity W protect group size [HC_WP_GRP_SIZE: 0x10]
  41. i.e. 8192 KiB
  42. Sleep current (VCC) [S_C_VCC: 0x08]
  43. Sleep current (VCCQ) [S_C_VCCQ: 0x07]
  44. Sleep/awake timeout [S_A_TIMEOUT: 0x12]
  45. Sector Count [SEC_COUNT: 0x00e90000]
  46. Device is block-addressed
  47. Minimum Write Performance for 8bit:
  48. [MIN_PERF_W_8_52: 0x0a]
  49. [MIN_PERF_R_8_52: 0x0a]
  50. [MIN_PERF_W_8_26_4_52: 0x0a]
  51. [MIN_PERF_R_8_26_4_52: 0x0a]
  52. Minimum Write Performance for 4bit:
  53. [MIN_PERF_W_4_26: 0x0a]
  54. [MIN_PERF_R_4_26: 0x0a]
  55. Power classes registers:
  56. [PWR_CL_26_360: 0x00]
  57. [PWR_CL_52_360: 0x00]
  58. [PWR_CL_26_195: 0xdd]
  59. [PWR_CL_52_195: 0xdd]
  60. Partition switching timing [PARTITION_SWITCH_TIME: 0x03]
  61. Out-of-interrupt busy timing [OUT_OF_INTERRUPT_TIME: 0x05]
  62. I/O Driver Strength [DRIVER_STRENGTH: 0x1f]
  63. Card Type [CARD_TYPE: 0x57]
  64. HS200 Single Data Rate eMMC @200MHz 1.8VI/O
  65. HS Dual Data Rate eMMC @52MHz 1.8V or 3VI/O
  66. HS eMMC @52MHz - at rated device voltage(s)
  67. HS eMMC @26MHz - at rated device voltage(s)
  68. CSD structure version [CSD_STRUCTURE: 0x02]
  69. Command set [CMD_SET: 0x00]
  70. Command set revision [CMD_SET_REV: 0x00]
  71. Power class [POWER_CLASS: 0x0d]
  72. High-speed interface timing [HS_TIMING: 0x02]
  73. Erased memory content [ERASED_MEM_CONT: 0x00]
  74. Boot configuration bytes [PARTITION_CONFIG: 0x00]
  75. Not boot enable
  76. No access to boot partition
  77. Boot config protection [BOOT_CONFIG_PROT: 0x00]
  78. Boot bus Conditions [BOOT_BUS_CONDITIONS: 0x00]
  79. High-density erase group definition [ERASE_GROUP_DEF: 0x01]
  80. Boot write protection status registers [BOOT_WP_STATUS]: 0x00
  81. Boot Area Write protection [BOOT_WP]: 0x00
  82. Power ro locking: possible
  83. Permanent ro locking: possible
  84. ro lock status: not locked
  85. User area write protection register [USER_WP]: 0x00
  86. FW configuration [FW_CONFIG]: 0x00
  87. RPMB Size [RPMB_SIZE_MULT]: 0x20
  88. Write reliability setting register [WR_REL_SET]: 0x1f
  89. user area: the device protects existing data if a power failure occurs during a write operation
  90. partition 1: the device protects existing data if a power failure occurs during a write operation
  91. partition 2: the device protects existing data if a power failure occurs during a write operation
  92. partition 3: the device protects existing data if a power failure occurs during a write operation
  93. partition 4: the device protects existing data if a power failure occurs during a write operation
  94. Write reliability parameter register [WR_REL_PARAM]: 0x05
  95. Device supports writing EXT_CSD_WR_REL_SET
  96. Device supports the enhanced def. of reliable write
  97. Enable background operations handshake [BKOPS_EN]: 0x00
  98. H/W reset function [RST_N_FUNCTION]: 0x00
  99. HPI management [HPI_MGMT]: 0x01
  100. Partitioning Support [PARTITIONING_SUPPORT]: 0x07
  101. Device support partitioning feature
  102. Device can have enhanced tech.
  103. Max Enhanced Area Size [MAX_ENH_SIZE_MULT]: 0x000124
  104. i.e. 2392064 KiB
  105. Partitions attribute [PARTITIONS_ATTRIBUTE]: 0x00
  106. Partitioning Setting [PARTITION_SETTING_COMPLETED]: 0x00
  107. Device partition setting NOT complete
  108. General Purpose Partition Size
  109. [GP_SIZE_MULT_4]: 0x000000
  110. [GP_SIZE_MULT_3]: 0x000000
  111. [GP_SIZE_MULT_2]: 0x000000
  112. [GP_SIZE_MULT_1]: 0x000000
  113. Enhanced User Data Area Size [ENH_SIZE_MULT]: 0x000000
  114. i.e. 0 KiB
  115. Enhanced User Data Start Address [ENH_START_ADDR]: 0x000000
  116. i.e. 0 bytes offset
  117. Bad Block Management mode [SEC_BAD_BLK_MGMNT]: 0x00
  118. Periodic Wake-up [PERIODIC_WAKEUP]: 0x00
  119. Program CID/CSD in DDR mode support [PROGRAM_CID_CSD_DDR_SUPPORT]: 0x01
  120. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[127]]: 0x00
  121. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[126]]: 0x00
  122. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[125]]: 0x00
  123. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[124]]: 0x00
  124. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[123]]: 0x00
  125. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[122]]: 0x00
  126. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[121]]: 0x00
  127. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[120]]: 0x02
  128. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[119]]: 0x00
  129. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[118]]: 0x00
  130. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[117]]: 0x00
  131. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[116]]: 0x00
  132. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[115]]: 0x00
  133. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[114]]: 0x00
  134. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[113]]: 0x00
  135. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[112]]: 0x00
  136. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[111]]: 0x00
  137. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[110]]: 0x00
  138. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[109]]: 0x00
  139. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[108]]: 0x00
  140. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[107]]: 0x00
  141. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[106]]: 0x00
  142. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[105]]: 0x00
  143. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[104]]: 0x00
  144. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[103]]: 0x00
  145. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[102]]: 0x00
  146. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[101]]: 0x00
  147. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[100]]: 0x00
  148. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[99]]: 0x00
  149. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[98]]: 0x00
  150. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[97]]: 0x00
  151. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[96]]: 0x00
  152. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[95]]: 0x02
  153. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[94]]: 0x01
  154. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[93]]: 0x04
  155. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[92]]: 0x00
  156. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[91]]: 0x00
  157. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[90]]: 0x00
  158. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[89]]: 0x00
  159. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[88]]: 0x00
  160. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[87]]: 0x00
  161. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[86]]: 0x00
  162. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[85]]: 0x03
  163. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[84]]: 0x00
  164. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[83]]: 0x00
  165. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[82]]: 0x00
  166. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[81]]: 0x00
  167. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[80]]: 0x00
  168. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[79]]: 0x00
  169. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[78]]: 0x00
  170. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[77]]: 0x00
  171. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[76]]: 0x00
  172. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[75]]: 0x00
  173. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[74]]: 0x00
  174. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[73]]: 0x00
  175. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[72]]: 0x00
  176. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[71]]: 0x00
  177. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[70]]: 0x00
  178. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[69]]: 0x00
  179. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[68]]: 0x00
  180. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[67]]: 0x00
  181. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[66]]: 0x00
  182. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[65]]: 0x00
  183. Vendor Specific Fields [VENDOR_SPECIFIC_FIELD[64]]: 0x00
  184. Native sector size [NATIVE_SECTOR_SIZE]: 0x00
  185. Sector size emulation [USE_NATIVE_SECTOR]: 0x00
  186. Sector size [DATA_SECTOR_SIZE]: 0x00
  187. 1st initialization after disabling sector size emulation [INI_TIMEOUT_EMU]: 0x0a
  188. Class 6 commands control [CLASS_6_CTRL]: 0x00
  189. Number of addressed group to be Released[DYNCAP_NEEDED]: 0x00
  190. Exception events control [EXCEPTION_EVENTS_CTRL]: 0x0000
  191. Exception events status[EXCEPTION_EVENTS_STATUS]: 0x0000
  192. Extended Partitions Attribute [EXT_PARTITIONS_ATTRIBUTE]: 0x0000
  193. Context configuration [CONTEXT_CONF[51]]: 0x00
  194. Context configuration [CONTEXT_CONF[50]]: 0x00
  195. Context configuration [CONTEXT_CONF[49]]: 0x00
  196. Context configuration [CONTEXT_CONF[48]]: 0x00
  197. Context configuration [CONTEXT_CONF[47]]: 0x00
  198. Context configuration [CONTEXT_CONF[46]]: 0x00
  199. Context configuration [CONTEXT_CONF[45]]: 0x00
  200. Context configuration [CONTEXT_CONF[44]]: 0x00
  201. Context configuration [CONTEXT_CONF[43]]: 0x00
  202. Context configuration [CONTEXT_CONF[42]]: 0x00
  203. Context configuration [CONTEXT_CONF[41]]: 0x00
  204. Context configuration [CONTEXT_CONF[40]]: 0x00
  205. Context configuration [CONTEXT_CONF[39]]: 0x00
  206. Context configuration [CONTEXT_CONF[38]]: 0x00
  207. Context configuration [CONTEXT_CONF[37]]: 0x00
  208. Packed command status [PACKED_COMMAND_STATUS]: 0x00
  209. Packed command failure index [PACKED_FAILURE_INDEX]: 0x00
  210. Power Off Notification [POWER_OFF_NOTIFICATION]: 0x01
  211. Control to turn the Cache ON/OFF [CACHE_CTRL]: 0x01
  212. eMMC Firmware Version: 002122  AS
复制代码

回复

使用道具 举报

11

主题

16

帖子

91

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
91
 楼主| 发表于 2022-8-16 08:52:39 | 显示全部楼层

eMMC掉电导致错误检查

Write reliability setting register [WR_REL_SET]: 0x1f
user area: the device protects existing data if a power failure occurs during a write operation
回复

使用道具 举报

11

主题

16

帖子

91

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
91
 楼主| 发表于 2022-8-16 08:53:50 | 显示全部楼层

eMMC剩余寿命检查

eMMC剩余寿命
DEVICE_LIFE_TIME_EST_TYP_ {A,B},其中1表示保留0-10%所使用的块数,2是10-20%,依此类推。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|科美工业存储论坛

GMT+8, 2024-7-13 00:29 , Processed in 0.049471 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表