iPXE
Data Structures | Macros | 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...
 

Macros

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

Variables

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

Detailed Description

Enhanced Disk Drive specification.

Definition in file edd.h.

Macro Definition Documentation

◆ EDD_BUS_TYPE_FIXED

#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.

◆ EDD_BUS_TYPE

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

Definition at line 24 of file edd.h.

◆ EDD_BUS_TYPE_PCI

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

EDD PCI bus type.

Definition at line 27 of file edd.h.

◆ EDD_BUS_TYPE_ISA

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

EDD ISA bus type.

Definition at line 29 of file edd.h.

◆ EDD_BUS_TYPE_PCIX

#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.

◆ EDD_BUS_TYPE_IBND

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

EDD Infiniband bus type.

Definition at line 33 of file edd.h.

◆ EDD_BUS_TYPE_XPRS

#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.

◆ EDD_BUS_TYPE_HTPT

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

EDD HyperTransport bus type.

Definition at line 37 of file edd.h.

◆ EDD_INTF_TYPE_FIXED

#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 ) )
unsigned long long uint64_t
Definition: stdint.h:13
static __always_inline void off_t int c
Definition: efi_uaccess.h:87
uint8_t h
Definition: registers.h:18

EDD interface type.

Definition at line 46 of file edd.h.

◆ EDD_INTF_TYPE

#define EDD_INTF_TYPE (   ...)
Value:
EDD_INTF_TYPE_FIXED ( __VA_ARGS__, \
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' )
#define EDD_INTF_TYPE_FIXED(a, b, c, d, e, f, g, h,...)
EDD interface type.
Definition: edd.h:46

Definition at line 51 of file edd.h.

◆ EDD_INTF_TYPE_ATA

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

EDD ATA interface type.

Definition at line 55 of file edd.h.

◆ EDD_INTF_TYPE_ATAPI

#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.

◆ EDD_INTF_TYPE_SCSI

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

EDD SCSI interface type.

Definition at line 59 of file edd.h.

◆ EDD_INTF_TYPE_USB

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

EDD USB interface type.

Definition at line 61 of file edd.h.

◆ EDD_INTF_TYPE_1394

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

EDD 1394 interface type.

Definition at line 63 of file edd.h.

◆ EDD_INTF_TYPE_FIBRE

#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.

◆ EDD_INTF_TYPE_I2O

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

EDD I2O interface type.

Definition at line 67 of file edd.h.

◆ EDD_INTF_TYPE_RAID

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

EDD RAID interface type.

Definition at line 69 of file edd.h.

◆ EDD_INTF_TYPE_SATA

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

EDD SATA interface type.

Definition at line 71 of file edd.h.

◆ EDD_INTF_TYPE_SAS

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

EDD SAS interface type.

Definition at line 73 of file edd.h.

◆ EDD_DEVICE_PATH_INFO_KEY

#define EDD_DEVICE_PATH_INFO_KEY   0xbedd

EDD device path information key.

Definition at line 184 of file edd.h.

◆ edd_describe_TYPE

#define edd_describe_TYPE (   object_type)
Value:
typeof ( int ( object_type, struct edd_interface_type *type, \
union edd_device_path *path ) )
An EDD device path.
Definition: edd.h:98
An EDD interface type.
Definition: edd.h:40
uint32_t type
Type.
Definition: edd.h:12

Definition at line 189 of file edd.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __attribute__()

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.

◆ edd_describe()

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.

45  {
46  struct interface *dest;
47  edd_describe_TYPE ( void * ) *op =
49  void *object = intf_object ( dest );
50  int rc;
51 
52  if ( op ) {
53  rc = op ( object, type, path );
54  } else {
55  /* Default is to not support this operation */
56  rc = -ENOTSUP;
57  }
58 
59  intf_put ( dest );
60  return rc;
61 }
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
uint8_t type
Type.
Definition: ena.h:16
#define edd_describe_TYPE(object_type)
Definition: edd.h:189
int edd_describe(struct interface *intf, struct edd_interface_type *type, union edd_device_path *path)
Describe a disk device using EDD.
Definition: edd.c:44
void * intf_object(struct interface *intf)
Get pointer to object containing object interface.
Definition: interface.c:154
#define ENOTSUP
Operation not supported.
Definition: errno.h:589
An object interface.
Definition: interface.h:109
static void * dest
Definition: strings.h:176
static uint16_t struct vmbus_xfer_pages_operations * op
Definition: netvsc.h:327
void intf_put(struct interface *intf)
Decrement reference count on an object interface.
Definition: interface.c:144
#define intf_get_dest_op(intf, type, dest)
Get object interface destination and operation method.
Definition: interface.h:214

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

Referenced by edd_describe(), and int13_device_path_info().

Variable Documentation

◆ type

uint64_t type

Type.

Definition at line 12 of file edd.h.

◆ base

uint64_t base

◆ bus

uint8_t bus

◆ slot

uint8_t slot

◆ function

uint8_t function

Function.

Definition at line 18 of file edd.h.

◆ channel

uint8_t channel

Channel number.

Definition at line 20 of file edd.h.

◆ pad

uint8_t pad[16]

Padding.

Definition at line 28 of file edd.h.

◆ slave

uint8_t slave

Slave.

Definition at line 30 of file edd.h.

Referenced by spi_bit_set_slave_select().

◆ lun

uint64_t lun

Logical Unit Number.

Definition at line 32 of file edd.h.

Referenced by fcp_open(), fcp_parse_uri(), fcpdev_edd_describe(), fcpdev_open(), ib_srp_open(), scsi_open(), scsi_parse_lun(), and srp_open().

◆ id

SCSI ID.

Definition at line 30 of file edd.h.

◆ serial

uint8_t serial

Serial number.

Serial number string.

Definition at line 30 of file edd.h.

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

◆ guid

uint64_t guid

◆ wwn

uint64_t wwn

WWN.

Definition at line 30 of file edd.h.

Referenced by fc_aton(), fc_ntoa(), fcp_open(), fcp_parse_uri(), fcpdev_edd_describe(), and fcpdev_open().

◆ tag

uint64_t tag

◆ array

uint32_t array

◆ port

uint8_t port

Port number.

Definition at line 30 of file edd.h.

◆ multiplier

uint8_t multiplier

Port multiplier number.

Definition at line 32 of file edd.h.

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

◆ address

uint64_t address

Address.

Definition at line 30 of file edd.h.

◆ key

uint16_t key

Key.

Definition at line 12 of file edd.h.

◆ len

uint8_t len

Length of this structure.

Definition at line 14 of file edd.h.

◆ reserved_a

uint8_t reserved_a[3]

Reserved.

Definition at line 16 of file edd.h.

◆ host_bus_type

struct edd_host_bus_type host_bus_type

Host bus type.

Definition at line 18 of file edd.h.

◆ interface_type

struct edd_interface_type interface_type

Interface type.

Definition at line 20 of file edd.h.

Referenced by efi_install_protocol_interface_wrapper().

◆ interface_path

union edd_interface_path interface_path

Interface path.

Definition at line 22 of file edd.h.

◆ device_path

union edd_device_path device_path

Device path.

Definition at line 24 of file edd.h.

Referenced by efi_load_image_wrapper(), and efi_locate_device_path_wrapper().

◆ reserved_b

uint8_t reserved_b

Reserved.

Definition at line 26 of file edd.h.

◆ checksum

uint8_t checksum

Checksum.

Definition at line 28 of file edd.h.