]>
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 * 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@
26 #ifndef _PPC_MISC_PROTOS_H_
27 #define _PPC_MISC_PROTOS_H_
32 #include <mach_kgdb.h>
34 #include <mach_debug.h>
36 #include <ppc/thread.h>
38 #include <kern/thread_act.h>
39 #include <mach/vm_types.h>
40 #include <kern/cpu_data.h>
41 #include <mach/ppc/thread_status.h>
44 extern int strcmp(const char *s1
, const char *s2
);
45 extern int strncmp(const char *s1
, const char *s2
, unsigned long n
);
46 extern char *strcat(char *dest
, const char *src
);
47 extern char *strcpy(char *dest
, const char *src
);
49 extern void vprintf(const char *fmt
, va_list args
);
50 extern void printf(const char *fmt
, ...);
52 extern void bzero_nc(char* buf
, int size
); /* uncached-safe */
53 extern void bcopy_nc(char *from
, char *to
, int size
); /* uncached-safe */
54 extern void bcopy_phys(addr64_t from
, addr64_t to
, int size
); /* Physical to physical copy (ints must be disabled) */
55 extern void bcopy_physvir(addr64_t from
, addr64_t to
, int size
); /* Physical to physical copy virtually (ints must be disabled) */
57 extern void ppc_init(boot_args
*args
);
58 extern struct savearea
*enterDebugger(unsigned int trap
,
59 struct savearea
*state
,
62 extern void draw_panic_dialog(void);
63 extern void ppc_vm_init(uint64_t mem_size
, boot_args
*args
);
65 extern int ppcNull(struct savearea
*);
66 extern int ppcNullinst(struct savearea
*);
68 extern void autoconf(void);
69 extern void machine_init(void);
70 extern void machine_conf(void);
71 extern void probeio(void);
72 extern int cons_find(boolean_t
);
73 extern void machine_startup(boot_args
*args
);
75 extern void interrupt_init(void);
76 extern void interrupt_enable(void);
77 extern void interrupt_disable(void);
78 extern void disable_bluebox_internal(thread_act_t act
);
79 extern uint64_t hid0get64(void);
80 extern void hid5set64(uint64_t);
82 extern void db_interrupt_enable(void);
83 extern void db_interrupt_disable(void);
86 extern void phys_zero(vm_offset_t
, vm_size_t
);
87 extern void phys_copy(addr64_t
, addr64_t
, vm_size_t
);
89 extern void Load_context(thread_t th
);
91 extern thread_t
Switch_context(
96 extern void fpu_save(struct facility_context
*);
97 extern void vec_save(struct facility_context
*);
98 extern void toss_live_fpu(struct facility_context
*);
99 extern void toss_live_vec(struct facility_context
*);
101 extern void condStop(unsigned int, unsigned int);
103 extern int nsec_to_processor_clock_ticks(int nsec
);
105 extern void tick_delay(int ticks
);
108 #define DPRINTF(x) { printf("%s : ",__FUNCTION__);printf x; }
112 extern void dump_thread(thread_t th
);
116 extern void mp_probe_cpus(void);
118 extern void remote_kdb(void);
119 extern void clear_kdb_intr(void);
120 extern void kdb_console(void);
121 #endif /* MACH_KDB */
122 #endif /* NCPUS > 1 */
124 #endif /* _PPC_MISC_PROTOS_H_ */