]> git.saurik.com Git - apple/xnu.git/blame_incremental - osfmk/ppc/misc_protos.h
xnu-792.2.4.tar.gz
[apple/xnu.git] / osfmk / ppc / misc_protos.h
... / ...
CommitLineData
1/*
2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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.
11 *
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
18 * under the License.
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 <debug.h>
30#include <mach_kdb.h>
31#include <mach_kgdb.h>
32#include <mach_kdp.h>
33#include <mach_debug.h>
34
35#include <ppc/boot.h>
36#include <kern/thread.h>
37#include <mach/vm_types.h>
38#include <kern/cpu_data.h>
39#include <ppc/savearea.h>
40#include <mach/ppc/thread_status.h>
41#include <stdarg.h>
42#include <string.h>
43
44/* uncached-safe */
45extern void bzero_nc(
46 char *buf,
47 int size);
48
49/* uncached-safe */
50extern void bcopy_nc(
51 char *from,
52 char *to,
53 int size);
54
55/* Physical to physical copy (ints must be disabled) */
56extern void bcopy_phys(
57 addr64_t from,
58 addr64_t to,
59 int size);
60
61/* Physical to physical copy virtually (ints must be disabled) */
62extern void bcopy_physvir_32(
63 addr64_t from,
64 addr64_t to,
65 int size);
66
67extern void phys_copy(
68 addr64_t from,
69 addr64_t to,
70 vm_size_t size);
71
72extern void machine_conf(
73 void);
74
75extern void machine_startup(
76 boot_args *args);
77
78extern void ppc_vm_init(
79 uint64_t ppc_mem_size,
80 boot_args *args);
81
82extern int ppcNull(
83 struct savearea *asavearea);
84
85extern int ppcNullinst(
86 struct savearea *asavearea);
87
88extern void disable_bluebox_internal(
89 thread_t act);
90
91extern uint64_t hid0get64(
92 void);
93
94extern void hid5set64(
95 uint64_t);
96
97extern void Load_context(
98 thread_t th);
99
100extern thread_t Switch_context(
101 thread_t old,
102 void (*cont)(void),
103 thread_t new);
104
105extern void fpu_save(
106 struct facility_context *fpu_fc);
107
108extern void vec_save(
109 struct facility_context *vec_fc);
110
111extern void toss_live_fpu(
112 struct facility_context *fpu_fc);
113
114extern void toss_live_vec(
115 struct facility_context *vec_fc);
116
117extern struct savearea *enterDebugger(
118 unsigned int trap,
119 struct savearea *state,
120 unsigned int dsisr);
121
122extern void draw_panic_dialog(
123 void);
124
125#ifdef DEBUG
126#define DPRINTF(x) { printf("%s : ",__FUNCTION__);printf x; }
127#endif /* DEBUG */
128
129#if MACH_ASSERT
130extern void dump_thread(
131 thread_t th);
132#endif
133
134#endif /* _PPC_MISC_PROTOS_H_ */