1/*	$NetBSD: cpu.h,v 1.77 2024/01/20 00:15:30 thorpej Exp $	*/
2
3/*
4 * Copyright (c) 1988 University of Utah.
5 * Copyright (c) 1982, 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by
9 * the Systems Programming Group of the University of Utah Computer
10 * Science Department.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 *    notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 *    notice, this list of conditions and the following disclaimer in the
19 *    documentation and/or other materials provided with the distribution.
20 * 3. Neither the name of the University nor the names of its contributors
21 *    may be used to endorse or promote products derived from this software
22 *    without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: Utah $Hdr: cpu.h 1.16 91/03/25$
37 *
38 *	@(#)cpu.h	7.7 (Berkeley) 6/27/91
39 */
40
41#ifndef _MACHINE_CPU_H_
42#define _MACHINE_CPU_H_
43
44#if defined(_KERNEL_OPT)
45#include "opt_lockdebug.h"
46#endif
47
48/*
49 * Get common m68k CPU definitions.
50 */
51#include <m68k/cpu.h>
52
53#if defined(_KERNEL)
54void	cpu_proc_fork(struct proc *, struct proc *);
55
56/*
57 * The rest of this should probably be moved to ../atari/ataricpu.h,
58 * although some of it could probably be put into generic 68k headers.
59 */
60#define	BASEPRI(sr)	((sr & PSL_IPL) == 0)
61#endif /* _KERNEL */
62
63/*
64 * Values for machineid.
65 */
66#define	ATARI_68000	1		/* 68000 CPU			*/
67#define	ATARI_68010	(1<<1)		/* 68010 CPU			*/
68#define ATARI_68020	(1L<<2)		/* 68020 CPU			*/
69#define ATARI_68030	(1L<<3)		/* 68030 CPU			*/
70#define ATARI_68040	(1L<<4)		/* 68040 CPU			*/
71#define ATARI_68060	(1L<<6)		/* 68060 CPU			*/
72#define	ATARI_TT	(1L<<11)	/* This is a TT030		*/
73#define	ATARI_FALCON	(1L<<12)	/*           Falcon		*/
74#define	ATARI_HADES	(1L<<13)	/*           Hades		*/
75#define	ATARI_MILAN	(1L<<14)	/*           Milan		*/
76
77#define	ATARI_CLKBROKEN	(1L<<16)
78
79#define	ATARI_ANYCPU	(ATARI_68000|ATARI_68010|ATARI_68020|ATARI_68030 \
80			|ATARI_68040|ATARI_68060)
81
82#define	ATARI_ANYMACH	(ATARI_TT|ATARI_FALCON|ATARI_HADES|ATARI_MILAN)
83
84#if defined(_KERNEL)
85extern int machineid;
86
87/*
88 * Prototypes from atari_init.c
89 */
90int	cpu_dump(int (*)(dev_t, daddr_t, void *, size_t), daddr_t *);
91int	cpu_dumpsize(void);
92
93/*
94 * Prototypes from autoconf.c
95 */
96void	config_console(void);
97
98/*
99 * Prototypes from fpu.c
100 */
101const char *fpu_describe(int);
102
103/*
104 * Prototypes from locore.s
105 */
106void	clearseg(paddr_t);
107void	doboot(void);
108void	physcopyseg(paddr_t, paddr_t);
109u_int	probeva(u_int, u_int);
110
111/*
112 * Prototypes from machdep.c:
113 */
114int	badbaddr(void *, int);
115void	consinit(void);
116typedef void (*si_farg)(void *, void *);	/* XXX */
117void	init_sicallback(void);			/* XXX */
118void	add_sicallback(si_farg, void *, void *);
119void	rem_sicallback(si_farg);
120void	dumpsys(void);
121vaddr_t reserve_dumppages(vaddr_t);
122
123
124/*
125 * Prototypes from nvram.c:
126 */
127struct uio;
128int	nvram_uio(struct uio *);
129
130/*
131 * Prototypes from pci_machdep.c
132 */
133void init_pci_bus(void);
134
135#endif /* _KERNEL */
136#endif /* !_MACHINE_CPU_H_ */
137