• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #![allow(warnings)]
6 
7 /* automatically generated by rust-bindgen */
8 
9 // manually added, needs to be included when this crate gets automated bindgen
10 use zerocopy::FromBytes;
11 use zerocopy::Immutable;
12 use zerocopy::IntoBytes;
13 use zerocopy::KnownLayout;
14 
15 pub const MPC_SIGNATURE: &'static [u8; 5usize] = b"PCMP\x00";
16 pub const MP_PROCESSOR: ::std::os::raw::c_uint = 0;
17 pub const MP_BUS: ::std::os::raw::c_uint = 1;
18 pub const MP_IOAPIC: ::std::os::raw::c_uint = 2;
19 pub const MP_INTSRC: ::std::os::raw::c_uint = 3;
20 pub const MP_LINTSRC: ::std::os::raw::c_uint = 4;
21 pub const MP_TRANSLATION: ::std::os::raw::c_uint = 192;
22 pub const CPU_ENABLED: ::std::os::raw::c_uint = 1;
23 pub const CPU_BOOTPROCESSOR: ::std::os::raw::c_uint = 2;
24 pub const CPU_STEPPING_MASK: ::std::os::raw::c_uint = 15;
25 pub const CPU_MODEL_MASK: ::std::os::raw::c_uint = 240;
26 pub const CPU_FAMILY_MASK: ::std::os::raw::c_uint = 3840;
27 pub const BUSTYPE_EISA: &'static [u8; 5usize] = b"EISA\x00";
28 pub const BUSTYPE_ISA: &'static [u8; 4usize] = b"ISA\x00";
29 pub const BUSTYPE_INTERN: &'static [u8; 7usize] = b"INTERN\x00";
30 pub const BUSTYPE_MCA: &'static [u8; 4usize] = b"MCA\x00";
31 pub const BUSTYPE_VL: &'static [u8; 3usize] = b"VL\x00";
32 pub const BUSTYPE_PCI: &'static [u8; 4usize] = b"PCI\x00";
33 pub const BUSTYPE_PCMCIA: &'static [u8; 7usize] = b"PCMCIA\x00";
34 pub const BUSTYPE_CBUS: &'static [u8; 5usize] = b"CBUS\x00";
35 pub const BUSTYPE_CBUSII: &'static [u8; 7usize] = b"CBUSII\x00";
36 pub const BUSTYPE_FUTURE: &'static [u8; 7usize] = b"FUTURE\x00";
37 pub const BUSTYPE_MBI: &'static [u8; 4usize] = b"MBI\x00";
38 pub const BUSTYPE_MBII: &'static [u8; 5usize] = b"MBII\x00";
39 pub const BUSTYPE_MPI: &'static [u8; 4usize] = b"MPI\x00";
40 pub const BUSTYPE_MPSA: &'static [u8; 5usize] = b"MPSA\x00";
41 pub const BUSTYPE_NUBUS: &'static [u8; 6usize] = b"NUBUS\x00";
42 pub const BUSTYPE_TC: &'static [u8; 3usize] = b"TC\x00";
43 pub const BUSTYPE_VME: &'static [u8; 4usize] = b"VME\x00";
44 pub const BUSTYPE_XPRESS: &'static [u8; 7usize] = b"XPRESS\x00";
45 pub const MPC_APIC_USABLE: ::std::os::raw::c_uint = 1;
46 pub const MP_IRQDIR_DEFAULT: ::std::os::raw::c_uint = 0;
47 pub const MP_IRQDIR_HIGH: ::std::os::raw::c_uint = 1;
48 pub const MP_IRQDIR_LOW: ::std::os::raw::c_uint = 3;
49 pub const MP_LEVEL_TRIGGER: ::std::os::raw::c_uint = 0xc;
50 pub const MP_APIC_ALL: ::std::os::raw::c_uint = 255;
51 pub const MPC_OEM_SIGNATURE: &'static [u8; 5usize] = b"_OEM\x00";
52 #[repr(C)]
53 #[derive(Debug, Default, Copy, FromBytes, Immutable, IntoBytes, KnownLayout)]
54 pub struct mpf_intel {
55     pub signature: [::std::os::raw::c_uchar; 4usize],
56     pub physptr: ::std::os::raw::c_uint,
57     pub length: ::std::os::raw::c_uchar,
58     pub specification: ::std::os::raw::c_uchar,
59     pub checksum: ::std::os::raw::c_uchar,
60     pub feature1: ::std::os::raw::c_uchar,
61     pub feature2: ::std::os::raw::c_uchar,
62     pub feature3: ::std::os::raw::c_uchar,
63     pub feature4: ::std::os::raw::c_uchar,
64     pub feature5: ::std::os::raw::c_uchar,
65 }
66 #[test]
bindgen_test_layout_mpf_intel()67 fn bindgen_test_layout_mpf_intel() {
68     assert_eq!(
69         ::std::mem::size_of::<mpf_intel>(),
70         16usize,
71         concat!("Size of: ", stringify!(mpf_intel))
72     );
73     assert_eq!(
74         ::std::mem::align_of::<mpf_intel>(),
75         4usize,
76         concat!("Alignment of ", stringify!(mpf_intel))
77     );
78     assert_eq!(
79         // SAFETY: trivially safe
80         unsafe { &(*(0 as *const mpf_intel)).signature as *const _ as usize },
81         0usize,
82         concat!(
83             "Alignment of field: ",
84             stringify!(mpf_intel),
85             "::",
86             stringify!(signature)
87         )
88     );
89     assert_eq!(
90         // SAFETY: trivially safe
91         unsafe { &(*(0 as *const mpf_intel)).physptr as *const _ as usize },
92         4usize,
93         concat!(
94             "Alignment of field: ",
95             stringify!(mpf_intel),
96             "::",
97             stringify!(physptr)
98         )
99     );
100     assert_eq!(
101         // SAFETY: trivially safe
102         unsafe { &(*(0 as *const mpf_intel)).length as *const _ as usize },
103         8usize,
104         concat!(
105             "Alignment of field: ",
106             stringify!(mpf_intel),
107             "::",
108             stringify!(length)
109         )
110     );
111     assert_eq!(
112         // SAFETY: trivially safe
113         unsafe { &(*(0 as *const mpf_intel)).specification as *const _ as usize },
114         9usize,
115         concat!(
116             "Alignment of field: ",
117             stringify!(mpf_intel),
118             "::",
119             stringify!(specification)
120         )
121     );
122     assert_eq!(
123         // SAFETY: trivially safe
124         unsafe { &(*(0 as *const mpf_intel)).checksum as *const _ as usize },
125         10usize,
126         concat!(
127             "Alignment of field: ",
128             stringify!(mpf_intel),
129             "::",
130             stringify!(checksum)
131         )
132     );
133     assert_eq!(
134         // SAFETY: trivially safe
135         unsafe { &(*(0 as *const mpf_intel)).feature1 as *const _ as usize },
136         11usize,
137         concat!(
138             "Alignment of field: ",
139             stringify!(mpf_intel),
140             "::",
141             stringify!(feature1)
142         )
143     );
144     assert_eq!(
145         // SAFETY: trivially safe
146         unsafe { &(*(0 as *const mpf_intel)).feature2 as *const _ as usize },
147         12usize,
148         concat!(
149             "Alignment of field: ",
150             stringify!(mpf_intel),
151             "::",
152             stringify!(feature2)
153         )
154     );
155     assert_eq!(
156         // SAFETY: trivially safe
157         unsafe { &(*(0 as *const mpf_intel)).feature3 as *const _ as usize },
158         13usize,
159         concat!(
160             "Alignment of field: ",
161             stringify!(mpf_intel),
162             "::",
163             stringify!(feature3)
164         )
165     );
166     assert_eq!(
167         // SAFETY: trivially safe
168         unsafe { &(*(0 as *const mpf_intel)).feature4 as *const _ as usize },
169         14usize,
170         concat!(
171             "Alignment of field: ",
172             stringify!(mpf_intel),
173             "::",
174             stringify!(feature4)
175         )
176     );
177     assert_eq!(
178         // SAFETY: trivially safe
179         unsafe { &(*(0 as *const mpf_intel)).feature5 as *const _ as usize },
180         15usize,
181         concat!(
182             "Alignment of field: ",
183             stringify!(mpf_intel),
184             "::",
185             stringify!(feature5)
186         )
187     );
188 }
189 impl Clone for mpf_intel {
clone(&self) -> Self190     fn clone(&self) -> Self {
191         *self
192     }
193 }
194 #[repr(C)]
195 #[derive(Debug, Default, Copy, FromBytes, Immutable, IntoBytes, KnownLayout)]
196 pub struct mpc_table {
197     pub signature: [::std::os::raw::c_uchar; 4usize],
198     pub length: ::std::os::raw::c_ushort,
199     pub spec: ::std::os::raw::c_char,
200     pub checksum: ::std::os::raw::c_char,
201     pub oem: [::std::os::raw::c_uchar; 8usize],
202     pub productid: [::std::os::raw::c_uchar; 12usize],
203     pub oemptr: ::std::os::raw::c_uint,
204     pub oemsize: ::std::os::raw::c_ushort,
205     pub oemcount: ::std::os::raw::c_ushort,
206     pub lapic: ::std::os::raw::c_uint,
207     pub reserved: ::std::os::raw::c_uint,
208 }
209 #[test]
bindgen_test_layout_mpc_table()210 fn bindgen_test_layout_mpc_table() {
211     assert_eq!(
212         ::std::mem::size_of::<mpc_table>(),
213         44usize,
214         concat!("Size of: ", stringify!(mpc_table))
215     );
216     assert_eq!(
217         ::std::mem::align_of::<mpc_table>(),
218         4usize,
219         concat!("Alignment of ", stringify!(mpc_table))
220     );
221     assert_eq!(
222         // SAFETY: trivially safe
223         unsafe { &(*(0 as *const mpc_table)).signature as *const _ as usize },
224         0usize,
225         concat!(
226             "Alignment of field: ",
227             stringify!(mpc_table),
228             "::",
229             stringify!(signature)
230         )
231     );
232     assert_eq!(
233         // SAFETY: trivially safe
234         unsafe { &(*(0 as *const mpc_table)).length as *const _ as usize },
235         4usize,
236         concat!(
237             "Alignment of field: ",
238             stringify!(mpc_table),
239             "::",
240             stringify!(length)
241         )
242     );
243     assert_eq!(
244         // SAFETY: trivially safe
245         unsafe { &(*(0 as *const mpc_table)).spec as *const _ as usize },
246         6usize,
247         concat!(
248             "Alignment of field: ",
249             stringify!(mpc_table),
250             "::",
251             stringify!(spec)
252         )
253     );
254     assert_eq!(
255         // SAFETY: trivially safe
256         unsafe { &(*(0 as *const mpc_table)).checksum as *const _ as usize },
257         7usize,
258         concat!(
259             "Alignment of field: ",
260             stringify!(mpc_table),
261             "::",
262             stringify!(checksum)
263         )
264     );
265     assert_eq!(
266         // SAFETY: trivially safe
267         unsafe { &(*(0 as *const mpc_table)).oem as *const _ as usize },
268         8usize,
269         concat!(
270             "Alignment of field: ",
271             stringify!(mpc_table),
272             "::",
273             stringify!(oem)
274         )
275     );
276     assert_eq!(
277         // SAFETY: trivially safe
278         unsafe { &(*(0 as *const mpc_table)).productid as *const _ as usize },
279         16usize,
280         concat!(
281             "Alignment of field: ",
282             stringify!(mpc_table),
283             "::",
284             stringify!(productid)
285         )
286     );
287     assert_eq!(
288         // SAFETY: trivially safe
289         unsafe { &(*(0 as *const mpc_table)).oemptr as *const _ as usize },
290         28usize,
291         concat!(
292             "Alignment of field: ",
293             stringify!(mpc_table),
294             "::",
295             stringify!(oemptr)
296         )
297     );
298     assert_eq!(
299         // SAFETY: trivially safe
300         unsafe { &(*(0 as *const mpc_table)).oemsize as *const _ as usize },
301         32usize,
302         concat!(
303             "Alignment of field: ",
304             stringify!(mpc_table),
305             "::",
306             stringify!(oemsize)
307         )
308     );
309     assert_eq!(
310         // SAFETY: trivially safe
311         unsafe { &(*(0 as *const mpc_table)).oemcount as *const _ as usize },
312         34usize,
313         concat!(
314             "Alignment of field: ",
315             stringify!(mpc_table),
316             "::",
317             stringify!(oemcount)
318         )
319     );
320     assert_eq!(
321         // SAFETY: trivially safe
322         unsafe { &(*(0 as *const mpc_table)).lapic as *const _ as usize },
323         36usize,
324         concat!(
325             "Alignment of field: ",
326             stringify!(mpc_table),
327             "::",
328             stringify!(lapic)
329         )
330     );
331     assert_eq!(
332         // SAFETY: trivially safe
333         unsafe { &(*(0 as *const mpc_table)).reserved as *const _ as usize },
334         40usize,
335         concat!(
336             "Alignment of field: ",
337             stringify!(mpc_table),
338             "::",
339             stringify!(reserved)
340         )
341     );
342 }
343 impl Clone for mpc_table {
clone(&self) -> Self344     fn clone(&self) -> Self {
345         *self
346     }
347 }
348 #[repr(C)]
349 #[derive(Debug, Default, Copy, FromBytes, Immutable, IntoBytes, KnownLayout)]
350 pub struct mpc_cpu {
351     pub type_: ::std::os::raw::c_uchar,
352     pub apicid: ::std::os::raw::c_uchar,
353     pub apicver: ::std::os::raw::c_uchar,
354     pub cpuflag: ::std::os::raw::c_uchar,
355     pub cpufeature: ::std::os::raw::c_uint,
356     pub featureflag: ::std::os::raw::c_uint,
357     pub reserved: [::std::os::raw::c_uint; 2usize],
358 }
359 #[test]
bindgen_test_layout_mpc_cpu()360 fn bindgen_test_layout_mpc_cpu() {
361     assert_eq!(
362         ::std::mem::size_of::<mpc_cpu>(),
363         20usize,
364         concat!("Size of: ", stringify!(mpc_cpu))
365     );
366     assert_eq!(
367         ::std::mem::align_of::<mpc_cpu>(),
368         4usize,
369         concat!("Alignment of ", stringify!(mpc_cpu))
370     );
371     assert_eq!(
372         // SAFETY: trivially safe
373         unsafe { &(*(0 as *const mpc_cpu)).type_ as *const _ as usize },
374         0usize,
375         concat!(
376             "Alignment of field: ",
377             stringify!(mpc_cpu),
378             "::",
379             stringify!(type_)
380         )
381     );
382     assert_eq!(
383         // SAFETY: trivially safe
384         unsafe { &(*(0 as *const mpc_cpu)).apicid as *const _ as usize },
385         1usize,
386         concat!(
387             "Alignment of field: ",
388             stringify!(mpc_cpu),
389             "::",
390             stringify!(apicid)
391         )
392     );
393     assert_eq!(
394         // SAFETY: trivially safe
395         unsafe { &(*(0 as *const mpc_cpu)).apicver as *const _ as usize },
396         2usize,
397         concat!(
398             "Alignment of field: ",
399             stringify!(mpc_cpu),
400             "::",
401             stringify!(apicver)
402         )
403     );
404     assert_eq!(
405         // SAFETY: trivially safe
406         unsafe { &(*(0 as *const mpc_cpu)).cpuflag as *const _ as usize },
407         3usize,
408         concat!(
409             "Alignment of field: ",
410             stringify!(mpc_cpu),
411             "::",
412             stringify!(cpuflag)
413         )
414     );
415     assert_eq!(
416         // SAFETY: trivially safe
417         unsafe { &(*(0 as *const mpc_cpu)).cpufeature as *const _ as usize },
418         4usize,
419         concat!(
420             "Alignment of field: ",
421             stringify!(mpc_cpu),
422             "::",
423             stringify!(cpufeature)
424         )
425     );
426     assert_eq!(
427         // SAFETY: trivially safe
428         unsafe { &(*(0 as *const mpc_cpu)).featureflag as *const _ as usize },
429         8usize,
430         concat!(
431             "Alignment of field: ",
432             stringify!(mpc_cpu),
433             "::",
434             stringify!(featureflag)
435         )
436     );
437     assert_eq!(
438         // SAFETY: trivially safe
439         unsafe { &(*(0 as *const mpc_cpu)).reserved as *const _ as usize },
440         12usize,
441         concat!(
442             "Alignment of field: ",
443             stringify!(mpc_cpu),
444             "::",
445             stringify!(reserved)
446         )
447     );
448 }
449 impl Clone for mpc_cpu {
clone(&self) -> Self450     fn clone(&self) -> Self {
451         *self
452     }
453 }
454 #[repr(C)]
455 #[derive(Debug, Default, Copy, FromBytes, Immutable, IntoBytes, KnownLayout)]
456 pub struct mpc_bus {
457     pub type_: ::std::os::raw::c_uchar,
458     pub busid: ::std::os::raw::c_uchar,
459     pub bustype: [::std::os::raw::c_uchar; 6usize],
460 }
461 #[test]
bindgen_test_layout_mpc_bus()462 fn bindgen_test_layout_mpc_bus() {
463     assert_eq!(
464         ::std::mem::size_of::<mpc_bus>(),
465         8usize,
466         concat!("Size of: ", stringify!(mpc_bus))
467     );
468     assert_eq!(
469         ::std::mem::align_of::<mpc_bus>(),
470         1usize,
471         concat!("Alignment of ", stringify!(mpc_bus))
472     );
473     assert_eq!(
474         // SAFETY: trivially safe
475         unsafe { &(*(0 as *const mpc_bus)).type_ as *const _ as usize },
476         0usize,
477         concat!(
478             "Alignment of field: ",
479             stringify!(mpc_bus),
480             "::",
481             stringify!(type_)
482         )
483     );
484     assert_eq!(
485         // SAFETY: trivially safe
486         unsafe { &(*(0 as *const mpc_bus)).busid as *const _ as usize },
487         1usize,
488         concat!(
489             "Alignment of field: ",
490             stringify!(mpc_bus),
491             "::",
492             stringify!(busid)
493         )
494     );
495     assert_eq!(
496         // SAFETY: trivially safe
497         unsafe { &(*(0 as *const mpc_bus)).bustype as *const _ as usize },
498         2usize,
499         concat!(
500             "Alignment of field: ",
501             stringify!(mpc_bus),
502             "::",
503             stringify!(bustype)
504         )
505     );
506 }
507 impl Clone for mpc_bus {
clone(&self) -> Self508     fn clone(&self) -> Self {
509         *self
510     }
511 }
512 #[repr(C)]
513 #[derive(Debug, Default, Copy, FromBytes, Immutable, IntoBytes, KnownLayout)]
514 pub struct mpc_ioapic {
515     pub type_: ::std::os::raw::c_uchar,
516     pub apicid: ::std::os::raw::c_uchar,
517     pub apicver: ::std::os::raw::c_uchar,
518     pub flags: ::std::os::raw::c_uchar,
519     pub apicaddr: ::std::os::raw::c_uint,
520 }
521 #[test]
bindgen_test_layout_mpc_ioapic()522 fn bindgen_test_layout_mpc_ioapic() {
523     assert_eq!(
524         ::std::mem::size_of::<mpc_ioapic>(),
525         8usize,
526         concat!("Size of: ", stringify!(mpc_ioapic))
527     );
528     assert_eq!(
529         ::std::mem::align_of::<mpc_ioapic>(),
530         4usize,
531         concat!("Alignment of ", stringify!(mpc_ioapic))
532     );
533     assert_eq!(
534         // SAFETY: trivially safe
535         unsafe { &(*(0 as *const mpc_ioapic)).type_ as *const _ as usize },
536         0usize,
537         concat!(
538             "Alignment of field: ",
539             stringify!(mpc_ioapic),
540             "::",
541             stringify!(type_)
542         )
543     );
544     assert_eq!(
545         // SAFETY: trivially safe
546         unsafe { &(*(0 as *const mpc_ioapic)).apicid as *const _ as usize },
547         1usize,
548         concat!(
549             "Alignment of field: ",
550             stringify!(mpc_ioapic),
551             "::",
552             stringify!(apicid)
553         )
554     );
555     assert_eq!(
556         // SAFETY: trivially safe
557         unsafe { &(*(0 as *const mpc_ioapic)).apicver as *const _ as usize },
558         2usize,
559         concat!(
560             "Alignment of field: ",
561             stringify!(mpc_ioapic),
562             "::",
563             stringify!(apicver)
564         )
565     );
566     assert_eq!(
567         // SAFETY: trivially safe
568         unsafe { &(*(0 as *const mpc_ioapic)).flags as *const _ as usize },
569         3usize,
570         concat!(
571             "Alignment of field: ",
572             stringify!(mpc_ioapic),
573             "::",
574             stringify!(flags)
575         )
576     );
577     assert_eq!(
578         // SAFETY: trivially safe
579         unsafe { &(*(0 as *const mpc_ioapic)).apicaddr as *const _ as usize },
580         4usize,
581         concat!(
582             "Alignment of field: ",
583             stringify!(mpc_ioapic),
584             "::",
585             stringify!(apicaddr)
586         )
587     );
588 }
589 impl Clone for mpc_ioapic {
clone(&self) -> Self590     fn clone(&self) -> Self {
591         *self
592     }
593 }
594 #[repr(C)]
595 #[derive(Debug, Default, Copy, FromBytes, Immutable, IntoBytes, KnownLayout)]
596 pub struct mpc_intsrc {
597     pub type_: ::std::os::raw::c_uchar,
598     pub irqtype: ::std::os::raw::c_uchar,
599     pub irqflag: ::std::os::raw::c_ushort,
600     pub srcbus: ::std::os::raw::c_uchar,
601     pub srcbusirq: ::std::os::raw::c_uchar,
602     pub dstapic: ::std::os::raw::c_uchar,
603     pub dstirq: ::std::os::raw::c_uchar,
604 }
605 #[test]
bindgen_test_layout_mpc_intsrc()606 fn bindgen_test_layout_mpc_intsrc() {
607     assert_eq!(
608         ::std::mem::size_of::<mpc_intsrc>(),
609         8usize,
610         concat!("Size of: ", stringify!(mpc_intsrc))
611     );
612     assert_eq!(
613         ::std::mem::align_of::<mpc_intsrc>(),
614         2usize,
615         concat!("Alignment of ", stringify!(mpc_intsrc))
616     );
617     assert_eq!(
618         // SAFETY: trivially safe
619         unsafe { &(*(0 as *const mpc_intsrc)).type_ as *const _ as usize },
620         0usize,
621         concat!(
622             "Alignment of field: ",
623             stringify!(mpc_intsrc),
624             "::",
625             stringify!(type_)
626         )
627     );
628     assert_eq!(
629         // SAFETY: trivially safe
630         unsafe { &(*(0 as *const mpc_intsrc)).irqtype as *const _ as usize },
631         1usize,
632         concat!(
633             "Alignment of field: ",
634             stringify!(mpc_intsrc),
635             "::",
636             stringify!(irqtype)
637         )
638     );
639     assert_eq!(
640         // SAFETY: trivially safe
641         unsafe { &(*(0 as *const mpc_intsrc)).irqflag as *const _ as usize },
642         2usize,
643         concat!(
644             "Alignment of field: ",
645             stringify!(mpc_intsrc),
646             "::",
647             stringify!(irqflag)
648         )
649     );
650     assert_eq!(
651         // SAFETY: trivially safe
652         unsafe { &(*(0 as *const mpc_intsrc)).srcbus as *const _ as usize },
653         4usize,
654         concat!(
655             "Alignment of field: ",
656             stringify!(mpc_intsrc),
657             "::",
658             stringify!(srcbus)
659         )
660     );
661     assert_eq!(
662         // SAFETY: trivially safe
663         unsafe { &(*(0 as *const mpc_intsrc)).srcbusirq as *const _ as usize },
664         5usize,
665         concat!(
666             "Alignment of field: ",
667             stringify!(mpc_intsrc),
668             "::",
669             stringify!(srcbusirq)
670         )
671     );
672     assert_eq!(
673         // SAFETY: trivially safe
674         unsafe { &(*(0 as *const mpc_intsrc)).dstapic as *const _ as usize },
675         6usize,
676         concat!(
677             "Alignment of field: ",
678             stringify!(mpc_intsrc),
679             "::",
680             stringify!(dstapic)
681         )
682     );
683     assert_eq!(
684         // SAFETY: trivially safe
685         unsafe { &(*(0 as *const mpc_intsrc)).dstirq as *const _ as usize },
686         7usize,
687         concat!(
688             "Alignment of field: ",
689             stringify!(mpc_intsrc),
690             "::",
691             stringify!(dstirq)
692         )
693     );
694 }
695 impl Clone for mpc_intsrc {
clone(&self) -> Self696     fn clone(&self) -> Self {
697         *self
698     }
699 }
700 pub const mp_irq_source_types_mp_INT: mp_irq_source_types = 0;
701 pub const mp_irq_source_types_mp_NMI: mp_irq_source_types = 1;
702 pub const mp_irq_source_types_mp_SMI: mp_irq_source_types = 2;
703 pub const mp_irq_source_types_mp_ExtINT: mp_irq_source_types = 3;
704 pub type mp_irq_source_types = ::std::os::raw::c_uint;
705 #[repr(C)]
706 #[derive(Debug, Default, Copy, FromBytes, Immutable, IntoBytes, KnownLayout)]
707 pub struct mpc_lintsrc {
708     pub type_: ::std::os::raw::c_uchar,
709     pub irqtype: ::std::os::raw::c_uchar,
710     pub irqflag: ::std::os::raw::c_ushort,
711     pub srcbusid: ::std::os::raw::c_uchar,
712     pub srcbusirq: ::std::os::raw::c_uchar,
713     pub destapic: ::std::os::raw::c_uchar,
714     pub destapiclint: ::std::os::raw::c_uchar,
715 }
716 #[test]
bindgen_test_layout_mpc_lintsrc()717 fn bindgen_test_layout_mpc_lintsrc() {
718     assert_eq!(
719         ::std::mem::size_of::<mpc_lintsrc>(),
720         8usize,
721         concat!("Size of: ", stringify!(mpc_lintsrc))
722     );
723     assert_eq!(
724         ::std::mem::align_of::<mpc_lintsrc>(),
725         2usize,
726         concat!("Alignment of ", stringify!(mpc_lintsrc))
727     );
728     assert_eq!(
729         // SAFETY: trivially safe
730         unsafe { &(*(0 as *const mpc_lintsrc)).type_ as *const _ as usize },
731         0usize,
732         concat!(
733             "Alignment of field: ",
734             stringify!(mpc_lintsrc),
735             "::",
736             stringify!(type_)
737         )
738     );
739     assert_eq!(
740         // SAFETY: trivially safe
741         unsafe { &(*(0 as *const mpc_lintsrc)).irqtype as *const _ as usize },
742         1usize,
743         concat!(
744             "Alignment of field: ",
745             stringify!(mpc_lintsrc),
746             "::",
747             stringify!(irqtype)
748         )
749     );
750     assert_eq!(
751         // SAFETY: trivially safe
752         unsafe { &(*(0 as *const mpc_lintsrc)).irqflag as *const _ as usize },
753         2usize,
754         concat!(
755             "Alignment of field: ",
756             stringify!(mpc_lintsrc),
757             "::",
758             stringify!(irqflag)
759         )
760     );
761     assert_eq!(
762         // SAFETY: trivially safe
763         unsafe { &(*(0 as *const mpc_lintsrc)).srcbusid as *const _ as usize },
764         4usize,
765         concat!(
766             "Alignment of field: ",
767             stringify!(mpc_lintsrc),
768             "::",
769             stringify!(srcbusid)
770         )
771     );
772     assert_eq!(
773         // SAFETY: trivially safe
774         unsafe { &(*(0 as *const mpc_lintsrc)).srcbusirq as *const _ as usize },
775         5usize,
776         concat!(
777             "Alignment of field: ",
778             stringify!(mpc_lintsrc),
779             "::",
780             stringify!(srcbusirq)
781         )
782     );
783     assert_eq!(
784         // SAFETY: trivially safe
785         unsafe { &(*(0 as *const mpc_lintsrc)).destapic as *const _ as usize },
786         6usize,
787         concat!(
788             "Alignment of field: ",
789             stringify!(mpc_lintsrc),
790             "::",
791             stringify!(destapic)
792         )
793     );
794     assert_eq!(
795         // SAFETY: trivially safe
796         unsafe { &(*(0 as *const mpc_lintsrc)).destapiclint as *const _ as usize },
797         7usize,
798         concat!(
799             "Alignment of field: ",
800             stringify!(mpc_lintsrc),
801             "::",
802             stringify!(destapiclint)
803         )
804     );
805 }
806 impl Clone for mpc_lintsrc {
clone(&self) -> Self807     fn clone(&self) -> Self {
808         *self
809     }
810 }
811 #[repr(C)]
812 #[derive(Debug, Default, Copy)]
813 pub struct mpc_oemtable {
814     pub signature: [::std::os::raw::c_char; 4usize],
815     pub length: ::std::os::raw::c_ushort,
816     pub rev: ::std::os::raw::c_char,
817     pub checksum: ::std::os::raw::c_char,
818     pub mpc: [::std::os::raw::c_char; 8usize],
819 }
820 #[test]
bindgen_test_layout_mpc_oemtable()821 fn bindgen_test_layout_mpc_oemtable() {
822     assert_eq!(
823         ::std::mem::size_of::<mpc_oemtable>(),
824         16usize,
825         concat!("Size of: ", stringify!(mpc_oemtable))
826     );
827     assert_eq!(
828         ::std::mem::align_of::<mpc_oemtable>(),
829         2usize,
830         concat!("Alignment of ", stringify!(mpc_oemtable))
831     );
832     assert_eq!(
833         // SAFETY: trivially safe
834         unsafe { &(*(0 as *const mpc_oemtable)).signature as *const _ as usize },
835         0usize,
836         concat!(
837             "Alignment of field: ",
838             stringify!(mpc_oemtable),
839             "::",
840             stringify!(signature)
841         )
842     );
843     assert_eq!(
844         // SAFETY: trivially safe
845         unsafe { &(*(0 as *const mpc_oemtable)).length as *const _ as usize },
846         4usize,
847         concat!(
848             "Alignment of field: ",
849             stringify!(mpc_oemtable),
850             "::",
851             stringify!(length)
852         )
853     );
854     assert_eq!(
855         // SAFETY: trivially safe
856         unsafe { &(*(0 as *const mpc_oemtable)).rev as *const _ as usize },
857         6usize,
858         concat!(
859             "Alignment of field: ",
860             stringify!(mpc_oemtable),
861             "::",
862             stringify!(rev)
863         )
864     );
865     assert_eq!(
866         // SAFETY: trivially safe
867         unsafe { &(*(0 as *const mpc_oemtable)).checksum as *const _ as usize },
868         7usize,
869         concat!(
870             "Alignment of field: ",
871             stringify!(mpc_oemtable),
872             "::",
873             stringify!(checksum)
874         )
875     );
876     assert_eq!(
877         // SAFETY: trivially safe
878         unsafe { &(*(0 as *const mpc_oemtable)).mpc as *const _ as usize },
879         8usize,
880         concat!(
881             "Alignment of field: ",
882             stringify!(mpc_oemtable),
883             "::",
884             stringify!(mpc)
885         )
886     );
887 }
888 impl Clone for mpc_oemtable {
clone(&self) -> Self889     fn clone(&self) -> Self {
890         *self
891     }
892 }
893 pub const mp_bustype_MP_BUS_ISA: mp_bustype = 1;
894 pub const mp_bustype_MP_BUS_EISA: mp_bustype = 2;
895 pub const mp_bustype_MP_BUS_PCI: mp_bustype = 3;
896 pub type mp_bustype = ::std::os::raw::c_uint;
897