2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
29 #include <mach_ldebug.h>
31 #include <i386/AT386/misc_protos.h>
32 #include <i386/AT386/mp/mp_v1_1.h>
33 #include <i386/AT386/mp/mp.h>
34 #include <i386/AT386/mp/boot.h>
35 #include <i386/apic.h>
39 #include <i386/cpuid.h>
40 #include <i386/proc_reg.h>
41 #include <i386/misc_protos.h>
42 #include <mach/mach_types.h>
43 #include <mach/kern_return.h>
44 #include <vm/vm_kern.h>
45 #include <kern/startup.h>
46 #include <kern/cpu_number.h>
47 #include <kern/cpu_data.h>
52 vm_offset_t bios_start
;
55 unsigned int lapic_id_initdata
= 0;
56 int lapic_id
= (int)&lapic_id_initdata
;
57 vm_offset_t lapic_start
;
59 void lapic_init(void);
61 void validate_cpus(int ncpus
);
62 void cpu_interrupt(int cpu
);
63 void slave_boot(int cpu
);
65 boolean_t mp_v1_1_initialized
= FALSE
;
70 /*WILL BE REMOVED IN FUTURE REVISION!!! !*/
71 /* SIMPLY COMMENTED OUT FOR THE MOMENT */
94 start_other_cpus(void)
99 validate_cpus(int ncpus
)
103 machine_slot
[i
].is_cpu
= TRUE
;
113 slave_machine_init(void)
117 #endif /* NCPUS > 1 */
120 #include <ddb/db_output.h>
122 #define TRAP_DEBUG 0 /* Must match interrupt.s and spl.s */
127 struct mp_trap_hist_struct
{
129 unsigned char data
[5];
130 } trap_hist
[MTRAPS
], *cur_trap_hist
= trap_hist
,
131 *max_trap_hist
= &trap_hist
[MTRAPS
];
133 void db_trap_hist(void);
153 for(i
=0;i
<MTRAPS
;i
++)
154 if (trap_hist
[i
].type
== 1 || trap_hist
[i
].type
== 2) {
156 (&trap_hist
[i
]>=cur_trap_hist
)?"*":" ",
157 (trap_hist
[i
].type
== 1)?"SPL":"INT");
159 db_printf(" %02x", trap_hist
[i
].data
[j
]);
164 #endif /* TRAP_DEBUG */
166 void db_lapic(int cpu
);
167 unsigned int db_remote_read(int cpu
, int reg
);
168 void db_ioapic(unsigned int);
169 void kdb_console(void);
176 #define BOOLP(a) ((a)?' ':'!')
178 static char *DM
[8] = {
189 db_remote_read(int cpu
, int reg
)
200 db_ioapic(unsigned int ind
)
204 #endif /* MACH_KDB */