more header changes for amd64 port; the pc64 building infrastructure
[dragonfly.git] / sys / platform / pc64 / amd64 / genassym.c
CommitLineData
d7f50089
YY
1/*-
2 * Copyright (c) 1982, 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
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.
23 *
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
34 * SUCH DAMAGE.
35 *
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 $
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/assym.h>
44#include <sys/interrupt.h>
45#include <sys/buf.h>
46#include <sys/proc.h>
47#include <sys/errno.h>
48#include <sys/mount.h>
49#include <sys/socket.h>
50#include <sys/lock.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>
57#include <vm/vm.h>
58#include <vm/vm_param.h>
59#include <vm/pmap.h>
60#include <vm/vm_map.h>
61#include <net/if.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>
67
68#include <machine/segments.h>
69#include <machine/sigframe.h>
70#include <machine/globaldata.h>
71#include <machine/pcb.h>
72
73ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace));
74ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap));
75ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active));
76
77ASSYM(UPAGES, UPAGES);
78ASSYM(PAGE_SIZE, PAGE_SIZE);
79ASSYM(NPTEPG, NPTEPG);
80ASSYM(NPDEPG, NPDEPG);
81ASSYM(PDESIZE, PDESIZE);
82ASSYM(PTESIZE, PTESIZE);
83ASSYM(PAGE_SHIFT, PAGE_SHIFT);
84ASSYM(PAGE_MASK, PAGE_MASK);
85ASSYM(PDRSHIFT, PDRSHIFT);
86ASSYM(USRSTACK, USRSTACK);
87ASSYM(KERNBASE, KERNBASE);
88
89ASSYM(MAXCOMLEN, MAXCOMLEN);
90ASSYM(EFAULT, EFAULT);
91ASSYM(ENAMETOOLONG, ENAMETOOLONG);
92ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS);
93ASSYM(GD_CURTHREAD, offsetof(struct mdglobaldata, mi.gd_curthread));
94ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
95
96ASSYM(SIGF_HANDLER, offsetof(struct sigframe, sf_ahu.sf_handler));
97ASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc));
98
99ASSYM(KCSEL, GSEL(GCODE_SEL, SEL_KPL));
100ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL));
101
102ASSYM(TD_PRI, offsetof(struct thread, td_pri));
103
104ASSYM(TDPRI_CRIT, TDPRI_CRIT);
105ASSYM(TDPRI_INT_SUPPORT, TDPRI_INT_SUPPORT);