I am familiar enough with eMMC features as there is a great deal of documentation about them. I understand that SD cards have permanent write protection, temporary write protection, and even password-based protection, but these seem to require special equipment to use (strikes me as somewhat stupid for OEMs not to implement this since they use the same exact contacts). eMMCs—and MMCs, as far as I know—support the ability to make certain regions write-protected, so something like a bootloader can be safe against accidental corruption. Do SD cards have this same or similar functionality? If they do, does this include power-on write protection, wherein a lock, when set, will last for as long as power is provided to the card?
SD cards have co-operative hardware write protection, which is a switch on the side of the card sensed by the OS driver.
The SD cards also support:
- Permanent write protection, PERM_WRITE_PROTECT
- Temporary write protection, TMP_WRITE_PROTECT first
- Write protect group size, WP_GRP_SIZE (set aside strings of sectors/blocks that are write protected)
All of these settings are in the CSD register which is read by the OS driver using CMD's when your media is first mounted.
You can read all about the registers here. The specification applies to all media up to, but not including UHS cards.
The driver supports a serial CMD structure for the SD cards, and the password protection is included here. You have to read the physical layer specification to understand how to read and write to the card.