]> git.saurik.com Git - apple/xnu.git/blame - osfmk/ppc/misc_protos.h
xnu-517.12.7.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 *
e5568f75
A
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.
1c79356b 11 *
e5568f75
A
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
1c79356b
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
e5568f75
A
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
1c79356b
A
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22/*
23 * @OSF_COPYRIGHT@
24 */
25
26#ifndef _PPC_MISC_PROTOS_H_
27#define _PPC_MISC_PROTOS_H_
28
29#include <cpus.h>
30#include <debug.h>
31#include <mach_kdb.h>
32#include <mach_kgdb.h>
33#include <mach_kdp.h>
34#include <mach_debug.h>
35
36#include <ppc/thread.h>
37#include <ppc/boot.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>
42#include <stdarg.h>
43
44extern int strcmp(const char *s1, const char *s2);
45extern int strncmp(const char *s1, const char *s2, unsigned long n);
46extern char *strcat(char *dest, const char *src);
47extern char *strcpy(char *dest, const char *src);
48
49extern void vprintf(const char *fmt, va_list args);
50extern void printf(const char *fmt, ...);
51
55e303ae 52extern void bzero_nc(char* buf, int size); /* uncached-safe */
1c79356b 53extern void bcopy_nc(char *from, char *to, int size); /* uncached-safe */
55e303ae
A
54extern void bcopy_phys(addr64_t from, addr64_t to, int size); /* Physical to physical copy (ints must be disabled) */
55extern void bcopy_physvir(addr64_t from, addr64_t to, int size); /* Physical to physical copy virtually (ints must be disabled) */
1c79356b
A
56
57extern void ppc_init(boot_args *args);
9bccf70c
A
58extern struct savearea *enterDebugger(unsigned int trap,
59 struct savearea *state,
1c79356b
A
60 unsigned int dsisr);
61
9bccf70c 62extern void draw_panic_dialog(void);
55e303ae
A
63extern void ppc_vm_init(uint64_t mem_size, boot_args *args);
64
65extern int ppcNull(struct savearea *);
66extern int ppcNullinst(struct savearea *);
1c79356b
A
67
68extern void autoconf(void);
69extern void machine_init(void);
70extern void machine_conf(void);
71extern void probeio(void);
72extern int cons_find(boolean_t);
73extern void machine_startup(boot_args *args);
74
75extern void interrupt_init(void);
76extern void interrupt_enable(void);
77extern void interrupt_disable(void);
78extern void disable_bluebox_internal(thread_act_t act);
55e303ae 79extern uint64_t hid0get64(void);
e5568f75 80extern void hid5set64(uint64_t);
1c79356b
A
81#if MACH_KDB
82extern void db_interrupt_enable(void);
83extern void db_interrupt_disable(void);
84#endif /* MACH_KDB */
1c79356b
A
85
86extern void phys_zero(vm_offset_t, vm_size_t);
55e303ae 87extern void phys_copy(addr64_t, addr64_t, vm_size_t);
1c79356b
A
88
89extern void Load_context(thread_t th);
90
55e303ae
A
91extern thread_t Switch_context(
92 thread_t old,
93 void (*cont)(void),
94 thread_t new);
1c79356b 95
9bccf70c
A
96extern void fpu_save(struct facility_context *);
97extern void vec_save(struct facility_context *);
98extern void toss_live_fpu(struct facility_context *);
99extern void toss_live_vec(struct facility_context *);
100
55e303ae
A
101extern void condStop(unsigned int, unsigned int);
102
1c79356b
A
103extern int nsec_to_processor_clock_ticks(int nsec);
104
105extern void tick_delay(int ticks);
106
107#ifdef DEBUG
108#define DPRINTF(x) { printf("%s : ",__FUNCTION__);printf x; }
109#endif /* DEBUG */
110
111#if MACH_ASSERT
1c79356b
A
112extern void dump_thread(thread_t th);
113#endif
114
115#if NCPUS > 1
116extern void mp_probe_cpus(void);
117#if MACH_KDB
118extern void remote_kdb(void);
119extern void clear_kdb_intr(void);
120extern void kdb_console(void);
121#endif /* MACH_KDB */
122#endif /* NCPUS > 1 */
123
124#endif /* _PPC_MISC_PROTOS_H_ */