xref: /titanic_44/usr/src/uts/sun4v/cpu/mach_cpu_module.c (revision 40e5e17b3361b3eea56a9723071c406894a20b78)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #pragma ident	"%Z%%M%	%I%	%E% SMI"
27 
28 #include <sys/cpu_module.h>
29 #include <vm/page.h>
30 #include <vm/seg_map.h>
31 
32 void
33 cpu_fiximp(struct cpu_node *cpunode)
34 {}
35 
36 void
37 cpu_flush_ecache(void)
38 {}
39 
40 /*ARGSUSED*/
41 void
42 cpu_faulted_enter(struct cpu *cp)
43 {}
44 
45 /*ARGSUSED*/
46 void
47 cpu_faulted_exit(struct cpu *cp)
48 {}
49 
50 /*
51  * Ecache scrub operations
52  */
53 void
54 cpu_init_cache_scrub(void)
55 {}
56 
57 /* ARGSUSED */
58 void
59 prefetch_page_w(void *pp)
60 {
61 #define	ECACHE_SUBBLOCKS_PER_PAGE	2
62 #define	ECACHE_SUBBLOCK_SIZE_BYTES	64
63 #define	ECACHE_PAGE_BYTE_MAX	\
64 	(ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1)
65 
66 	/*
67 	 * The following line is intended to cause an error
68 	 * whenever the sun4u page_t grows beyond 128
69 	 * bytes.
70 	 *
71 	 * If you get an error here, you'll need to change
72 	 * the 'prefetch_page_w' assembly language code
73 	 * (see also prefetch_page_w prologue comment)
74 	 */
75 	/*LINTED*/
76 	volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)];
77 }
78 
79 /* ARGSUSED */
80 void
81 prefetch_page_r(void *pp)
82 {
83 #define	ECACHE_SUBBLOCKS_PER_PAGE	2
84 #define	ECACHE_SUBBLOCK_SIZE_BYTES	64
85 #define	ECACHE_PAGE_BYTE_MAX	\
86 	(ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1)
87 
88 	/*
89 	 * The following line is intended to cause an error
90 	 * whenever the sun4u page_t grows beyond 128
91 	 * bytes.
92 	 *
93 	 * If you get an error here, you'll need to change
94 	 * the 'prefetch_page_r' assembly language code
95 	 * (see also prefetch_page_w prologue comment)
96 	 */
97 	/*LINTED*/
98 	volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)];
99 }
100 
101 
102 #ifdef	SEGKPM_SUPPORT
103 #define	SMAP_SIZE	80
104 #else
105 #define	SMAP_SIZE	56
106 #endif
107 
108 /* ARGSUSED */
109 void
110 prefetch_smap_w(void *smp)
111 {
112 
113 	/*
114 	 * The following lines are intended to cause an error
115 	 * whenever the smap object size changes from the current
116 	 * size of 48 bytes.  If you get an error here, you'll
117 	 * need to update the code in the 'prefetch_smap_w' assembly
118 	 * language code.
119 	 */
120 	/*LINTED*/
121 	volatile int smap_size_changed [SMAP_SIZE - sizeof (struct smap) + 1];
122 	volatile int smap_size_changed2 [sizeof (struct smap) - SMAP_SIZE + 1];
123 }
124 
125 void
126 kdi_flush_caches(void)
127 {}
128 
129 /*ARGSUSED*/
130 int
131 kzero(void *addr, size_t count)
132 { return (0); }
133 
134 /*ARGSUSED*/
135 void
136 uzero(void *addr, size_t count)
137 {}
138 
139 /*ARGSUSED*/
140 void
141 bzero(void *addr, size_t count)
142 {}
143 
144 /*ARGSUSED*/
145 void
146 cpu_inv_tsb(caddr_t tsb_base, uint_t tsb_bytes)
147 {}
148 
149 void
150 fp_zero(void)
151 {}
152