]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/misc_protos.h
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@
29 #ifndef _PPC_MISC_PROTOS_H_
30 #define _PPC_MISC_PROTOS_H_
35 #include <mach_kgdb.h>
37 #include <mach_debug.h>
39 #include <ppc/thread.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>
47 extern int strcmp(const char *s1
, const char *s2
);
48 extern int strncmp(const char *s1
, const char *s2
, unsigned long n
);
49 extern char *strcat(char *dest
, const char *src
);
50 extern char *strcpy(char *dest
, const char *src
);
52 extern void vprintf(const char *fmt
, va_list args
);
53 extern void printf(const char *fmt
, ...);
55 extern void bzero_nc(char* buf
, int size
); /* uncached-safe */
56 extern void bcopy_nc(char *from
, char *to
, int size
); /* uncached-safe */
57 extern void bcopy_phys(addr64_t from
, addr64_t to
, int size
); /* Physical to physical copy (ints must be disabled) */
58 extern void bcopy_physvir(addr64_t from
, addr64_t to
, int size
); /* Physical to physical copy virtually (ints must be disabled) */
60 extern void ppc_init(boot_args
*args
);
61 extern struct savearea
*enterDebugger(unsigned int trap
,
62 struct savearea
*state
,
65 extern void draw_panic_dialog(void);
66 extern void ppc_vm_init(uint64_t mem_size
, boot_args
*args
);
68 extern int ppcNull(struct savearea
*);
69 extern int ppcNullinst(struct savearea
*);
71 extern void autoconf(void);
72 extern void machine_init(void);
73 extern void machine_conf(void);
74 extern void probeio(void);
75 extern int cons_find(boolean_t
);
76 extern void machine_startup(boot_args
*args
);
78 extern void interrupt_init(void);
79 extern void interrupt_enable(void);
80 extern void interrupt_disable(void);
81 extern void disable_bluebox_internal(thread_act_t act
);
82 extern uint64_t hid0get64(void);
84 extern void db_interrupt_enable(void);
85 extern void db_interrupt_disable(void);
88 extern void phys_zero(vm_offset_t
, vm_size_t
);
89 extern void phys_copy(addr64_t
, addr64_t
, vm_size_t
);
91 extern void Load_context(thread_t th
);
93 extern struct thread_shuttle
*Switch_context(struct thread_shuttle
*old
,
95 struct thread_shuttle
*new);
97 extern void fpu_save(struct facility_context
*);
98 extern void vec_save(struct facility_context
*);
99 extern void toss_live_fpu(struct facility_context
*);
100 extern void toss_live_vec(struct facility_context
*);
102 extern void condStop(unsigned int, unsigned int);
104 extern int nsec_to_processor_clock_ticks(int nsec
);
106 extern void tick_delay(int ticks
);
109 #define DPRINTF(x) { printf("%s : ",__FUNCTION__);printf x; }
113 extern void dump_thread(thread_t th
);
117 extern void mp_probe_cpus(void);
119 extern void remote_kdb(void);
120 extern void clear_kdb_intr(void);
121 extern void kdb_console(void);
122 #endif /* MACH_KDB */
123 #endif /* NCPUS > 1 */
125 #endif /* _PPC_MISC_PROTOS_H_ */