Merge tag 'v9.0.0-rc3'
[qemu/ar7.git] / bsd-user / x86_64 / target_arch_vmparam.h
blob6797623a6ba29fa8834e8474d05f00b9756e8b46
1 /*
2 * Intel x86_64 VM parameters definitions
4 * Copyright (c) 2013 Stacey D. Son
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef TARGET_ARCH_VMPARAM_H
21 #define TARGET_ARCH_VMPARAM_H
23 #include "cpu.h"
25 /* compare to amd64/include/vmparam.h */
26 #define TARGET_MAXTSIZ (128 * MiB) /* max text size */
27 #define TARGET_DFLDSIZ (32 * GiB) /* initial data size limit */
28 #define TARGET_MAXDSIZ (32 * GiB) /* max data size */
29 #define TARGET_DFLSSIZ (8 * MiB) /* initial stack size limit */
30 #define TARGET_MAXSSIZ (512 * MiB) /* max stack size */
31 #define TARGET_SGROWSIZ (128 * KiB) /* amount to grow stack */
33 #define TARGET_VM_MAXUSER_ADDRESS (0x00007fffff000000UL)
35 #define TARGET_USRSTACK (TARGET_VM_MAXUSER_ADDRESS - TARGET_PAGE_SIZE)
37 static inline abi_ulong get_sp_from_cpustate(CPUX86State *state)
39 return state->regs[R_ESP];
42 static inline void set_second_rval(CPUX86State *state, abi_ulong retval2)
44 state->regs[R_EDX] = retval2;
47 #endif /* TARGET_ARCH_VMPARAM_H */