182792244SWarner Losh /* 282792244SWarner Losh * i386 VM parameters definitions 382792244SWarner Losh * 482792244SWarner Losh * Copyright (c) 2013 Stacey D. Son 582792244SWarner Losh * 682792244SWarner Losh * This program is free software; you can redistribute it and/or modify 782792244SWarner Losh * it under the terms of the GNU General Public License as published by 882792244SWarner Losh * the Free Software Foundation; either version 2 of the License, or 982792244SWarner Losh * (at your option) any later version. 1082792244SWarner Losh * 1182792244SWarner Losh * This program is distributed in the hope that it will be useful, 1282792244SWarner Losh * but WITHOUT ANY WARRANTY; without even the implied warranty of 1382792244SWarner Losh * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1482792244SWarner Losh * GNU General Public License for more details. 1582792244SWarner Losh * 1682792244SWarner Losh * You should have received a copy of the GNU General Public License 1782792244SWarner Losh * along with this program; if not, see <http://www.gnu.org/licenses/>. 1882792244SWarner Losh */ 19*9c092804SMarkus Armbruster 20*9c092804SMarkus Armbruster #ifndef TARGET_ARCH_VMPARAM_H 21*9c092804SMarkus Armbruster #define TARGET_ARCH_VMPARAM_H 2282792244SWarner Losh 2382792244SWarner Losh #include "cpu.h" 2482792244SWarner Losh 2582792244SWarner Losh /* compare to i386/include/vmparam.h */ 2682792244SWarner Losh #define TARGET_MAXTSIZ (128 * MiB) /* max text size */ 2782792244SWarner Losh #define TARGET_DFLDSIZ (128 * MiB) /* initial data size limit */ 2882792244SWarner Losh #define TARGET_MAXDSIZ (512 * MiB) /* max data size */ 2982792244SWarner Losh #define TARGET_DFLSSIZ (8 * MiB) /* initial stack size limit */ 3082792244SWarner Losh #define TARGET_MAXSSIZ (64 * MiB) /* max stack size */ 3182792244SWarner Losh #define TARGET_SGROWSIZ (128 * KiB) /* amount to grow stack */ 3282792244SWarner Losh 3382792244SWarner Losh #define TARGET_RESERVED_VA 0xf7000000 3482792244SWarner Losh 3582792244SWarner Losh #define TARGET_USRSTACK (0xbfc00000) 3682792244SWarner Losh get_sp_from_cpustate(CPUX86State * state)3782792244SWarner Loshstatic inline abi_ulong get_sp_from_cpustate(CPUX86State *state) 3882792244SWarner Losh { 3982792244SWarner Losh return state->regs[R_ESP]; 4082792244SWarner Losh } 4182792244SWarner Losh set_second_rval(CPUX86State * state,abi_ulong retval2)4282792244SWarner Loshstatic inline void set_second_rval(CPUX86State *state, abi_ulong retval2) 4382792244SWarner Losh { 4482792244SWarner Losh state->regs[R_EDX] = retval2; 4582792244SWarner Losh } 4682792244SWarner Losh 47*9c092804SMarkus Armbruster #endif /* TARGET_ARCH_VMPARAM_H */ 48