xref: /titanic_51/usr/src/uts/i86pc/sys/machsystm.h (revision 8eea8e29cc4374d1ee24c25a07f45af132db3499)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_MACHSYSTM_H
28 #define	_SYS_MACHSYSTM_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * Numerous platform-dependent interfaces that don't seem to belong
34  * in any other header file.
35  *
36  * This file should not be included by code that purports to be
37  * platform-independent.
38  *
39  */
40 
41 #include <sys/machparam.h>
42 #include <sys/varargs.h>
43 #include <sys/thread.h>
44 #include <sys/cpuvar.h>
45 #include <vm/page.h>
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 #ifdef _KERNEL
52 
53 extern processorid_t getbootcpuid(void);
54 extern void mp_halt(char *);
55 
56 extern int Cpudelay;
57 extern void setcpudelay(void);
58 
59 extern void init_intr_threads(struct cpu *);
60 extern void init_clock_thread(void);
61 
62 extern void send_dirint(int, int);
63 extern void siron(void);
64 
65 extern void return_instr(void);
66 
67 extern int pokefault;
68 
69 extern int kcpc_hw_load_pcbe(void);
70 extern void kcpc_hw_init(cpu_t *cp);
71 extern int kcpc_hw_overflow_intr_installed;
72 
73 struct memconf {
74 	pfn_t	mcf_spfn;	/* begin page fram number */
75 	pfn_t	mcf_epfn;	/* end page frame number */
76 };
77 
78 struct system_hardware {
79 	int		hd_nodes;		/* number of nodes */
80 	int		hd_cpus_per_node; 	/* max cpus in a node */
81 	struct memconf 	hd_mem[MAXNODES];
82 						/*
83 						 * memory layout for each
84 						 * node.
85 						 */
86 };
87 extern struct system_hardware system_hardware;
88 extern void get_system_configuration(void);
89 extern void mmu_init(void);
90 extern void post_startup_mmu_initialization(void);
91 extern int cpuid2nodeid(int);
92 extern void map_kaddr(caddr_t, pfn_t, int, int);
93 
94 extern unsigned int microdata;
95 extern int use_mp;
96 
97 extern struct cpu	cpus[];		/* pointer to other cpus */
98 extern struct cpu	*cpu[];		/* pointer to all cpus */
99 
100 extern uintptr_t hole_start, hole_end;
101 
102 #define	INVALID_VADDR(a)	\
103 	(((a) >= (caddr_t)hole_start && (a) < (caddr_t)hole_end))
104 
105 /* kpm mapping window */
106 extern size_t   kpm_size;
107 extern uchar_t  kpm_size_shift;
108 extern caddr_t  kpm_vbase;
109 
110 #endif /* _KERNEL */
111 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 #endif	/* _SYS_MACHSYSTM_H */
117