1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _UAPI_LINUX_EDD_H 20 #define _UAPI_LINUX_EDD_H 21 #include <linux/types.h> 22 #define EDDNR 0x1e9 23 #define EDDBUF 0xd00 24 #define EDDMAXNR 6 25 #define EDDEXTSIZE 8 26 #define EDDPARMSIZE 74 27 #define CHECKEXTENSIONSPRESENT 0x41 28 #define GETDEVICEPARAMETERS 0x48 29 #define LEGACYGETDEVICEPARAMETERS 0x08 30 #define EDDMAGIC1 0x55AA 31 #define EDDMAGIC2 0xAA55 32 #define READ_SECTORS 0x02 33 #define EDD_MBR_SIG_OFFSET 0x1B8 34 #define EDD_MBR_SIG_BUF 0x290 35 #define EDD_MBR_SIG_MAX 16 36 #define EDD_MBR_SIG_NR_BUF 0x1ea 37 #ifndef __ASSEMBLY__ 38 #define EDD_EXT_FIXED_DISK_ACCESS (1 << 0) 39 #define EDD_EXT_DEVICE_LOCKING_AND_EJECTING (1 << 1) 40 #define EDD_EXT_ENHANCED_DISK_DRIVE_SUPPORT (1 << 2) 41 #define EDD_EXT_64BIT_EXTENSIONS (1 << 3) 42 #define EDD_INFO_DMA_BOUNDARY_ERROR_TRANSPARENT (1 << 0) 43 #define EDD_INFO_GEOMETRY_VALID (1 << 1) 44 #define EDD_INFO_REMOVABLE (1 << 2) 45 #define EDD_INFO_WRITE_VERIFY (1 << 3) 46 #define EDD_INFO_MEDIA_CHANGE_NOTIFICATION (1 << 4) 47 #define EDD_INFO_LOCKABLE (1 << 5) 48 #define EDD_INFO_NO_MEDIA_PRESENT (1 << 6) 49 #define EDD_INFO_USE_INT13_FN50 (1 << 7) 50 struct edd_device_params { 51 __u16 length; 52 __u16 info_flags; 53 __u32 num_default_cylinders; 54 __u32 num_default_heads; 55 __u32 sectors_per_track; 56 __u64 number_of_sectors; 57 __u16 bytes_per_sector; 58 __u32 dpte_ptr; 59 __u16 key; 60 __u8 device_path_info_length; 61 __u8 reserved2; 62 __u16 reserved3; 63 __u8 host_bus_type[4]; 64 __u8 interface_type[8]; 65 union { 66 struct { 67 __u16 base_address; 68 __u16 reserved1; 69 __u32 reserved2; 70 } __attribute__((packed)) isa; 71 struct { 72 __u8 bus; 73 __u8 slot; 74 __u8 function; 75 __u8 channel; 76 __u32 reserved; 77 } __attribute__((packed)) pci; 78 struct { 79 __u64 reserved; 80 } __attribute__((packed)) ibnd; 81 struct { 82 __u64 reserved; 83 } __attribute__((packed)) xprs; 84 struct { 85 __u64 reserved; 86 } __attribute__((packed)) htpt; 87 struct { 88 __u64 reserved; 89 } __attribute__((packed)) unknown; 90 } interface_path; 91 union { 92 struct { 93 __u8 device; 94 __u8 reserved1; 95 __u16 reserved2; 96 __u32 reserved3; 97 __u64 reserved4; 98 } __attribute__((packed)) ata; 99 struct { 100 __u8 device; 101 __u8 lun; 102 __u8 reserved1; 103 __u8 reserved2; 104 __u32 reserved3; 105 __u64 reserved4; 106 } __attribute__((packed)) atapi; 107 struct { 108 __u16 id; 109 __u64 lun; 110 __u16 reserved1; 111 __u32 reserved2; 112 } __attribute__((packed)) scsi; 113 struct { 114 __u64 serial_number; 115 __u64 reserved; 116 } __attribute__((packed)) usb; 117 struct { 118 __u64 eui; 119 __u64 reserved; 120 } __attribute__((packed)) i1394; 121 struct { 122 __u64 wwid; 123 __u64 lun; 124 } __attribute__((packed)) fibre; 125 struct { 126 __u64 identity_tag; 127 __u64 reserved; 128 } __attribute__((packed)) i2o; 129 struct { 130 __u32 array_number; 131 __u32 reserved1; 132 __u64 reserved2; 133 } __attribute__((packed)) raid; 134 struct { 135 __u8 device; 136 __u8 reserved1; 137 __u16 reserved2; 138 __u32 reserved3; 139 __u64 reserved4; 140 } __attribute__((packed)) sata; 141 struct { 142 __u64 reserved1; 143 __u64 reserved2; 144 } __attribute__((packed)) unknown; 145 } device_path; 146 __u8 reserved4; 147 __u8 checksum; 148 } __attribute__((packed)); 149 struct edd_info { 150 __u8 device; 151 __u8 version; 152 __u16 interface_support; 153 __u16 legacy_max_cylinder; 154 __u8 legacy_max_head; 155 __u8 legacy_sectors_per_track; 156 struct edd_device_params params; 157 } __attribute__((packed)); 158 struct edd { 159 unsigned int mbr_signature[EDD_MBR_SIG_MAX]; 160 struct edd_info edd_info[EDDMAXNR]; 161 unsigned char mbr_signature_nr; 162 unsigned char edd_info_nr; 163 }; 164 #endif 165 #endif 166