Thursday, November 12, 2015

storage - Is the lock mechanism on an SD card hardware, firmware, or software (driver,OS) enforced?


Where is the lock to read-only mode enforced with SD cards? Is this done inside the card itself physically, in the firmware of readers, or in the OS? (Some other place?)


Answer



If you read the SD Specifications Part 1 Physical Layer Simplified Specification, section 4.3.6 "Write Protect Management" says



Three write protect methods are supported in the SD Memory Card as follows:
- Mechanical write protect switch (Host responsibility only)
- Card internal write protect (Card's responsibility)
- Password protection card lock operation.


Mechanical Write Protect Switch


A mechanical sliding tablet on the side of the card (refer to the Part 1 Mechanical Addenda) will be used
by the user to indicate that a given card is write protected or not. If the sliding tablet is positioned in
such a way that the window is open it means that the card is write protected. If the window is close the
card is not write-protected.
A proper, matched, switch on the socket side will indicate to the host that the card is write-protected or
not. It is the responsibility of the host to protect the card. The position of the write protect switch is unknown to the internal circuitry of the card.



(my emphasis)


A TOSHIBA SD Card Specification says



CMD28 SET_WRITE_PROT - Internal Write Protection is not implemented.
CMD29 CLR_WRITE_PROT - Internal Write Protection is not implemented.
CMD30 SEND_WRITE_PROT - Internal Write Protection is not implemented.





2)Non Supported Functions:
Card ‘s Internal Write Protect (Optional in PHYSICAL LAYER SPECIFICATION 4.3.5.)



No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...