]> git.saurik.com Git - apple/xnu.git/blame - osfmk/ppc/misc_protos.h
xnu-344.49.tar.gz
[apple/xnu.git] / osfmk / ppc / misc_protos.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
43866e37 6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
1c79356b 7 *
43866e37
A
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
13 * file.
14 *
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
1c79356b
A
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
43866e37
A
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.
1c79356b
A
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25/*
26 * @OSF_COPYRIGHT@
27 */
28
29#ifndef _PPC_MISC_PROTOS_H_
30#define _PPC_MISC_PROTOS_H_
31
32#include <cpus.h>
33#include <debug.h>
34#include <mach_kdb.h>
35#include <mach_kgdb.h>
36#include <mach_kdp.h>
37#include <mach_debug.h>
38
39#include <ppc/thread.h>
40#include <ppc/boot.h>
41#include <kern/thread_act.h>
42#include <mach/vm_types.h>
43#include <kern/cpu_data.h>
44#include <mach/ppc/thread_status.h>
45#include <stdarg.h>
46
47extern int strcmp(const char *s1, const char *s2);
48extern int strncmp(const char *s1, const char *s2, unsigned long n);
49extern char *strcat(char *dest, const char *src);
50extern char *strcpy(char *dest, const char *src);
51
52extern void vprintf(const char *fmt, va_list args);
53extern void printf(const char *fmt, ...);
54
55extern void bcopy_nc(char *from, char *to, int size); /* uncached-safe */
de355530
A
56extern void bcopy_phys(char *from, char *to, int size); /* Physical to physical copy (ints must be disabled) */
57extern void bcopy_physvir(char *from, char *to, int size); /* Physical to physical copy virtually (ints must be disabled) */
1c79356b
A
58
59extern void ppc_init(boot_args *args);
9bccf70c
A
60extern struct savearea *enterDebugger(unsigned int trap,
61 struct savearea *state,
1c79356b
A
62 unsigned int dsisr);
63
9bccf70c 64extern void draw_panic_dialog(void);
de355530 65extern void ppc_vm_init(unsigned int mem_size, boot_args *args);
1c79356b
A
66
67extern void autoconf(void);
68extern void machine_init(void);
69extern void machine_conf(void);
70extern void probeio(void);
71extern int cons_find(boolean_t);
72extern void machine_startup(boot_args *args);
73
74extern void interrupt_init(void);
75extern void interrupt_enable(void);
76extern void interrupt_disable(void);
77extern void disable_bluebox_internal(thread_act_t act);
78#if MACH_KDB
79extern void db_interrupt_enable(void);
80extern void db_interrupt_disable(void);
81#endif /* MACH_KDB */
1c79356b
A
82
83extern void phys_zero(vm_offset_t, vm_size_t);
de355530 84extern void phys_copy(vm_offset_t, vm_offset_t, vm_size_t);
1c79356b
A
85
86extern void Load_context(thread_t th);
87
88extern struct thread_shuttle *Switch_context(struct thread_shuttle *old,
89 void (*cont)(void),
90 struct thread_shuttle *new);
91
9bccf70c
A
92extern void fpu_save(struct facility_context *);
93extern void vec_save(struct facility_context *);
94extern void toss_live_fpu(struct facility_context *);
95extern void toss_live_vec(struct facility_context *);
96
1c79356b
A
97extern int nsec_to_processor_clock_ticks(int nsec);
98
99extern void tick_delay(int ticks);
100
101#ifdef DEBUG
102#define DPRINTF(x) { printf("%s : ",__FUNCTION__);printf x; }
103#endif /* DEBUG */
104
105#if MACH_ASSERT
1c79356b
A
106extern void dump_thread(thread_t th);
107#endif
108
109#if NCPUS > 1
110extern void mp_probe_cpus(void);
111#if MACH_KDB
112extern void remote_kdb(void);
113extern void clear_kdb_intr(void);
114extern void kdb_console(void);
115#endif /* MACH_KDB */
116#endif /* NCPUS > 1 */
117
118#endif /* _PPC_MISC_PROTOS_H_ */