T13/2132-D Revision 3

June 23, 2010

8.18 Lock/Unlock Media (FN 45h)

This function locks or unlocks removable media in a specific device. All removable media devices numbered 80h and above shall implement this function. If a fixed disk (non-removable device) supports the media locking and ejecting subset, this function shall return with success (i.e., AH = 00h and CF = 0b). There shall be support for 255 locks per device. A device shall not be unlocked until all locks to that device have been released with unlock commands. Excess unlock calls shall return with CF = 1b and AH = B0h. If the number of locks supported value is exceeded on a lock request, this function shall reject the request with CF = 1b and AH = B4h. Locking a device without media present shall be a valid operation. On return from a lock or unlock request, AL shall contain the lock state of the media as maintained by the BIOS. This provides for unlock requests when the lock count is greater than zero. In this case, the media shall remain locked. Any physical locking and unlocking of the media shall be implementation dependent, but the caller may operate on the assumption that locked media cannot be removed without an unlock request. After power-on, or a system reset, all devices shall automatically enter an unlocked state.

Entry

AH 45h

AL

Value Description

00h Lock media in device

01h Unlock media in device

02h Return lock/unlock status

03h-FFh Reserved

DL BIOS device number

Exit

Carry Clear Function completed without error

AH Shall be cleared to zero

AL

Value Description

00h Device is not locked

01h Device is locked

02h-FFh Reserved

Carry Set Function completed with an error

AH Shall be set to the error code

46

Working Draft Enhanced Disk Drive - 4 (EDD-4)

Page 58
Image 58
Western Digital T13/2132-D manual Lock/Unlock Media FN 45h