Western Digital T13/2132-D manual Hybrid MBR boot code endeavor procedure, Eax

Page 85

June 23, 2010

T13/2132-D Revision 3

9)set the IA-32 registers according to the hybrid MBR boot code hand over procedure (see A.4) and jump to 7C00h.

NOTE 4 — In contrast, legacy MBR boot code searches the MBR Partition Records for a partition with the Boot Indicator field set to 80h, then loads the VBR based on the Starting LBA field and passes the Size In LBA field to the VBR.

A.4 Hybrid MBR boot code endeavor procedure

Hybrid MBR boot code fills in the IA-32 registers according to table A.2 before jumping to 7C00h.

Table A.2 — Hybrid MBR endeavor IA-32 register values

Register

Description

Differences from legacy MBR hand over

DL

Disk number

No change

 

 

 

ES:DI

Pointer to $PnP

No change

 

 

 

EAX

54504721h (i.e., "!GPT"). Indicates that the hybrid

New

 

MBR hand over structure is being passed with

 

 

DS:SI rather than the legacy MBR Partition Record

 

DS:SI

Pointer to the hybrid MBR hand over structure (see

New

 

table A.3)

 

Table A.3 defines the Hybrid MBR boot code hand over structure.

NOTE 5 — With legacy MBR boot code, this structure included fields from the MBR Partition Record of the boot partition. Since the GPT partition may be located at an LBA beyond the 32-bit LBA addressing boundary, additional fields are added to communicate the full information to the VBR.

Table A.3 — Hybrid MBR boot code hand over structure

 

Byte

Byte

 

Differences from legacy

Mnemonic

Offset

Length

Description

MBR hand over structure

 

 

 

 

 

Boot Indicator

0

1

Set to 80h (i.e., bootable).

Fixed value

 

 

 

 

 

Starting CHS

1

3

Set to FF_FFFFh. The VBR boot code

Fixed value

 

 

 

should ignore this field.

 

 

 

 

 

 

OS Type

4

1

Set to the OS Type of the bootable

No change

 

 

 

partition (i.e., that would have been

 

 

 

 

assigned had the partition been

 

 

 

 

installed in an MBR disk layout).

 

Ending CHS

5

3

Set to FF_FFFFh. The VBR boot code

Fixed value

 

 

 

should ignore this field.

 

 

 

 

 

 

Starting LBA

8

4

Set to FFFF_FFFFh.

Fixed value

 

 

 

 

 

Size In LBA

12

4

Set to FFFF_FFFFh.

Fixed value

 

 

 

 

 

Size Of Partition Entry

16

4

Set to the Size Of Partition Entry field of

New value

 

 

 

the GPT Partition Header.

 

 

 

 

 

 

GPT Partition Entry

20

Partition

Set to the GPT Partition Entry of the

New value

 

 

Entry

boot partition

 

 

 

Size

 

 

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

73

Image 85
Contents Revision June 23 Information technology Enhanced Disk Drive 4 EDD-4T13/2132-D Revision 3June 23 Points of ContactWorking Draft Enhanced Disk Drive 4 EDD-4 June 23 T13/2132-D Revision DraftT13/2132-D Revision June 23 American National StandardNew Capabilities added to EDD-4 Document StatusContents Working Draft Enhanced Disk Drive 4 EDD-4 Vii Viii Working Draft Enhanced Disk Drive 4 EDD-4 Output Parameters TablesFigures Introduction ForewordXii Working Draft Enhanced Disk Drive 4 EDD-4 BSR Incits ScopeAmerican National Standard for Information Technology ATA8-APT ATA8-AST Approved references Normative references GeneralApproved Ansi References Name Other references References under developmentReferences Under Development Name Project Number June 23 T13/2132-D Revision Master Boot Record MBR The first LBA on a disk Symbols and abbreviationsConventions Abbreviation MeaningLists Lists overview PrecedenceUnordered lists Ordered listsNumbering T13/2132-D Revision June 23 KeywordsInterrupt Services and Functions Register and CF ContentsNumbering conventions French English This standard Bit conventionsWord at offset n ByteDWord at word offset n QWord at word offset nATA firmware revision example ATA string byte swapping Word Byte Character in stringWord Byte ValueOverview Conventional Register Definitions 8GB INT 13h Functions Conventional FunctionsRegister Description Bit DescriptionConventional Function Definitions Function a Description Data Structure 8GB INT 13h Functions OverviewExtended Function Definitions Function DescriptionT13/2132-D Revision June 23 Device Address Packet Offset Fixed Disk Access Function Code Fixed Disk Access SubsetRemovable Media INT 13h Interface SubsetsEnhanced Disk Drive EDD Support Subset Locking and Ejecting Function CodeEDD Support Function Code ISO 9660 CD Layout Working Draft Enhanced Disk Drive 4 EDD-4 CD/DVD Boot OverviewSystem Area Unused Emulation Process Boot MethodsFloppy Boot No Emulation BootHard Drive Boot Floppy Geometries Type Cylinders Heads SectorsBoot Volume Descriptor Boot Volume Descriptor BVDCD/DVD Format Offset Type Description T13/2132-D Revision June 23 Validation EntrySection Header June 23 T13/2132-D Revision Initial/Default Entry00h Byte Header ID Type Description June 23 T13/2132-D Revision Section EntryT13/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 Value Description Get Disk Type FN 15hSet Media Type FN 18h Park Heads FN 19h Identify Device Information FN 25h Interface Support Bit Map Description Check Extensions Present FN 41hExtended Read FN 42h Extended Write FN 43h Verify Sectors FN 44h Lock/Unlock Media FN 45h Eject Removable Media FN 46h Result Buffer Get Device Parameters FN 48hAscii Interface Path Definitions part 1 Host Bus Type Offset T13/2132-D Revision June 23 Interface PathDevice Path Definition00h ATA Device 01h 02h..FFh Reserved Byte Word DWord QWord Byte Port number Device parameter table extension Offset 7 READ/WRITE Multiple command block count Offset 5 Bios use only Bios use only Offset 6 IRQ numberOffset 0-1 I/O port base Offset 2-3 control port baseBit 7 32-bit transfer mode Offset 10-11 Bios selected hardware specific option flagsBit 8 Atapi device uses command packet interrupt Offset 9 PIO typeJune 23 T13/2132-D Revision Bits 9-10 translation type Bit 13h 48-bit LBA addressing enabledTranslation Type Bits Description 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 CD Command Packet Return Boot Catalog FN 4DhHardware Configuration Sub-Functions Set Hardware Configuration FN 4EhFormatted Command Packet Offset Type Description Send Packet Command FN 50hFormatted Protocol Specific Data T13/2132-D Revision June 23 Output Parameters Security Protocol Commands FN 51h INT 15h Removable Media Eject GPT support for hybrid MBR boot code Hybrid MBR boot Hybrid MBR boot overviewAnnex a Hybrid MBR boot code EAX Hybrid MBR boot code endeavor procedureHybrid VBR boot code