2 * Copyright (c) 1982, 1990 The Regents of the University of California.
5 * This code is derived from software contributed to Berkeley by
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by the University of
19 * California, Berkeley and its contributors.
20 * 4. 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.
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
36 * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
37 * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.86.2.3 2002/03/03 05:42:49 nyan Exp $
38 * $DragonFly: src/sys/platform/pc64/amd64/genassym.c,v 1.1 2007/09/23 04:29:31 yanyh Exp $
41 #include <sys/param.h>
42 #include <sys/systm.h>
43 #include <sys/assym.h>
44 #include <sys/interrupt.h>
47 #include <sys/errno.h>
48 #include <sys/mount.h>
49 #include <sys/socket.h>
51 #include <sys/resourcevar.h>
52 #include <machine/frame.h>
53 #include <machine/bootinfo.h>
54 #include <machine/tss.h>
55 #include <sys/vmmeter.h>
56 #include <sys/machintr.h>
58 #include <vm/vm_param.h>
60 #include <vm/vm_map.h>
62 #include <netinet/in.h>
63 #include <vfs/nfs/nfsv2.h>
64 #include <vfs/nfs/rpcv2.h>
65 #include <vfs/nfs/nfs.h>
66 #include <vfs/nfs/nfsdiskless.h>
68 #include <machine/segments.h>
69 #include <machine/sigframe.h>
70 #include <machine/globaldata.h>
71 #include <machine/pcb.h>
73 ASSYM(P_VMSPACE
, offsetof(struct proc
, p_vmspace
));
74 ASSYM(VM_PMAP
, offsetof(struct vmspace
, vm_pmap
));
75 ASSYM(PM_ACTIVE
, offsetof(struct pmap
, pm_active
));
77 ASSYM(UPAGES
, UPAGES
);
78 ASSYM(PAGE_SIZE
, PAGE_SIZE
);
79 ASSYM(NPTEPG
, NPTEPG
);
80 ASSYM(NPDEPG
, NPDEPG
);
81 ASSYM(PDESIZE
, PDESIZE
);
82 ASSYM(PTESIZE
, PTESIZE
);
83 ASSYM(PAGE_SHIFT
, PAGE_SHIFT
);
84 ASSYM(PAGE_MASK
, PAGE_MASK
);
85 ASSYM(PDRSHIFT
, PDRSHIFT
);
86 ASSYM(USRSTACK
, USRSTACK
);
87 ASSYM(KERNBASE
, KERNBASE
);
89 ASSYM(MAXCOMLEN
, MAXCOMLEN
);
90 ASSYM(EFAULT
, EFAULT
);
91 ASSYM(ENAMETOOLONG
, ENAMETOOLONG
);
92 ASSYM(VM_MAXUSER_ADDRESS
, VM_MAXUSER_ADDRESS
);
93 ASSYM(GD_CURTHREAD
, offsetof(struct mdglobaldata
, mi
.gd_curthread
));
94 ASSYM(PCB_ONFAULT
, offsetof(struct pcb
, pcb_onfault
));
96 ASSYM(SIGF_HANDLER
, offsetof(struct sigframe
, sf_ahu
.sf_handler
));
97 ASSYM(SIGF_UC
, offsetof(struct sigframe
, sf_uc
));
99 ASSYM(KCSEL
, GSEL(GCODE_SEL
, SEL_KPL
));
100 ASSYM(KDSEL
, GSEL(GDATA_SEL
, SEL_KPL
));
102 ASSYM(TD_PRI
, offsetof(struct thread
, td_pri
));
104 ASSYM(TDPRI_CRIT
, TDPRI_CRIT
);
105 ASSYM(TDPRI_INT_SUPPORT
, TDPRI_INT_SUPPORT
);