xref: /titanic_41/usr/src/uts/i86pc/sys/machsystm.h (revision 6be356c5780a1ccb886bba08d6eb56b61f021564)
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 kcpc_hw_load_pcbe(void);
68 extern void kcpc_hw_init(cpu_t *cp);
69 extern int kcpc_hw_overflow_intr_installed;
70 
71 struct memconf {
72 	pfn_t	mcf_spfn;	/* begin page fram number */
73 	pfn_t	mcf_epfn;	/* end page frame number */
74 };
75 
76 struct system_hardware {
77 	int		hd_nodes;		/* number of nodes */
78 	int		hd_cpus_per_node; 	/* max cpus in a node */
79 	struct memconf 	hd_mem[MAXNODES];
80 						/*
81 						 * memory layout for each
82 						 * node.
83 						 */
84 };
85 extern struct system_hardware system_hardware;
86 extern void get_system_configuration(void);
87 extern void mmu_init(void);
88 extern int cpuid2nodeid(int);
89 extern void map_kaddr(caddr_t, pfn_t, int, int);
90 extern void memscrub_init(void);
91 
92 extern unsigned int microdata;
93 extern int use_mp;
94 
95 extern struct cpu	cpus[];		/* pointer to other cpus */
96 extern struct cpu	*cpu[];		/* pointer to all cpus */
97 
98 extern uintptr_t hole_start, hole_end;
99 
100 #define	INVALID_VADDR(a)	\
101 	(((a) >= (caddr_t)hole_start && (a) < (caddr_t)hole_end))
102 
103 /* kpm mapping window */
104 extern size_t   kpm_size;
105 extern uchar_t  kpm_size_shift;
106 extern caddr_t  kpm_vbase;
107 
108 #endif /* _KERNEL */
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif	/* _SYS_MACHSYSTM_H */
115