2 Include file to suport EDD 3.0.
3 This file is coded to T13 D1386 Revision 3
4 Availible on http://www.t13.org/#Project drafts
5 Currently at ftp://fission.dt.wdc.com/pub/standards/x3t13/project/d1386r3.pdf
7 Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>
9 SPDX-License-Identifier: BSD-2-Clause-Patent
17 // packing with no compiler padding, so that the fields
18 // of the following architected structures can be
19 // properly accessed from C code.
80 EDD_FIBRE FibreChannel
;
88 UINT32 SectorsPerTrack
;
89 UINT64 PhysicalSectors
;
90 UINT16 BytesPerSector
;
93 UINT8 DevicePathLength
;
97 CHAR8 InterfaceType
[8];
98 EDD_INTERFACE_PATH InterfacePath
;
99 EDD_DEVICE_PATH DevicePath
;
102 } EDD_DRIVE_PARAMETERS
;
105 // EDD_DRIVE_PARAMETERS.Flags defines
107 #define EDD_GEOMETRY_VALID 0x02
108 #define EDD_DEVICE_REMOVABLE 0x04
109 #define EDD_WRITE_VERIFY_SUPPORTED 0x08
110 #define EDD_DEVICE_CHANGE 0x10
111 #define EDD_DEVICE_LOCKABLE 0x20
114 // BUGBUG: This bit does not follow the spec. It tends to be always set
115 // to work properly with Win98.
117 #define EDD_DEVICE_GEOMETRY_MAX 0x40
120 UINT8 PacketSizeInBytes
; // 0x18
122 UINT8 NumberOfBlocks
; // Max 0x7f
126 UINT64 TransferBuffer
;
127 UINT32 ExtendedBlockCount
; // Max 0xffffffff
129 } EDD_DEVICE_ADDRESS_PACKET
;
131 #define EDD_VERSION_30 0x30
134 // Int 13 BIOS Errors
136 #define BIOS_PASS 0x00
137 #define BIOS_WRITE_PROTECTED 0x03
138 #define BIOS_SECTOR_NOT_FOUND 0x04
139 #define BIOS_RESET_FAILED 0x05
140 #define BIOS_DISK_CHANGED 0x06
141 #define BIOS_DRIVE_DOES_NOT_EXIST 0x07
142 #define BIOS_DMA_ERROR 0x08
143 #define BIOS_DATA_BOUNDRY_ERROR 0x09
144 #define BIOS_BAD_SECTOR 0x0a
145 #define BIOS_BAD_TRACK 0x0b
146 #define BIOS_MEADIA_TYPE_NOT_FOUND 0x0c
147 #define BIOS_INVALED_FORMAT 0x0d
148 #define BIOS_ECC_ERROR 0x10
149 #define BIOS_ECC_CORRECTED_ERROR 0x11
150 #define BIOS_HARD_DRIVE_FAILURE 0x20
151 #define BIOS_SEEK_FAILED 0x40
152 #define BIOS_DRIVE_TIMEOUT 0x80
153 #define BIOS_DRIVE_NOT_READY 0xaa
154 #define BIOS_UNDEFINED_ERROR 0xbb
155 #define BIOS_WRITE_FAULT 0xcc
156 #define BIOS_SENSE_FAILED 0xff
158 #define MAX_EDD11_XFER 0xfe00
162 // Internal Data Structures
168 BOOLEAN ExtendedInt13
;
169 BOOLEAN DriveLockingAndEjecting
;
171 BOOLEAN Extensions64Bit
;
172 BOOLEAN ParametersValid
;
181 EDD_DRIVE_PARAMETERS Parameters
;
184 #define BIOS_CONSOLE_BLOCK_IO_DEV_SIGNATURE SIGNATURE_32 ('b', 'b', 'i', 'o')
189 EFI_HANDLE ControllerHandle
;
190 EFI_BLOCK_IO_PROTOCOL BlockIo
;
191 EFI_BLOCK_IO_MEDIA BlockMedia
;
192 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
193 EFI_PCI_IO_PROTOCOL
*PciIo
;
194 EFI_LEGACY_BIOS_PROTOCOL
*LegacyBios
;
196 BIOS_LEGACY_DRIVE Bios
;
200 #define BIOS_BLOCK_IO_FROM_THIS(a) CR (a, BIOS_BLOCK_IO_DEV, BlockIo, BIOS_CONSOLE_BLOCK_IO_DEV_SIGNATURE)