Tool/software:
I recently started using the hardware boot partitions on eMMC. Reads from /dev/mmcblk1boot[0|1] typically return the expected data. Occasionally however, a read will return data not from /dev/mmcblk1boot0 but from /dev/mmcblk1 instead. Using hexdump, I can see that the offset specified is correct, just the data comes from the wrong device node. An example of this occurring is below. I tried running hexdump with strace to compare good vs bad reads and the only meaningful difference between the two is the data returned. I can see the device node /dev/mmcblk1boot0 is being opened in both. This same eMMC part is used on another, non-AM57 target and it does not exhibit the same behavior.
My Linux kernel version is 6.1.38 and I have CONFIG_MMC_OMAP and CONFIG_MMC_OMAP_HS compiled in. Any thoughts on what might be cause the occasional bad reads?
Good read:
hexdump -C /dev/mmcblk1boot0 -s 0x3FC000 -n 20
003fc000 4b d8 fa 7e 42 4f 4f 54 5f 41 5f 4c 45 46 54 3d |K..~BOOT_A_LEFT=|
003fc010 33 00 42 4f |3.BO|
003fc014
Bad read:
hexdump -C /dev/mmcblk1boot0 -s 0x3FC000 -n 20
003fc000 51 b9 9a 36 f0 56 e7 c4 d3 36 2b 2d 2c d2 e5 bd |Q..6.V...6+-,...|
003fc010 66 8a 00 98 |f...|
003fc014
Read from same offset of /dev/mmcblk1
hexdump -C /dev/mmcblk1 -s 0x3FC000 -n 20
003fc000 51 b9 9a 36 f0 56 e7 c4 d3 36 2b 2d 2c d2 e5 bd |Q..6.V...6+-,...|
003fc010 66 8a 00 98 |f...|
003fc014
Thanks,
Dave