iPXE
Data Structures | Defines | Functions | Variables
edd.h File Reference

Enhanced Disk Drive specification. More...

#include <stdint.h>
#include <ipxe/interface.h>

Go to the source code of this file.

Data Structures

struct  edd_host_bus_type
 An EDD host bus type. More...
struct  edd_interface_type
 An EDD interface type. More...
union  edd_interface_path
 An EDD interface path. More...
union  edd_device_path
 An EDD device path. More...
struct  edd_device_path_information
 EDD device path information. More...

Defines

#define EDD_BUS_TYPE_FIXED(a, b, c, d,...)   ( ( (a) << 0 ) | ( (b) << 8 ) | ( (c) << 16 ) | ( (d) << 24 ) )
 EDD bus type.
#define EDD_BUS_TYPE(...)   EDD_BUS_TYPE_FIXED ( __VA_ARGS__, ' ', ' ', ' ', ' ' )
#define EDD_BUS_TYPE_PCI   EDD_BUS_TYPE ( 'P', 'C', 'I' )
 EDD PCI bus type.
#define EDD_BUS_TYPE_ISA   EDD_BUS_TYPE ( 'I', 'S', 'A' )
 EDD ISA bus type.
#define EDD_BUS_TYPE_PCIX   EDD_BUS_TYPE ( 'P', 'C', 'I', 'X' )
 EDD PCI-X bus type.
#define EDD_BUS_TYPE_IBND   EDD_BUS_TYPE ( 'I', 'B', 'N', 'D' )
 EDD Infiniband bus type.
#define EDD_BUS_TYPE_XPRS   EDD_BUS_TYPE ( 'X', 'P', 'R', 'S' )
 EDD PCI Express bus type.
#define EDD_BUS_TYPE_HTPT   EDD_BUS_TYPE ( 'H', 'T', 'P', 'T' )
 EDD HyperTransport bus type.
#define EDD_INTF_TYPE_FIXED(a, b, c, d, e, f, g, h,...)
 EDD interface type.
#define EDD_INTF_TYPE(...)
#define EDD_INTF_TYPE_ATA   EDD_INTF_TYPE ( 'A', 'T', 'A' )
 EDD ATA interface type.
#define EDD_INTF_TYPE_ATAPI   EDD_INTF_TYPE ( 'A', 'T', 'A', 'P', 'I' )
 EDD ATAPI interface type.
#define EDD_INTF_TYPE_SCSI   EDD_INTF_TYPE ( 'S', 'C', 'S', 'I' )
 EDD SCSI interface type.
#define EDD_INTF_TYPE_USB   EDD_INTF_TYPE ( 'U', 'S', 'B' )
 EDD USB interface type.
#define EDD_INTF_TYPE_1394   EDD_INTF_TYPE ( '1', '3', '9', '4' )
 EDD 1394 interface type.
#define EDD_INTF_TYPE_FIBRE   EDD_INTF_TYPE ( 'F', 'I', 'B', 'R', 'E' )
 EDD Fibre Channel interface type.
#define EDD_INTF_TYPE_I2O   EDD_INTF_TYPE ( 'I', '2', 'O' )
 EDD I2O interface type.
#define EDD_INTF_TYPE_RAID   EDD_INTF_TYPE ( 'R', 'A', 'I', 'D' )
 EDD RAID interface type.
#define EDD_INTF_TYPE_SATA   EDD_INTF_TYPE ( 'S', 'A', 'T', 'A' )
 EDD SATA interface type.
#define EDD_INTF_TYPE_SAS   EDD_INTF_TYPE ( 'S', 'A', 'S' )
 EDD SAS interface type.
#define EDD_DEVICE_PATH_INFO_KEY   0xbedd
 EDD device path information key.
#define edd_describe_TYPE(object_type)

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
struct edd_host_bus_type __attribute__ ((packed)) legacy
 Legacy bus type.
int edd_describe (struct interface *intf, struct edd_interface_type *type, union edd_device_path *path)
 Describe a disk device using EDD.

Variables

uint32_t type
 Type.
uint16_t base
 Base address.
uint8_t bus
 Bus.
uint8_t slot
 Slot.
uint8_t function
 Function.
uint8_t channel
 Channel number.
uint8_t pad [8]
 Padding.
uint8_t slave
 Slave.
uint8_t lun
 Logical Unit Number.
uint16_t id
 SCSI ID.
uint64_t serial
 Serial number.
uint64_t guid
 GUID.
uint64_t wwn
 WWN.
uint64_t tag
 Identity tag.
uint32_t array
 Array number.
uint8_t port
 Port number.
uint8_t multiplier
 Port multiplier number.
uint64_t address
 Address.
uint16_t key
 Key.
uint8_t len
 Length of this structure.
uint8_t reserved_a [3]
 Reserved.
struct edd_host_bus_type host_bus_type
 Host bus type.
struct edd_interface_type interface_type
 Interface type.
union edd_interface_path interface_path
 Interface path.
union edd_device_path device_path
 Device path.
uint8_t reserved_b
 Reserved.
uint8_t checksum
 Checksum.

Detailed Description

Enhanced Disk Drive specification.

Definition in file edd.h.


Define Documentation

#define EDD_BUS_TYPE_FIXED (   a,
  b,
  c,
  d,
  ... 
)    ( ( (a) << 0 ) | ( (b) << 8 ) | ( (c) << 16 ) | ( (d) << 24 ) )

EDD bus type.

Definition at line 22 of file edd.h.

#define EDD_BUS_TYPE (   ...)    EDD_BUS_TYPE_FIXED ( __VA_ARGS__, ' ', ' ', ' ', ' ' )

Definition at line 24 of file edd.h.

#define EDD_BUS_TYPE_PCI   EDD_BUS_TYPE ( 'P', 'C', 'I' )

EDD PCI bus type.

Definition at line 27 of file edd.h.

Referenced by int13_device_path_info().

#define EDD_BUS_TYPE_ISA   EDD_BUS_TYPE ( 'I', 'S', 'A' )

EDD ISA bus type.

Definition at line 29 of file edd.h.

#define EDD_BUS_TYPE_PCIX   EDD_BUS_TYPE ( 'P', 'C', 'I', 'X' )

EDD PCI-X bus type.

Definition at line 31 of file edd.h.

#define EDD_BUS_TYPE_IBND   EDD_BUS_TYPE ( 'I', 'B', 'N', 'D' )

EDD Infiniband bus type.

Definition at line 33 of file edd.h.

#define EDD_BUS_TYPE_XPRS   EDD_BUS_TYPE ( 'X', 'P', 'R', 'S' )

EDD PCI Express bus type.

Definition at line 35 of file edd.h.

#define EDD_BUS_TYPE_HTPT   EDD_BUS_TYPE ( 'H', 'T', 'P', 'T' )

EDD HyperTransport bus type.

Definition at line 37 of file edd.h.

#define EDD_INTF_TYPE_FIXED (   a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  ... 
)
Value:
( ( ( ( uint64_t ) (a) ) <<  0 ) | ( ( ( uint64_t ) (b) ) <<  8 ) | \
          ( ( ( uint64_t ) (c) ) << 16 ) | ( ( ( uint64_t ) (d) ) << 24 ) | \
          ( ( ( uint64_t ) (e) ) << 32 ) | ( ( ( uint64_t ) (f) ) << 40 ) | \
          ( ( ( uint64_t ) (g) ) << 48 ) | ( ( ( uint64_t ) (h) ) << 56 ) )

EDD interface type.

Definition at line 46 of file edd.h.

#define EDD_INTF_TYPE (   ...)
Value:
EDD_INTF_TYPE_FIXED ( __VA_ARGS__,                                  \
                              ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' )

Definition at line 51 of file edd.h.

#define EDD_INTF_TYPE_ATA   EDD_INTF_TYPE ( 'A', 'T', 'A' )

EDD ATA interface type.

Definition at line 55 of file edd.h.

Referenced by atadev_edd_describe().

#define EDD_INTF_TYPE_ATAPI   EDD_INTF_TYPE ( 'A', 'T', 'A', 'P', 'I' )

EDD ATAPI interface type.

Definition at line 57 of file edd.h.

#define EDD_INTF_TYPE_SCSI   EDD_INTF_TYPE ( 'S', 'C', 'S', 'I' )

EDD SCSI interface type.

Definition at line 59 of file edd.h.

#define EDD_INTF_TYPE_USB   EDD_INTF_TYPE ( 'U', 'S', 'B' )

EDD USB interface type.

Definition at line 61 of file edd.h.

#define EDD_INTF_TYPE_1394   EDD_INTF_TYPE ( '1', '3', '9', '4' )

EDD 1394 interface type.

Definition at line 63 of file edd.h.

#define EDD_INTF_TYPE_FIBRE   EDD_INTF_TYPE ( 'F', 'I', 'B', 'R', 'E' )

EDD Fibre Channel interface type.

Definition at line 65 of file edd.h.

Referenced by fcpdev_edd_describe().

#define EDD_INTF_TYPE_I2O   EDD_INTF_TYPE ( 'I', '2', 'O' )

EDD I2O interface type.

Definition at line 67 of file edd.h.

#define EDD_INTF_TYPE_RAID   EDD_INTF_TYPE ( 'R', 'A', 'I', 'D' )

EDD RAID interface type.

Definition at line 69 of file edd.h.

#define EDD_INTF_TYPE_SATA   EDD_INTF_TYPE ( 'S', 'A', 'T', 'A' )

EDD SATA interface type.

Definition at line 71 of file edd.h.

#define EDD_INTF_TYPE_SAS   EDD_INTF_TYPE ( 'S', 'A', 'S' )

EDD SAS interface type.

Definition at line 73 of file edd.h.

#define EDD_DEVICE_PATH_INFO_KEY   0xbedd

EDD device path information key.

Definition at line 184 of file edd.h.

Referenced by int13_device_path_info().

#define edd_describe_TYPE (   object_type)
Value:
typeof ( int ( object_type, struct edd_interface_type *type,    \
                       union edd_device_path *path ) )

Definition at line 189 of file edd.h.

Referenced by edd_describe().


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
struct edd_host_bus_type __attribute__ ( (packed)  )

Legacy bus type.

SAS interface type.

SATA interface type.

RAID interface type.

I2O interface type.

Fibre Channel interface type.

IEEE1394 interface type.

USB interface type.

SCSI interface type.

ATAPI interface type.

ATA interface type.

PCI, PCI-X, PCI Express, or HyperTransport bus type.

int edd_describe ( struct interface intf,
struct edd_interface_type type,
union edd_device_path path 
)

Describe a disk device using EDD.

Parameters:
intfInterface
typeEDD interface type
pathEDD device path
Return values:
rcReturn status code

Definition at line 44 of file edd.c.

References dest, edd_describe(), edd_describe_TYPE, ENOTSUP, intf_get_dest_op, intf_object(), intf_put(), op, and rc.

Referenced by edd_describe(), and int13_device_path_info().

                                                 {
        struct interface *dest;
        edd_describe_TYPE ( void * ) *op =
                intf_get_dest_op ( intf, edd_describe, &dest );
        void *object = intf_object ( dest );
        int rc;

        if ( op ) {
                rc = op ( object, type, path );
        } else {
                /* Default is to not support this operation */
                rc = -ENOTSUP;
        }

        intf_put ( dest );
        return rc;
}

Variable Documentation

Type.

Definition at line 21 of file edd.h.

Base address.

Definition at line 83 of file edd.h.

Function.

Definition at line 98 of file edd.h.

Channel number.

Definition at line 100 of file edd.h.

uint8_t pad[16]

Padding.

Definition at line 113 of file edd.h.

Slave.

Definition at line 105 of file edd.h.

Logical Unit Number.

Definition at line 114 of file edd.h.

Referenced by fcpdev_edd_describe().

SCSI ID.

Definition at line 119 of file edd.h.

Serial number.

Serial number string.

Definition at line 124 of file edd.h.

Referenced by linda_read_eeprom(), qib7322_read_eeprom(), and x509_parse_serial().

WWN.

Definition at line 136 of file edd.h.

Referenced by fcpdev_edd_describe().

Array number.

Definition at line 146 of file edd.h.

Referenced by ar9003_hw_configpcipowersave(), nfs_lookup(), nfs_read(), and nfs_readlink().

Port number.

Definition at line 153 of file edd.h.

Port multiplier number.

Definition at line 155 of file edd.h.

Referenced by bigint_mod_multiply_raw(), bigint_mod_multiply_sample(), bigint_multiply_raw(), and bigint_multiply_sample().

Address.

Definition at line 158 of file edd.h.

Key.

Definition at line 183 of file edd.h.

Length of this structure.

Definition at line 185 of file edd.h.

Reserved.

Definition at line 187 of file edd.h.

Host bus type.

Definition at line 189 of file edd.h.

Interface type.

Definition at line 191 of file edd.h.

Interface path.

Definition at line 193 of file edd.h.

Device path.

Definition at line 195 of file edd.h.

Reserved.

Definition at line 197 of file edd.h.

Checksum.

Definition at line 199 of file edd.h.