• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI_LINUX_EDD_H
8 #define _UAPI_LINUX_EDD_H
9 #include <linux/types.h>
10 #define EDDNR 0x1e9
11 #define EDDBUF 0xd00
12 #define EDDMAXNR 6
13 #define EDDEXTSIZE 8
14 #define EDDPARMSIZE 74
15 #define CHECKEXTENSIONSPRESENT 0x41
16 #define GETDEVICEPARAMETERS 0x48
17 #define LEGACYGETDEVICEPARAMETERS 0x08
18 #define EDDMAGIC1 0x55AA
19 #define EDDMAGIC2 0xAA55
20 #define READ_SECTORS 0x02
21 #define EDD_MBR_SIG_OFFSET 0x1B8
22 #define EDD_MBR_SIG_BUF 0x290
23 #define EDD_MBR_SIG_MAX 16
24 #define EDD_MBR_SIG_NR_BUF 0x1ea
25 #ifndef __ASSEMBLY__
26 #define EDD_EXT_FIXED_DISK_ACCESS (1 << 0)
27 #define EDD_EXT_DEVICE_LOCKING_AND_EJECTING (1 << 1)
28 #define EDD_EXT_ENHANCED_DISK_DRIVE_SUPPORT (1 << 2)
29 #define EDD_EXT_64BIT_EXTENSIONS (1 << 3)
30 #define EDD_INFO_DMA_BOUNDARY_ERROR_TRANSPARENT (1 << 0)
31 #define EDD_INFO_GEOMETRY_VALID (1 << 1)
32 #define EDD_INFO_REMOVABLE (1 << 2)
33 #define EDD_INFO_WRITE_VERIFY (1 << 3)
34 #define EDD_INFO_MEDIA_CHANGE_NOTIFICATION (1 << 4)
35 #define EDD_INFO_LOCKABLE (1 << 5)
36 #define EDD_INFO_NO_MEDIA_PRESENT (1 << 6)
37 #define EDD_INFO_USE_INT13_FN50 (1 << 7)
38 struct edd_device_params {
39   __u16 length;
40   __u16 info_flags;
41   __u32 num_default_cylinders;
42   __u32 num_default_heads;
43   __u32 sectors_per_track;
44   __u64 number_of_sectors;
45   __u16 bytes_per_sector;
46   __u32 dpte_ptr;
47   __u16 key;
48   __u8 device_path_info_length;
49   __u8 reserved2;
50   __u16 reserved3;
51   __u8 host_bus_type[4];
52   __u8 interface_type[8];
53   union {
54     struct {
55       __u16 base_address;
56       __u16 reserved1;
57       __u32 reserved2;
58     } __attribute__((packed)) isa;
59     struct {
60       __u8 bus;
61       __u8 slot;
62       __u8 function;
63       __u8 channel;
64       __u32 reserved;
65     } __attribute__((packed)) pci;
66     struct {
67       __u64 reserved;
68     } __attribute__((packed)) ibnd;
69     struct {
70       __u64 reserved;
71     } __attribute__((packed)) xprs;
72     struct {
73       __u64 reserved;
74     } __attribute__((packed)) htpt;
75     struct {
76       __u64 reserved;
77     } __attribute__((packed)) unknown;
78   } interface_path;
79   union {
80     struct {
81       __u8 device;
82       __u8 reserved1;
83       __u16 reserved2;
84       __u32 reserved3;
85       __u64 reserved4;
86     } __attribute__((packed)) ata;
87     struct {
88       __u8 device;
89       __u8 lun;
90       __u8 reserved1;
91       __u8 reserved2;
92       __u32 reserved3;
93       __u64 reserved4;
94     } __attribute__((packed)) atapi;
95     struct {
96       __u16 id;
97       __u64 lun;
98       __u16 reserved1;
99       __u32 reserved2;
100     } __attribute__((packed)) scsi;
101     struct {
102       __u64 serial_number;
103       __u64 reserved;
104     } __attribute__((packed)) usb;
105     struct {
106       __u64 eui;
107       __u64 reserved;
108     } __attribute__((packed)) i1394;
109     struct {
110       __u64 wwid;
111       __u64 lun;
112     } __attribute__((packed)) fibre;
113     struct {
114       __u64 identity_tag;
115       __u64 reserved;
116     } __attribute__((packed)) i2o;
117     struct {
118       __u32 array_number;
119       __u32 reserved1;
120       __u64 reserved2;
121     } __attribute__((packed)) raid;
122     struct {
123       __u8 device;
124       __u8 reserved1;
125       __u16 reserved2;
126       __u32 reserved3;
127       __u64 reserved4;
128     } __attribute__((packed)) sata;
129     struct {
130       __u64 reserved1;
131       __u64 reserved2;
132     } __attribute__((packed)) unknown;
133   } device_path;
134   __u8 reserved4;
135   __u8 checksum;
136 } __attribute__((packed));
137 struct edd_info {
138   __u8 device;
139   __u8 version;
140   __u16 interface_support;
141   __u16 legacy_max_cylinder;
142   __u8 legacy_max_head;
143   __u8 legacy_sectors_per_track;
144   struct edd_device_params params;
145 } __attribute__((packed));
146 struct edd {
147   unsigned int mbr_signature[EDD_MBR_SIG_MAX];
148   struct edd_info edd_info[EDDMAXNR];
149   unsigned char mbr_signature_nr;
150   unsigned char edd_info_nr;
151 };
152 #endif
153 #endif
154