2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
32 #include <mach_ldebug.h>
34 #include <i386/AT386/misc_protos.h>
35 #include <i386/AT386/mp/mp_v1_1.h>
36 #include <i386/AT386/mp/mp.h>
37 #include <i386/AT386/mp/boot.h>
38 #include <i386/apic.h>
42 #include <i386/cpuid.h>
43 #include <i386/proc_reg.h>
44 #include <i386/misc_protos.h>
45 #include <mach/mach_types.h>
46 #include <mach/kern_return.h>
47 #include <vm/vm_kern.h>
48 #include <kern/startup.h>
49 #include <kern/cpu_number.h>
50 #include <kern/cpu_data.h>
55 vm_offset_t bios_start
;
58 unsigned int lapic_id_initdata
= 0;
59 int lapic_id
= (int)&lapic_id_initdata
;
60 vm_offset_t lapic_start
;
62 void lapic_init(void);
64 void validate_cpus(int ncpus
);
65 void cpu_interrupt(int cpu
);
66 void slave_boot(int cpu
);
68 boolean_t mp_v1_1_initialized
= FALSE
;
73 /*WILL BE REMOVED IN FUTURE REVISION!!! !*/
74 /* SIMPLY COMMENTED OUT FOR THE MOMENT */
97 start_other_cpus(void)
102 validate_cpus(int ncpus
)
106 machine_slot
[i
].is_cpu
= TRUE
;
116 slave_machine_init(void)
120 #endif /* NCPUS > 1 */
123 #include <ddb/db_output.h>
125 #define TRAP_DEBUG 0 /* Must match interrupt.s and spl.s */
130 struct mp_trap_hist_struct
{
132 unsigned char data
[5];
133 } trap_hist
[MTRAPS
], *cur_trap_hist
= trap_hist
,
134 *max_trap_hist
= &trap_hist
[MTRAPS
];
136 void db_trap_hist(void);
156 for(i
=0;i
<MTRAPS
;i
++)
157 if (trap_hist
[i
].type
== 1 || trap_hist
[i
].type
== 2) {
159 (&trap_hist
[i
]>=cur_trap_hist
)?"*":" ",
160 (trap_hist
[i
].type
== 1)?"SPL":"INT");
162 db_printf(" %02x", trap_hist
[i
].data
[j
]);
167 #endif /* TRAP_DEBUG */
169 void db_lapic(int cpu
);
170 unsigned int db_remote_read(int cpu
, int reg
);
171 void db_ioapic(unsigned int);
172 void kdb_console(void);
179 #define BOOLP(a) ((a)?' ':'!')
181 static char *DM
[8] = {
192 db_remote_read(int cpu
, int reg
)
203 db_ioapic(unsigned int ind
)
207 #endif /* MACH_KDB */