ia32_util.h revision 220238
1100384Speter/*- 2100384Speter * Copyright (c) 1998-1999 Andrew Gallatin 3100384Speter * All rights reserved. 4100384Speter * 5100384Speter * Redistribution and use in source and binary forms, with or without 6100384Speter * modification, are permitted provided that the following conditions 7100384Speter * are met: 8100384Speter * 1. Redistributions of source code must retain the above copyright 9100384Speter * notice, this list of conditions and the following disclaimer 10100384Speter * in this position and unchanged. 11100384Speter * 2. Redistributions in binary form must reproduce the above copyright 12100384Speter * notice, this list of conditions and the following disclaimer in the 13100384Speter * documentation and/or other materials provided with the distribution. 14100384Speter * 3. The name of the author may not be used to endorse or promote products 15100384Speter * derived from this software withough specific prior written permission 16100384Speter * 17100384Speter * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18100384Speter * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19100384Speter * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20100384Speter * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21100384Speter * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22100384Speter * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23100384Speter * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24100384Speter * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25100384Speter * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26100384Speter * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27100384Speter * 28100384Speter * $FreeBSD: head/sys/compat/ia32/ia32_util.h 220238 2011-04-01 11:16:29Z kib $ 29100384Speter */ 30100384Speter 31215741Skib#ifndef _COMPAT_IA32_IA32_UTIL_H 32215741Skib#define _COMPAT_IA32_IA32_UTIL_H 33215741Skib 34100384Speter#include <vm/vm.h> 35100384Speter#include <vm/vm_param.h> 36100384Speter#include <vm/pmap.h> 37100384Speter 38100384Speter 39100384Speter#include <sys/exec.h> 40100384Speter#include <sys/sysent.h> 41100384Speter#include <sys/cdefs.h> 42100384Speter 43123423Speter#ifdef __ia64__ 44217151Skib#define FREEBSD32_MAXUSER ((1ul << 32) - IA32_PAGE_SIZE * 2) 45217151Skib#define FREEBSD32_SHAREDPAGE 0 46217151Skib#define FREEBSD32_USRSTACK FREEBSD32_MAXUSER 47123423Speter#else 48217151Skib#define FREEBSD32_MAXUSER ((1ul << 32) - IA32_PAGE_SIZE) 49217151Skib#define FREEBSD32_SHAREDPAGE (FREEBSD32_MAXUSER - IA32_PAGE_SIZE) 50217151Skib#define FREEBSD32_USRSTACK FREEBSD32_SHAREDPAGE 51123423Speter#endif 52120422Speter 53123423Speter#define IA32_PAGE_SIZE 4096 54120422Speter#define IA32_MAXDSIZ (512*1024*1024) /* 512MB */ 55120422Speter#define IA32_MAXSSIZ (64*1024*1024) /* 64MB */ 56120422Speter#define IA32_MAXVMEM 0 /* Unlimited */ 57208453Skib 58208453Skibstruct syscall_args; 59208453Skibint ia32_fetch_syscall_args(struct thread *td, struct syscall_args *sa); 60208453Skibvoid ia32_set_syscall_retval(struct thread *, int); 61220238Skibvoid ia32_fixlimit(struct rlimit *rl, int which); 62215741Skib 63215741Skib#endif 64