iPXE
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, ...)
 EDD bus type.
#define EDD_BUS_TYPE(...)
#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)
 FILE_SECBOOT (PERMITTED)
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.

Macro Definition Documentation

◆ EDD_BUS_TYPE_FIXED

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

EDD bus type.

Definition at line 23 of file edd.h.

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

◆ EDD_BUS_TYPE

#define EDD_BUS_TYPE ( ...)
Value:
EDD_BUS_TYPE_FIXED ( __VA_ARGS__, ' ', ' ', ' ', ' ' )
#define EDD_BUS_TYPE_FIXED(a, b, c, d,...)
EDD bus type.
Definition edd.h:23

Definition at line 25 of file edd.h.

25#define EDD_BUS_TYPE( ... ) \
26 EDD_BUS_TYPE_FIXED ( __VA_ARGS__, ' ', ' ', ' ', ' ' )

◆ EDD_BUS_TYPE_PCI

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

EDD PCI bus type.

Definition at line 28 of file edd.h.

Referenced by int13_device_path_info().

◆ EDD_BUS_TYPE_ISA

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

EDD ISA bus type.

Definition at line 30 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 32 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 34 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 36 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 38 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
uint8_t h
Definition registers.h:4

EDD interface type.

Definition at line 47 of file edd.h.

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

◆ 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:47

Definition at line 52 of file edd.h.

52#define EDD_INTF_TYPE( ... ) \
53 EDD_INTF_TYPE_FIXED ( __VA_ARGS__, \
54 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' )

◆ EDD_INTF_TYPE_ATA

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

EDD ATA interface type.

Definition at line 56 of file edd.h.

Referenced by atadev_edd_describe().

◆ EDD_INTF_TYPE_ATAPI

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

EDD ATAPI interface type.

Definition at line 58 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 60 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 62 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 64 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 66 of file edd.h.

Referenced by fcpdev_edd_describe().

◆ EDD_INTF_TYPE_I2O

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

EDD I2O interface type.

Definition at line 68 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 70 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 72 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 74 of file edd.h.

◆ EDD_DEVICE_PATH_INFO_KEY

#define EDD_DEVICE_PATH_INFO_KEY   0xbedd

EDD device path information key.

Definition at line 185 of file edd.h.

Referenced by int13_device_path_info().

◆ edd_describe_TYPE

#define edd_describe_TYPE ( object_type)
Value:
typeof ( int ( object_type, struct edd_interface_type *type, \
union edd_device_path *path ) )
typeof(acpi_finder=acpi_find)
ACPI table finder.
Definition acpi.c:48
uint32_t type
Operating system type.
Definition ena.h:1
An EDD interface type.
Definition edd.h:41
An EDD device path.
Definition edd.h:99

Definition at line 190 of file edd.h.

190#define edd_describe_TYPE( object_type ) \
191 typeof ( int ( object_type, struct edd_interface_type *type, \
192 union edd_device_path *path ) )

Referenced by edd_describe().

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ edd_describe()

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

Describe a disk device using EDD.

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

Definition at line 45 of file edd.c.

46 {
47 struct interface *dest;
48 edd_describe_TYPE ( void * ) *op =
50 void *object = intf_object ( dest );
51 int rc;
52
53 if ( op ) {
54 rc = op ( object, type, path );
55 } else {
56 /* Default is to not support this operation */
57 rc = -ENOTSUP;
58 }
59
60 intf_put ( dest );
61 return rc;
62}
struct arbelprm_rc_send_wqe rc
Definition arbel.h:3
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" retur dest)
Definition string.h:151
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:45
#define edd_describe_TYPE(object_type)
Definition edd.h:190
#define ENOTSUP
Operation not supported.
Definition errno.h:633
void * intf_object(struct interface *intf)
Get pointer to object containing object interface.
Definition interface.c:160
void intf_put(struct interface *intf)
Decrement reference count on an object interface.
Definition interface.c:150
#define intf_get_dest_op(intf, type, dest)
Get object interface destination and operation method.
Definition interface.h:270
static uint16_t struct vmbus_xfer_pages_operations * op
Definition netvsc.h:327
An object interface.
Definition interface.h:125
struct interface * intf
Original interface.
Definition interface.h:159

References dest, edd_describe(), edd_describe_TYPE, ENOTSUP, interface::intf, 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 1 of file edd.h.

◆ base

uint16_t base

Base address.

Definition at line 1 of file edd.h.

◆ bus

◆ slot

◆ function

◆ channel

uint8_t channel

Channel number.

Definition at line 7 of file edd.h.

◆ pad

uint8_t pad[16]

Padding.

Definition at line 17 of file edd.h.

◆ slave

uint8_t slave

Slave.

Definition at line 1 of file edd.h.

Referenced by spi_bit_set_slave_select().

◆ lun

◆ id

SCSI ID.

Definition at line 1 of file edd.h.

◆ serial

◆ guid

◆ wwn

uint64_t wwn

WWN.

Definition at line 1 of file edd.h.

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

◆ tag

◆ array

◆ port

uint8_t port

Port number.

Definition at line 1 of file edd.h.

◆ multiplier

uint8_t multiplier

Port multiplier number.

Definition at line 3 of file edd.h.

◆ address

uint64_t address

Address.

Definition at line 1 of file edd.h.

◆ key

uint16_t key

Key.

Definition at line 1 of file edd.h.

◆ len

uint8_t len

Length of this structure.

Definition at line 3 of file edd.h.

◆ reserved_a

uint8_t reserved_a[3]

Reserved.

Definition at line 5 of file edd.h.

◆ host_bus_type

struct edd_host_bus_type host_bus_type

Host bus type.

Definition at line 7 of file edd.h.

◆ interface_type

struct edd_interface_type interface_type

Interface type.

Definition at line 9 of file edd.h.

Referenced by efi_install_protocol_interface_wrapper().

◆ interface_path

union edd_interface_path interface_path

Interface path.

Definition at line 11 of file edd.h.

◆ device_path

union edd_device_path device_path

Device path.

Definition at line 13 of file edd.h.

Referenced by efi_init(), efi_load_image_wrapper(), and efi_locate_device_path_wrapper().

◆ reserved_b

uint8_t reserved_b

Reserved.

Definition at line 15 of file edd.h.

◆ checksum

uint8_t checksum

Checksum.

Definition at line 17 of file edd.h.