1 // Copyright 2017 The Chromium OS Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE-BSD-3-Clause file. 4 5 pub const MP_PROCESSOR: ::std::os::raw::c_uint = 0; 6 pub const MP_BUS: ::std::os::raw::c_uint = 1; 7 pub const MP_IOAPIC: ::std::os::raw::c_uint = 2; 8 pub const MP_INTSRC: ::std::os::raw::c_uint = 3; 9 pub const MP_LINTSRC: ::std::os::raw::c_uint = 4; 10 pub const CPU_ENABLED: ::std::os::raw::c_uint = 1; 11 pub const CPU_BOOTPROCESSOR: ::std::os::raw::c_uint = 2; 12 pub const MPC_APIC_USABLE: ::std::os::raw::c_uint = 1; 13 pub const MP_IRQDIR_DEFAULT: ::std::os::raw::c_uint = 0; 14 15 #[repr(C)] 16 #[derive(Debug, Default, Copy, Clone)] 17 pub struct mpf_intel { 18 pub signature: [::std::os::raw::c_char; 4usize], 19 pub physptr: ::std::os::raw::c_uint, 20 pub length: ::std::os::raw::c_uchar, 21 pub specification: ::std::os::raw::c_uchar, 22 pub checksum: ::std::os::raw::c_uchar, 23 pub feature1: ::std::os::raw::c_uchar, 24 pub feature2: ::std::os::raw::c_uchar, 25 pub feature3: ::std::os::raw::c_uchar, 26 pub feature4: ::std::os::raw::c_uchar, 27 pub feature5: ::std::os::raw::c_uchar, 28 } 29 30 #[repr(C)] 31 #[derive(Debug, Default, Copy, Clone)] 32 pub struct mpc_table { 33 pub signature: [::std::os::raw::c_char; 4usize], 34 pub length: ::std::os::raw::c_ushort, 35 pub spec: ::std::os::raw::c_char, 36 pub checksum: ::std::os::raw::c_char, 37 pub oem: [::std::os::raw::c_char; 8usize], 38 pub productid: [::std::os::raw::c_char; 12usize], 39 pub oemptr: ::std::os::raw::c_uint, 40 pub oemsize: ::std::os::raw::c_ushort, 41 pub oemcount: ::std::os::raw::c_ushort, 42 pub lapic: ::std::os::raw::c_uint, 43 pub reserved: ::std::os::raw::c_uint, 44 } 45 46 #[repr(C)] 47 #[derive(Debug, Default, Copy, Clone)] 48 pub struct mpc_cpu { 49 pub type_: ::std::os::raw::c_uchar, 50 pub apicid: ::std::os::raw::c_uchar, 51 pub apicver: ::std::os::raw::c_uchar, 52 pub cpuflag: ::std::os::raw::c_uchar, 53 pub cpufeature: ::std::os::raw::c_uint, 54 pub featureflag: ::std::os::raw::c_uint, 55 pub reserved: [::std::os::raw::c_uint; 2usize], 56 } 57 58 #[repr(C)] 59 #[derive(Debug, Default, Copy, Clone)] 60 pub struct mpc_bus { 61 pub type_: ::std::os::raw::c_uchar, 62 pub busid: ::std::os::raw::c_uchar, 63 pub bustype: [::std::os::raw::c_uchar; 6usize], 64 } 65 66 #[repr(C)] 67 #[derive(Debug, Default, Copy, Clone)] 68 pub struct mpc_ioapic { 69 pub type_: ::std::os::raw::c_uchar, 70 pub apicid: ::std::os::raw::c_uchar, 71 pub apicver: ::std::os::raw::c_uchar, 72 pub flags: ::std::os::raw::c_uchar, 73 pub apicaddr: ::std::os::raw::c_uint, 74 } 75 76 #[repr(C)] 77 #[derive(Debug, Default, Copy, Clone)] 78 pub struct mpc_intsrc { 79 pub type_: ::std::os::raw::c_uchar, 80 pub irqtype: ::std::os::raw::c_uchar, 81 pub irqflag: ::std::os::raw::c_ushort, 82 pub srcbus: ::std::os::raw::c_uchar, 83 pub srcbusirq: ::std::os::raw::c_uchar, 84 pub dstapic: ::std::os::raw::c_uchar, 85 pub dstirq: ::std::os::raw::c_uchar, 86 } 87 88 pub const MP_IRQ_SOURCE_TYPES_MP_INT: ::std::os::raw::c_uint = 0; 89 pub const MP_IRQ_SOURCE_TYPES_MP_NMI: ::std::os::raw::c_uint = 1; 90 pub const MP_IRQ_SOURCE_TYPES_MP_EXT_INT: ::std::os::raw::c_uint = 3; 91 92 #[repr(C)] 93 #[derive(Debug, Default, Copy, Clone)] 94 pub struct mpc_lintsrc { 95 pub type_: ::std::os::raw::c_uchar, 96 pub irqtype: ::std::os::raw::c_uchar, 97 pub irqflag: ::std::os::raw::c_ushort, 98 pub srcbusid: ::std::os::raw::c_uchar, 99 pub srcbusirq: ::std::os::raw::c_uchar, 100 pub destapic: ::std::os::raw::c_uchar, 101 pub destapiclint: ::std::os::raw::c_uchar, 102 } 103 104 #[repr(C)] 105 #[derive(Debug, Default, Copy, Clone)] 106 pub struct mpc_oemtable { 107 pub signature: [::std::os::raw::c_char; 4usize], 108 pub length: ::std::os::raw::c_ushort, 109 pub rev: ::std::os::raw::c_char, 110 pub checksum: ::std::os::raw::c_char, 111 pub mpc: [::std::os::raw::c_char; 8usize], 112 } 113