Rev 1576 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1576 | Rev 1702 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * Copyright (C) 2001-2004 Jakub Jermar |
2 | * Copyright (C) 2001-2004 Jakub Jermar |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
7 | * are met: |
8 | * |
8 | * |
9 | * - Redistributions of source code must retain the above copyright |
9 | * - Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. |
10 | * notice, this list of conditions and the following disclaimer. |
11 | * - Redistributions in binary form must reproduce the above copyright |
11 | * - Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the |
12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. |
13 | * documentation and/or other materials provided with the distribution. |
14 | * - The name of the author may not be used to endorse or promote products |
14 | * - The name of the author may not be used to endorse or promote products |
15 | * derived from this software without specific prior written permission. |
15 | * derived from this software without specific prior written permission. |
16 | * |
16 | * |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
- | 29 | /** @addtogroup ia32 |
|
- | 30 | * @{ |
|
- | 31 | */ |
|
- | 32 | /** @file |
|
- | 33 | */ |
|
- | 34 | ||
29 | #ifndef __MPS_H__ |
35 | #ifndef __MPS_H__ |
30 | #define __MPS_H__ |
36 | #define __MPS_H__ |
31 | 37 | ||
32 | #include <arch/types.h> |
38 | #include <arch/types.h> |
33 | #include <typedefs.h> |
39 | #include <typedefs.h> |
34 | #include <synch/waitq.h> |
40 | #include <synch/waitq.h> |
35 | #include <config.h> |
41 | #include <config.h> |
36 | #include <arch/smp/smp.h> |
42 | #include <arch/smp/smp.h> |
37 | 43 | ||
38 | #define CT_EXT_ENTRY_TYPE 0 |
44 | #define CT_EXT_ENTRY_TYPE 0 |
39 | #define CT_EXT_ENTRY_LEN 1 |
45 | #define CT_EXT_ENTRY_LEN 1 |
40 | 46 | ||
41 | struct mps_fs { |
47 | struct mps_fs { |
42 | __u32 signature; |
48 | __u32 signature; |
43 | __u32 configuration_table; |
49 | __u32 configuration_table; |
44 | __u8 length; |
50 | __u8 length; |
45 | __u8 revision; |
51 | __u8 revision; |
46 | __u8 checksum; |
52 | __u8 checksum; |
47 | __u8 config_type; |
53 | __u8 config_type; |
48 | __u8 mpfib2; |
54 | __u8 mpfib2; |
49 | __u8 mpfib3; |
55 | __u8 mpfib3; |
50 | __u8 mpfib4; |
56 | __u8 mpfib4; |
51 | __u8 mpfib5; |
57 | __u8 mpfib5; |
52 | } __attribute__ ((packed)); |
58 | } __attribute__ ((packed)); |
53 | 59 | ||
54 | struct mps_ct { |
60 | struct mps_ct { |
55 | __u32 signature; |
61 | __u32 signature; |
56 | __u16 base_table_length; |
62 | __u16 base_table_length; |
57 | __u8 revision; |
63 | __u8 revision; |
58 | __u8 checksum; |
64 | __u8 checksum; |
59 | __u8 oem_id[8]; |
65 | __u8 oem_id[8]; |
60 | __u8 product_id[12]; |
66 | __u8 product_id[12]; |
61 | __u32 oem_table; |
67 | __u32 oem_table; |
62 | __u16 oem_table_size; |
68 | __u16 oem_table_size; |
63 | __u16 entry_count; |
69 | __u16 entry_count; |
64 | __u32 l_apic; |
70 | __u32 l_apic; |
65 | __u16 ext_table_length; |
71 | __u16 ext_table_length; |
66 | __u8 ext_table_checksum; |
72 | __u8 ext_table_checksum; |
67 | __u8 xxx; |
73 | __u8 xxx; |
68 | __u8 base_table[0]; |
74 | __u8 base_table[0]; |
69 | } __attribute__ ((packed)); |
75 | } __attribute__ ((packed)); |
70 | 76 | ||
71 | struct __processor_entry { |
77 | struct __processor_entry { |
72 | __u8 type; |
78 | __u8 type; |
73 | __u8 l_apic_id; |
79 | __u8 l_apic_id; |
74 | __u8 l_apic_version; |
80 | __u8 l_apic_version; |
75 | __u8 cpu_flags; |
81 | __u8 cpu_flags; |
76 | __u8 cpu_signature[4]; |
82 | __u8 cpu_signature[4]; |
77 | __u32 feature_flags; |
83 | __u32 feature_flags; |
78 | __u32 xxx[2]; |
84 | __u32 xxx[2]; |
79 | } __attribute__ ((packed)); |
85 | } __attribute__ ((packed)); |
80 | 86 | ||
81 | struct __bus_entry { |
87 | struct __bus_entry { |
82 | __u8 type; |
88 | __u8 type; |
83 | __u8 bus_id; |
89 | __u8 bus_id; |
84 | __u8 bus_type[6]; |
90 | __u8 bus_type[6]; |
85 | } __attribute__ ((packed)); |
91 | } __attribute__ ((packed)); |
86 | 92 | ||
87 | struct __io_apic_entry { |
93 | struct __io_apic_entry { |
88 | __u8 type; |
94 | __u8 type; |
89 | __u8 io_apic_id; |
95 | __u8 io_apic_id; |
90 | __u8 io_apic_version; |
96 | __u8 io_apic_version; |
91 | __u8 io_apic_flags; |
97 | __u8 io_apic_flags; |
92 | __u32 io_apic; |
98 | __u32 io_apic; |
93 | } __attribute__ ((packed)); |
99 | } __attribute__ ((packed)); |
94 | 100 | ||
95 | struct __io_intr_entry { |
101 | struct __io_intr_entry { |
96 | __u8 type; |
102 | __u8 type; |
97 | __u8 intr_type; |
103 | __u8 intr_type; |
98 | __u8 poel; |
104 | __u8 poel; |
99 | __u8 xxx; |
105 | __u8 xxx; |
100 | __u8 src_bus_id; |
106 | __u8 src_bus_id; |
101 | __u8 src_bus_irq; |
107 | __u8 src_bus_irq; |
102 | __u8 dst_io_apic_id; |
108 | __u8 dst_io_apic_id; |
103 | __u8 dst_io_apic_pin; |
109 | __u8 dst_io_apic_pin; |
104 | } __attribute__ ((packed)); |
110 | } __attribute__ ((packed)); |
105 | 111 | ||
106 | struct __l_intr_entry { |
112 | struct __l_intr_entry { |
107 | __u8 type; |
113 | __u8 type; |
108 | __u8 intr_type; |
114 | __u8 intr_type; |
109 | __u8 poel; |
115 | __u8 poel; |
110 | __u8 xxx; |
116 | __u8 xxx; |
111 | __u8 src_bus_id; |
117 | __u8 src_bus_id; |
112 | __u8 src_bus_irq; |
118 | __u8 src_bus_irq; |
113 | __u8 dst_l_apic_id; |
119 | __u8 dst_l_apic_id; |
114 | __u8 dst_l_apic_pin; |
120 | __u8 dst_l_apic_pin; |
115 | } __attribute__ ((packed)); |
121 | } __attribute__ ((packed)); |
116 | 122 | ||
117 | 123 | ||
118 | extern waitq_t ap_completion_wq; |
124 | extern waitq_t ap_completion_wq; |
119 | 125 | ||
120 | extern struct smp_config_operations mps_config_operations; |
126 | extern struct smp_config_operations mps_config_operations; |
121 | 127 | ||
122 | extern void mps_init(void); |
128 | extern void mps_init(void); |
123 | extern void kmp(void *arg); |
129 | extern void kmp(void *arg); |
124 | 130 | ||
125 | #endif |
131 | #endif |
- | 132 | ||
- | 133 | /** @} |
|
- | 134 | */ |
|
- | 135 | ||
126 | 136 |