/*-1* Copyright (c) 2011 Hudson River Trading LLC2* Written by: John H. Baldwin <[email protected]>3* All rights reserved.4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10* 2. Redistributions in binary form must reproduce the above copyright11* notice, this list of conditions and the following disclaimer in the12* documentation and/or other materials provided with the distribution.13*14* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND15* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE16* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE17* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE18* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL19* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS20* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)21* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT22* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY23* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF24* SUCH DAMAGE.25*/2627#ifndef _EDD_H_28#define _EDD_H_2930/* Supported interfaces for "Check Extensions Present". */31#define EDD_INTERFACE_FIXED_DISK 0x0132#define EDD_INTERFACE_EJECT 0x0233#define EDD_INTERFACE_EDD 0x043435struct edd_packet {36uint16_t len;37uint16_t count;38uint16_t off;39uint16_t seg;40uint64_t lba;41};4243struct edd_packet_v3 {44uint16_t len;45uint16_t count;46uint16_t off;47uint16_t seg;48uint64_t lba;49uint64_t phys_addr;50};5152struct edd_params {53uint16_t len;54uint16_t flags;55uint32_t cylinders;56uint32_t heads;57uint32_t sectors_per_track;58uint64_t sectors;59uint16_t sector_size;60uint16_t edd_params_seg;61uint16_t edd_params_off;62} __packed;6364struct edd_device_path_v3 {65uint16_t key;66uint8_t len;67uint8_t reserved[3];68char host_bus[4];69char interface[8];70uint64_t interface_path;71uint64_t device_path[2];72uint8_t reserved2[1];73uint8_t checksum;74} __packed;7576struct edd_params_v3 {77struct edd_params params;78struct edd_device_path_v3 device_path;79} __packed;8081#define EDD_FLAGS_DMA_BOUNDARY_HANDLING 0x000182#define EDD_FLAGS_REMOVABLE_MEDIA 0x000283#define EDD_FLAGS_WRITE_VERIFY 0x000484#define EDD_FLAGS_MEDIA_CHANGE_NOTIFICATION 0x000885#define EDD_FLAGS_LOCKABLE_MEDIA 0x001086#define EDD_FLAGS_NO_MEDIA_PRESENT 0x00208788#define EDD_DEVICE_PATH_KEY 0xbedd8990#define EDD_QUERY_MAGIC 0x55aa91#define EDD_INSTALLED 0xaa559293#endif /* !_EDD_H_ */949596