Deleted Added
full compact
genassym.c (216803) genassym.c (221869)
1/*-
2 * Copyright (c) 2001 Jake Burkholder.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
27 */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Jake Burkholder.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/sparc64/sparc64/genassym.c 216803 2010-12-29 16:59:33Z marius $");
30__FBSDID("$FreeBSD: head/sys/sparc64/sparc64/genassym.c 221869 2011-05-14 01:53:38Z attilio $");
31
32#include "opt_kstack_pages.h"
33
34#include <sys/param.h>
35#include <sys/assym.h>
36#include <sys/ktr.h>
37#include <sys/proc.h>
38#include <sys/smp.h>
39#include <sys/vmmeter.h>
40
41#include <vm/vm.h>
42#include <vm/vm_page.h>
43#include <vm/vm_map.h>
44
45#ifdef SUN4U
46#include <machine/cache.h>
47#endif
31
32#include "opt_kstack_pages.h"
33
34#include <sys/param.h>
35#include <sys/assym.h>
36#include <sys/ktr.h>
37#include <sys/proc.h>
38#include <sys/smp.h>
39#include <sys/vmmeter.h>
40
41#include <vm/vm.h>
42#include <vm/vm_page.h>
43#include <vm/vm_map.h>
44
45#ifdef SUN4U
46#include <machine/cache.h>
47#endif
48#ifdef SUN4V
49#include <machine/mmu.h>
50#endif
51#include <machine/pcb.h>
52#include <machine/setjmp.h>
53#include <machine/smp.h>
54#include <machine/tlb.h>
55#include <machine/tte.h>
48#include <machine/pcb.h>
49#include <machine/setjmp.h>
50#include <machine/smp.h>
51#include <machine/tlb.h>
52#include <machine/tte.h>
56#ifdef SUN4V
57#include <machine/trap.h>
58#include <machine/tte_hash.h>
59#endif
60#include <machine/vmparam.h>
61
62ASSYM(KERNBASE, KERNBASE);
63
64ASSYM(KSTACK_PAGES, KSTACK_PAGES);
65ASSYM(PCPU_PAGES, PCPU_PAGES);
66
67ASSYM(TAR_VPN_SHIFT, TAR_VPN_SHIFT);

--- 20 unchanged lines hidden (view full) ---

88ASSYM(CSA_STATE, offsetof(struct cpu_start_args, csa_state));
89#ifdef SUN4U
90ASSYM(CSA_MID, offsetof(struct cpu_start_args, csa_mid));
91ASSYM(CSA_STICK, offsetof(struct cpu_start_args, csa_stick));
92ASSYM(CSA_TICK, offsetof(struct cpu_start_args, csa_tick));
93ASSYM(CSA_TTES, offsetof(struct cpu_start_args, csa_ttes));
94ASSYM(CSA_VER, offsetof(struct cpu_start_args, csa_ver));
95#endif
53#include <machine/vmparam.h>
54
55ASSYM(KERNBASE, KERNBASE);
56
57ASSYM(KSTACK_PAGES, KSTACK_PAGES);
58ASSYM(PCPU_PAGES, PCPU_PAGES);
59
60ASSYM(TAR_VPN_SHIFT, TAR_VPN_SHIFT);

--- 20 unchanged lines hidden (view full) ---

81ASSYM(CSA_STATE, offsetof(struct cpu_start_args, csa_state));
82#ifdef SUN4U
83ASSYM(CSA_MID, offsetof(struct cpu_start_args, csa_mid));
84ASSYM(CSA_STICK, offsetof(struct cpu_start_args, csa_stick));
85ASSYM(CSA_TICK, offsetof(struct cpu_start_args, csa_tick));
86ASSYM(CSA_TTES, offsetof(struct cpu_start_args, csa_ttes));
87ASSYM(CSA_VER, offsetof(struct cpu_start_args, csa_ver));
88#endif
96#ifdef SUN4V
97ASSYM(CSA_CPUID, offsetof(struct cpu_start_args, csa_cpuid));
98#endif
89#endif
99#endif
100
101#ifdef SUN4U
102ASSYM(DC_SIZE, offsetof(struct cacheinfo, dc_size));
103ASSYM(DC_LINESIZE, offsetof(struct cacheinfo, dc_linesize));
104ASSYM(IC_SIZE, offsetof(struct cacheinfo, ic_size));
105ASSYM(IC_LINESIZE, offsetof(struct cacheinfo, ic_linesize));
106#endif
107

--- 28 unchanged lines hidden (view full) ---

136ASSYM(TS_MAX, TS_MAX);
137ASSYM(TLB_DAR_SLOT_SHIFT, TLB_DAR_SLOT_SHIFT);
138ASSYM(TLB_CXR_PGSZ_MASK, TLB_CXR_PGSZ_MASK);
139ASSYM(TLB_DIRECT_ADDRESS_MASK, TLB_DIRECT_ADDRESS_MASK);
140ASSYM(TLB_DIRECT_TO_TTE_MASK, TLB_DIRECT_TO_TTE_MASK);
141ASSYM(TV_SIZE_BITS, TV_SIZE_BITS);
142#endif
143
90
91#ifdef SUN4U
92ASSYM(DC_SIZE, offsetof(struct cacheinfo, dc_size));
93ASSYM(DC_LINESIZE, offsetof(struct cacheinfo, dc_linesize));
94ASSYM(IC_SIZE, offsetof(struct cacheinfo, ic_size));
95ASSYM(IC_LINESIZE, offsetof(struct cacheinfo, ic_linesize));
96#endif
97

--- 28 unchanged lines hidden (view full) ---

126ASSYM(TS_MAX, TS_MAX);
127ASSYM(TLB_DAR_SLOT_SHIFT, TLB_DAR_SLOT_SHIFT);
128ASSYM(TLB_CXR_PGSZ_MASK, TLB_CXR_PGSZ_MASK);
129ASSYM(TLB_DIRECT_ADDRESS_MASK, TLB_DIRECT_ADDRESS_MASK);
130ASSYM(TLB_DIRECT_TO_TTE_MASK, TLB_DIRECT_TO_TTE_MASK);
131ASSYM(TV_SIZE_BITS, TV_SIZE_BITS);
132#endif
133
144#ifdef SUN4V
145ASSYM(VTD_REF, VTD_REF);
146ASSYM(VTD_W, VTD_W);
147ASSYM(VTD_SW_W, VTD_SW_W);
148ASSYM(VTD_LOCK, VTD_LOCK);
149
150ASSYM(THE_SHIFT, THE_SHIFT);
151ASSYM(PM_HASHSCRATCH, offsetof(struct pmap, pm_hashscratch));
152ASSYM(PM_TSBSCRATCH, offsetof(struct pmap, pm_tsbscratch));
153ASSYM(PM_TSB_RA, offsetof(struct pmap, pm_tsb_ra));
154ASSYM(PM_TLBACTIVE, offsetof(struct pmap, pm_tlbactive));
155ASSYM(HASH_ENTRY_SHIFT, HASH_ENTRY_SHIFT);
156#endif
157
158ASSYM(V_INTR, offsetof(struct vmmeter, v_intr));
159
160ASSYM(MAXCOMLEN, MAXCOMLEN);
161ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
162ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
163ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
164ASSYM(PC_CPUMASK, offsetof(struct pcpu, pc_cpumask));
165ASSYM(PC_IRHEAD, offsetof(struct pcpu, pc_irhead));
166ASSYM(PC_IRTAIL, offsetof(struct pcpu, pc_irtail));
167ASSYM(PC_IRFREE, offsetof(struct pcpu, pc_irfree));
168ASSYM(PC_CNT, offsetof(struct pcpu, pc_cnt));
169ASSYM(PC_SIZEOF, sizeof(struct pcpu));
170
134ASSYM(V_INTR, offsetof(struct vmmeter, v_intr));
135
136ASSYM(MAXCOMLEN, MAXCOMLEN);
137ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
138ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
139ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
140ASSYM(PC_CPUMASK, offsetof(struct pcpu, pc_cpumask));
141ASSYM(PC_IRHEAD, offsetof(struct pcpu, pc_irhead));
142ASSYM(PC_IRTAIL, offsetof(struct pcpu, pc_irtail));
143ASSYM(PC_IRFREE, offsetof(struct pcpu, pc_irfree));
144ASSYM(PC_CNT, offsetof(struct pcpu, pc_cnt));
145ASSYM(PC_SIZEOF, sizeof(struct pcpu));
146
171#ifdef SUN4V
172ASSYM(PC_CPU_Q_RA, offsetof(struct pcpu, pc_cpu_q_ra));
173ASSYM(PC_CPU_Q_SIZE, offsetof(struct pcpu, pc_cpu_q_size));
174ASSYM(PC_DEV_Q_RA, offsetof(struct pcpu, pc_dev_q_ra));
175ASSYM(PC_DEV_Q_SIZE, offsetof(struct pcpu, pc_dev_q_size));
176
177ASSYM(PC_RQ_BASE, offsetof(struct pcpu, pc_rq_ra));
178ASSYM(PC_RQ_SIZE, offsetof(struct pcpu, pc_rq_size));
179ASSYM(PC_NRQ_BASE, offsetof(struct pcpu, pc_nrq_ra));
180ASSYM(PC_NRQ_SIZE, offsetof(struct pcpu, pc_nrq_size));
181ASSYM(PC_MONDO_DATA, offsetof(struct pcpu, pc_mondo_data));
182ASSYM(PC_MONDO_DATA_RA, offsetof(struct pcpu, pc_mondo_data_ra));
183
184ASSYM(PC_KWBUF_FULL, offsetof(struct pcpu, pc_kwbuf_full));
185ASSYM(PC_KWBUF_SP, offsetof(struct pcpu, pc_kwbuf_sp));
186ASSYM(PC_KWBUF, offsetof(struct pcpu, pc_kwbuf));
187ASSYM(PC_PAD, offsetof(struct pcpu, pad));
188ASSYM(PC_PMAP, offsetof(struct pcpu, pc_curpmap));
189ASSYM(PC_TSBWBUF, offsetof(struct pcpu, pc_tsbwbuf));
190
191ASSYM(PCB_KSTACK, offsetof(struct pcb, pcb_kstack));
192ASSYM(PCB_TSTATE, offsetof(struct pcb, pcb_tstate));
193ASSYM(PCB_TPC, offsetof(struct pcb, pcb_tpc));
194ASSYM(PCB_TNPC, offsetof(struct pcb, pcb_tnpc));
195ASSYM(PCB_TT, offsetof(struct pcb, pcb_tt));
196ASSYM(PCB_SFAR, offsetof(struct pcb, pcb_sfar));
197ASSYM(PM_TSB_MISS_COUNT, offsetof(struct pmap, pm_tsb_miss_count));
198ASSYM(PM_TSB_CAP_MISS_COUNT, offsetof(struct pmap, pm_tsb_cap_miss_count));
199#endif
200#ifdef SUN4U
201ASSYM(PC_CACHE, offsetof(struct pcpu, pc_cache));
202ASSYM(PC_MID, offsetof(struct pcpu, pc_mid));
203ASSYM(PC_PMAP, offsetof(struct pcpu, pc_pmap));
204ASSYM(PC_TLB_CTX, offsetof(struct pcpu, pc_tlb_ctx));
205ASSYM(PC_TLB_CTX_MAX, offsetof(struct pcpu, pc_tlb_ctx_max));
206ASSYM(PC_TLB_CTX_MIN, offsetof(struct pcpu, pc_tlb_ctx_min));
207#endif

--- 85 unchanged lines hidden (view full) ---

293#ifdef SUN4U
294ASSYM(TF_LEVEL, offsetof(struct trapframe, tf_level));
295ASSYM(TF_SFAR, offsetof(struct trapframe, tf_sfar));
296ASSYM(TF_SFSR, offsetof(struct trapframe, tf_sfsr));
297ASSYM(TF_TAR, offsetof(struct trapframe, tf_tar));
298ASSYM(TF_TYPE, offsetof(struct trapframe, tf_type));
299ASSYM(TF_Y, offsetof(struct trapframe, tf_y));
300#endif
147#ifdef SUN4U
148ASSYM(PC_CACHE, offsetof(struct pcpu, pc_cache));
149ASSYM(PC_MID, offsetof(struct pcpu, pc_mid));
150ASSYM(PC_PMAP, offsetof(struct pcpu, pc_pmap));
151ASSYM(PC_TLB_CTX, offsetof(struct pcpu, pc_tlb_ctx));
152ASSYM(PC_TLB_CTX_MAX, offsetof(struct pcpu, pc_tlb_ctx_max));
153ASSYM(PC_TLB_CTX_MIN, offsetof(struct pcpu, pc_tlb_ctx_min));
154#endif

--- 85 unchanged lines hidden (view full) ---

240#ifdef SUN4U
241ASSYM(TF_LEVEL, offsetof(struct trapframe, tf_level));
242ASSYM(TF_SFAR, offsetof(struct trapframe, tf_sfar));
243ASSYM(TF_SFSR, offsetof(struct trapframe, tf_sfsr));
244ASSYM(TF_TAR, offsetof(struct trapframe, tf_tar));
245ASSYM(TF_TYPE, offsetof(struct trapframe, tf_type));
246ASSYM(TF_Y, offsetof(struct trapframe, tf_y));
247#endif
301#ifdef SUN4V
302ASSYM(TF_ASI, offsetof(struct trapframe, tf_asi));
303#endif
304ASSYM(TF_TNPC, offsetof(struct trapframe, tf_tnpc));
305ASSYM(TF_TPC, offsetof(struct trapframe, tf_tpc));
306ASSYM(TF_TSTATE, offsetof(struct trapframe, tf_tstate));
307ASSYM(TF_WSTATE, offsetof(struct trapframe, tf_wstate));
308ASSYM(TF_SIZEOF, sizeof(struct trapframe));
309
310ASSYM(VM_MIN_DIRECT_ADDRESS, VM_MIN_DIRECT_ADDRESS);
311ASSYM(VM_MIN_PROM_ADDRESS, VM_MIN_PROM_ADDRESS);
312ASSYM(VM_MAX_PROM_ADDRESS, VM_MAX_PROM_ADDRESS);
248ASSYM(TF_TNPC, offsetof(struct trapframe, tf_tnpc));
249ASSYM(TF_TPC, offsetof(struct trapframe, tf_tpc));
250ASSYM(TF_TSTATE, offsetof(struct trapframe, tf_tstate));
251ASSYM(TF_WSTATE, offsetof(struct trapframe, tf_wstate));
252ASSYM(TF_SIZEOF, sizeof(struct trapframe));
253
254ASSYM(VM_MIN_DIRECT_ADDRESS, VM_MIN_DIRECT_ADDRESS);
255ASSYM(VM_MIN_PROM_ADDRESS, VM_MIN_PROM_ADDRESS);
256ASSYM(VM_MAX_PROM_ADDRESS, VM_MAX_PROM_ADDRESS);