Western Digital T13/2132-D manual Send Packet Command FN 50h

Page 78

T13/2132-D Revision 3

June 23, 2010

8.27 Send Packet Command (FN 50h)

8.27.1 Overview

This function defines a service that the system BIOS shall call for sending data to and from a device implementing a protocol using packet transfers. The BIOS shall provide this service before the OS is loaded. When an operating system takes control of the device controller it replaces the BIOS routine for this service to provide a seamless transfer of control from the BIOS to the operating system. This service allows several BIOS level services to continue functioning, even after the OS has taken control of the device controller, for example:

a)The INT 13h mass storage interface

b)Power Management

c)Suspend to disk

The BIOS is single threaded. This means that the BIOS shall not process asynchronous requests from other devices. The BIOS shall send commands to devices and wait for responses. This means that the operating system may take control of the serial interface with no hand-off information from the system BIOS. The operating system shall reconfigure the interface and hook the service described above. The system BIOS may provide INT 13h FN 50h for the 1394, USB, and any other packet oriented bus.

The format of the packet shall be determined by the requirements of the target bus and is beyond the scope of this document. In the case of USB, the packet format shall be determined by the USB specification. In the case of 1394, IEEE 1394-1995 shall determine the size of a packet with payload information defined in SBP-2.

Entry

AH 50h

AL D7h

DL BIOS device number

ES:SI Pointer to formatted command packet (see table 30)

Exit

Carry Clear Function completed without error AH Shall be cleared to zero

Carry Set Function completed with an error

AH AH = 01 - Function not implemented, 80h - Command failed to complete, 97h

-Subfunction D7h not supported for this device, C3h - Formatted Command Packet is too short

Table 30 — Formatted Command Packet

Offset

Type

Description

0

Word

Length of this record in bytes

 

 

 

2-n

Byte

Formatted protocol specific data

 

 

 

8.27.2Packet Sending Service (PSS) For SCSI Command Descriptor Blocks (CDB) 8.27.2.1 Overview

The purpose of the PSS is to allow an application to send SCSI CDB's using BIOS INT 13h calls to a device, regardless of the bus on which the device resides. This interface is currently defined for ATAPI, SCSI, 1394, and USB devices. Future buses that use SCSI CDB's may also adopt this mechanism for transporting commands

This interface shall not retry any operation. If an error occurs either in command format, or operation of the device, an error shall be returned by INT 13h. The application may choose to retry a command by issuing it again.

66

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

Image 78
Contents Information technology Enhanced Disk Drive 4 EDD-4 Revision June 23Points of Contact T13/2132-D Revision 3June 23Working Draft Enhanced Disk Drive 4 EDD-4 Draft June 23 T13/2132-D RevisionAmerican National Standard T13/2132-D Revision June 23Document Status New Capabilities added to EDD-4Contents Working Draft Enhanced Disk Drive 4 EDD-4 Vii Viii Working Draft Enhanced Disk Drive 4 EDD-4 Tables Output ParametersFigures Foreword IntroductionXii Working Draft Enhanced Disk Drive 4 EDD-4 Scope BSR IncitsAmerican National Standard for Information Technology ATA8-APT ATA8-AST Normative references General Approved referencesApproved Ansi References Name References under development Other referencesReferences Under Development Name Project Number June 23 T13/2132-D Revision Conventions Symbols and abbreviationsMaster Boot Record MBR The first LBA on a disk Abbreviation MeaningUnordered lists PrecedenceLists Lists overview Ordered listsT13/2132-D Revision June 23 Keywords NumberingNumbering conventions French English This standard Register and CF ContentsInterrupt Services and Functions Bit conventionsDWord at word offset n ByteWord at offset n QWord at word offset nWord ATA string byte swapping Word Byte Character in stringATA firmware revision example Byte ValueOverview Register Description 8GB INT 13h Functions Conventional FunctionsConventional Register Definitions Bit DescriptionConventional Function Definitions Function a Description Extended Function Definitions 8GB INT 13h Functions OverviewData Structure Function DescriptionT13/2132-D Revision June 23 Device Address Packet Offset Removable Media Fixed Disk Access SubsetFixed Disk Access Function Code INT 13h Interface SubsetsLocking and Ejecting Function Code Enhanced Disk Drive EDD Support SubsetEDD Support Function Code CD/DVD Boot Overview ISO 9660 CD Layout Working Draft Enhanced Disk Drive 4 EDD-4System Area Unused Boot Methods Emulation ProcessHard Drive Boot No Emulation BootFloppy Boot Floppy Geometries Type Cylinders Heads SectorsBoot Volume Descriptor BVD Boot Volume DescriptorCD/DVD Format T13/2132-D Revision June 23 Validation Entry Offset Type DescriptionJune 23 T13/2132-D Revision Initial/Default Entry Section Header00h Byte Header ID June 23 T13/2132-D Revision Section Entry Type DescriptionT13/2132-D Revision June 23 Section Entry Extension INT 13h Function Definitions Overview Reset Disk Subsystem FN 00h Get Status of Last Operation FN 01h Read Sectors into Memory FN 02h Write Sectors From Memory FN 03h Verify Sectors FN 04h Get Drive Parameters FN 08h Read Buffer FN 0Eh Write Buffer FN 0Fh Get Disk Type FN 15h Value DescriptionSet Media Type FN 18h Park Heads FN 19h Identify Device Information FN 25h Check Extensions Present FN 41h Interface Support Bit Map DescriptionExtended Read FN 42h Extended Write FN 43h Verify Sectors FN 44h Lock/Unlock Media FN 45h Eject Removable Media FN 46h Get Device Parameters FN 48h Result BufferAscii T13/2132-D Revision June 23 Interface Path Interface Path Definitions part 1 Host Bus Type OffsetDefinition Device Path00h ATA Device 01h 02h..FFh Reserved Byte Word DWord QWord Byte Port number Device parameter table extension Offset 0-1 I/O port base Offset 5 Bios use only Bios use only Offset 6 IRQ numberOffset 7 READ/WRITE Multiple command block count Offset 2-3 control port baseBit 8 Atapi device uses command packet interrupt Offset 10-11 Bios selected hardware specific option flagsBit 7 32-bit transfer mode Offset 9 PIO typeTranslation Type Bits Description Bit 13h 48-bit LBA addressing enabledJune 23 T13/2132-D Revision Bits 9-10 translation type Bit 11 Ultra DMAGet Extended Media Change Status FN 49h Initiate Disk Emulation FN 4Ah Value Emulation Working Draft Enhanced Disk Drive 4 EDD-4 Terminate Disk Emulation FN 4Bh Initiate Disk Emulation & Boot FN 4Ch Return Boot Catalog FN 4Dh CD Command PacketSet Hardware Configuration FN 4Eh Hardware Configuration Sub-FunctionsSend Packet Command FN 50h Formatted Command Packet Offset Type DescriptionFormatted Protocol Specific Data T13/2132-D Revision June 23 Output Parameters Security Protocol Commands FN 51h INT 15h Removable Media Eject Hybrid MBR boot Hybrid MBR boot overview GPT support for hybrid MBR boot codeAnnex a Hybrid MBR boot code Hybrid MBR boot code endeavor procedure EAXHybrid VBR boot code