]> git.saurik.com Git - apple/xnu.git/blame - osfmk/ppc/misc_protos.h
xnu-124.13.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 *
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 <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
52extern void bcopy_nc(char *from, char *to, int size); /* uncached-safe */
53extern void bcopy_phys(char *from, char *to, int size); /* Physical to physical copy (ints must be disabled) */
54
55extern void ppc_init(boot_args *args);
56extern struct ppc_saved_state *enterDebugger(unsigned int trap,
57 struct ppc_saved_state *state,
58 unsigned int dsisr);
59
60extern void ppc_vm_init(unsigned int mem_size, boot_args *args);
61extern void regDump(struct ppc_saved_state *state);
62
63extern void autoconf(void);
64extern void machine_init(void);
65extern void machine_conf(void);
66extern void probeio(void);
67extern int cons_find(boolean_t);
68extern void machine_startup(boot_args *args);
69
70extern void interrupt_init(void);
71extern void interrupt_enable(void);
72extern void interrupt_disable(void);
73extern void disable_bluebox_internal(thread_act_t act);
74#if MACH_KDB
75extern void db_interrupt_enable(void);
76extern void db_interrupt_disable(void);
77#endif /* MACH_KDB */
78extern void amic_init(void);
79
80extern void phys_zero(vm_offset_t, vm_size_t);
81extern void phys_copy(vm_offset_t, vm_offset_t, vm_size_t);
82
83extern void Load_context(thread_t th);
84
85extern struct thread_shuttle *Switch_context(struct thread_shuttle *old,
86 void (*cont)(void),
87 struct thread_shuttle *new);
88
89extern int nsec_to_processor_clock_ticks(int nsec);
90
91extern void tick_delay(int ticks);
92
93#ifdef DEBUG
94#define DPRINTF(x) { printf("%s : ",__FUNCTION__);printf x; }
95#endif /* DEBUG */
96
97#if MACH_ASSERT
98extern void dump_pcb(pcb_t pcb);
99extern void dump_thread(thread_t th);
100#endif
101
102#if NCPUS > 1
103extern void mp_probe_cpus(void);
104#if MACH_KDB
105extern void remote_kdb(void);
106extern void clear_kdb_intr(void);
107extern void kdb_console(void);
108#endif /* MACH_KDB */
109#endif /* NCPUS > 1 */
110
111#endif /* _PPC_MISC_PROTOS_H_ */